From 27c3ff4af50b1ae0019d2bdf08352886372eaf10 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Thu, 3 Aug 2023 17:19:02 -0400 Subject: [PATCH 01/74] Fix RESOURCE_EXHAUSTED in KeySetWrite (#28456) * Fix RESOURCE_EXHAUSTED in KeySetWrite * Restyled by prettier-yaml --------- Co-authored-by: tennessee.carmelveilleux@gmail.com Co-authored-by: Restyled.io Co-authored-by: Andrei Litvin --- .../group-key-mgmt-server.cpp | 6 + .../suites/TestGroupKeyManagementCluster.yaml | 19 ++ .../chip-tool/zap-generated/test/Commands.h | 238 +++++++++------ .../zap-generated/test/Commands.h | 288 ++++++++++-------- 4 files changed, 332 insertions(+), 219 deletions(-) diff --git a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp index 8edf8810f70c4b..9ff43d9a2ef834 100644 --- a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp +++ b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp @@ -500,6 +500,12 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( // Set KeySet err = provider->SetKeySet(fabric->GetFabricIndex(), compressed_fabric_id, keyset); + if (CHIP_ERROR_INVALID_LIST_LENGTH == err) + { + commandObj->AddStatusAndLogIfFailure(commandPath, Status::ResourceExhausted, "Not enough space left to add a new KeySet"); + return true; + } + if (CHIP_NO_ERROR == err) { ChipLogDetail(Zcl, "GroupKeyManagementCluster: KeySetWrite OK"); diff --git a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml index 034bdfd0a9a7b5..cc69380fa16796 100644 --- a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml +++ b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml @@ -538,6 +538,25 @@ tests: # Note: There's always an IPK keyset with index 0 contains: [0x01a1, 0x01a2, 0] + - label: "Write one keyset too many when already full" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x0222, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf", + EpochStartTime0: 3110000, + EpochKey1: "\xe1\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef", + EpochStartTime1: 3110001, + EpochKey2: "\xf1\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", + EpochStartTime2: 3110002, + } + response: + error: RESOURCE_EXHAUSTED + - label: "Write Group Keys (invalid)" command: "writeAttribute" attribute: "GroupKeyMap" diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 0ab94dafd7c628..d157cf5183082c 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -113404,7 +113404,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand { public: TestGroupKeyManagementClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestGroupKeyManagementCluster", 63, credsIssuerConfig) + TestCommand("TestGroupKeyManagementCluster", 64, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113562,18 +113562,21 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } break; case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); break; case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113602,7 +113605,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113647,7 +113650,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113676,7 +113679,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113721,7 +113724,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113730,7 +113733,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113739,7 +113742,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); } break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113748,7 +113751,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); } break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113757,7 +113760,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 260U)); } break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113766,7 +113769,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 261U)); } break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113835,7 +113838,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113918,7 +113921,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113945,7 +113948,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114028,13 +114031,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 46: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; - case 47: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -114055,7 +114058,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); } break; - case 48: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -114076,7 +114079,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); } break; - case 49: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; @@ -114085,7 +114088,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; - case 50: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114140,10 +114143,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 51: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 52: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114156,14 +114159,11 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -114178,6 +114178,9 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 60: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114194,10 +114197,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 61: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 62: + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114886,7 +114889,42 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } case 28: { - LogStep(28, "Write Group Keys (invalid)"); + LogStep(28, "Write one keyset too many when already full"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 546U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\321\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 3110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\341\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 3110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\361\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 3110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 29: { + LogStep(29, "Write Group Keys (invalid)"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114904,8 +114942,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 29: { - LogStep(29, "Write Group Keys (too many)"); + case 30: { + LogStep(30, "Write Group Keys (too many)"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114975,8 +115013,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 30: { - LogStep(30, "Write Group Keys on alpha"); + case 31: { + LogStep(31, "Write Group Keys on alpha"); ListFreer listFreer; chip::app::DataModel::List value; @@ -115006,8 +115044,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 31: { - LogStep(31, "Write Group Keys on beta"); + case 32: { + LogStep(32, "Write Group Keys on beta"); ListFreer listFreer; chip::app::DataModel::List value; @@ -115037,28 +115075,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 32: { - LogStep(32, "Read Group Keys on alpha"); + case 33: { + LogStep(33, "Read Group Keys on alpha"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 33: { - LogStep(33, "Read Group Keys on alpha without fabric filtering"); + case 34: { + LogStep(34, "Read Group Keys on alpha without fabric filtering"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); } - case 34: { - LogStep(34, "Read Group Keys on beta"); + case 35: { + LogStep(35, "Read Group Keys on beta"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 35: { - LogStep(35, "Read Group Keys on beta without fabric filtering"); + case 36: { + LogStep(36, "Read Group Keys on beta without fabric filtering"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); } - case 36: { - LogStep(36, "Add Group 1"); + case 37: { + LogStep(37, "Add Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 257U; @@ -115067,8 +115105,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 37: { - LogStep(37, "Add Group 2"); + case 38: { + LogStep(38, "Add Group 2"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 258U; @@ -115077,8 +115115,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 38: { - LogStep(38, "Add Group 3"); + case 39: { + LogStep(39, "Add Group 3"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 259U; @@ -115087,8 +115125,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 39: { - LogStep(39, "Add Group 4"); + case 40: { + LogStep(40, "Add Group 4"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 260U; @@ -115097,8 +115135,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 40: { - LogStep(40, "Add Group 5"); + case 41: { + LogStep(41, "Add Group 5"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 261U; @@ -115107,28 +115145,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 41: { - LogStep(41, "Read GroupTable from alpha"); + case 42: { + LogStep(42, "Read GroupTable from alpha"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 42: { - LogStep(42, "Read GroupTable from alpha without fabric filtering"); + case 43: { + LogStep(43, "Read GroupTable from alpha without fabric filtering"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); } - case 43: { - LogStep(43, "Read GroupTable from beta"); + case 44: { + LogStep(44, "Read GroupTable from beta"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 44: { - LogStep(44, "Read GroupTable from beta without fabric filtering"); + case 45: { + LogStep(45, "Read GroupTable from beta without fabric filtering"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); } - case 45: { - LogStep(45, "KeySet Remove 1"); + case 46: { + LogStep(46, "KeySet Remove 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 417U; @@ -115137,8 +115175,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 46: { - LogStep(46, "KeySet Read (removed)"); + case 47: { + LogStep(47, "KeySet Read (removed)"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 417U; @@ -115147,8 +115185,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 47: { - LogStep(47, "KeySet Read (not removed) CacheAndSync"); + case 48: { + LogStep(48, "KeySet Read (not removed) CacheAndSync"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; @@ -115158,8 +115196,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 48: { - LogStep(48, "KeySet Read (not removed) TrustFirst"); + case 49: { + LogStep(49, "KeySet Read (not removed) TrustFirst"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; @@ -115169,8 +115207,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 49: { - LogStep(49, "Remove Group 1"); + case 50: { + LogStep(50, "Remove Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveGroup::Type value; value.groupID = 257U; @@ -115179,13 +115217,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 50: { - LogStep(50, "Read GroupTable 2"); + case 51: { + LogStep(51, "Read GroupTable 2"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 51: { - LogStep(51, "Remove All"); + case 52: { + LogStep(52, "Remove All"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, @@ -115193,13 +115231,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 52: { - LogStep(52, "Read GroupTable 3"); + case 53: { + LogStep(53, "Read GroupTable 3"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 53: { - LogStep(53, "KeySet Remove 2"); + case 54: { + LogStep(54, "KeySet Remove 2"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 418U; @@ -115208,8 +115246,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 54: { - LogStep(54, "KeySet Read (also removed)"); + case 55: { + LogStep(55, "KeySet Read (also removed)"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 418U; @@ -115218,8 +115256,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 55: { - LogStep(55, "KeySet Write 1"); + case 56: { + LogStep(56, "KeySet Write 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -115253,8 +115291,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 56: { - LogStep(56, "KeySet Write 2 CacheAndSync"); + case 57: { + LogStep(57, "KeySet Write 2 CacheAndSync"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -115289,8 +115327,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 57: { - LogStep(57, "KeySet Write 2 TrustFirst"); + case 58: { + LogStep(58, "KeySet Write 2 TrustFirst"); VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -115325,8 +115363,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 58: { - LogStep(58, "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2"); + case 59: { + LogStep(59, "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2"); ListFreer listFreer; chip::app::DataModel::List value; @@ -115352,8 +115390,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 59: { - LogStep(59, "Remove keyset 1"); + case 60: { + LogStep(60, "Remove keyset 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 417U; @@ -115362,13 +115400,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 60: { - LogStep(60, "TH verifies GroupKeyMap entries for KeySet 1 have been removed"); + case 61: { + LogStep(61, "TH verifies GroupKeyMap entries for KeySet 1 have been removed"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 61: { - LogStep(61, "Remove keyset 2"); + case 62: { + LogStep(62, "Remove keyset 2"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 418U; @@ -115377,8 +115415,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 62: { - LogStep(62, "TH verifies GroupKeyMap entries for KeySet 2 have been removed"); + case 63: { + LogStep(63, "TH verifies GroupKeyMap entries for KeySet 2 have been removed"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 5f4ad1bcda5777..e753c024da9f07 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -175828,160 +175828,164 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { err = TestKeySetReadAllIndices_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Write Group Keys (invalid)\n"); - err = TestWriteGroupKeysInvalid_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Write one keyset too many when already full\n"); + err = TestWriteOneKeysetTooManyWhenAlreadyFull_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Write Group Keys (too many)\n"); - err = TestWriteGroupKeysTooMany_29(); + ChipLogProgress(chipTool, " ***** Test Step 29 : Write Group Keys (invalid)\n"); + err = TestWriteGroupKeysInvalid_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Write Group Keys on alpha\n"); - err = TestWriteGroupKeysOnAlpha_30(); + ChipLogProgress(chipTool, " ***** Test Step 30 : Write Group Keys (too many)\n"); + err = TestWriteGroupKeysTooMany_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Write Group Keys on beta\n"); - err = TestWriteGroupKeysOnBeta_31(); + ChipLogProgress(chipTool, " ***** Test Step 31 : Write Group Keys on alpha\n"); + err = TestWriteGroupKeysOnAlpha_31(); break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Read Group Keys on alpha\n"); - err = TestReadGroupKeysOnAlpha_32(); + ChipLogProgress(chipTool, " ***** Test Step 32 : Write Group Keys on beta\n"); + err = TestWriteGroupKeysOnBeta_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read Group Keys on alpha without fabric filtering\n"); - err = TestReadGroupKeysOnAlphaWithoutFabricFiltering_33(); + ChipLogProgress(chipTool, " ***** Test Step 33 : Read Group Keys on alpha\n"); + err = TestReadGroupKeysOnAlpha_33(); break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Read Group Keys on beta\n"); - err = TestReadGroupKeysOnBeta_34(); + ChipLogProgress(chipTool, " ***** Test Step 34 : Read Group Keys on alpha without fabric filtering\n"); + err = TestReadGroupKeysOnAlphaWithoutFabricFiltering_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read Group Keys on beta without fabric filtering\n"); - err = TestReadGroupKeysOnBetaWithoutFabricFiltering_35(); + ChipLogProgress(chipTool, " ***** Test Step 35 : Read Group Keys on beta\n"); + err = TestReadGroupKeysOnBeta_35(); break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Add Group 1\n"); - err = TestAddGroup1_36(); + ChipLogProgress(chipTool, " ***** Test Step 36 : Read Group Keys on beta without fabric filtering\n"); + err = TestReadGroupKeysOnBetaWithoutFabricFiltering_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Add Group 2\n"); - err = TestAddGroup2_37(); + ChipLogProgress(chipTool, " ***** Test Step 37 : Add Group 1\n"); + err = TestAddGroup1_37(); break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Add Group 3\n"); - err = TestAddGroup3_38(); + ChipLogProgress(chipTool, " ***** Test Step 38 : Add Group 2\n"); + err = TestAddGroup2_38(); break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Add Group 4\n"); - err = TestAddGroup4_39(); + ChipLogProgress(chipTool, " ***** Test Step 39 : Add Group 3\n"); + err = TestAddGroup3_39(); break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Add Group 5\n"); - err = TestAddGroup5_40(); + ChipLogProgress(chipTool, " ***** Test Step 40 : Add Group 4\n"); + err = TestAddGroup4_40(); break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Read GroupTable from alpha\n"); - err = TestReadGroupTableFromAlpha_41(); + ChipLogProgress(chipTool, " ***** Test Step 41 : Add Group 5\n"); + err = TestAddGroup5_41(); break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Read GroupTable from alpha without fabric filtering\n"); - err = TestReadGroupTableFromAlphaWithoutFabricFiltering_42(); + ChipLogProgress(chipTool, " ***** Test Step 42 : Read GroupTable from alpha\n"); + err = TestReadGroupTableFromAlpha_42(); break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Read GroupTable from beta\n"); - err = TestReadGroupTableFromBeta_43(); + ChipLogProgress(chipTool, " ***** Test Step 43 : Read GroupTable from alpha without fabric filtering\n"); + err = TestReadGroupTableFromAlphaWithoutFabricFiltering_43(); break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Read GroupTable from beta without fabric filtering\n"); - err = TestReadGroupTableFromBetaWithoutFabricFiltering_44(); + ChipLogProgress(chipTool, " ***** Test Step 44 : Read GroupTable from beta\n"); + err = TestReadGroupTableFromBeta_44(); break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : KeySet Remove 1\n"); - err = TestKeySetRemove1_45(); + ChipLogProgress(chipTool, " ***** Test Step 45 : Read GroupTable from beta without fabric filtering\n"); + err = TestReadGroupTableFromBetaWithoutFabricFiltering_45(); break; case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : KeySet Read (removed)\n"); - err = TestKeySetReadRemoved_46(); + ChipLogProgress(chipTool, " ***** Test Step 46 : KeySet Remove 1\n"); + err = TestKeySetRemove1_46(); break; case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : KeySet Read (not removed) CacheAndSync\n"); + ChipLogProgress(chipTool, " ***** Test Step 47 : KeySet Read (removed)\n"); + err = TestKeySetReadRemoved_47(); + break; + case 48: + ChipLogProgress(chipTool, " ***** Test Step 48 : KeySet Read (not removed) CacheAndSync\n"); if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetReadNotRemovedCacheAndSync_47(); + err = TestKeySetReadNotRemovedCacheAndSync_48(); break; - case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : KeySet Read (not removed) TrustFirst\n"); + case 49: + ChipLogProgress(chipTool, " ***** Test Step 49 : KeySet Read (not removed) TrustFirst\n"); if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetReadNotRemovedTrustFirst_48(); - break; - case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Remove Group 1\n"); - err = TestRemoveGroup1_49(); + err = TestKeySetReadNotRemovedTrustFirst_49(); break; case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Read GroupTable 2\n"); - err = TestReadGroupTable2_50(); + ChipLogProgress(chipTool, " ***** Test Step 50 : Remove Group 1\n"); + err = TestRemoveGroup1_50(); break; case 51: - ChipLogProgress(chipTool, " ***** Test Step 51 : Remove All\n"); - err = TestRemoveAll_51(); + ChipLogProgress(chipTool, " ***** Test Step 51 : Read GroupTable 2\n"); + err = TestReadGroupTable2_51(); break; case 52: - ChipLogProgress(chipTool, " ***** Test Step 52 : Read GroupTable 3\n"); - err = TestReadGroupTable3_52(); + ChipLogProgress(chipTool, " ***** Test Step 52 : Remove All\n"); + err = TestRemoveAll_52(); break; case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : KeySet Remove 2\n"); - err = TestKeySetRemove2_53(); + ChipLogProgress(chipTool, " ***** Test Step 53 : Read GroupTable 3\n"); + err = TestReadGroupTable3_53(); break; case 54: - ChipLogProgress(chipTool, " ***** Test Step 54 : KeySet Read (also removed)\n"); - err = TestKeySetReadAlsoRemoved_54(); + ChipLogProgress(chipTool, " ***** Test Step 54 : KeySet Remove 2\n"); + err = TestKeySetRemove2_54(); break; case 55: - ChipLogProgress(chipTool, " ***** Test Step 55 : KeySet Write 1\n"); - err = TestKeySetWrite1_55(); + ChipLogProgress(chipTool, " ***** Test Step 55 : KeySet Read (also removed)\n"); + err = TestKeySetReadAlsoRemoved_55(); break; case 56: - ChipLogProgress(chipTool, " ***** Test Step 56 : KeySet Write 2 CacheAndSync\n"); + ChipLogProgress(chipTool, " ***** Test Step 56 : KeySet Write 1\n"); + err = TestKeySetWrite1_56(); + break; + case 57: + ChipLogProgress(chipTool, " ***** Test Step 57 : KeySet Write 2 CacheAndSync\n"); if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetWrite2CacheAndSync_56(); + err = TestKeySetWrite2CacheAndSync_57(); break; - case 57: - ChipLogProgress(chipTool, " ***** Test Step 57 : KeySet Write 2 TrustFirst\n"); + case 58: + ChipLogProgress(chipTool, " ***** Test Step 58 : KeySet Write 2 TrustFirst\n"); if (ShouldSkip("!GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetWrite2TrustFirst_57(); - break; - case 58: - ChipLogProgress(chipTool, " ***** Test Step 58 : Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2\n"); - err = TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_58(); + err = TestKeySetWrite2TrustFirst_58(); break; case 59: - ChipLogProgress(chipTool, " ***** Test Step 59 : Remove keyset 1\n"); - err = TestRemoveKeyset1_59(); + ChipLogProgress(chipTool, " ***** Test Step 59 : Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2\n"); + err = TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_59(); break; case 60: - ChipLogProgress(chipTool, " ***** Test Step 60 : TH verifies GroupKeyMap entries for KeySet 1 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_60(); + ChipLogProgress(chipTool, " ***** Test Step 60 : Remove keyset 1\n"); + err = TestRemoveKeyset1_60(); break; case 61: - ChipLogProgress(chipTool, " ***** Test Step 61 : Remove keyset 2\n"); - err = TestRemoveKeyset2_61(); + ChipLogProgress(chipTool, " ***** Test Step 61 : TH verifies GroupKeyMap entries for KeySet 1 have been removed\n"); + err = TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_61(); break; case 62: - ChipLogProgress(chipTool, " ***** Test Step 62 : TH verifies GroupKeyMap entries for KeySet 2 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_62(); + ChipLogProgress(chipTool, " ***** Test Step 62 : Remove keyset 2\n"); + err = TestRemoveKeyset2_62(); + break; + case 63: + ChipLogProgress(chipTool, " ***** Test Step 63 : TH verifies GroupKeyMap entries for KeySet 2 have been removed\n"); + err = TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_63(); break; } @@ -176079,13 +176083,13 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); break; case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -176133,10 +176137,10 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -176157,10 +176161,10 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -176183,6 +176187,9 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 63: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -176196,7 +176203,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 63; + const uint16_t mTestCount = 64; chip::Optional mNodeId; chip::Optional mCluster; @@ -177185,7 +177192,50 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysInvalid_28() + CHIP_ERROR TestWriteOneKeysetTooManyWhenAlreadyFull_28() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:546U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\321\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:3110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\341\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:3110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\361\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:3110002ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Write one keyset too many when already full Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteGroupKeysInvalid_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177220,7 +177270,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysTooMany_29() + CHIP_ERROR TestWriteGroupKeysTooMany_30() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177320,7 +177370,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysOnAlpha_30() + CHIP_ERROR TestWriteGroupKeysOnAlpha_31() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177366,7 +177416,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysOnBeta_31() + CHIP_ERROR TestWriteGroupKeysOnBeta_32() { MTRBaseDevice * device = GetDevice("beta"); @@ -177412,7 +177462,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnAlpha_32() + CHIP_ERROR TestReadGroupKeysOnAlpha_33() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177474,7 +177524,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_33() + CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_34() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177568,7 +177618,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnBeta_34() + CHIP_ERROR TestReadGroupKeysOnBeta_35() { MTRBaseDevice * device = GetDevice("beta"); @@ -177630,7 +177680,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_35() + CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_36() { MTRBaseDevice * device = GetDevice("beta"); @@ -177724,7 +177774,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup1_36() + CHIP_ERROR TestAddGroup1_37() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177756,7 +177806,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup2_37() + CHIP_ERROR TestAddGroup2_38() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177788,7 +177838,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup3_38() + CHIP_ERROR TestAddGroup3_39() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177820,7 +177870,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup4_39() + CHIP_ERROR TestAddGroup4_40() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177852,7 +177902,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup5_40() + CHIP_ERROR TestAddGroup5_41() { MTRBaseDevice * device = GetDevice("beta"); @@ -177884,7 +177934,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromAlpha_41() + CHIP_ERROR TestReadGroupTableFromAlpha_42() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177973,7 +178023,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_42() + CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_43() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178077,7 +178127,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBeta_43() + CHIP_ERROR TestReadGroupTableFromBeta_44() { MTRBaseDevice * device = GetDevice("beta"); @@ -178121,7 +178171,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_44() + CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_45() { MTRBaseDevice * device = GetDevice("beta"); @@ -178225,7 +178275,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove1_45() + CHIP_ERROR TestKeySetRemove1_46() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178248,7 +178298,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadRemoved_46() + CHIP_ERROR TestKeySetReadRemoved_47() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178275,7 +178325,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_47() + CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_48() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178326,7 +178376,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_48() + CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_49() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178377,7 +178427,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveGroup1_49() + CHIP_ERROR TestRemoveGroup1_50() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178408,7 +178458,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable2_50() + CHIP_ERROR TestReadGroupTable2_51() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178482,7 +178532,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveAll_51() + CHIP_ERROR TestRemoveAll_52() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178500,7 +178550,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable3_52() + CHIP_ERROR TestReadGroupTable3_53() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178529,7 +178579,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove2_53() + CHIP_ERROR TestKeySetRemove2_54() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178552,7 +178602,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadAlsoRemoved_54() + CHIP_ERROR TestKeySetReadAlsoRemoved_55() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178579,7 +178629,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite1_55() + CHIP_ERROR TestKeySetWrite1_56() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178619,7 +178669,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2CacheAndSync_56() + CHIP_ERROR TestKeySetWrite2CacheAndSync_57() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178659,7 +178709,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2TrustFirst_57() + CHIP_ERROR TestKeySetWrite2TrustFirst_58() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178699,7 +178749,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_58() + CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_59() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178740,7 +178790,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset1_59() + CHIP_ERROR TestRemoveKeyset1_60() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178763,7 +178813,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_60() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_61() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178801,7 +178851,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset2_61() + CHIP_ERROR TestRemoveKeyset2_62() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178824,7 +178874,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_62() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_63() { MTRBaseDevice * device = GetDevice("alpha"); From 45e971530d949b0e3e568686054bdec5f2186bc1 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Thu, 3 Aug 2023 22:18:23 -0400 Subject: [PATCH 02/74] Power source: Implementation of dynamic endpoint list setter (#28110) * Implementation of dynamic endpoint list setter Test: tested by adding a call to set endpoint list in all clusters with chip-tool. Also see TestPowerSourceCluster.cpp * Restyled by whitespace * Restyled by gn * Remove the define Some platforms run these tests, but don't have that define defined. Instead, just change the function name to test only. * Address review comments * free is being called, man, where's the leak? * Restyled by clang-format * Address some review comments. * Fix leak. * Deal with zero-length arrays. * shutdown -> clear * Use EncodeList for list * test fix. * types need to match --------- Co-authored-by: Restyled.io --- .../power-source-server.cpp | 181 +++++++++- .../power-source-server/power-source-server.h | 66 ++++ src/app/tests/BUILD.gn | 14 + src/app/tests/TestPowerSourceCluster.cpp | 339 ++++++++++++++++++ 4 files changed, 583 insertions(+), 17 deletions(-) create mode 100644 src/app/clusters/power-source-server/power-source-server.h create mode 100644 src/app/tests/TestPowerSourceCluster.cpp diff --git a/src/app/clusters/power-source-server/power-source-server.cpp b/src/app/clusters/power-source-server/power-source-server.cpp index a5163df93b2895..b09e25d7ad75b5 100644 --- a/src/app/clusters/power-source-server/power-source-server.cpp +++ b/src/app/clusters/power-source-server/power-source-server.cpp @@ -19,32 +19,82 @@ * @brief Implementation for the Power Source Server Cluster ***************************************************************************/ +#include "power-source-server.h" + #include #include -#include -#include #include #include #include +#include using namespace chip; -using namespace chip::app; -using namespace chip::app::Clusters; -using namespace chip::app::Clusters::PowerSource::Attributes; +using namespace app; +using namespace app::Clusters; +using namespace app::Clusters::PowerSource::Attributes; namespace { -class PowerSourceAttrAccess : public AttributeAccessInterface +struct PowerSourceClusterInfo { -public: - // Register on all endpoints. - PowerSourceAttrAccess() : AttributeAccessInterface(Optional::Missing(), PowerSource::Id) {} - - CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + PowerSourceClusterInfo() : mClusterEndpoint(kInvalidEndpointId) {} + explicit PowerSourceClusterInfo(EndpointId powerClusterEndpointId) : mClusterEndpoint(powerClusterEndpointId) {} + void Clear() + { + mBuf.Free(); + mEndpointList = Span(); + } + CHIP_ERROR SetEndpointList(Span endpointList) + { + Clear(); + if (endpointList.size() == 0) + { + mEndpointList = Span(); + return CHIP_NO_ERROR; + } + mBuf.Calloc(endpointList.size()); + if (mBuf.Get() == nullptr) + { + return CHIP_ERROR_NO_MEMORY; + } + memcpy(mBuf.Get(), endpointList.data(), endpointList.size() * sizeof(EndpointId)); + mEndpointList = Span(mBuf.Get(), endpointList.size()); + return CHIP_NO_ERROR; + } + EndpointId mClusterEndpoint = kInvalidEndpointId; + Platform::ScopedMemoryBuffer mBuf; + Span mEndpointList; }; +PowerSourceServer gPowerSourceServer; + PowerSourceAttrAccess gAttrAccess; +#ifdef ZCL_USING_POWER_SOURCE_CLUSTER_SERVER +#define POWER_SERVER_NUM_SUPPORTED_ENDPOINTS \ + (EMBER_AF_POWER_SOURCE_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) +#else +#define POWER_SERVER_NUM_SUPPORTED_ENDPOINTS CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT +#endif +static constexpr size_t kNumSupportedEndpoints = POWER_SERVER_NUM_SUPPORTED_ENDPOINTS; + +#if POWER_SERVER_NUM_SUPPORTED_ENDPOINTS > 0 +PowerSourceClusterInfo sPowerSourceClusterInfo[kNumSupportedEndpoints] = {}; +#else +PowerSourceClusterInfo * sPowerSourceClusterInfo = nullptr; +#endif + +} // anonymous namespace + +void MatterPowerSourcePluginServerInitCallback() +{ + registerAttributeAccessOverride(&gAttrAccess); +} + +namespace chip { +namespace app { +namespace Clusters { + CHIP_ERROR PowerSourceAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -55,10 +105,25 @@ CHIP_ERROR PowerSourceAttrAccess::Read(const ConcreteReadAttributePath & aPath, // TODO: Needs implementation. err = aEncoder.EncodeEmptyList(); break; - case EndpointList::Id: - // TODO: Needs implementation and a way to allow dynamic endpoints to register endpoints - err = aEncoder.EncodeEmptyList(); + case EndpointList::Id: { + PowerSourceServer & server = PowerSourceServer::Instance(); + const Span * span = server.GetEndpointList(aPath.mEndpointId); + if (span == nullptr) + { + err = aEncoder.EncodeEmptyList(); + } + else + { + err = aEncoder.EncodeList([span](const auto & encoder) -> CHIP_ERROR { + for (auto id : *span) + { + ReturnErrorOnFailure(encoder.Encode(id)); + } + return CHIP_NO_ERROR; + }); + } break; + } default: break; } @@ -66,9 +131,91 @@ CHIP_ERROR PowerSourceAttrAccess::Read(const ConcreteReadAttributePath & aPath, return err; } -} // anonymous namespace +PowerSourceAttrAccess & TestOnlyGetPowerSourceAttrAccess() +{ + return gAttrAccess; +} -void MatterPowerSourcePluginServerInitCallback() +PowerSourceServer & PowerSourceServer::Instance() { - registerAttributeAccessOverride(&gAttrAccess); + return gPowerSourceServer; +} + +// Caller does not need to retain the span past the call point as these are copied into an internal storage +CHIP_ERROR PowerSourceServer::SetEndpointList(EndpointId powerSourceClusterEndpoint, Span endpointList) +{ + // TODO: should check here that the power source cluster exists on the endpoint, but for now let's take the caller's word + // for it + + size_t idx = PowerSourceClusterEndpointIndex(powerSourceClusterEndpoint); + if (idx >= kNumSupportedEndpoints) + { + idx = NextEmptyIndex(); + } + if (idx >= kNumSupportedEndpoints) + { + return CHIP_ERROR_NO_MEMORY; + } + + sPowerSourceClusterInfo[idx].Clear(); + if (endpointList.size() == 0) + { + sPowerSourceClusterInfo[idx] = PowerSourceClusterInfo(); + } + else + { + sPowerSourceClusterInfo[idx] = PowerSourceClusterInfo(powerSourceClusterEndpoint); + sPowerSourceClusterInfo[idx].SetEndpointList(endpointList); + } + return CHIP_NO_ERROR; +} +const Span * PowerSourceServer::GetEndpointList(EndpointId powerSourceClusterEndpoint) const +{ + size_t idx = PowerSourceClusterEndpointIndex(powerSourceClusterEndpoint); + if (idx != std::numeric_limits::max()) + { + return &sPowerSourceClusterInfo[idx].mEndpointList; + } + return nullptr; +} + +void PowerSourceServer::Shutdown() +{ + for (size_t i = 0; i < kNumSupportedEndpoints; ++i) + { + sPowerSourceClusterInfo[i].Clear(); + } +} + +size_t PowerSourceServer::GetNumSupportedEndpointLists() const +{ + return kNumSupportedEndpoints; } + +size_t PowerSourceServer::PowerSourceClusterEndpointIndex(EndpointId endpointId) const +{ + for (size_t i = 0; i < kNumSupportedEndpoints; ++i) + { + if (sPowerSourceClusterInfo[i].mClusterEndpoint == endpointId) + { + return i; + } + } + return std::numeric_limits::max(); +} + +size_t PowerSourceServer::NextEmptyIndex() const +{ + for (size_t i = 0; i < kNumSupportedEndpoints; ++i) + { + if (sPowerSourceClusterInfo[i].mClusterEndpoint == kInvalidEndpointId) + { + return i; + } + } + return std::numeric_limits::max(); +} + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/power-source-server/power-source-server.h b/src/app/clusters/power-source-server/power-source-server.h new file mode 100644 index 00000000000000..a02f54cd5375c1 --- /dev/null +++ b/src/app/clusters/power-source-server/power-source-server.h @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { + +class PowerSourceServer +{ +public: + static PowerSourceServer & Instance(); + + // Caller does not need to retain the span past the call point as these are copied into an internal storage + CHIP_ERROR SetEndpointList(EndpointId powerSourceClusterEndpoint, Span endpointList); + CHIP_ERROR ClearEndpointList(EndpointId powerSourceClusterEndpoint) + { + return SetEndpointList(powerSourceClusterEndpoint, Span()); + } + // returns nullptr if there's not endpoint list set for this power source cluster endpoint id. + const Span * GetEndpointList(EndpointId powerSourceClusterEndpoint) const; + void Shutdown(); + size_t GetNumSupportedEndpointLists() const; + +private: + // Both return std::numeric_limits::max() for not found + size_t PowerSourceClusterEndpointIndex(EndpointId endpointId) const; + size_t NextEmptyIndex() const; +}; + +class PowerSourceAttrAccess : public AttributeAccessInterface +{ +public: + // Register on all endpoints. + PowerSourceAttrAccess() : AttributeAccessInterface(Optional::Missing(), PowerSource::Id) {} + + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; +}; + +PowerSourceAttrAccess & TestOnlyGetPowerSourceAttrAccess(); + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 90b4796fef3c47..9078702fb983e9 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -78,6 +78,18 @@ source_set("time-sync-data-provider-test-srcs") { ] } +source_set("power-cluster-test-srcs") { + sources = [ + "${chip_root}/src/app/clusters/power-source-server/power-source-server.cpp", + ] + + public_deps = [ + "${chip_root}/src/app/common:cluster-objects", + "${chip_root}/src/app/util/mock:mock_ember", + "${chip_root}/src/lib/core", + ] +} + source_set("scenes-table-test-srcs") { sources = [ "${chip_root}/src/app/clusters/scenes-server/ExtensionFieldSets.h", @@ -133,6 +145,7 @@ chip_test_suite("tests") { "TestNumericAttributeTraits.cpp", "TestOperationalStateDelegate.cpp", "TestPendingNotificationMap.cpp", + "TestPowerSourceCluster.cpp", "TestReadInteraction.cpp", "TestReportingEngine.cpp", "TestSceneTable.cpp", @@ -183,6 +196,7 @@ chip_test_suite("tests") { ":binding-test-srcs", ":operational-state-test-srcs", ":ota-requestor-test-srcs", + ":power-cluster-test-srcs", ":scenes-table-test-srcs", ":time-sync-data-provider-test-srcs", "${chip_root}/src/app", diff --git a/src/app/tests/TestPowerSourceCluster.cpp b/src/app/tests/TestPowerSourceCluster.cpp new file mode 100644 index 00000000000000..e224571a45780d --- /dev/null +++ b/src/app/tests/TestPowerSourceCluster.cpp @@ -0,0 +1,339 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "lib/support/CHIPMem.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace chip { +namespace app { + +class TestPowerSourceCluster +{ +public: + static void TestEndpointList(nlTestSuite * apSuite, void * apContext); +}; + +std::vector ReadEndpointsThroughAttributeReader(nlTestSuite * apSuite, EndpointId endpoint) +{ + Clusters::PowerSourceAttrAccess & attrAccess = Clusters::TestOnlyGetPowerSourceAttrAccess(); + CHIP_ERROR err = CHIP_NO_ERROR; + + // Write TLV through the attribute access interface into the buffer + + // Buffer setup + constexpr size_t buflen = 128; + uint8_t buf[buflen]; + memset(buf, 0, buflen); + + // Create the builders + TLV::TLVWriter tlvWriter; + tlvWriter.Init(buf); + + AttributeReportIBs::Builder builder; + builder.Init(&tlvWriter); + + ConcreteAttributePath path(endpoint, Clusters::PowerSource::Id, Clusters::PowerSource::Attributes::EndpointList::Id); + ConcreteReadAttributePath readPath(path); + chip::DataVersion dataVersion(0); + AttributeValueEncoder aEncoder(builder, 0, path, dataVersion); + + err = attrAccess.Read(readPath, aEncoder); + + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + // Read out from the buffer. This comes back as a nested struct + // AttributeReportIBs is a list of + // AttributeReportIB structs containing + // AttributeDataIB struct, which holds DataVersion (tag 0), AttributePathIB (tag 1) and Data (tag 2) + + TLV::TLVReader reader; + reader.Init(buf); + + TLV::TLVReader attrReportsReader; + TLV::TLVReader attrReportReader; + TLV::TLVReader attrDataReader; + + reader.Next(); + reader.OpenContainer(attrReportsReader); + + attrReportsReader.Next(); + attrReportsReader.OpenContainer(attrReportReader); + + attrReportReader.Next(); + attrReportReader.OpenContainer(attrDataReader); + + // We're now in the attribute data IB, skip to the desired tag, we want TagNum = 2 + attrDataReader.Next(); + for (int i = 0; i < 3 && !(IsContextTag(attrDataReader.GetTag()) && TagNumFromTag(attrDataReader.GetTag()) == 2); ++i) + { + attrDataReader.Next(); + } + NL_TEST_ASSERT(apSuite, IsContextTag(attrDataReader.GetTag())); + NL_TEST_ASSERT(apSuite, TagNumFromTag(attrDataReader.GetTag()) == 2); + + // OK, we should be in the right spot now, let's decode the list. + Clusters::PowerSource::Attributes::EndpointList::TypeInfo::DecodableType list; + err = list.Decode(attrDataReader); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + std::vector ret; + auto iter = list.begin(); + while (iter.Next()) + { + ret.push_back(iter.GetValue()); + } + return ret; +} + +void TestPowerSourceCluster::TestEndpointList(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + Clusters::PowerSourceServer & powerSourceServer = Clusters::PowerSourceServer::Instance(); + + // test that when we read everything we get an empty list as nothing has been set up yet + for (EndpointId i = 0; i < 11; ++i) + { + std::vector vec = ReadEndpointsThroughAttributeReader(apSuite, i); + NL_TEST_ASSERT(apSuite, vec.size() == 0); + } + + if (powerSourceServer.GetNumSupportedEndpointLists() < 2 || + powerSourceServer.GetNumSupportedEndpointLists() > std::numeric_limits::max()) + { + // Test assumes at least two endpoints. This runs on linux, not worthwhile to run on platforms with fewer endpoints. + return; + } + + // ***************** + // Test setting, getting and reading through the attribute access interface + // ***************** + EndpointId list0[5] = { 1, 2, 3, 4, 5 }; + EndpointId list1[10] = { 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; + EndpointId listRest[1] = { 2 }; + + // we checked earlier that this fit + // This test just uses endpoints in order, so we want to set endpoints from + // 0 to numEndpoints - 1, and use this for overflow checking + EndpointId numEndpoints = static_cast(powerSourceServer.GetNumSupportedEndpointLists()); + + // Endpoint 0 - list of 5 + err = powerSourceServer.SetEndpointList(0, Span(list0)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + const Span * readBack = powerSourceServer.GetEndpointList(0); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 5); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list0[i]); + } + + // Endpoint 1 - list of 10 + err = powerSourceServer.SetEndpointList(1, Span(list1)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(1); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 10); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list1[i]); + } + + // Remaining endpoints - list of 1 + for (EndpointId ep = 2; ep < numEndpoints; ++ep) + { + err = powerSourceServer.SetEndpointList(ep, Span(listRest)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(ep); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 1); + if (readBack->size() == 1) + { + NL_TEST_ASSERT(apSuite, readBack->data()[0] == listRest[0]); + } + } + + // ***************** + // Check for out of memory error when setting too many endpoints + // ***************** + // pick a random endpoint number for the power cluster - it doesn't matter, we don't have space anyway. + err = powerSourceServer.SetEndpointList(55, Span(listRest)); + NL_TEST_ASSERT(apSuite, err == CHIP_ERROR_NO_MEMORY); + + // ***************** + // Recheck getting and reading after OOM + // ***************** + // EP0 + readBack = powerSourceServer.GetEndpointList(0); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 5); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list0[i]); + } + + // EP1 + readBack = powerSourceServer.GetEndpointList(1); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 10); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list1[i]); + } + + // Remaining endpoints + for (EndpointId ep = 2; ep < numEndpoints; ++ep) + { + readBack = powerSourceServer.GetEndpointList(ep); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 1); + if (readBack->size() == 1) + { + NL_TEST_ASSERT(apSuite, readBack->data()[0] == listRest[0]); + } + } + + // ***************** + // Test overwriting + // ***************** + // Overwrite a list + err = powerSourceServer.SetEndpointList(1, Span(listRest)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(1); + NL_TEST_ASSERT(apSuite, readBack->size() == 1); + if (readBack->size() == 1) + { + NL_TEST_ASSERT(apSuite, readBack->data()[0] == listRest[0]); + } + + // Ensure only the overwritten list was changed, using read interface + for (EndpointId ep = 0; ep < numEndpoints + 1; ++ep) + { + std::vector vec = ReadEndpointsThroughAttributeReader(apSuite, ep); + if (ep == 0) + { + NL_TEST_ASSERT(apSuite, vec.size() == 5); + for (size_t j = 0; j < vec.size(); ++j) + { + NL_TEST_ASSERT(apSuite, vec[j] == list0[j]); + } + } + else if (ep == numEndpoints) + { + NL_TEST_ASSERT(apSuite, vec.size() == 0); + } + else + { + NL_TEST_ASSERT(apSuite, vec.size() == 1); + if (vec.size() == 1) + { + NL_TEST_ASSERT(apSuite, vec[0] == listRest[0]); + } + } + } + + // ***************** + // Test removal + // ***************** + for (EndpointId ep = 0; ep < numEndpoints; ++ep) + { + err = powerSourceServer.SetEndpointList(ep, Span()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(ep); + NL_TEST_ASSERT(apSuite, readBack == nullptr); + } + + // Check through the read interface + for (EndpointId ep = 0; ep < numEndpoints + 1; ++ep) + { + std::vector vec = ReadEndpointsThroughAttributeReader(apSuite, ep); + NL_TEST_ASSERT(apSuite, vec.size() == 0); + } +} + +} // namespace app +} // namespace chip + +namespace { + +/** + * Test Suite. It lists all the test functions. + */ + +// clang-format off +const nlTest sTests[] = +{ + NL_TEST_DEF("TestEndpointList", chip::app::TestPowerSourceCluster::TestEndpointList), + NL_TEST_SENTINEL() +}; +// clang-format on + +/** + * Set up the test suite. + */ +int TestPowerSourceClusterContext_Setup(void * inContext) +{ + CHIP_ERROR error = chip::Platform::MemoryInit(); + if (error != CHIP_NO_ERROR) + return FAILURE; + return SUCCESS; +} + +/** + * Tear down the test suite. + */ +int TestPowerSourceClusterContext_Teardown(void * inContext) +{ + chip::app::Clusters::PowerSourceServer::Instance().Shutdown(); + chip::Platform::MemoryShutdown(); + return SUCCESS; +} + +// clang-format off +nlTestSuite sSuite = +{ + "TestPowerSourceCluster", + &sTests[0], + TestPowerSourceClusterContext_Setup, + TestPowerSourceClusterContext_Teardown +}; +// clang-format on + +} // namespace + +int TestPowerSource() +{ + nlTestRunner(&sSuite, nullptr); + return nlTestRunnerStats(&sSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestPowerSource) From fc595053e66bd120c6b74d77630a408ea0740f7f Mon Sep 17 00:00:00 2001 From: crlonxp <88241281+crlonxp@users.noreply.github.com> Date: Fri, 4 Aug 2023 10:31:31 +0800 Subject: [PATCH 03/74] * Refine the laundry-washer-control server implementation and add laundry-washer-controls-delegate-impl (#28264) * * Refine the laundry-washer-control server implementation * Add laundry-washer-controls-delegate-impl Signed-off-by: Chin-Ran Lo * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Update src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h Co-authored-by: Boris Zbarsky * Update examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h Co-authored-by: Boris Zbarsky * * Remove the unused code and refine the comment Signed-off-by: Chin-Ran Lo * Update examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h Co-authored-by: Arkadiusz Bokowy * Restyled by clang-format --------- Signed-off-by: Chin-Ran Lo Co-authored-by: Restyled.io Co-authored-by: Boris Zbarsky Co-authored-by: Arkadiusz Bokowy --- .../laundry-washer-controls-delegate-impl.h | 55 ++++++++++++++++++ .../laundry-washer-controls-delegate-impl.cpp | 56 +++++++++++++++++++ examples/all-clusters-app/linux/BUILD.gn | 1 + .../all-clusters-app/linux/main-common.cpp | 8 +++ .../laundry-washer-controls-delegate.h | 17 +++--- .../laundry-washer-controls-server.cpp | 11 ++-- .../laundry-washer-controls-server.h | 38 +------------ 7 files changed, 136 insertions(+), 50 deletions(-) create mode 100644 examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h create mode 100644 examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp diff --git a/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h new file mode 100644 index 00000000000000..15a72482726ba0 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace LaundryWasherControls { + +/** + * The application delegate to statically define the options. + */ + +class LaundryWasherControlDelegate : public Delegate +{ + static const CharSpan spinSpeedsNameOptions[]; + static const NumberOfRinsesEnum supportRinsesOptions[]; + static LaundryWasherControlDelegate instance; + +public: + CHIP_ERROR GetSpinSpeedAtIndex(size_t index, MutableCharSpan & spinSpeed); + CHIP_ERROR GetSupportedRinseAtIndex(size_t index, NumberOfRinsesEnum & supportedRinse); + + LaundryWasherControlDelegate() = default; + ~LaundryWasherControlDelegate() = default; + + static inline LaundryWasherControlDelegate & getLaundryWasherControlDelegate() { return instance; } +}; + +} // namespace LaundryWasherControls +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp new file mode 100644 index 00000000000000..6c70ef98cb4736 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include + +using namespace chip; +using namespace chip::app::Clusters::LaundryWasherControls; + +const CharSpan LaundryWasherControlDelegate::spinSpeedsNameOptions[] = { + CharSpan::fromCharString("Off"), + CharSpan::fromCharString("Low"), + CharSpan::fromCharString("Medium"), + CharSpan::fromCharString("High"), +}; + +const NumberOfRinsesEnum LaundryWasherControlDelegate::supportRinsesOptions[] = { + NumberOfRinsesEnum::kNormal, + NumberOfRinsesEnum::kExtra, +}; + +LaundryWasherControlDelegate LaundryWasherControlDelegate::instance; + +CHIP_ERROR LaundryWasherControlDelegate::GetSpinSpeedAtIndex(size_t index, MutableCharSpan & spinSpeed) +{ + if (index >= ArraySize(spinSpeedsNameOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + return chip::CopyCharSpanToMutableCharSpan(LaundryWasherControlDelegate::spinSpeedsNameOptions[index], spinSpeed); +} + +CHIP_ERROR LaundryWasherControlDelegate::GetSupportedRinseAtIndex(size_t index, NumberOfRinsesEnum & supportedRinse) +{ + if (index >= ArraySize(supportRinsesOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + supportedRinse = LaundryWasherControlDelegate::supportRinsesOptions[index]; + return CHIP_NO_ERROR; +} diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index 72cd65ba55bc9e..766b482e5a4600 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -26,6 +26,7 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/dishwasher-alarm-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegates.cpp", diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index 727bddb955056b..71e86397ce7120 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -20,6 +20,7 @@ #include "WindowCoveringManager.h" #include "dishwasher-mode.h" #include "include/tv-callbacks.h" +#include "laundry-washer-controls-delegate-impl.h" #include "laundry-washer-mode.h" #include "rvc-modes.h" #include "tcc-mode.h" @@ -27,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -205,6 +207,12 @@ void ApplicationShutdown() } } +using namespace chip::app::Clusters::LaundryWasherControls; +void emberAfLaundryWasherControlsClusterInitCallback(EndpointId endpoint) +{ + LaundryWasherControlsServer::SetDefaultDelegate(1, &LaundryWasherControlDelegate::getLaundryWasherControlDelegate()); +} + void emberAfLowPowerClusterInitCallback(EndpointId endpoint) { ChipLogProgress(NotSpecified, "Setting LowPower default delegate to global manager"); diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h index 5529413a40cb88..c90923c775e5f3 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h @@ -35,20 +35,19 @@ class Delegate virtual ~Delegate() = default; /** - * Get the list of supported spin_speed list. - * Fills in the provided spin_speed at index `index` if there is one, - * or returns CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of spin_speed. - * @param index The index of the spin_speed, with 0 representing the first one. - * @param spinSpeed The spin speed is filled. + * Get the spin speed string at the given index in the list. + * @param index The index of the spin speed, with 0 representing the first one. + * @param spinSpeed The MutableCharSpan to copy the string data into. On success, the callee must update + * the length to the length of the copied data. + * @return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of spin speeds. */ virtual CHIP_ERROR GetSpinSpeedAtIndex(size_t index, MutableCharSpan & spinSpeed) = 0; /** - * Get the list of supported rinses list. - * Fills in the provided rinses at index `index` if there is one, - * or returns CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of rinses. + * Get the supported rinses value at the given index in the list. * @param index The index of the supported rinses with 0 representing the first one. - * @param supportedRinse The supported rinse is filled. + * @param supportedRinse The supported rinse at the given index + * @return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of supported rinses. */ virtual CHIP_ERROR GetSupportedRinseAtIndex(size_t index, NumberOfRinsesEnum & supportedRinse) = 0; }; diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp index 76832e4c091eb8..f7cb0cd06d42a6 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp @@ -83,14 +83,13 @@ LaundryWasherControlsServer & LaundryWasherControlsServer::Instance() return sInstance; } -EmberAfStatus LaundryWasherControlsServer::SetSpinSpeedCurrent(EndpointId endpointId, - DataModel::Nullable newSpinSpeedCurrent) +EmberAfStatus LaundryWasherControlsServer::SetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable spinSpeedCurrent) { - DataModel::Nullable spinSpeedCurrent; - EmberAfStatus res = SpinSpeedCurrent::Get(endpointId, spinSpeedCurrent); - if ((res == EMBER_ZCL_STATUS_SUCCESS) && (spinSpeedCurrent != newSpinSpeedCurrent)) + DataModel::Nullable spinSpeedCurrentNow; + EmberAfStatus res = SpinSpeedCurrent::Get(endpointId, spinSpeedCurrentNow); + if ((res == EMBER_ZCL_STATUS_SUCCESS) && (spinSpeedCurrentNow != spinSpeedCurrent)) { - res = SpinSpeedCurrent::Set(endpointId, newSpinSpeedCurrent); + res = SpinSpeedCurrent::Set(endpointId, spinSpeedCurrent); } return res; diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h index ac9b4ca0b7f209..f01069135b3e7c 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h @@ -42,51 +42,19 @@ class LaundryWasherControlsServer : public AttributeAccessInterface * Set the default delegate of laundry washer server at endpoint x * @param endpoint ID of the endpoint * @param delegate The default delegate at the endpoint - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error code. */ static void SetDefaultDelegate(EndpointId endpoint, Delegate * delegate); /** - * Init the laundry washer server. - * @param void - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error code. - */ - // CHIP_ERROR Init(); - - /** - * @brief Set the attribute newSpinSpeedCurrent - * - * @param endpointId ID of the endpoint - * @param newSpinSpeedCurrent attribute SpinSpeedCurrent - * @return true on success, false on failure - */ - EmberAfStatus SetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable newSpinSpeedCurrent); - - /** - * @brief Get the attribute newSpinSpeedCurrent - * - * @param endpointId ID of the endpoint - * @param SpinSpeedCurrent attribute SpinSpeedCurrent - * @return true on success, false on failure + * API to set/get the SpinSpeedCurrent attribute */ + EmberAfStatus SetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable spinSpeedCurrent); EmberAfStatus GetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable & spinSpeedCurrent); /** - * @brief Set the attribute NumberOfRinses - * - * @param endpointId ID of the endpoint - * @param newNumberOfRinses attribute NumberOfRinses - * @return true on success, false on failure + * API to set/get the NumberOfRinses attribute */ EmberAfStatus SetNumberOfRinses(EndpointId endpointId, NumberOfRinsesEnum newNumberOfRinses); - - /** - * @brief Get the attribute NumberOfRinses - * - * @param endpointId ID of the endpoint - * @param NumberOfRinses attribute NumberOfRinses - * @return true on success, false on failure - */ EmberAfStatus GetNumberOfRinses(EndpointId endpointId, NumberOfRinsesEnum & numberOfRinses); private: From 6a5f7047b63df400fb9c2e41bcb7794fb880fdac Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 4 Aug 2023 00:41:27 -0400 Subject: [PATCH 04/74] Fix selector for status update on CHIPToolDeviceControllerDelegate. (#28506) This did not get correctly updated in https://github.com/project-chip/connectedhomeip/pull/23665, so it was not getting the status update callbacks. --- .../commands/pairing/DeviceControllerDelegateBridge.h | 1 + .../commands/pairing/DeviceControllerDelegateBridge.mm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h index 334d2339536b15..04d65bdf565db0 100644 --- a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h +++ b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h @@ -28,6 +28,7 @@ @property MTRDeviceController * commissioner; @property MTRCommissioningParameters * params; +- (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status; - (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError *)error; - (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError *)error; diff --git a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm index b5166d8b707b54..b3476119c224b5 100644 --- a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm @@ -23,7 +23,7 @@ @interface CHIPToolDeviceControllerDelegate () @end @implementation CHIPToolDeviceControllerDelegate -- (void)onStatusUpdate:(MTRCommissioningStatus)status +- (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status { NSLog(@"Pairing Status Update: %tu", status); switch (status) { From 14bdc24baafbef23a4eeb3606483f13347160639 Mon Sep 17 00:00:00 2001 From: Wang Qixiang <43193572+wqx6@users.noreply.github.com> Date: Fri, 4 Aug 2023 13:04:55 +0800 Subject: [PATCH 05/74] [app] Add option to disable read client (#28149) * app : Add option to disable Read Client * Restyled by gn * Format changes * Restyled by clang-format --------- Co-authored-by: Restyled.io --- config/esp32/components/chip/CMakeLists.txt | 4 ++++ config/esp32/components/chip/Kconfig | 6 ++++++ .../lighting-app/esp32/sdkconfig.defaults | 3 +++ examples/lighting-app/linux/args.gni | 2 ++ src/app/AttributePathParams.h | 2 ++ src/app/BUILD.gn | 14 +++++++++---- src/app/BufferedReadCallback.h | 2 ++ src/app/ClusterStateCache.h | 6 ++++-- src/app/InteractionModelEngine.cpp | 14 +++++++++++++ src/app/InteractionModelEngine.h | 8 ++++++++ src/app/ReadClient.h | 6 ++++-- src/app/common_flags.gni | 1 + src/controller/BUILD.gn | 20 ++++++++++++------- src/controller/CHIPCluster.h | 2 ++ src/controller/CHIPDeviceController.h | 12 +++++++++-- src/controller/ReadInteraction.h | 2 ++ src/controller/TypedReadCallback.h | 2 ++ 17 files changed, 89 insertions(+), 17 deletions(-) diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index dfda6287ccb60e..6aa824bdcba6f3 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -124,6 +124,10 @@ if(CONFIG_DISABLE_IPV4) chip_gn_arg_append("chip_inet_config_enable_ipv4" "false") endif() +if(CONFIG_DISABLE_READ_CLIENT) + chip_gn_arg_append("chip_enable_read_client" "false") +endif() + if(CHIP_CODEGEN_PREGEN_DIR) chip_gn_arg_append("chip_code_pre_generated_directory" "\"${CHIP_CODEGEN_PREGEN_DIR}\"") endif() diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 99de12afa97e6e..5c871c2d043a30 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -108,6 +108,12 @@ menu "CHIP Core" help Matter spec is based on IPv6 communication only. Enabling this option may save some flash/ram. + config DISABLE_READ_CLIENT + bool "Disable read client in Interaction Model" + default n + help + Some device types don't require the read client. Enabling this option may save some flash/ram. + config BUILD_CHIP_TESTS bool "Build CHIP tests" default n diff --git a/examples/lighting-app/esp32/sdkconfig.defaults b/examples/lighting-app/esp32/sdkconfig.defaults index 59c0af656896f0..f87a164ae41dd2 100644 --- a/examples/lighting-app/esp32/sdkconfig.defaults +++ b/examples/lighting-app/esp32/sdkconfig.defaults @@ -58,3 +58,6 @@ CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Disable Read Client +CONFIG_DISABLE_READ_CLIENT=y diff --git a/examples/lighting-app/linux/args.gni b/examples/lighting-app/linux/args.gni index d07e8c87cdb15c..4c205a5cef34a5 100644 --- a/examples/lighting-app/linux/args.gni +++ b/examples/lighting-app/linux/args.gni @@ -27,3 +27,5 @@ chip_project_config_include_dirs = chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] matter_enable_tracing_support = true + +chip_enable_read_client = false diff --git a/src/app/AttributePathParams.h b/src/app/AttributePathParams.h index adfc77cfe27830..b03153d71c2e2f 100644 --- a/src/app/AttributePathParams.h +++ b/src/app/AttributePathParams.h @@ -24,7 +24,9 @@ namespace chip { namespace app { +#if CHIP_CONFIG_ENABLE_READ_CLIENT class ReadClient; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT struct AttributePathParams { // diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 312a53aa6ee1a7..f5a167ca7e7aff 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -58,6 +58,7 @@ buildconfig_header("app_buildconfig") { "CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION=${chip_subscription_timeout_resumption}", "CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE=${enable_eventlist_attribute}", "CHIP_CONFIG_ENABLE_ICD_SERVER=${chip_enable_icd_server}", + "CHIP_CONFIG_ENABLE_READ_CLIENT=${chip_enable_read_client}", ] } @@ -76,7 +77,6 @@ static_library("app") { "AttributePathExpandIterator.h", "AttributePathParams.h", "AttributePersistenceProvider.h", - "BufferedReadCallback.cpp", "CASEClient.cpp", "CASEClient.h", "CASEClientPool.h", @@ -84,8 +84,6 @@ static_library("app") { "CASESessionManager.h", "ChunkedWriteCallback.cpp", "ChunkedWriteCallback.h", - "ClusterStateCache.cpp", - "ClusterStateCache.h", "CommandHandler.cpp", "CommandResponseHelper.h", "CommandSender.cpp", @@ -179,7 +177,6 @@ static_library("app") { "OperationalSessionSetup.cpp", "OperationalSessionSetup.h", "OperationalSessionSetupPool.h", - "ReadClient.cpp", "ReadHandler.cpp", "RequiredPrivilege.cpp", "RequiredPrivilege.h", @@ -210,6 +207,15 @@ static_library("app") { ] } + if (chip_enable_read_client) { + sources += [ + "BufferedReadCallback.cpp", + "ClusterStateCache.cpp", + "ClusterStateCache.h", + "ReadClient.cpp", + ] + } + public_deps = [ ":app_config", "${chip_root}/src/access", diff --git a/src/app/BufferedReadCallback.h b/src/app/BufferedReadCallback.h index 7779446f5a78fd..0616bb09958348 100644 --- a/src/app/BufferedReadCallback.h +++ b/src/app/BufferedReadCallback.h @@ -25,6 +25,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace app { @@ -133,3 +134,4 @@ class BufferedReadCallback : public ReadClient::Callback } // namespace app } // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/app/ClusterStateCache.h b/src/app/ClusterStateCache.h index e0d5d98d72a5ec..9e08abacde7768 100644 --- a/src/app/ClusterStateCache.h +++ b/src/app/ClusterStateCache.h @@ -33,6 +33,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace app { /* @@ -660,5 +661,6 @@ class ClusterStateCache : protected ReadClient::Callback const bool mCacheData = true; }; -}; // namespace app -}; // namespace chip +}; // namespace app +}; // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 933b5a4c118254..23aaf9d85d03be 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -108,6 +108,7 @@ void InteractionModelEngine::Shutdown() mReadHandlers.ReleaseAll(); +#if CHIP_CONFIG_ENABLE_READ_CLIENT // Shut down any subscription clients that are still around. They won't be // able to work after this point anyway, since we're about to drop our refs // to them. @@ -134,6 +135,7 @@ void InteractionModelEngine::Shutdown() // After that, we just null out our tracker. // mpActiveReadClientList = nullptr; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT for (auto & writeHandler : mWriteHandlers) { @@ -254,6 +256,7 @@ uint32_t InteractionModelEngine::GetNumActiveWriteHandlers() const return numActive; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT CHIP_ERROR InteractionModelEngine::ShutdownSubscription(const ScopedNodeId & aPeerNodeId, SubscriptionId aSubscriptionId) { assertChipStackLockedByCurrentThread(); @@ -311,6 +314,7 @@ void InteractionModelEngine::ShutdownMatchingSubscriptions(const OptionalOnMessageReceived(apExchangeContext, aPayloadHeader, std::move(aPayload)); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT Status InteractionModelEngine::OnUnsolicitedReportData(Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) { @@ -849,6 +854,7 @@ Status InteractionModelEngine::OnUnsolicitedReportData(Messaging::ExchangeContex return Status::InvalidSubscription; } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT CHIP_ERROR InteractionModelEngine::OnUnsolicitedMessageReceived(const PayloadHeader & payloadHeader, ExchangeDelegate *& newDelegate) @@ -892,10 +898,12 @@ CHIP_ERROR InteractionModelEngine::OnMessageReceived(Messaging::ExchangeContext status = OnReadInitialRequest(apExchangeContext, aPayloadHeader, std::move(aPayload), ReadHandler::InteractionType::Subscribe); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT else if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::ReportData)) { status = OnUnsolicitedReportData(apExchangeContext, aPayloadHeader, std::move(aPayload)); } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT else if (aPayloadHeader.HasMessageType(MsgType::TimedRequest)) { OnTimedRequest(apExchangeContext, aPayloadHeader, std::move(aPayload), status); @@ -920,11 +928,13 @@ void InteractionModelEngine::OnResponseTimeout(Messaging::ExchangeContext * ec) ChipLogValueExchange(ec)); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT void InteractionModelEngine::AddReadClient(ReadClient * apReadClient) { apReadClient->SetNextClient(mpActiveReadClientList); mpActiveReadClientList = apReadClient; } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT bool InteractionModelEngine::TrimFabricForSubscriptions(FabricIndex aFabricIndex, bool aForceEvict) { @@ -1322,6 +1332,7 @@ Protocols::InteractionModel::Status InteractionModelEngine::EnsureResourceForRea return Status::Success; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT void InteractionModelEngine::RemoveReadClient(ReadClient * apReadClient) { ReadClient * pPrevListItem = nullptr; @@ -1380,6 +1391,7 @@ bool InteractionModelEngine::InActiveReadClientList(ReadClient * apReadClient) return false; } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT bool InteractionModelEngine::HasConflictWriteRequests(const WriteHandler * apWriteHandler, const ConcreteAttributePath & aPath) { @@ -1738,6 +1750,7 @@ void InteractionModelEngine::OnFabricRemoved(const FabricTable & fabricTable, Fa return Loop::Continue; }); +#if CHIP_CONFIG_ENABLE_READ_CLIENT for (auto * readClient = mpActiveReadClientList; readClient != nullptr; readClient = readClient->GetNextClient()) { if (readClient->GetFabricIndex() == fabricIndex) @@ -1746,6 +1759,7 @@ void InteractionModelEngine::OnFabricRemoved(const FabricTable & fabricTable, Fa readClient->Close(CHIP_ERROR_IM_FABRIC_DELETED, false); } } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT for (auto & handler : mWriteHandlers) { diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index 6236ff63efc5ec..57e4c66475757f 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -129,6 +129,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, */ CASESessionManager * GetCASESessionManager() const { return mpCASESessionMgr; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT /** * Tears down an active subscription. * @@ -151,6 +152,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, * Tears down all active subscriptions. */ void ShutdownAllSubscriptions(); +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT uint32_t GetNumActiveReadHandlers() const; uint32_t GetNumActiveReadHandlers(ReadHandler::InteractionType type) const; @@ -234,6 +236,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, void OnTimedWrite(TimedHandler * apTimedHandler, Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload); +#if CHIP_CONFIG_ENABLE_READ_CLIENT /** * Add a read client to the internally tracked list of weak references. This list is used to * correctly dispatch unsolicited reports to the right matching handler by subscription ID. @@ -254,6 +257,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, * Return the number of active read clients being tracked by the engine. */ size_t GetNumActiveReadClients(); +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT /** * Returns the number of dirty subscriptions. Including the subscriptions that are generating reports. @@ -348,6 +352,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, // void ShutdownActiveReads() { +#if CHIP_CONFIG_ENABLE_READ_CLIENT for (auto * readClient = mpActiveReadClientList; readClient != nullptr;) { readClient->mpImEngine = nullptr; @@ -361,6 +366,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, // After that, we just null out our tracker. // mpActiveReadClientList = nullptr; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT mReadHandlers.ReleaseAll(); } @@ -599,7 +605,9 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, ObjectPool mReadHandlers; +#if CHIP_CONFIG_ENABLE_READ_CLIENT ReadClient * mpActiveReadClientList = nullptr; +#endif ReadHandler::ApplicationCallback * mpReadHandlerApplicationCallback = nullptr; diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index 502e08eaa65a6a..71844713ff1461 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -49,6 +49,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace app { @@ -613,5 +614,6 @@ class ReadClient : public Messaging::ExchangeDelegate kReservedSizeForEndOfContainer + kReservedSizeForIMRevision + kReservedSizeForEndOfContainer; }; -}; // namespace app -}; // namespace chip +}; // namespace app +}; // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/app/common_flags.gni b/src/app/common_flags.gni index 1d4309810d57e8..5e5a82afd7d5e1 100644 --- a/src/app/common_flags.gni +++ b/src/app/common_flags.gni @@ -15,4 +15,5 @@ declare_args() { # Temporary flag for interaction model and echo protocols, set it to true to enable chip_app_use_echo = false + chip_enable_read_client = true } diff --git a/src/controller/BUILD.gn b/src/controller/BUILD.gn index 3172c1815a1271..9fcbca7ea451e2 100644 --- a/src/controller/BUILD.gn +++ b/src/controller/BUILD.gn @@ -13,6 +13,8 @@ # limitations under the License. import("//build_overrides/chip.gni") +import("${chip_root}/src/app/common_flags.gni") +import("${chip_root}/src/lib/lib.gni") import("${chip_root}/src/platform/device.gni") import("${chip_root}/src/platform/python.gni") @@ -21,15 +23,13 @@ static_library("controller") { sources = [ "CHIPCluster.h" ] - if (chip_controller) { + if (chip_controller && chip_build_controller) { sources += [ "AbstractDnssdDiscoveryController.cpp", "AutoCommissioner.cpp", "AutoCommissioner.h", "CHIPCommissionableNodeController.cpp", "CHIPCommissionableNodeController.h", - "CHIPDeviceController.cpp", - "CHIPDeviceController.h", "CHIPDeviceControllerFactory.cpp", "CHIPDeviceControllerFactory.h", "CommissioneeDeviceProxy.cpp", @@ -37,10 +37,6 @@ static_library("controller") { "CommissionerDiscoveryController.cpp", "CommissionerDiscoveryController.h", "CommissioningDelegate.cpp", - "CommissioningWindowOpener.cpp", - "CommissioningWindowOpener.h", - "CurrentFabricRemover.cpp", - "CurrentFabricRemover.h", "DeviceDiscoveryDelegate.h", "DevicePairingDelegate.h", "EmptyDataModelHandler.cpp", @@ -49,6 +45,16 @@ static_library("controller") { "SetUpCodePairer.cpp", "SetUpCodePairer.h", ] + if (chip_enable_read_client) { + sources += [ + "CHIPDeviceController.cpp", + "CHIPDeviceController.h", + "CommissioningWindowOpener.cpp", + "CommissioningWindowOpener.h", + "CurrentFabricRemover.cpp", + "CurrentFabricRemover.h", + ] + } } cflags = [ "-Wconversion" ] diff --git a/src/controller/CHIPCluster.h b/src/controller/CHIPCluster.h index ab37a52ece8e24..4324092871424b 100644 --- a/src/controller/CHIPCluster.h +++ b/src/controller/CHIPCluster.h @@ -221,6 +221,7 @@ class DLL_EXPORT ClusterBase return WriteAttribute(requestData, context, successCb, failureCb, NullOptional, doneCb, aDataVersion); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT /** * Read an attribute and get a type-safe callback with the attribute value. */ @@ -399,6 +400,7 @@ class DLL_EXPORT ClusterBase onSubscriptionEstablishedCb, onResubscriptionAttemptCb, aKeepPreviousSubscriptions, aIsUrgentEvent); } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT protected: Messaging::ExchangeManager & mExchangeManager; diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 9fd8d1cfe7ee03..2d85fdce3068e4 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -384,8 +384,10 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY // make this commissioner discoverable public Protocols::UserDirectedCommissioning::InstanceNameResolver, #endif - public SessionEstablishmentDelegate, - public app::ClusterStateCache::Callback +#if CHIP_CONFIG_ENABLE_READ_CLIENT + public app::ClusterStateCache::Callback, +#endif + public SessionEstablishmentDelegate { public: DeviceCommissioner(); @@ -683,8 +685,10 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, void RegisterPairingDelegate(DevicePairingDelegate * pairingDelegate) { mPairingDelegate = pairingDelegate; } DevicePairingDelegate * GetPairingDelegate() const { return mPairingDelegate; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT // ClusterStateCache::Callback impl void OnDone(app::ReadClient *) override; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT // Issue an NOC chain using the associated OperationalCredentialsDelegate. The NOC chain will // be provided in X509 DER format. @@ -915,11 +919,13 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, void SendCommissioningReadRequest(DeviceProxy * proxy, Optional timeout, app::AttributePathParams * readPaths, size_t readPathsSize); +#if CHIP_CONFIG_ENABLE_READ_CLIENT // Parsers for the two different read clients void ParseCommissioningInfo(); void ParseFabrics(); // Called by ParseCommissioningInfo void ParseTimeSyncInfo(ReadCommissioningInfo & info); +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT static CHIP_ERROR ConvertFromOperationalCertStatus(chip::app::Clusters::OperationalCredentials::NodeOperationalCertStatusEnum err); @@ -959,8 +965,10 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, nullptr; // Commissioning delegate that issued the PerformCommissioningStep command CompletionStatus commissioningCompletionStatus; +#if CHIP_CONFIG_ENABLE_READ_CLIENT Platform::UniquePtr mAttributeCache; Platform::UniquePtr mReadClient; +#endif Credentials::AttestationVerificationResult mAttestationResult; Platform::UniquePtr mAttestationDeviceInfo; Credentials::DeviceAttestationVerifier * mDeviceAttestationVerifier = nullptr; diff --git a/src/controller/ReadInteraction.h b/src/controller/ReadInteraction.h index 88c1f902121de6..34491dd9edfebf 100644 --- a/src/controller/ReadInteraction.h +++ b/src/controller/ReadInteraction.h @@ -23,6 +23,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace Controller { namespace detail { @@ -328,3 +329,4 @@ CHIP_ERROR SubscribeEvent( } // namespace Controller } // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/controller/TypedReadCallback.h b/src/controller/TypedReadCallback.h index aa0e4394ad4e5e..f35a39670ee8e7 100644 --- a/src/controller/TypedReadCallback.h +++ b/src/controller/TypedReadCallback.h @@ -24,6 +24,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace Controller { @@ -290,3 +291,4 @@ class TypedReadEventCallback final : public app::ReadClient::Callback } // namespace Controller } // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT From 9c7b1c5425af520991f8a4289c917a103ca0f6d6 Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Thu, 3 Aug 2023 22:46:15 -0700 Subject: [PATCH 06/74] enable android platform configuration (#28451) --- src/platform/android/SystemPlatformConfig.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/android/SystemPlatformConfig.h b/src/platform/android/SystemPlatformConfig.h index 1c601906812edc..085d1e58f96e0b 100644 --- a/src/platform/android/SystemPlatformConfig.h +++ b/src/platform/android/SystemPlatformConfig.h @@ -41,4 +41,5 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS 1 +#define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 1 // ========== Platform-specific Configuration Overrides ========= From 5534c6d3fcf98d750b696704c9952c7b8b60511b Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 4 Aug 2023 02:56:10 -0400 Subject: [PATCH 07/74] Skip building python modules as part of Matter.framework build. (#28514) We don't need them there, but also they unconditionally pull in perfetto bits, which is also undesirable. --- src/darwin/Framework/chip_xcode_build_connector.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/darwin/Framework/chip_xcode_build_connector.sh b/src/darwin/Framework/chip_xcode_build_connector.sh index 888ae55c786e59..2127313659614c 100755 --- a/src/darwin/Framework/chip_xcode_build_connector.sh +++ b/src/darwin/Framework/chip_xcode_build_connector.sh @@ -96,6 +96,7 @@ declare -a args=( 'chip_build_tools=false' 'chip_build_tests=false' 'chip_enable_wifi=false' + 'chip_enable_python_modules=false' 'chip_log_message_max_size=4096' # might as well allow nice long log messages 'chip_disable_platform_kvs=true' 'enable_fuzz_test_targets=false' From a27f6a9f4ad955cc5c0b6a74b2136cf2d82899f1 Mon Sep 17 00:00:00 2001 From: mideayanghui <106149377+mideayanghui@users.noreply.github.com> Date: Fri, 4 Aug 2023 16:19:43 +0800 Subject: [PATCH 08/74] [mode-base-cluster]fix: build error while not enable On/Off cluster server (#28388) * fix build error while not enable onOff cluster server * fix include file bug --- src/app/clusters/mode-base-server/mode-base-server.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/clusters/mode-base-server/mode-base-server.cpp b/src/app/clusters/mode-base-server/mode-base-server.cpp index d2e56f172627dc..4495e728fc7ecb 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.cpp +++ b/src/app/clusters/mode-base-server/mode-base-server.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include using namespace chip; @@ -193,7 +194,7 @@ CHIP_ERROR Instance::Init() } } } - +#ifdef EMBER_AF_PLUGIN_ON_OFF_SERVER // OnMode with Power Up // If the On/Off feature is supported and the On/Off cluster attribute StartUpOnOff is present, with a // value of On (turn on at power up), then the CurrentMode attribute SHALL be set to the OnMode attribute @@ -227,7 +228,7 @@ CHIP_ERROR Instance::Init() } } } - +#endif // EMBER_AF_PLUGIN_ON_OFF_SERVER return CHIP_NO_ERROR; } From 32ed9c540553df77b6a402517ac6ac1eb0f9195d Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Fri, 4 Aug 2023 21:40:56 +0800 Subject: [PATCH 09/74] [Ameba] Update docker image (#28441) * Update Dockerfile * Update version --- integrations/docker/images/base/chip-build/version | 2 +- integrations/docker/images/stage-2/chip-build-ameba/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index 1776994de4304f..17e40cdd356a3d 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -3 : Update to gcc-10 +4 : [Ameba] Upgrade to c++17 diff --git a/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile b/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile index 07f8118b5f004d..af659cb7a08e0c 100644 --- a/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile @@ -4,7 +4,7 @@ LABEL org.opencontainers.image.source https://github.com/project-chip/connectedh # Setup Ameba ARG AMEBA_DIR=/opt/ameba -ARG TAG_NAME=ameba_update_2023_06_28 +ARG TAG_NAME=ameba_update_2023_08_01 RUN set -x \ && apt-get update \ && mkdir ${AMEBA_DIR} \ From 0e005ba0827391bf29a199aa9c21bf07ad022f7a Mon Sep 17 00:00:00 2001 From: Marius Tache <102153746+marius-alex-tache@users.noreply.github.com> Date: Fri, 4 Aug 2023 17:34:17 +0300 Subject: [PATCH 10/74] [K32W0] Use west tool to get SDK (#28431) Signed-off-by: Marius Tache --- integrations/docker/images/base/chip-build/version | 2 +- .../images/stage-2/chip-build-k32w/Dockerfile | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index 17e40cdd356a3d..dfab429dbd9f0a 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -4 : [Ameba] Upgrade to c++17 +5 : Use west to download the K32W0 SDK diff --git a/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile index 42e1dde62a56d9..dd629a9824c6ee 100644 --- a/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile @@ -11,15 +11,19 @@ RUN set -x \ && : # last line WORKDIR /opt/sdk -# Setup the K32W SDK + RUN set -x \ - && wget https://cache.nxp.com/lgfiles/bsps/SDK_2_6_11_K32W061DK6.zip \ - && unzip SDK_2_6_11_K32W061DK6.zip \ - && rm -rf SDK_2_6_11_K32W061DK6.zip \ + && python3 -m pip install -U --no-cache-dir west==1.0.0 \ + && west init -m https://github.com/nxp-mcuxpresso/mcux-sdk --mr "release/2.6.x_k32w0" \ + && west update \ + && chmod +x core/tools/imagetool/sign_images.sh \ + && ln -sf ../rtos core \ + && ln -sf ../middleware core \ + && cp -R examples/* core/boards && rm -rf examples \ && : # last line FROM ghcr.io/project-chip/chip-build:${VERSION} COPY --from=build /opt/sdk/ /opt/sdk/ -ENV NXP_K32W0_SDK_ROOT=/opt/sdk +ENV NXP_K32W0_SDK_ROOT=/opt/sdk/core From 6c95a745757ce63889c273b0470334a105a132d8 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Fri, 4 Aug 2023 22:40:10 +0800 Subject: [PATCH 11/74] [Ameba] Upgrade cpp17 (#28438) * fix cmake workaround for ameba - upgrade pigweed app to c++17 * Update Dockerfile * Update version * Move to chip-build-ameba version 4 instead of 1, to suppor c++17 --------- Co-authored-by: Andrei Litvin Co-authored-by: Andrei Litvin --- .github/workflows/examples-ameba.yaml | 2 +- examples/all-clusters-app/ameba/README.md | 4 ++-- examples/all-clusters-minimal-app/ameba/README.md | 4 ++-- examples/light-switch-app/ameba/README.md | 4 ++-- examples/lighting-app/ameba/README.md | 4 ++-- examples/ota-requestor-app/ameba/README.md | 4 ++-- examples/pigweed-app/ameba/README.md | 4 ++-- examples/pigweed-app/ameba/chip_main.cmake | 4 ++-- src/app/chip_data_model.cmake | 7 ------- 9 files changed, 15 insertions(+), 22 deletions(-) diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index c4c164f880cd0c..5ccb16bfab073a 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:1 + image: ghcr.io/project-chip/chip-build-ameba:4 options: --user root steps: diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index d02447ebfb6330..cb07a50deba7e1 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -27,11 +27,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md index 21d7c94f4859f0..f4ae242ea0aa05 100644 --- a/examples/all-clusters-minimal-app/ameba/README.md +++ b/examples/all-clusters-minimal-app/ameba/README.md @@ -27,13 +27,13 @@ The CHIP demo application is supported on - Pull docker image: ``` - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 ``` - Run docker container: ``` - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 ``` - Setup build environment: diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md index 03ee7caacb0447..8c45c2ee225d0c 100644 --- a/examples/light-switch-app/ameba/README.md +++ b/examples/light-switch-app/ameba/README.md @@ -26,11 +26,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index bd764b23558643..8297c2a3bb2dbc 100644 --- a/examples/lighting-app/ameba/README.md +++ b/examples/lighting-app/ameba/README.md @@ -23,11 +23,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md index cb175df24d9116..534db2f8b18b62 100644 --- a/examples/ota-requestor-app/ameba/README.md +++ b/examples/ota-requestor-app/ameba/README.md @@ -6,11 +6,11 @@ A prototype application that demonstrates OTA Requestor capabilities. - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/pigweed-app/ameba/README.md b/examples/pigweed-app/ameba/README.md index 77ea1e196429f7..4f6ed1830b6cce 100644 --- a/examples/pigweed-app/ameba/README.md +++ b/examples/pigweed-app/ameba/README.md @@ -31,11 +31,11 @@ following features are available: - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/pigweed-app/ameba/chip_main.cmake b/examples/pigweed-app/ameba/chip_main.cmake index e18ecb62bdf48c..1f0db465a6878b 100644 --- a/examples/pigweed-app/ameba/chip_main.cmake +++ b/examples/pigweed-app/ameba/chip_main.cmake @@ -100,9 +100,9 @@ list( APPEND chip_main_cpp_flags -Wno-unused-parameter - -std=gnu++17 + -std=c++17 -fno-rtti - -fno-use-cxa-atexit + -fno-use-cxa-atexit ) target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} ) target_compile_options(${chip_main} PRIVATE ${chip_main_cpp_flags}) diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index 8f0f7f82301cfc..63ebf1b4ef1eee 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -16,13 +16,6 @@ set(CHIP_APP_BASE_DIR ${CMAKE_CURRENT_LIST_DIR}) -if (NOT CHIP_ROOT) - # TODO: these are WORKAROUNDS and should be removed - if(DEFINED ameba_matter_root) - SET(CHIP_ROOT "${ameba_matter_root}") - endif() -endif() - include("${CHIP_ROOT}/build/chip/chip_codegen.cmake") # Configure ${APP_TARGET} with source files associated with ${CLUSTER} cluster From 7af8b1b041f224da25c99c92ce22dd2f71ad6f0b Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Fri, 4 Aug 2023 11:59:08 -0400 Subject: [PATCH 12/74] Remove ICDM cluster for lighting app (#28522) --- .../data_model/lighting-thread-app.matter | 61 ------------------ .../silabs/data_model/lighting-thread-app.zap | 62 ++++++++++++++++--- 2 files changed, 55 insertions(+), 68 deletions(-) diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 89681a67ce9e42..2745e2fd4d5092 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -1914,53 +1914,6 @@ server cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } -/** Allows servers to ensure that listed clients are notified when a server is available for communication. */ -server cluster IcdManagement = 70 { - bitmap Feature : BITMAP32 { - kCheckInProtocolSupport = 0x1; - } - - fabric_scoped struct MonitoringRegistrationStruct { - fabric_sensitive node_id checkInNodeID = 1; - fabric_sensitive int64u monitoredSubject = 2; - fabric_sensitive octet_string<16> key = 3; - fabric_idx fabricIndex = 254; - } - - readonly attribute int32u idleModeInterval = 0; - readonly attribute int32u activeModeInterval = 1; - readonly attribute int16u activeModeThreshold = 2; - readonly attribute access(read: administer) MonitoringRegistrationStruct registeredClients[] = 3; - readonly attribute access(read: administer) int32u ICDCounter = 4; - readonly attribute int16u clientsSupportedPerFabric = 5; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct RegisterClientRequest { - node_id checkInNodeID = 0; - INT64U monitoredSubject = 1; - OCTET_STRING<16> key = 2; - optional OCTET_STRING<16> verificationKey = 3; - } - - request struct UnregisterClientRequest { - node_id checkInNodeID = 0; - optional OCTET_STRING<16> verificationKey = 1; - } - - response struct RegisterClientResponse = 1 { - INT32U ICDCounter = 0; - } - - fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; - fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; - command access(invoke: manage) StayActiveRequest(): DefaultSuccess = 3; -} - /** Attributes and commands for controlling the color properties of a color-capable light. */ server cluster ColorControl = 768 { enum ColorLoopAction : ENUM8 { @@ -2463,20 +2416,6 @@ endpoint 0 { ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } - - server cluster IcdManagement { - callback attribute idleModeInterval default = 500; - callback attribute activeModeInterval default = 300; - callback attribute activeModeThreshold default = 300; - callback attribute registeredClients; - callback attribute ICDCounter; - callback attribute clientsSupportedPerFabric default = 1; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 1; - ram attribute clusterRevision default = 1; - } } endpoint 1 { device type dimmablelight = 257, version 1; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index 978b68609f1e6d..77ce7f1f3b2077 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5555,7 +5581,7 @@ "mfgCode": null, "define": "ICD_MANAGEMENT_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "RegisterClientResponse", @@ -5764,7 +5790,33 @@ ] }, { + "id": 2, "name": "MA-dimmablelight", + "deviceTypeRef": { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceTypeRefs": [ + 9 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -9103,18 +9155,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-dimmablelight", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 257 + "networkId": 0 } ], "log": [] From 104861d477286f4f5be85f44670d4de49b39a246 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:05:11 -0400 Subject: [PATCH 13/74] [Silabs] Rename SED build target to ICD for python scripts (#28504) * rename sed to icd in build targets * update txt tagets * rename targets --- .github/workflows/examples-efr32.yaml | 4 ++-- scripts/build/build/targets.py | 4 ++-- scripts/build/builders/efr32.py | 4 ++-- scripts/build/testdata/all_targets_linux_x64.txt | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 685a641e5a552a..b0e3eef9b3cbe7 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -67,7 +67,7 @@ jobs: "./scripts/build/build_examples.py \ --enable-flashbundle \ --target efr32-brd4187c-thermostat-openthread_mtd \ - --target efr32-brd4187c-switch-sed-shell-use_ot_coap_lib \ + --target efr32-brd4187c-switch-shell-use_ot_coap_lib \ --target efr32-brd4187c-unit-test \ build \ --copy-artifacts-to out/artifacts \ @@ -81,7 +81,7 @@ jobs: --enable-flashbundle \ --target efr32-brd4187c-light-use_ot_lib \ --target efr32-brd4187c-pump \ - --target efr32-brd4187c-lock-rpc-shell-enable_heap_monitoring \ + --target efr32-brd4187c-lock-shell-enable_heap_monitoring \ build \ --copy-artifacts-to out/artifacts \ " diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index b6bb80b2ebe5c7..609400764e0c72 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -237,8 +237,8 @@ def BuildEfr32Target(): target.AppendModifier('rpc', enable_rpcs=True) target.AppendModifier('with-ota-requestor', enable_ota_requestor=True) - target.AppendModifier('sed', enable_sed=True) - target.AppendModifier('low-power', enable_low_power=True).OnlyIfRe('-sed') + target.AppendModifier('icd', enable_icd=True) + target.AppendModifier('low-power', enable_low_power=True).OnlyIfRe('-icd') target.AppendModifier('shell', chip_build_libshell=True) target.AppendModifier('no_logging', chip_logging=False) target.AppendModifier('openthread_mtd', chip_openthread_ftd=False) diff --git a/scripts/build/builders/efr32.py b/scripts/build/builders/efr32.py index e45574accd3894..990f44993eb55d 100644 --- a/scripts/build/builders/efr32.py +++ b/scripts/build/builders/efr32.py @@ -140,7 +140,7 @@ def __init__(self, show_qr_code: bool = False, enable_rpcs: bool = False, enable_ota_requestor: bool = False, - enable_sed: bool = False, + enable_icd: bool = False, enable_low_power: bool = False, enable_wifi: bool = False, enable_rs911x: bool = False, @@ -164,7 +164,7 @@ def __init__(self, if enable_ota_requestor: self.extra_gn_options.append('chip_enable_ota_requestor=true') - if enable_sed: + if enable_icd: self.extra_gn_options.append('chip_enable_icd_server=true chip_openthread_ftd=false') if enable_low_power: diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index db0d31ea145989..1ac764d6f1afb0 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -6,7 +6,7 @@ cc32xx-lock ti-cc13x2x7_26x2x7-{lighting,lock,pump,pump-controller}[-mtd] ti-cc13x4_26x4-{all-clusters,lighting,lock,pump,pump-controller}[-mtd][-ftd] cyw30739-cyw930739m2evb_01-{light,lock,ota-requestor,switch} -efr32-{brd4161a,brd4187c,brd4186c,brd4163a,brd4164a,brd4166a,brd4170a,brd4186a,brd4187a,brd4304a}-{window-covering,switch,unit-test,light,lock,thermostat,pump}[-rpc][-with-ota-requestor][-sed][-low-power][-shell][-no_logging][-openthread_mtd][-enable_heap_monitoring][-no_openthread_cli][-show_qr_code][-wifi][-rs911x][-wf200][-wifi_ipv4][-additional_data_advertising][-use_ot_lib][-use_ot_coap_lib][-no-version] +efr32-{brd4161a,brd4187c,brd4186c,brd4163a,brd4164a,brd4166a,brd4170a,brd4186a,brd4187a,brd4304a}-{window-covering,switch,unit-test,light,lock,thermostat,pump}[-rpc][-with-ota-requestor][-icd][-low-power][-shell][-no_logging][-openthread_mtd][-enable_heap_monitoring][-no_openthread_cli][-show_qr_code][-wifi][-rs911x][-wf200][-wifi_ipv4][-additional_data_advertising][-use_ot_lib][-use_ot_coap_lib][-no-version] esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only] genio-lighting-app linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang] From 1465733af63716e033291c52bc4f24ec106cd655 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 4 Aug 2023 12:08:55 -0400 Subject: [PATCH 14/74] [chef] disable Groups and Switch from example devices (#28501) * A set of manual edits * zap regen * Script-disable groups and switch from EP0 * Zap regen --- ...p_rootnode_dimmablelight_bCwGYSDpoe.matter | 65 ------- ...noip_rootnode_dimmablelight_bCwGYSDpoe.zap | 4 +- ...umiditysensor_thermostat_56de3d5f45.matter | 65 ------- ...r_humiditysensor_thermostat_56de3d5f45.zap | 184 ++++++++++++++++-- ...ootnode_basicvideoplayer_0ff86e943b.matter | 134 ------------- .../rootnode_basicvideoplayer_0ff86e943b.zap | 64 +++++- ...de_colortemperaturelight_hbUnzYVeyn.matter | 6 - ...tnode_colortemperaturelight_hbUnzYVeyn.zap | 2 +- .../rootnode_contactsensor_lFAGG1bfRO.matter | 65 ------- .../rootnode_contactsensor_lFAGG1bfRO.zap | 4 +- .../rootnode_dimmablelight_bCwGYSDpoe.matter | 65 ------- .../rootnode_dimmablelight_bCwGYSDpoe.zap | 4 +- .../rootnode_doorlock_aNKYAreMXE.matter | 65 ------- .../devices/rootnode_doorlock_aNKYAreMXE.zap | 4 +- ...tnode_extendedcolorlight_8lcaaYJVAa.matter | 65 ------- ...rootnode_extendedcolorlight_8lcaaYJVAa.zap | 4 +- .../devices/rootnode_fan_7N2TobIlOX.matter | 65 ------- .../chef/devices/rootnode_fan_7N2TobIlOX.zap | 4 +- .../rootnode_flowsensor_1zVxHedlaV.matter | 134 ------------- .../rootnode_flowsensor_1zVxHedlaV.zap | 4 +- ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 65 ------- ...rootnode_heatingcoolingunit_ncdGai1E5a.zap | 4 +- .../rootnode_humiditysensor_Xyj4gda6Hb.matter | 134 ------------- .../rootnode_humiditysensor_Xyj4gda6Hb.zap | 4 +- .../rootnode_lightsensor_lZQycTFcJK.matter | 134 ------------- .../rootnode_lightsensor_lZQycTFcJK.zap | 4 +- ...rootnode_occupancysensor_iHyVgifZuo.matter | 134 ------------- .../rootnode_occupancysensor_iHyVgifZuo.zap | 4 +- .../rootnode_onofflight_bbs1b7IaOV.matter | 65 ------- .../rootnode_onofflight_bbs1b7IaOV.zap | 4 +- ...ootnode_onofflightswitch_FsPlMr090Q.matter | 65 ------- .../rootnode_onofflightswitch_FsPlMr090Q.zap | 4 +- ...rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 65 ------- .../rootnode_onoffpluginunit_Wtf8ss5EBY.zap | 4 +- .../rootnode_pressuresensor_s0qC9wLH4k.matter | 134 ------------- .../rootnode_pressuresensor_s0qC9wLH4k.zap | 4 +- ...ode_roboticvacuumcleaner_1807ff0c49.matter | 65 ------- ...otnode_roboticvacuumcleaner_1807ff0c49.zap | 4 +- .../rootnode_speaker_RpzeXdimqA.matter | 134 ------------- .../devices/rootnode_speaker_RpzeXdimqA.zap | 4 +- ...otnode_temperaturesensor_Qy1zkNW7c3.matter | 134 ------------- .../rootnode_temperaturesensor_Qy1zkNW7c3.zap | 4 +- .../rootnode_thermostat_bm3fb8dhYi.matter | 65 ------- .../rootnode_thermostat_bm3fb8dhYi.zap | 4 +- .../rootnode_windowcovering_RLCxaGi9Yx.matter | 65 ------- .../rootnode_windowcovering_RLCxaGi9Yx.zap | 4 +- examples/chef/devices/template.zap | 64 +++++- scripts/setup/constraints.txt | 2 +- 48 files changed, 318 insertions(+), 2066 deletions(-) diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 3fa94f796969e9..b52350856139ab 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1215,58 +1215,6 @@ server cluster EthernetNetworkDiagnostics = 55 { command ResetCounts(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1556,12 +1504,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1780,13 +1722,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index 9ab03f1604e7fe..d487930194b61e 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4642,7 +4642,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index a10059b8f5d77d..37d8723570e27f 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -682,58 +682,6 @@ server cluster GeneralDiagnostics = 51 { command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1807,12 +1755,6 @@ server cluster RadonConcentrationMeasurement = 1071 { endpoint 0 { device type rootdevice = 22, version 1; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1905,13 +1847,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap index 0647999f636f36..9f584e99db4640 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 3, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -198,7 +224,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4645,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -5394,7 +5420,33 @@ ] }, { + "id": 7, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 45, + "code": 45, + "profileId": 259, + "label": "MA-air-purifier", + "name": "MA-air-purifier" + }, + "deviceTypes": [ + { + "id": 45, + "code": 45, + "profileId": 259, + "label": "MA-air-purifier", + "name": "MA-air-purifier" + } + ], + "deviceTypeRefs": [ + 45 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 45 + ], "deviceTypeName": "MA-air-purifier", "deviceTypeCode": 45, "deviceTypeProfileId": 259, @@ -10884,7 +10936,33 @@ ] }, { + "id": 4, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 46, + "code": 44, + "profileId": 259, + "label": "MA-air-quality-sensor", + "name": "MA-air-quality-sensor" + }, + "deviceTypes": [ + { + "id": 46, + "code": 44, + "profileId": 259, + "label": "MA-air-quality-sensor", + "name": "MA-air-quality-sensor" + } + ], + "deviceTypeRefs": [ + 46 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 44 + ], "deviceTypeName": "MA-air-quality-sensor", "deviceTypeCode": 44, "deviceTypeProfileId": 259, @@ -15138,7 +15216,33 @@ ] }, { + "id": 6, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 24, + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor" + }, + "deviceTypes": [ + { + "id": 24, + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor" + } + ], + "deviceTypeRefs": [ + 24 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 770 + ], "deviceTypeName": "MA-tempsensor", "deviceTypeCode": 770, "deviceTypeProfileId": 259, @@ -15784,7 +15888,33 @@ ] }, { + "id": 5, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 27, + "code": 775, + "profileId": 259, + "label": "MA-humiditysensor", + "name": "MA-humiditysensor" + }, + "deviceTypes": [ + { + "id": 27, + "code": 775, + "profileId": 259, + "label": "MA-humiditysensor", + "name": "MA-humiditysensor" + } + ], + "deviceTypeRefs": [ + 27 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 775 + ], "deviceTypeName": "MA-humiditysensor", "deviceTypeCode": 775, "deviceTypeProfileId": 259, @@ -16430,7 +16560,33 @@ ] }, { + "id": 8, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 34, + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + }, + "deviceTypes": [ + { + "id": 34, + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + } + ], + "deviceTypeRefs": [ + 34 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 769 + ], "deviceTypeName": "MA-thermostat", "deviceTypeCode": 769, "deviceTypeProfileId": 259, @@ -17928,54 +18084,42 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 45 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 2, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 44 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 3, "profileId": 259, "endpointId": 3, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 770 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 4, "profileId": 259, "endpointId": 4, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 775 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 5, "profileId": 259, "endpointId": 5, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 769 + "networkId": 0 } ], "log": [] diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 169129dd542a12..3c51ea71c7b222 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -33,75 +33,6 @@ struct OperationalStateStruct { optional char_string<64> operationalStateLabel = 1; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** Attributes and commands for switching devices between 'On' and 'Off' states. */ server cluster OnOff = 6 { enum OnOffDelayedAllOffEffectVariant : ENUM8 { @@ -915,58 +846,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1587,12 +1466,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1721,13 +1594,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap index 49051bc9b0e123..711eaeb3fd40a2 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 10, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -198,7 +224,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4645,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -5394,7 +5420,33 @@ ] }, { + "id": 9, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 37, + "code": 40, + "profileId": 259, + "label": "MA-basic-videoplayer", + "name": "MA-basic-videoplayer" + }, + "deviceTypes": [ + { + "id": 37, + "code": 40, + "profileId": 259, + "label": "MA-basic-videoplayer", + "name": "MA-basic-videoplayer" + } + ], + "deviceTypeRefs": [ + 37 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 40 + ], "deviceTypeName": "MA-basic-videoplayer", "deviceTypeCode": 40, "deviceTypeProfileId": 259, @@ -7488,18 +7540,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 40 + "networkId": 0 } ], "log": [] diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index d4ed8ae7833f32..ed53816698d54f 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -1537,12 +1537,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index 6287c65ac3867c..640d0f39b6d6a0 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index e757bfca40c244..69106c33cf137b 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -929,58 +929,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1246,12 +1194,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1380,13 +1322,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index 8642b2a170521d..9eac9221ebe424 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index ecddba32229e2a..8ee5b39e03d3e4 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1079,58 +1079,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1420,12 +1368,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1556,13 +1498,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index 0ab727ecd5abc2..18900740bf7806 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4667,7 +4667,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index cb7af5398cb2d9..85f6c9bb9a5be1 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -929,58 +929,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1718,12 +1666,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1852,13 +1794,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index da96d4569de5ef..fdfffe135b50bd 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index cd0309d8576232..25ac0f188072b3 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1079,58 +1079,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1649,12 +1597,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1783,13 +1725,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index c38514edfb40ae..acc303bb710b01 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 5253394dac1473..2f2fb298b4d5aa 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -916,58 +916,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1288,12 +1236,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1423,13 +1365,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index 1975bfaf97c3e3..011ff039daa3ac 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4667,7 +4667,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 5f7dc401654574..6c8e865f26610f 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { struct DeviceTypeStruct { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1320,12 +1199,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1454,13 +1327,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index 37a010401215f4..59abbd4ae12012 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 5c16ff4316165a..d57906a51bf465 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1073,58 +1073,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1598,12 +1546,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1732,13 +1674,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index b95ce7015634cb..66561779d4cd88 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 282e57cb787065..a37d8142cff436 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { struct DeviceTypeStruct { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1320,12 +1199,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1454,13 +1327,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index e7267012c6188a..250d24c35eb7cc 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 60663594687e76..828bede7d73b36 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { struct DeviceTypeStruct { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1325,12 +1204,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1459,13 +1332,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index 57b5f0a2cb1180..019a4617f0a72c 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 159d6df5d0c559..64035c5820d1aa 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { struct DeviceTypeStruct { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1336,12 +1215,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1470,13 +1343,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index 01c4eefa322d6c..e08e37d82df559 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 82a253ba91ab62..26e8c6a26c324a 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -1079,58 +1079,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1381,12 +1329,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1515,13 +1457,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index f134cca90449a2..9fc7b0e9296203 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 3e3de2c710e365..c3ba8a911d9e97 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -1043,58 +1043,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1345,12 +1293,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1479,13 +1421,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 5205af24b4419f..20c1653ac2ea07 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 0f341394b711b3..4b7cc83be7cd9e 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -978,58 +978,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1280,12 +1228,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1414,13 +1356,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index e6984ffac25eae..68ea6f87083982 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index eadffeffcfd559..1155193e3cd3d5 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { struct DeviceTypeStruct { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1339,12 +1218,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1473,13 +1346,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index 1145564264c61e..ad8e1134b6a71a 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index 8fb00caaadd6a7..e1df348a9052ab 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -801,58 +801,6 @@ server cluster GeneralDiagnostics = 51 { command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1247,12 +1195,6 @@ server cluster RvcOperationalState = 97 { endpoint 0 { device type rootdevice = 22, version 1; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1345,13 +1287,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap index 746259df3636b6..6e71a2c6cb74e1 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index d452974aac5c8e..ef5096d4182ecb 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -73,75 +73,6 @@ server cluster Identify = 3 { command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** Attributes and commands for switching devices between 'On' and 'Off' states. */ server cluster OnOff = 6 { enum OnOffDelayedAllOffEffectVariant : ENUM8 { @@ -1073,58 +1004,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1375,12 +1254,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1509,13 +1382,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 3e9137e4de49c1..8b4cbf9a609dee 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index b4eb0ec4c22094..1fc82bcf1508b8 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -148,75 +148,6 @@ client cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - bitmap NameSupportBitmap : BITMAP8 { - kGroupNames = 0x80; - } - - readonly attribute NameSupportBitmap nameSupport = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { struct DeviceTypeStruct { @@ -1004,58 +935,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1319,12 +1198,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1453,13 +1326,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index ec498c5a4cb846..5f512e7848cbef 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 57f3f09d4a4963..45831b2a87159b 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -929,58 +929,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1499,12 +1447,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1633,13 +1575,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index e71fbc336eceaf..6e6f841d558dd1 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4667,7 +4667,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index a5e2ad2299635d..8bae0ae4946a79 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -929,58 +929,6 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1375,12 +1323,6 @@ endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -1509,13 +1451,6 @@ endpoint 0 { ram attribute clusterRevision default = 0x0001; } - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index 2ed25d1db597e8..56e76d3ce58aab 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -198,7 +198,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4619,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", diff --git a/examples/chef/devices/template.zap b/examples/chef/devices/template.zap index 3df60484a7fb27..f74e712a6b4ff5 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -198,7 +224,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddGroupResponse", @@ -4619,7 +4645,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "NumberOfPositions", @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 52, + "code": 0, + "profileId": 259, + "label": "MA-all-clusters-app", + "name": "MA-all-clusters-app" + }, + "deviceTypes": [ + { + "id": 52, + "code": 0, + "profileId": 259, + "label": "MA-all-clusters-app", + "name": "MA-all-clusters-app" + } + ], + "deviceTypeRefs": [ + 52 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 0 + ], "deviceTypeName": "MA-all-clusters-app", "deviceTypeCode": 0, "deviceTypeProfileId": 259, @@ -10062,18 +10114,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 0 + "networkId": 0 } ], "log": [] diff --git a/scripts/setup/constraints.txt b/scripts/setup/constraints.txt index fa15e9d94ab800..a80c8a297d9fa8 100644 --- a/scripts/setup/constraints.txt +++ b/scripts/setup/constraints.txt @@ -379,7 +379,7 @@ wheel==0.38.4 ; sys_platform == "linux" # pip-tools # The following packages are considered to be unsafe in a requirements file: -pip==23.2 +pip==23.2.1 # via # fastcore # ghapi From 78a3bd9186b1f9ce4b5dd89f942491a5c69874fa Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Fri, 4 Aug 2023 21:31:40 +0200 Subject: [PATCH 15/74] Bash completion support for chip-tool (#28470) * Bash completion support for chip-tool * Restyled crashes if we've got nested cases... * Prevent executing command when collecting compgen --- scripts/helpers/bash-completion.sh | 69 ++++++++++++++++++++++++++++++ scripts/setup/bootstrap.sh | 7 ++- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 scripts/helpers/bash-completion.sh diff --git a/scripts/helpers/bash-completion.sh b/scripts/helpers/bash-completion.sh new file mode 100644 index 00000000000000..6737f2149cc5f9 --- /dev/null +++ b/scripts/helpers/bash-completion.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +# +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Get the list of commands from the output of the chip-tool, +# where each command is prefixed with the ' | * ' string. +_chip_tool_get_commands() { + "$@" --help 2>&1 | awk '/ [|] [*] /{ print $3 }' +} + +# Get the list of options from the output of the chip-tool, +# where each option starts with the '[--' string. +_chip_tool_get_options() { + "$@" --help 2>&1 | awk -F'[[]|[]]' '/^[[]--/{ print $2 }' +} + +_chip_tool() { + + local cur prev words cword split + _init_completion -s || return + + # Get command line arguments up to the cursor position + local args=("${COMP_WORDS[@]:0:$cword+1}") + + local command=0 + case "$prev" in + --commissioner-name) + readarray -t COMPREPLY < <(compgen -W "alpha beta gamma 4 5 6 7 8 9" -- "$cur") + ;; + --paa-trust-store-path | --cd-trust-store-path) + _filedir -d + ;; + --storage-directory) + _filedir -d + ;; + *) + command=1 + ;; + esac + + if [ "$command" -eq 1 ]; then + case "$cur" in + -*) + words=$(_chip_tool_get_options "${args[@]}") + ;; + *) + words=$(_chip_tool_get_commands "${args[@]}") + ;; + esac + readarray -t COMPREPLY < <(compgen -W "$words" -- "$cur") + fi + +} + +complete -F _chip_tool chip-tool diff --git a/scripts/setup/bootstrap.sh b/scripts/setup/bootstrap.sh index 2fea8adc8f702d..64866fc2e3860b 100644 --- a/scripts/setup/bootstrap.sh +++ b/scripts/setup/bootstrap.sh @@ -155,6 +155,11 @@ else _install_additional_pip_requirements "none" "$@" fi +# Load bash completion helper if running bash +if [ -n "$BASH" ]; then + . "$_CHIP_ROOT/scripts/helpers/bash-completion.sh" +fi + unset -f _bootstrap_or_activate unset -f _install_additional_pip_requirements @@ -169,6 +174,6 @@ unset PW_DOCTOR_SKIP_CIPD_CHECKS unset -f _chip_bootstrap_banner -if ! [ -z "$_ORIGINAL_PW_ENVIRONMENT_ROOT" ]; then +if [ -n "$_ORIGINAL_PW_ENVIRONMENT_ROOT" ]; then export PW_ENVIRONMENT_ROOT="$_ORIGINAL_PW_ENVIRONMENT_ROOT" fi From 94686f519a537a5804aad6db3f12e47350a41675 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 4 Aug 2023 16:13:13 -0400 Subject: [PATCH 16/74] Add a few new things to Darwin availability annotations. (#28528) --- .../Framework/CHIP/templates/availability.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index d0d958848323de..d49841e22c3d97 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -7621,10 +7621,28 @@ attributes: PowerSource: - EndpointList + Descriptor: + - TagList + structs: + Descriptor: + - SemanticTagStruct + struct fields: + Descriptor: + SemanticTagStruct: + - mfgCode + - namespaceID + - tag + - label + bitmaps: + GroupKeyManagement: + - Feature bitmap values: OnOff: Feature: - DeadFront + GroupKeyManagement: + Feature: + - CacheAndSync removed: clusters: # Clusters that really should just not be exposed, even if they're in our XML. From a70d5b44f68bf1bd512d47acdc00b9529b2fe045 Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Fri, 4 Aug 2023 17:12:49 -0400 Subject: [PATCH 17/74] [ReadHandler] ReportScheduler Injection (#28497) * Moved the default report scheduler to the application code and added a pointer to a report scheduler in ServerInitParams so it gets injected * Restyled by clang-format * Added a default ReportScheduler to the server init * Restyled by clang-format * Removed the double instanciation of report scheduler in ESP32 to reduce ram usage * Restyled by clang-format * Removed instanciation of ReportScheduler in examples as the default is now in Common Server Init params * Restyled by clang-format * Removed un-necessary mention to CommonCaseDeviceServerInitParams, restore CHIPConfig Synchronous reports to 0 --------- Co-authored-by: Restyled.io --- examples/platform/silabs/MatterConfig.cpp | 19 ++++++++ src/app/BUILD.gn | 2 + src/app/TimerDelegates.cpp | 55 +++++++++++++++++++++++ src/app/TimerDelegates.h | 27 ++--------- src/app/server/Server.cpp | 10 ++++- src/app/server/Server.h | 29 ++++++------ src/app/tests/TestCommissionManager.cpp | 6 +++ 7 files changed, 110 insertions(+), 38 deletions(-) create mode 100644 src/app/TimerDelegates.cpp diff --git a/examples/platform/silabs/MatterConfig.cpp b/examples/platform/silabs/MatterConfig.cpp index 836e2a777c3699..1392dd9dc2b382 100644 --- a/examples/platform/silabs/MatterConfig.cpp +++ b/examples/platform/silabs/MatterConfig.cpp @@ -56,6 +56,14 @@ static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeys #include "SilabsDeviceDataProvider.h" #include "SilabsTestEventTriggerDelegate.h" #include +#include + +#if CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED +#include +#else +#include +#endif + #include #if CHIP_ENABLE_OPENTHREAD @@ -182,8 +190,19 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) chip::DeviceLayer::PlatformMgr().LockChipStack(); // Create initParams with SDK example defaults here + // TODO: replace with our own init param to avoid double allocation in examples static chip::CommonCaseDeviceServerInitParams initParams; + // Report scheduler and timer delegate instance + static chip::app::DefaultTimerDelegate sTimerDelegate; +#if CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED + static chip::app::reporting::SynchronizedReportSchedulerImpl sReportScheduler(&sTimerDelegate); +#else + static chip::app::reporting::ReportSchedulerImpl sReportScheduler(&sTimerDelegate); +#endif + + initParams.reportScheduler = &sReportScheduler; + #if SILABS_TEST_EVENT_TRIGGER_ENABLED if (Encoding::HexToBytes(SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY, strlen(SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY), sTestEventTriggerEnableKey, diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index f5a167ca7e7aff..a4028a7a7449ef 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -188,6 +188,8 @@ static_library("app") { "TimedHandler.h", "TimedRequest.cpp", "TimedRequest.h", + "TimerDelegates.cpp", + "TimerDelegates.h", "WriteClient.cpp", "WriteHandler.cpp", "reporting/Engine.cpp", diff --git a/src/app/TimerDelegates.cpp b/src/app/TimerDelegates.cpp new file mode 100644 index 00000000000000..d41503d0947d04 --- /dev/null +++ b/src/app/TimerDelegates.cpp @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include + +using TimerContext = chip::app::reporting::TimerContext; +using Timeout = chip::System::Clock::Timeout; + +namespace chip { +namespace app { + +static void TimerCallbackInterface(System::Layer * aLayer, void * aAppState) +{ + TimerContext * context = static_cast(aAppState); + context->TimerFired(); +} +CHIP_ERROR DefaultTimerDelegate::StartTimer(TimerContext * context, Timeout aTimeout) +{ + return InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->StartTimer( + aTimeout, TimerCallbackInterface, context); +} +void DefaultTimerDelegate::CancelTimer(TimerContext * context) +{ + InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->CancelTimer( + TimerCallbackInterface, context); +} +bool DefaultTimerDelegate::IsTimerActive(TimerContext * context) +{ + return InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->IsTimerActive( + TimerCallbackInterface, context); +} + +System::Clock::Timestamp DefaultTimerDelegate::GetCurrentMonotonicTimestamp() +{ + return System::SystemClock().GetMonotonicTimestamp(); +} + +} // namespace app +} // namespace chip diff --git a/src/app/TimerDelegates.h b/src/app/TimerDelegates.h index 8e24fd4aef09bd..563ee138d9199f 100644 --- a/src/app/TimerDelegates.h +++ b/src/app/TimerDelegates.h @@ -17,7 +17,6 @@ #pragma once -#include #include #include @@ -29,28 +28,10 @@ class DefaultTimerDelegate : public reporting::ReportScheduler::TimerDelegate public: using TimerContext = reporting::TimerContext; using Timeout = System::Clock::Timeout; - static void TimerCallbackInterface(System::Layer * aLayer, void * aAppState) - { - TimerContext * context = static_cast(aAppState); - context->TimerFired(); - } - CHIP_ERROR StartTimer(TimerContext * context, Timeout aTimeout) override - { - return InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->StartTimer( - aTimeout, TimerCallbackInterface, context); - } - void CancelTimer(TimerContext * context) override - { - InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->CancelTimer( - TimerCallbackInterface, context); - } - bool IsTimerActive(TimerContext * context) override - { - return InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->IsTimerActive( - TimerCallbackInterface, context); - } - - System::Clock::Timestamp GetCurrentMonotonicTimestamp() override { return System::SystemClock().GetMonotonicTimestamp(); } + CHIP_ERROR StartTimer(TimerContext * context, Timeout aTimeout) override; + void CancelTimer(TimerContext * context) override; + bool IsTimerActive(TimerContext * context) override; + System::Clock::Timestamp GetCurrentMonotonicTimestamp() override; }; } // namespace app diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index b416d5086c3096..f7d8d24ab36d2f 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -117,6 +117,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) VerifyOrExit(initParams.sessionKeystore != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); VerifyOrExit(initParams.operationalKeystore != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); VerifyOrExit(initParams.opCertStore != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(initParams.reportScheduler != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); // TODO(16969): Remove chip::Platform::MemoryInit() call from Server class, it belongs to outer code chip::Platform::MemoryInit(); @@ -171,6 +172,8 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) mGroupsProvider = initParams.groupDataProvider; SetGroupDataProvider(mGroupsProvider); + mReportScheduler = initParams.reportScheduler; + mTestEventTriggerDelegate = initParams.testEventTriggerDelegate; deviceInfoprovider = DeviceLayer::GetDeviceInfoProvider(); @@ -250,7 +253,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) #endif // CHIP_CONFIG_ENABLE_SERVER_IM_EVENT #if CHIP_CONFIG_ENABLE_ICD_SERVER - mICDManager.Init(mDeviceStorage, &GetFabricTable(), &mReportScheduler); + mICDManager.Init(mDeviceStorage, &GetFabricTable(), mReportScheduler); mICDEventManager.Init(&mICDManager); #endif // CHIP_CONFIG_ENABLE_ICD_SERVER @@ -317,7 +320,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) &mCertificateValidityPolicy, mGroupsProvider); SuccessOrExit(err); - err = chip::app::InteractionModelEngine::GetInstance()->Init(&mExchangeMgr, &GetFabricTable(), &mReportScheduler, + err = chip::app::InteractionModelEngine::GetInstance()->Init(&mExchangeMgr, &GetFabricTable(), mReportScheduler, &mCASESessionManager, mSubscriptionResumptionStorage); SuccessOrExit(err); @@ -555,6 +558,9 @@ KvsPersistentStorageDelegate CommonCaseDeviceServerInitParams::sKvsPersistenStor PersistentStorageOperationalKeystore CommonCaseDeviceServerInitParams::sPersistentStorageOperationalKeystore; Credentials::PersistentStorageOpCertStore CommonCaseDeviceServerInitParams::sPersistentStorageOpCertStore; Credentials::GroupDataProviderImpl CommonCaseDeviceServerInitParams::sGroupDataProvider; +app::DefaultTimerDelegate CommonCaseDeviceServerInitParams::sTimerDelegate; +app::reporting::ReportSchedulerImpl + CommonCaseDeviceServerInitParams::sReportScheduler(&CommonCaseDeviceServerInitParams::sTimerDelegate); #if CHIP_CONFIG_ENABLE_SESSION_RESUMPTION SimpleSessionResumptionStorage CommonCaseDeviceServerInitParams::sSessionResumptionStorage; #endif diff --git a/src/app/server/Server.h b/src/app/server/Server.h index c41a9e3127e0d9..e5b5585be19f44 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -64,12 +64,8 @@ #include #endif #include -#include -#if CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED -#include -#else #include -#endif +#include #if CHIP_CONFIG_ENABLE_ICD_SERVER #include // nogncheck @@ -146,6 +142,8 @@ struct ServerInitParams // Operational certificate store with access to the operational certs in persisted storage: // must not be null at timne of Server::Init(). Credentials::OperationalCertificateStore * opCertStore = nullptr; + // Required, if not provided, the Server::Init() WILL fail. + app::reporting::ReportScheduler * reportScheduler = nullptr; }; /** @@ -222,6 +220,14 @@ struct CommonCaseDeviceServerInitParams : public ServerInitParams this->opCertStore = &sPersistentStorageOpCertStore; } + // Injection of report scheduler WILL lead to two schedulers being allocated. As recommended above, this should only be used + // for IN-TREE examples. If a default scheduler is desired, the basic ServerInitParams should be used by the application and + // CommonCaseDeviceServerInitParams should not be allocated. + if (this->reportScheduler == nullptr) + { + reportScheduler = &sReportScheduler; + } + // Session Keystore injection this->sessionKeystore = &sSessionKeystore; @@ -260,6 +266,8 @@ struct CommonCaseDeviceServerInitParams : public ServerInitParams static PersistentStorageOperationalKeystore sPersistentStorageOperationalKeystore; static Credentials::PersistentStorageOpCertStore sPersistentStorageOpCertStore; static Credentials::GroupDataProviderImpl sGroupDataProvider; + static chip::app::DefaultTimerDelegate sTimerDelegate; + static app::reporting::ReportSchedulerImpl sReportScheduler; #if CHIP_CONFIG_ENABLE_SESSION_RESUMPTION static SimpleSessionResumptionStorage sSessionResumptionStorage; @@ -340,7 +348,7 @@ class Server app::DefaultAttributePersistenceProvider & GetDefaultAttributePersister() { return mAttributePersister; } - app::reporting::ReportScheduler & GetReportScheduler() { return mReportScheduler; } + app::reporting::ReportScheduler * GetReportScheduler() { return mReportScheduler; } /** * This function causes the ShutDown event to be generated async on the @@ -360,7 +368,7 @@ class Server static Server & GetInstance() { return sServer; } private: - Server() : mTimerDelegate(), mReportScheduler(&mTimerDelegate) {} + Server() {} static Server sServer; @@ -594,12 +602,7 @@ class Server app::DefaultAttributePersistenceProvider mAttributePersister; GroupDataProviderListener mListener; ServerFabricDelegate mFabricDelegate; - app::DefaultTimerDelegate mTimerDelegate; -#if CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED - app::reporting::SynchronizedReportSchedulerImpl mReportScheduler; -#else - app::reporting::ReportSchedulerImpl mReportScheduler; -#endif + app::reporting::ReportScheduler * mReportScheduler; Access::AccessControl mAccessControl; app::AclStorage * mAclStorage; diff --git a/src/app/tests/TestCommissionManager.cpp b/src/app/tests/TestCommissionManager.cpp index e2886f16dbdeab..73cf9423ef0838 100644 --- a/src/app/tests/TestCommissionManager.cpp +++ b/src/app/tests/TestCommissionManager.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#include +#include #include #include #include @@ -92,6 +94,10 @@ void InitializeChip(nlTestSuite * suite) chip::DeviceLayer::SetCommissionableDataProvider(&commissionableDataProvider); static chip::CommonCaseDeviceServerInitParams initParams; + // Report scheduler and timer delegate instance + static chip::app::DefaultTimerDelegate sTimerDelegate; + static chip::app::reporting::ReportSchedulerImpl sReportScheduler(&sTimerDelegate); + initParams.reportScheduler = &sReportScheduler; (void) initParams.InitializeStaticResourcesBeforeServerInit(); err = chip::Server::GetInstance().Init(initParams); From e16f5c8ec92d0012df3119cfa671ff1316c62705 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Fri, 4 Aug 2023 16:45:11 -0700 Subject: [PATCH 18/74] [Java] Fix crash on 32bit Android phone when eventing is enabled (#28534) * [Java] Fix crash on 32bit Android phone when eventing is enabled * Restyled by clang-format * Address review comment * Restyled by clang-format --------- Co-authored-by: Restyled.io --- src/controller/java/AndroidCallbacks.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index d55dfdf953c91c..4d8e536bfde4c5 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -364,9 +364,9 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); - jlong eventNumber = static_cast(aEventHeader.mEventNumber); - jlong priorityLevel = static_cast(aEventHeader.mPriorityLevel); - jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); + jlong eventNumber = static_cast(aEventHeader.mEventNumber); + jint priorityLevel = static_cast(aEventHeader.mPriorityLevel); + jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); jobject value = nullptr; #if USE_JAVA_TLV_ENCODE_DECODE From c1bcf1dde9ce3a0fa3077d583116a0e2e739c5a1 Mon Sep 17 00:00:00 2001 From: Evgeny Margolis Date: Fri, 4 Aug 2023 16:54:04 -0700 Subject: [PATCH 19/74] Json to Tlv and Tlv to Json Converters Implementation in CPP (#27635) * Json to Tlv and Tlv to Json Converters Implemented in CPP This implementation is equivalent to the Kotlin implementation in: src/controller/java/src/chip/jsontlv/ Note that NOT all TLV configurations are supported by the current implementation. Here is the list of limitations: - TLV Structure elements are expected to be sorted in a canonical tag order - TLV Lists are not supported - Multi-Dimensional TLV Arrays are not supported - All elements in an array MUST be of the same type - The top-level TLV element MUST be a single structure with AnonymousTag - The following tags are supported: - AnonymousTag are only used with TLV Array elements or a top-level structure. - ContextSpecificTag are used only with TLV Structure elements. - CommonProfileTag are used only with TLV Structure elements. - Infinity Float/Double values are not supported. Added README.md file that describing the format. Added unit tests for TLV to JSON, JSON to TLV, JSON to TLV back to JSON conversion cases. NOTE about the current implementation of the Tlv-to-Json converter in: src/lib/support/jsontlv/TlvJson.cpp I kept this implementation because it is currently used in a few places in the code for testing/logging purposes. As a follow up work item, this implementation should be replaced with the new one presented in this commit. * Update src/lib/support/jsontlv/JsonToTlv.cpp Co-authored-by: Robert Szewczyk * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Robert Szewczyk * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/JsonToTlv.h Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/JsonToTlv.h Co-authored-by: Boris Zbarsky * Addressed Review Comments * Restyled by clang-format * Restyled by prettier-markdown * Removed Debug Prints * Added Support for Float/Double Infinity Values Those values should be encoded as "Infinity" and "-Infinity" strings. * Restyled by clang-format * Restyled by prettier-markdown * Update src/lib/support/jsontlv/JsonToTlv.cpp Co-authored-by: Boris Zbarsky * Addressed Review Comments * Switch from CommonTag to ProfileTag with an implicit profile id * Documentation update * Restyle * Fix type of variable in unit test * Update src/lib/support/jsontlv/README.md Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/TlvJson.cpp Co-authored-by: Boris Zbarsky * Added more comments about kTemporaryImplicitProfileId not being actually used in stored values. Made the values consistent everywhere * Revert old code updates * Casing on json updated according to code review * Make the tlv element naming a bit more consistent, including invalid JSON in case element types are NOT as expected * Remove obsolete comment * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Boris Zbarsky * Update src/lib/support/jsontlv/TlvToJson.cpp Co-authored-by: Boris Zbarsky --------- Co-authored-by: Robert Szewczyk Co-authored-by: Boris Zbarsky Co-authored-by: Restyled.io Co-authored-by: Andrei Litvin Co-authored-by: Andrei Litvin Co-authored-by: yunhanw-google --- .github/.wordlist.txt | 1 + scripts/tools/check_includes_config.py | 5 + src/lib/core/TLVReader.h | 5 + src/lib/support/jsontlv/BUILD.gn | 15 +- src/lib/support/jsontlv/ElementTypes.h | 43 + src/lib/support/jsontlv/JsonToTlv.cpp | 460 ++++ src/lib/support/jsontlv/JsonToTlv.h | 35 + src/lib/support/jsontlv/README.md | 134 ++ src/lib/support/jsontlv/TlvToJson.cpp | 382 ++++ src/lib/support/jsontlv/TlvToJson.h | 51 + src/lib/support/tests/BUILD.gn | 5 +- src/lib/support/tests/TestJsonToTlv.cpp | 344 +++ src/lib/support/tests/TestJsonToTlvToJson.cpp | 1913 +++++++++++++++++ src/lib/support/tests/TestTlvJson.cpp | 259 +++ src/lib/support/tests/TestTlvToJson.cpp | 239 +- 15 files changed, 3769 insertions(+), 122 deletions(-) create mode 100644 src/lib/support/jsontlv/ElementTypes.h create mode 100644 src/lib/support/jsontlv/JsonToTlv.cpp create mode 100644 src/lib/support/jsontlv/JsonToTlv.h create mode 100644 src/lib/support/jsontlv/README.md create mode 100644 src/lib/support/jsontlv/TlvToJson.cpp create mode 100644 src/lib/support/jsontlv/TlvToJson.h create mode 100644 src/lib/support/tests/TestJsonToTlv.cpp create mode 100644 src/lib/support/tests/TestJsonToTlvToJson.cpp create mode 100644 src/lib/support/tests/TestTlvJson.cpp diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 0b195ba9a244e5..41e37196757c41 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -154,6 +154,7 @@ blocklist blockquote bluetoothd bluez +BOOL BooleanState bootable Bootloader diff --git a/scripts/tools/check_includes_config.py b/scripts/tools/check_includes_config.py index cb1f4e1062fb26..ae06b487cbaba8 100644 --- a/scripts/tools/check_includes_config.py +++ b/scripts/tools/check_includes_config.py @@ -158,4 +158,9 @@ # Library meant for non-embedded 'src/tracing/json/json_tracing.cpp': {'string', 'sstream'}, 'src/tracing/json/json_tracing.h': {'fstream'}, + + # Not intended for embedded clients + 'src/lib/support/jsontlv/JsonToTlv.cpp': {'sstream'}, + 'src/lib/support/jsontlv/JsonToTlv.h': {'string'}, + 'src/lib/support/jsontlv/TlvToJson.h': {'string'} } diff --git a/src/lib/core/TLVReader.h b/src/lib/core/TLVReader.h index caf56332762e79..0acc618bc86598 100644 --- a/src/lib/core/TLVReader.h +++ b/src/lib/core/TLVReader.h @@ -855,6 +855,11 @@ class DLL_EXPORT TLVReader */ TLVBackingStore * GetBackingStore() { return mBackingStore; } + /** + * Returns true if the current TLV element type is a double. + */ + bool IsElementDouble() { return ElementType() == TLVElementType::FloatingPointNumber64; } + /** * Gets the point in the underlying input buffer that corresponds to the reader's current position. * diff --git a/src/lib/support/jsontlv/BUILD.gn b/src/lib/support/jsontlv/BUILD.gn index 1e62202adc29a5..377b9be19d0656 100644 --- a/src/lib/support/jsontlv/BUILD.gn +++ b/src/lib/support/jsontlv/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2020-2023 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,7 +19,18 @@ config("jsontlv_config") { } static_library("jsontlv") { - sources = [ "TlvJson.cpp" ] + sources = [ + "ElementTypes.h", + "JsonToTlv.cpp", + "TlvJson.cpp", + "TlvToJson.cpp", + ] + + public = [ + "JsonToTlv.h", + "TlvJson.h", + "TlvToJson.h", + ] public_configs = [ ":jsontlv_config" ] diff --git a/src/lib/support/jsontlv/ElementTypes.h b/src/lib/support/jsontlv/ElementTypes.h new file mode 100644 index 00000000000000..0dd23bf9aaaa76 --- /dev/null +++ b/src/lib/support/jsontlv/ElementTypes.h @@ -0,0 +1,43 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +namespace { + +const char kElementTypeInt[] = "INT"; +const char kElementTypeUInt[] = "UINT"; +const char kElementTypeBool[] = "BOOL"; +const char kElementTypeFloat[] = "FLOAT"; +const char kElementTypeDouble[] = "DOUBLE"; +const char kElementTypeBytes[] = "BYTES"; +const char kElementTypeString[] = "STRING"; +const char kElementTypeNull[] = "NULL"; +const char kElementTypeStruct[] = "STRUCT"; +const char kElementTypeArray[] = "ARRAY"; +const char kElementTypeEmpty[] = "?"; + +const char kFloatingPointPositiveInfinity[] = "Infinity"; +const char kFloatingPointNegativeInfinity[] = "-Infinity"; + +struct ElementTypeContext +{ + chip::TLV::TLVType tlvType = chip::TLV::kTLVType_NotSpecified; + bool isDouble = false; +}; + +} // namespace diff --git a/src/lib/support/jsontlv/JsonToTlv.cpp b/src/lib/support/jsontlv/JsonToTlv.cpp new file mode 100644 index 00000000000000..327419e7273b57 --- /dev/null +++ b/src/lib/support/jsontlv/JsonToTlv.cpp @@ -0,0 +1,460 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include + +namespace chip { + +namespace { + +// Not directly used: TLV encoding will not encode this number and +// will just encode "Implicit profile tag" +// This profile, but will be used for deciding what binary values to encode. +constexpr uint32_t kTemporaryImplicitProfileId = 0xFF01; + +std::vector SplitIntoFieldsBySeparator(const std::string & input, char separator) +{ + std::vector substrings; + std::stringstream ss(input); + std::string substring; + + while (std::getline(ss, substring, separator)) + { + substrings.push_back(std::move(substring)); + } + + return substrings; +} + +CHIP_ERROR JsonTypeStrToTlvType(const char * elementType, ElementTypeContext & type) +{ + if (strcmp(elementType, kElementTypeInt) == 0) + { + type.tlvType = TLV::kTLVType_SignedInteger; + } + else if (strcmp(elementType, kElementTypeUInt) == 0) + { + type.tlvType = TLV::kTLVType_UnsignedInteger; + } + else if (strcmp(elementType, kElementTypeBool) == 0) + { + type.tlvType = TLV::kTLVType_Boolean; + } + else if (strcmp(elementType, kElementTypeFloat) == 0) + { + type.tlvType = TLV::kTLVType_FloatingPointNumber; + type.isDouble = false; + } + else if (strcmp(elementType, kElementTypeDouble) == 0) + { + type.tlvType = TLV::kTLVType_FloatingPointNumber; + type.isDouble = true; + } + else if (strcmp(elementType, kElementTypeBytes) == 0) + { + type.tlvType = TLV::kTLVType_ByteString; + } + else if (strcmp(elementType, kElementTypeString) == 0) + { + type.tlvType = TLV::kTLVType_UTF8String; + } + else if (strcmp(elementType, kElementTypeNull) == 0) + { + type.tlvType = TLV::kTLVType_Null; + } + else if (strcmp(elementType, kElementTypeStruct) == 0) + { + type.tlvType = TLV::kTLVType_Structure; + } + else if (strncmp(elementType, kElementTypeArray, strlen(kElementTypeArray)) == 0) + { + type.tlvType = TLV::kTLVType_Array; + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + return CHIP_NO_ERROR; +} + +bool IsUnsignedInteger(const std::string & s) +{ + size_t len = s.length(); + if (len == 0) + { + return false; + } + for (size_t i = 0; i < len; i++) + { + if (!isdigit(s[i])) + { + return false; + } + } + return true; +} + +bool IsSignedInteger(const std::string & s) +{ + if (s.length() == 0) + { + return false; + } + if (s[0] == '-') + { + return IsUnsignedInteger(s.substr(1)); + } + return IsUnsignedInteger(s); +} + +bool IsValidBase64String(const std::string & s) +{ + const std::string base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + size_t len = s.length(); + + // Check if the length is a multiple of 4 + if (len % 4 != 0) + { + return false; + } + + size_t paddingLen = 0; + if (s[len - 1] == '=') + { + paddingLen++; + if (s[len - 2] == '=') + { + paddingLen++; + } + } + + // Check for invalid characters + for (char c : s.substr(0, len - paddingLen)) + { + if (base64Chars.find(c) == std::string::npos) + { + return false; + } + } + + return true; +} + +struct ElementContext +{ + std::string jsonName; + TLV::Tag tag = TLV::AnonymousTag(); + ElementTypeContext type; + ElementTypeContext subType; +}; + +bool CompareByTag(const ElementContext & a, const ElementContext & b) +{ + // If tags are of the same type compare by tag number + if (IsContextTag(a.tag) == IsContextTag(b.tag)) + { + return TLV::TagNumFromTag(a.tag) < TLV::TagNumFromTag(b.tag); + } + // Otherwise, compare by tag type: context tags first followed by common profile tags + return IsContextTag(a.tag); +} + +CHIP_ERROR ParseJsonName(const std::string name, ElementContext & elementCtx, uint32_t implicitProfileId) +{ + uint64_t tagNumber = 0; + const char * elementType = nullptr; + std::vector nameFields = SplitIntoFieldsBySeparator(name, ':'); + TLV::Tag tag = TLV::AnonymousTag(); + ElementTypeContext type; + ElementTypeContext subType; + + if (nameFields.size() == 2) + { + VerifyOrReturnError(IsUnsignedInteger(nameFields[0]), CHIP_ERROR_INVALID_ARGUMENT); + tagNumber = std::strtoull(nameFields[0].c_str(), nullptr, 10); + elementType = nameFields[1].c_str(); + } + else if (nameFields.size() == 3) + { + VerifyOrReturnError(IsUnsignedInteger(nameFields[1]), CHIP_ERROR_INVALID_ARGUMENT); + tagNumber = std::strtoull(nameFields[1].c_str(), nullptr, 10); + elementType = nameFields[2].c_str(); + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + if (tagNumber <= UINT8_MAX) + { + tag = TLV::ContextTag(static_cast(tagNumber)); + } + else if (tagNumber <= UINT32_MAX) + { + tag = TLV::ProfileTag(implicitProfileId, static_cast(tagNumber)); + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + ReturnErrorOnFailure(JsonTypeStrToTlvType(elementType, type)); + + if (type.tlvType == TLV::kTLVType_Array) + { + std::vector arrayFields = SplitIntoFieldsBySeparator(elementType, '-'); + VerifyOrReturnError(arrayFields.size() == 2, CHIP_ERROR_INVALID_ARGUMENT); + + if (strcmp(arrayFields[1].c_str(), kElementTypeEmpty) == 0) + { + subType.tlvType = TLV::kTLVType_NotSpecified; + } + else + { + ReturnErrorOnFailure(JsonTypeStrToTlvType(arrayFields[1].c_str(), subType)); + } + } + + elementCtx.jsonName = name; + elementCtx.tag = tag; + elementCtx.type = type; + elementCtx.subType = subType; + + return CHIP_NO_ERROR; +} + +CHIP_ERROR EncodeTlvElement(const Json::Value & val, TLV::TLVWriter & writer, const ElementContext & elementCtx) +{ + TLV::Tag tag = elementCtx.tag; + + switch (elementCtx.type.tlvType) + { + case TLV::kTLVType_UnsignedInteger: { + uint64_t v; + if (val.isUInt64()) + { + v = val.asUInt64(); + } + else if (val.isString()) + { + const std::string valAsString = val.asString(); + VerifyOrReturnError(IsUnsignedInteger(valAsString), CHIP_ERROR_INVALID_ARGUMENT); + v = std::strtoull(valAsString.c_str(), nullptr, 10); + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + ReturnErrorOnFailure(writer.Put(tag, v)); + break; + } + + case TLV::kTLVType_SignedInteger: { + int64_t v; + if (val.isInt64()) + { + v = val.asInt64(); + } + else if (val.isString()) + { + const std::string valAsString = val.asString(); + VerifyOrReturnError(IsSignedInteger(valAsString), CHIP_ERROR_INVALID_ARGUMENT); + v = std::strtoll(valAsString.c_str(), nullptr, 10); + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + ReturnErrorOnFailure(writer.Put(tag, v)); + break; + } + + case TLV::kTLVType_Boolean: { + VerifyOrReturnError(val.isBool(), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(writer.Put(tag, val.asBool())); + break; + } + + case TLV::kTLVType_FloatingPointNumber: { + if (val.isNumeric()) + { + if (elementCtx.type.isDouble) + { + ReturnErrorOnFailure(writer.Put(tag, val.asDouble())); + } + else + { + ReturnErrorOnFailure(writer.Put(tag, val.asFloat())); + } + } + else if (val.isString()) + { + const std::string valAsString = val.asString(); + bool isPositiveInfinity = (valAsString == kFloatingPointPositiveInfinity); + bool isNegativeInfinity = (valAsString == kFloatingPointNegativeInfinity); + VerifyOrReturnError(isPositiveInfinity || isNegativeInfinity, CHIP_ERROR_INVALID_ARGUMENT); + if (elementCtx.type.isDouble) + { + if (isPositiveInfinity) + { + ReturnErrorOnFailure(writer.Put(tag, std::numeric_limits::infinity())); + } + else + { + ReturnErrorOnFailure(writer.Put(tag, -std::numeric_limits::infinity())); + } + } + else + { + if (isPositiveInfinity) + { + ReturnErrorOnFailure(writer.Put(tag, std::numeric_limits::infinity())); + } + else + { + ReturnErrorOnFailure(writer.Put(tag, -std::numeric_limits::infinity())); + } + } + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + break; + } + + case TLV::kTLVType_ByteString: { + VerifyOrReturnError(val.isString(), CHIP_ERROR_INVALID_ARGUMENT); + const std::string valAsString = val.asString(); + size_t encodedLen = valAsString.length(); + VerifyOrReturnError(CanCastTo(encodedLen), CHIP_ERROR_INVALID_ARGUMENT); + + VerifyOrReturnError(IsValidBase64String(valAsString), CHIP_ERROR_INVALID_ARGUMENT); + + Platform::ScopedMemoryBuffer byteString; + byteString.Alloc(BASE64_MAX_DECODED_LEN(static_cast(encodedLen))); + VerifyOrReturnError(byteString.Get() != nullptr, CHIP_ERROR_NO_MEMORY); + + auto decodedLen = Base64Decode(valAsString.c_str(), static_cast(encodedLen), byteString.Get()); + ReturnErrorOnFailure(writer.PutBytes(tag, byteString.Get(), decodedLen)); + break; + } + + case TLV::kTLVType_UTF8String: { + VerifyOrReturnError(val.isString(), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(writer.PutString(tag, val.asCString())); + break; + } + + case TLV::kTLVType_Null: { + VerifyOrReturnError(val.isNull(), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(writer.PutNull(tag)); + break; + } + + case TLV::kTLVType_Structure: { + TLV::TLVType containerType; + VerifyOrReturnError(val.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, containerType)); + + std::vector jsonNames = val.getMemberNames(); + std::vector nestedElementsCtx; + + for (size_t i = 0; i < jsonNames.size(); i++) + { + ElementContext ctx; + ReturnErrorOnFailure(ParseJsonName(jsonNames[i], ctx, writer.ImplicitProfileId)); + nestedElementsCtx.push_back(ctx); + } + + // Sort Json object elements by Tag number (low to high). + // Note that all sorted Context Tags will appear first followed by all sorted Common Tags. + std::sort(nestedElementsCtx.begin(), nestedElementsCtx.end(), CompareByTag); + + for (auto & ctx : nestedElementsCtx) + { + ReturnErrorOnFailure(EncodeTlvElement(val[ctx.jsonName], writer, ctx)); + } + + ReturnErrorOnFailure(writer.EndContainer(containerType)); + break; + } + + case TLV::kTLVType_Array: { + TLV::TLVType containerType; + VerifyOrReturnError(val.isArray(), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Array, containerType)); + + if (elementCtx.subType.tlvType == TLV::kTLVType_NotSpecified) + { + VerifyOrReturnError(val.size() == 0, CHIP_ERROR_INVALID_ARGUMENT); + } + else + { + ElementContext nestedElementCtx; + nestedElementCtx.tag = TLV::AnonymousTag(); + nestedElementCtx.type = elementCtx.subType; + for (Json::ArrayIndex i = 0; i < val.size(); i++) + { + ReturnErrorOnFailure(EncodeTlvElement(val[i], writer, nestedElementCtx)); + } + } + + ReturnErrorOnFailure(writer.EndContainer(containerType)); + break; + } + + default: + return CHIP_ERROR_INVALID_TLV_ELEMENT; + break; + } + + return CHIP_NO_ERROR; +} + +} // namespace + +CHIP_ERROR JsonToTlv(const std::string & jsonString, MutableByteSpan & tlv) +{ + TLV::TLVWriter writer; + writer.Init(tlv); + writer.ImplicitProfileId = kTemporaryImplicitProfileId; + ReturnErrorOnFailure(JsonToTlv(jsonString, writer)); + ReturnErrorOnFailure(writer.Finalize()); + tlv.reduce_size(writer.GetLengthWritten()); + return CHIP_NO_ERROR; +} + +CHIP_ERROR JsonToTlv(const std::string & jsonString, TLV::TLVWriter & writer) +{ + Json::Reader reader; + Json::Value json; + bool result = reader.parse(jsonString, json); + VerifyOrReturnError(result, CHIP_ERROR_INTERNAL); + + ElementContext elementCtx; + elementCtx.type = { TLV::kTLVType_Structure, false }; + return EncodeTlvElement(json, writer, elementCtx); +} + +} // namespace chip diff --git a/src/lib/support/jsontlv/JsonToTlv.h b/src/lib/support/jsontlv/JsonToTlv.h new file mode 100644 index 00000000000000..d4660465c4c3d9 --- /dev/null +++ b/src/lib/support/jsontlv/JsonToTlv.h @@ -0,0 +1,35 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +namespace chip { + +/* + * Given a JSON object that represents TLV, this function writes the corresponding TLV bytes into the provided buffer. + * The size of tlv will be adjusted to the size of the actual data written to the buffer. + */ +CHIP_ERROR JsonToTlv(const std::string & jsonString, MutableByteSpan & tlv); + +/* + * Given a JSON object that represents TLV, this function makes encode calls on the given TLVWriter to encode the corresponding TLV + * bytes. + */ +CHIP_ERROR JsonToTlv(const std::string & jsonString, TLV::TLVWriter & writer); + +} // namespace chip diff --git a/src/lib/support/jsontlv/README.md b/src/lib/support/jsontlv/README.md new file mode 100644 index 00000000000000..06de13398af7b1 --- /dev/null +++ b/src/lib/support/jsontlv/README.md @@ -0,0 +1,134 @@ +# JSON to TLV and TLV to JSON Converter + +## Introduction + +Helper functions for converting TLV-encoded data to Json format and vice versa. + +### Supported payloads + +The library supports + +- full bi-directional conversion for matter data model payloads +- Additional support for generic 32-bit unsigned integer ids using "implicit + profile tags": + + - 8-bit IDs are encoded as `ContextTags`, which matches matter + specification for encoding field identifiers + - For IDs that are larger, they will be encoded as + `Implicit Profile Tags`. The reason for allowing such IDs is to support + json formats where keys contain ids typically found in paths, like + `{"1234:INT": 10}` meaning `"Attribute 1234 has value 10"`. + +### Format details + +In order for the Json format to represent the TLV format without loss of +information, the Json name of each element should contain the TLV element tag +and type information. + +The Json name schema is as follows: + +``` +{ [field_name:]field_id:element_type[-sub_element_type] } +``` + +Specific rules: + +- 'element_type' MUST map to the TLV Type as specified in the table below. +- For 'element_type' of type "ARRAY", the sub_element_type MUST always be + present and be equal to the 'element_type' of the elements in the array. +- Array elements MUST have the same 'element_type'. +- Array elements MUST have anonymous TLV tags. +- 'field_name' is always an optional field and can be provided if the semantic + name for the field is available. +- In the case of an empty array, 'sub_element_type' should be "?" (unknown + element type). +- The unknown element type “?” MUST never occur outside of "ARRAY-?". +- 'field_id' is equivalent to the Field ID for all cluster payloads (commands, + events, attributes), encoded as a decimal number. + +The table below summarizes all element types and their corresponding encoding in +the Json element name: + +| TLV Type | element_type | JSON Type | +| -------------------------------------- | ---------------------- | ------------------------------- | +| Unsigned Integer ( < 2^32 ) | UINT | Number | +| Unsigned Integer ( >= 2^32 ) | UINT | String | +| Signed Integer ( >= -2^31 and < 2^31 ) | INT | Number | +| Signed Integer ( < -2^31 or >= 2^31 ) | INT | String | +| Boolean | BOOL | Boolean | +| Float (positive/negative infinity) | FLOAT | String ("Infinity"/"-Infinity") | +| Double (positive/negative infinity) | DOUBLE | String ("Infinity"/"-Infinity") | +| Float (not infinity) | FLOAT | Number | +| Double (not infinity) | DOUBLE | Number | +| Octet String | BYTES | String (Base64 encoded) | +| UTF-8 String | STRING | String | +| Null Value | NULL | null | +| Struct | STRUCT | Dict | +| Array | ARRAY-sub_element_type | Array | +| Unknown | ? | Empty Array | + +Note that this is NOT a generalized JSON representation of TLV and does not +support arbitrary TLV conversions. The main goal of this Json format is to +support data model payloads for events/commands/attributes. Some of the +limitations of this format are: + +- TLV List types are not supported. +- TLV Array cannot contain another TLV Array. +- The top-level container MUST be an anonymous STRUCT. +- Elements of the TLV Structure MUST have Context or Implicit Profile Tags. +- Implicit Profile Tag number MUST be larger or equal to 256 and smaller than + 2^32 + 1. +- TLV Structure element MUST be sorted by tag numbers from low to high, where + sorted elements with Context Tags MUST appear first followed by sorted + elements with Implicit Profile Tags. + +## Format Example + +The following is an example of a Json string. It represents various TLV +elements, arrays, and structures. + +``` +{ // top-level anonymous structure + "0:ARRAY-STRUCT" : [ // array of structures + { + "0:INT" : 8, // Struct.elem0 + "1:BOOL" : true // Struct.elem1 + } + ], + "1:STRUCT" : { // structure + "0:INT" : 12, // Struct.elem0 + "1:BOOL" : false, // Struct.elem1 + "2:STRING" : "example" // Struct.elem2 + }, + "2:INT" : "40000000000", // int as string + "isQualified:3:BOOL" : true, // boolean with field_name in the Json name + "4:ARRAY-?" : [], // empty array + "5:ARRAY-DOUBLE" : [ // array of doubles + 1.1, + 134.2763, + -12345.87, + "Infinity", // positive infinity + 62534, // positive integer-valued double + -62534 // negative integer-valued double + ], + "6:ARRAY-BYTES" : [ // array of Octet Strings: [{00 01 02 03 04}, {FF}, {4A EF 88}] + "AAECAwQ=", // base64( {00 01 02 03 04} ) + "/w==", // base64( {FF} ) + "Su+I" // base64( {4A EF 88} ) + ], + "7:BYTES" : "VGVzdCBCeXRlcw==", // base64( "Test Bytes" ) + "8:DOUBLE" : 17.9, // 17.9 as double + "9:FLOAT" : 17.9, // 17.9 as float + "10:FLOAT" : "-Infinity", // Negative infinity float + "contact:11:STRUCT" : { // structure example with field_name in the Json name + "name:1:STRING" : "John", + "age:2:UINT" : 34, + "approved:3:BOOL" : true, + "kids:4:ARRAY-INT" : [ + 5, + 9, + 10 + ] + } +} +``` diff --git a/src/lib/support/jsontlv/TlvToJson.cpp b/src/lib/support/jsontlv/TlvToJson.cpp new file mode 100644 index 00000000000000..d9884f60af43fa --- /dev/null +++ b/src/lib/support/jsontlv/TlvToJson.cpp @@ -0,0 +1,382 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "lib/support/CHIPMemString.h" +#include "lib/support/ScopedBuffer.h" +#include +#include +#include +#include +#include +#include + +namespace chip { + +namespace { + +// actual value of this does not actually matter, however we need +// a value to be able to read 32-bit implicit profile tags +// +// JSON format never has this and TLV payload contains "implicit profile" +// and this value is never stored. +constexpr uint32_t kTemporaryImplicitProfileId = 0xFF01; + +/// RAII to switch the implicit profile id for a reader +class ImplicitProfileIdChange +{ +public: + ImplicitProfileIdChange(TLV::TLVReader & reader, uint32_t id) : mReader(reader), mOldImplicitProfileId(reader.ImplicitProfileId) + { + reader.ImplicitProfileId = id; + } + ~ImplicitProfileIdChange() { mReader.ImplicitProfileId = mOldImplicitProfileId; } + +private: + TLV::TLVReader & mReader; + uint32_t mOldImplicitProfileId; +}; + +const char * GetJsonElementStrFromType(const ElementTypeContext & ctx) +{ + switch (ctx.tlvType) + { + case TLV::kTLVType_UnsignedInteger: + return kElementTypeUInt; + case TLV::kTLVType_SignedInteger: + return kElementTypeInt; + case TLV::kTLVType_Boolean: + return kElementTypeBool; + case TLV::kTLVType_FloatingPointNumber: + return ctx.isDouble ? kElementTypeDouble : kElementTypeFloat; + case TLV::kTLVType_ByteString: + return kElementTypeBytes; + case TLV::kTLVType_UTF8String: + return kElementTypeString; + case TLV::kTLVType_Null: + return kElementTypeNull; + case TLV::kTLVType_Structure: + return kElementTypeStruct; + case TLV::kTLVType_Array: + return kElementTypeArray; + default: + return kElementTypeEmpty; + } +}; + +/* + * Encapsulates the element information required to construct a JSON element name string in a JSON object. + * + * The generated JSON element name string is constructed as: + * 'TagNumber:ElementType-SubElementType'. + */ +struct JsonObjectElementContext +{ + JsonObjectElementContext(TLV::TLVReader & reader) + { + tag = reader.GetTag(); + implicitProfileId = reader.ImplicitProfileId; + type.tlvType = reader.GetType(); + if (type.tlvType == TLV::kTLVType_FloatingPointNumber) + { + type.isDouble = reader.IsElementDouble(); + } + } + + std::string GenerateJsonElementName() const + { + std::string str = "???"; + if (TLV::IsContextTag(tag)) + { + // common case for context tags: raw value + str = std::to_string(TLV::TagNumFromTag(tag)); + } + else if (TLV::IsProfileTag(tag)) + { + if (TLV::ProfileIdFromTag(tag) == implicitProfileId) + { + // Explicit assume implicit tags are just things we want + // 32-bit numbers for + str = std::to_string(TLV::TagNumFromTag(tag)); + } + else + { + // UNEXPECTED, create a full 64-bit number here + str = std::to_string(TLV::ProfileIdFromTag(tag)) + "/" + std::to_string(TLV::TagNumFromTag(tag)); + } + } + str = str + ":" + GetJsonElementStrFromType(type); + if (type.tlvType == TLV::kTLVType_Array) + { + str = str + "-" + GetJsonElementStrFromType(subType); + } + return str; + } + + TLV::Tag tag; + uint32_t implicitProfileId; + ElementTypeContext type; + ElementTypeContext subType; +}; + +/* + * This templated function inserts a name/value pair into the Json object. + * The value is templated to be of type T and accepts any of the following types: + * + * bool, uint*_t, int*_t, char *, float, double, std::string, Json::Value + * + * This method uses the provided element context to generate Json name string. + */ +template +void InsertJsonElement(Json::Value & json, const JsonObjectElementContext & ctx, T val) +{ + if (json.isArray()) + { + json.append(val); + } + else + { + json[ctx.GenerateJsonElementName()] = val; + } +} + +static CHIP_ERROR TlvToJson(TLV::TLVReader & reader, Json::Value & jsonObj); + +/* + * Given a TLVReader positioned at TLV structure this function: + * - enters structure + * - converts all elements of a structure into JSON object representation + * - exits structure + */ +CHIP_ERROR TlvStructToJson(TLV::TLVReader & reader, Json::Value & jsonObj) +{ + CHIP_ERROR err; + TLV::TLVType containerType; + + ReturnErrorOnFailure(reader.EnterContainer(containerType)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + TLV::Tag tag = reader.GetTag(); + VerifyOrReturnError(TLV::IsContextTag(tag) || TLV::IsProfileTag(tag), CHIP_ERROR_INVALID_TLV_TAG); + + // Profile tags are expected to be implicit profile tags and they are + // used to encode > 8bit values from json + if (TLV::IsProfileTag(tag)) + { + VerifyOrReturnError(TLV::ProfileIdFromTag(tag) == reader.ImplicitProfileId, CHIP_ERROR_INVALID_TLV_TAG); + VerifyOrReturnError(TLV::TagNumFromTag(tag) > UINT8_MAX, CHIP_ERROR_INVALID_TLV_TAG); + } + + // Recursively convert to JSON the item within the struct. + ReturnErrorOnFailure(TlvToJson(reader, jsonObj)); + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + return reader.ExitContainer(containerType); +} + +CHIP_ERROR TlvToJson(TLV::TLVReader & reader, Json::Value & jsonObj) +{ + JsonObjectElementContext context(reader); + + switch (reader.GetType()) + { + case TLV::kTLVType_UnsignedInteger: { + uint64_t v; + ReturnErrorOnFailure(reader.Get(v)); + if (CanCastTo(v)) + { + InsertJsonElement(jsonObj, context, v); + } + else + { + InsertJsonElement(jsonObj, context, std::to_string(v)); + } + break; + } + + case TLV::kTLVType_SignedInteger: { + int64_t v; + ReturnErrorOnFailure(reader.Get(v)); + if (CanCastTo(v)) + { + InsertJsonElement(jsonObj, context, v); + } + else + { + InsertJsonElement(jsonObj, context, std::to_string(v)); + } + break; + } + + case TLV::kTLVType_Boolean: { + bool v; + ReturnErrorOnFailure(reader.Get(v)); + InsertJsonElement(jsonObj, context, v); + break; + } + + case TLV::kTLVType_FloatingPointNumber: { + double v; + ReturnErrorOnFailure(reader.Get(v)); + if (v == std::numeric_limits::infinity()) + { + InsertJsonElement(jsonObj, context, kFloatingPointPositiveInfinity); + } + else if (v == -std::numeric_limits::infinity()) + { + InsertJsonElement(jsonObj, context, kFloatingPointNegativeInfinity); + } + else + { + InsertJsonElement(jsonObj, context, v); + } + break; + } + + case TLV::kTLVType_ByteString: { + ByteSpan span; + ReturnErrorOnFailure(reader.Get(span)); + + Platform::ScopedMemoryBuffer byteString; + byteString.Alloc(BASE64_ENCODED_LEN(span.size()) + 1); + VerifyOrReturnError(byteString.Get() != nullptr, CHIP_ERROR_NO_MEMORY); + + auto encodedLen = Base64Encode(span.data(), static_cast(span.size()), byteString.Get()); + byteString.Get()[encodedLen] = '\0'; + + InsertJsonElement(jsonObj, context, byteString.Get()); + break; + } + + case TLV::kTLVType_UTF8String: { + CharSpan span; + ReturnErrorOnFailure(reader.Get(span)); + + std::string str(span.data(), span.size()); + InsertJsonElement(jsonObj, context, str); + break; + } + + case TLV::kTLVType_Null: { + InsertJsonElement(jsonObj, context, Json::Value()); + break; + } + + case TLV::kTLVType_Structure: { + Json::Value jsonStruct(Json::objectValue); + ReturnErrorOnFailure(TlvStructToJson(reader, jsonStruct)); + InsertJsonElement(jsonObj, context, jsonStruct); + break; + } + + case TLV::kTLVType_Array: { + CHIP_ERROR err; + Json::Value jsonArray(Json::arrayValue); + ElementTypeContext prevSubType; + ElementTypeContext nextSubType; + TLV::TLVType containerType; + + ReturnErrorOnFailure(reader.EnterContainer(containerType)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(reader.GetTag() == TLV::AnonymousTag(), CHIP_ERROR_INVALID_TLV_TAG); + VerifyOrReturnError(reader.GetType() != TLV::kTLVType_Array, CHIP_ERROR_INVALID_TLV_ELEMENT); + + nextSubType.tlvType = reader.GetType(); + if (nextSubType.tlvType == TLV::kTLVType_FloatingPointNumber) + { + nextSubType.isDouble = reader.IsElementDouble(); + } + + if (jsonArray.empty()) + { + prevSubType = nextSubType; + } + else + { + VerifyOrReturnError(prevSubType.tlvType == nextSubType.tlvType && prevSubType.isDouble == nextSubType.isDouble, + CHIP_ERROR_INVALID_TLV_ELEMENT); + } + + // Recursively convert to JSON the encompassing item within the array. + ReturnErrorOnFailure(TlvToJson(reader, jsonArray)); + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(containerType)); + + context.subType = prevSubType; + InsertJsonElement(jsonObj, context, jsonArray); + break; + } + + default: + return CHIP_ERROR_INVALID_TLV_ELEMENT; + break; + } + + return CHIP_NO_ERROR; +} + +} // namespace + +CHIP_ERROR TlvToJson(const ByteSpan & tlv, std::string & jsonString) +{ + TLV::TLVReader reader; + reader.Init(tlv); + reader.ImplicitProfileId = kTemporaryImplicitProfileId; + + ReturnErrorOnFailure(reader.Next()); + return TlvToJson(reader, jsonString); +} + +CHIP_ERROR TlvToJson(TLV::TLVReader & reader, std::string & jsonString) +{ + // The top level element must be a TLV Structure of Anonymous type. + VerifyOrReturnError(reader.GetType() == TLV::kTLVType_Structure, CHIP_ERROR_WRONG_TLV_TYPE); + VerifyOrReturnError(reader.GetTag() == TLV::AnonymousTag(), CHIP_ERROR_INVALID_TLV_TAG); + + // During json conversion, a implicit profile ID is required + ImplicitProfileIdChange implicitProfileIdChange(reader, kTemporaryImplicitProfileId); + + Json::Value jsonObject(Json::objectValue); + ReturnErrorOnFailure(TlvStructToJson(reader, jsonObject)); + + Json::StyledWriter writer; + jsonString = writer.write(jsonObject); + return CHIP_NO_ERROR; +} + +std::string PrettyPrintJsonString(const std::string & jsonString) +{ + Json::Reader reader; + Json::Value jsonObject; + reader.parse(jsonString, jsonObject); + Json::StyledWriter writer; + return writer.write(jsonObject); +} + +std::string MakeJsonSingleLine(const std::string & jsonString) +{ + std::string str = PrettyPrintJsonString(jsonString); + str.erase(std::remove_if(str.begin(), str.end(), ::isspace), str.end()); + return str; +} + +} // namespace chip diff --git a/src/lib/support/jsontlv/TlvToJson.h b/src/lib/support/jsontlv/TlvToJson.h new file mode 100644 index 00000000000000..ea7589271e8d2e --- /dev/null +++ b/src/lib/support/jsontlv/TlvToJson.h @@ -0,0 +1,51 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +namespace chip { + +/* + * Given a TLVReader positioned at a particular cluster data payload, this function converts + * the TLV data into a JSON object representation. + * + * NOTE: This only accepts data model payloads for events/commands/attributes. It does not support + * arbitrary TLV conversion to JSON. + */ +CHIP_ERROR TlvToJson(TLV::TLVReader & reader, std::string & jsonString); + +/* + * Given a TLV encoded byte array, this function converts it into JSON object. + */ +CHIP_ERROR TlvToJson(const ByteSpan & tlv, std::string & jsonString); + +/* + * Pretty-prints the input Json string using standard library pretty-printer. + * This pretty-printer generates a Json string in a human friendly format with 3 space indentation + * and nice representation of arrays and objects. + * The input can be any string, as long as it's valid Json. + */ +std::string PrettyPrintJsonString(const std::string & jsonString); + +/* + * Reformats the input Json string as a single-line string with no spaces or newlines. + * The input can be any string, as long as it's valid Json. + */ +std::string MakeJsonSingleLine(const std::string & jsonString); + +} // namespace chip diff --git a/src/lib/support/tests/BUILD.gn b/src/lib/support/tests/BUILD.gn index a42ecec423a382..1ef6db03710146 100644 --- a/src/lib/support/tests/BUILD.gn +++ b/src/lib/support/tests/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2020-2023 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -36,6 +36,8 @@ chip_test_suite("tests") { "TestFold.cpp", "TestIniEscaping.cpp", "TestIntrusiveList.cpp", + "TestJsonToTlv.cpp", + "TestJsonToTlvToJson.cpp", "TestOwnerOf.cpp", "TestPersistedCounter.cpp", "TestPool.cpp", @@ -51,6 +53,7 @@ chip_test_suite("tests") { "TestTestPersistentStorageDelegate.cpp", "TestThreadOperationalDataset.cpp", "TestTimeUtils.cpp", + "TestTlvJson.cpp", "TestTlvToJson.cpp", "TestVariant.cpp", "TestZclString.cpp", diff --git a/src/lib/support/tests/TestJsonToTlv.cpp b/src/lib/support/tests/TestJsonToTlv.cpp new file mode 100644 index 00000000000000..c08ba978360173 --- /dev/null +++ b/src/lib/support/tests/TestJsonToTlv.cpp @@ -0,0 +1,344 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace { + +using namespace chip::Encoding; +using namespace chip; +using namespace chip::app; + +constexpr uint32_t kImplicitProfileId = 0x1234; + +uint8_t gBuf1[1024]; +uint8_t gBuf2[1024]; +TLV::TLVWriter gWriter1; +TLV::TLVWriter gWriter2; +nlTestSuite * gSuite; + +void SetupWriters() +{ + gWriter1.Init(gBuf1); + gWriter1.ImplicitProfileId = kImplicitProfileId; + + gWriter2.Init(gBuf2); + gWriter2.ImplicitProfileId = kImplicitProfileId; +} + +void PrintBytes(const uint8_t * buf, uint32_t len) +{ + for (uint32_t i = 0; i < len; i++) + { + printf("%02X ", buf[i]); + } + printf("\n"); +} + +bool MatchWriter1and2() +{ + auto matches = + (gWriter1.GetLengthWritten() == gWriter2.GetLengthWritten()) && (memcmp(gBuf1, gBuf2, gWriter1.GetLengthWritten()) == 0); + + if (!matches) + { + printf("Didn't match!\n"); + printf("Reference:\n"); + PrintBytes(gBuf1, gWriter1.GetLengthWritten()); + + printf("Generated:\n"); + PrintBytes(gBuf2, gWriter2.GetLengthWritten()); + } + + return matches; +} + +template +void ConvertJsonToTlvAndValidate(T val, const std::string & jsonString) +{ + CHIP_ERROR err; + TLV::TLVType container; + + SetupWriters(); + + err = gWriter1.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, container); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = DataModel::Encode(gWriter1, TLV::ContextTag(1), val); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = gWriter1.EndContainer(container); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = gWriter1.Finalize(); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = JsonToTlv(jsonString, gWriter2); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + NL_TEST_ASSERT(gSuite, MatchWriter1and2()); +} + +void TestConverter(nlTestSuite * inSuite, void * inContext) +{ + std::string jsonString; + + gSuite = inSuite; + + jsonString = "{\n" + " \"1:UINT\" : 30\n" + "}\n"; + ConvertJsonToTlvAndValidate(static_cast(30), jsonString); + + jsonString = "{\n" + " \"1:INT\" : -30\n" + "}\n"; + ConvertJsonToTlvAndValidate(static_cast(-30), jsonString); + + jsonString = "{\n" + " \"1:BOOL\" : false\n" + "}\n"; + ConvertJsonToTlvAndValidate(false, jsonString); + + jsonString = "{\n" + " \"1:BOOL\" : true\n" + "}\n"; + ConvertJsonToTlvAndValidate(true, jsonString); + + jsonString = "{\n" + " \"1:FLOAT\" : 1.0\n" + "}\n"; + ConvertJsonToTlvAndValidate(static_cast(1.0), jsonString); + + jsonString = "{\n" + " \"1:DOUBLE\" : 1.0\n" + "}\n"; + ConvertJsonToTlvAndValidate(static_cast(1.0), jsonString); + + jsonString = "{\n" + " \"1:STRING\" : \"hello\"\n" + "}\n"; + ConvertJsonToTlvAndValidate(CharSpan::fromCharString("hello"), jsonString); + + // Validated using https://base64.guru/converter/encode/hex + const uint8_t byteBuf[] = { 0x01, 0x02, 0x03, 0x04, 0xff, 0xfe, 0x99, 0x88, 0xdd, 0xcd }; + ByteSpan byteSpan(byteBuf); + jsonString = "{\n" + " \"1:BYTES\" : \"AQIDBP/+mYjdzQ==\"\n" + "}\n"; + ConvertJsonToTlvAndValidate(byteSpan, jsonString); + + DataModel::Nullable nullValue; + jsonString = "{\n" + " \"1:NULL\" : null\n" + "}\n"; + ConvertJsonToTlvAndValidate(nullValue, jsonString); + + Clusters::UnitTesting::Structs::SimpleStruct::Type structVal; + structVal.a = 20; + structVal.b = true; + structVal.d = byteBuf; + structVal.e = CharSpan::fromCharString("hello"); + structVal.g = static_cast(1.0); + structVal.h = static_cast(1.0); + + jsonString = "{\n" + " \"1:STRUCT\" : {\n" + " \"0:UINT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"AQIDBP/+mYjdzQ==\",\n" + " \"4:STRING\" : \"hello\",\n" + " \"5:UINT\" : 0,\n" + " \"6:FLOAT\" : 1.0,\n" + " \"7:DOUBLE\" : 1.0\n" + " }\n" + "}\n"; + ConvertJsonToTlvAndValidate(structVal, jsonString); + + uint8_t int8uListData[] = { 1, 2, 3, 4 }; + DataModel::List int8uList; + + int8uList = int8uListData; + jsonString = "{\n" + " \"1:ARRAY-UINT\" : [ 1, 2, 3, 4 ]\n" + "}\n"; + ConvertJsonToTlvAndValidate(int8uList, jsonString); + + int8uList = {}; + jsonString = "{\n" + " \"1:ARRAY-?\" : [ ]\n" + "}\n"; + ConvertJsonToTlvAndValidate(int8uList, jsonString); + + DataModel::Nullable> nullValueList; + jsonString = "{\n" + " \"1:NULL\" : null\n" + "}\n"; + ConvertJsonToTlvAndValidate(nullValueList, jsonString); + + Clusters::UnitTesting::Structs::SimpleStruct::Type structListData[2] = { structVal, structVal }; + DataModel::List structList; + + structList = structListData; + jsonString = "{\n" + " \"1:ARRAY-STRUCT\" : [\n" + " {\n" + " \"0:UINT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"AQIDBP/+mYjdzQ==\",\n" + " \"4:STRING\" : \"hello\",\n" + " \"5:UINT\" : 0,\n" + " \"6:FLOAT\" : 1.0,\n" + " \"7:DOUBLE\" : 1.0\n" + " },\n" + " {\n" + " \"0:UINT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"AQIDBP/+mYjdzQ==\",\n" + " \"4:STRING\" : \"hello\",\n" + " \"5:UINT\" : 0,\n" + " \"6:FLOAT\" : 1.0,\n" + " \"7:DOUBLE\" : 1.0\n" + " }\n" + " ]\n" + "}\n"; + ConvertJsonToTlvAndValidate(structList, jsonString); +} + +void Test32BitConvert(nlTestSuite * inSuite, void * inContext) +{ + // JSON TLV format explicitly wants to support 32-bit integer preservation. + // + // This is to support encode/decode of a format like: + // { "123456:BOOL" : true } to be a compact way of encoding + // "attribute id 123456 has value true" + // + // Such an encoding is NOT part of the matter spec, so best-effort is done here: + // - low ids are encoded as context tags (this is in the spec for any structure encoding) + // - large ids are encoded as implicit tags (NOT used in spec as spec never has such high ids) + TLV::TLVReader reader; + TLV::TLVType tlvType; + int32_t value = 0; + + // convert a simple single value + { + SetupWriters(); + JsonToTlv("{\"1:INT\": 321}", gWriter1); + NL_TEST_ASSERT(inSuite, gWriter1.Finalize() == CHIP_NO_ERROR); + + reader.Init(gBuf1, gWriter1.GetLengthWritten()); + reader.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(inSuite, reader.Next(TLV::AnonymousTag()) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.GetType() == TLV::kTLVType_Structure); + NL_TEST_ASSERT(inSuite, reader.EnterContainer(tlvType) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.Next(TLV::ContextTag(1)) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.GetType() == TLV::kTLVType_SignedInteger); + NL_TEST_ASSERT(inSuite, reader.Get(value) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, value == 321); + NL_TEST_ASSERT(inSuite, reader.Next() == CHIP_END_OF_TLV); + NL_TEST_ASSERT(inSuite, reader.ExitContainer(tlvType) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.Next() == CHIP_END_OF_TLV); + } + + // convert a single value that is larger than 8 bit + { + SetupWriters(); + JsonToTlv("{\"1234:INT\": 321}", gWriter1); + NL_TEST_ASSERT(inSuite, gWriter1.Finalize() == CHIP_NO_ERROR); + + reader.Init(gBuf1, gWriter1.GetLengthWritten()); + reader.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(inSuite, reader.Next(TLV::AnonymousTag()) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.GetType() == TLV::kTLVType_Structure); + NL_TEST_ASSERT(inSuite, reader.EnterContainer(tlvType) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.Next(TLV::ProfileTag(kImplicitProfileId, 1234)) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.GetType() == TLV::kTLVType_SignedInteger); + NL_TEST_ASSERT(inSuite, reader.Get(value) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, value == 321); + NL_TEST_ASSERT(inSuite, reader.Next() == CHIP_END_OF_TLV); + NL_TEST_ASSERT(inSuite, reader.ExitContainer(tlvType) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.Next() == CHIP_END_OF_TLV); + } + + // Convert to a full 32-bit value, unsigned + { + SetupWriters(); + JsonToTlv("{\"4275878552:INT\": 321}", gWriter1); + NL_TEST_ASSERT(inSuite, gWriter1.Finalize() == CHIP_NO_ERROR); + + reader.Init(gBuf1, gWriter1.GetLengthWritten()); + reader.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(inSuite, reader.Next(TLV::AnonymousTag()) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.GetType() == TLV::kTLVType_Structure); + NL_TEST_ASSERT(inSuite, reader.EnterContainer(tlvType) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.Next(TLV::ProfileTag(kImplicitProfileId, 0xFEDCBA98u)) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.GetType() == TLV::kTLVType_SignedInteger); + NL_TEST_ASSERT(inSuite, reader.Get(value) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, value == 321); + NL_TEST_ASSERT(inSuite, reader.Next() == CHIP_END_OF_TLV); + NL_TEST_ASSERT(inSuite, reader.ExitContainer(tlvType) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, reader.Next() == CHIP_END_OF_TLV); + } + + // FIXME: implement +} + +int Initialize(void * apSuite) +{ + VerifyOrReturnError(chip::Platform::MemoryInit() == CHIP_NO_ERROR, FAILURE); + return SUCCESS; +} + +int Finalize(void * aContext) +{ + chip::Platform::MemoryShutdown(); + return SUCCESS; +} + +// clang-format off +const nlTest sTests[] = +{ + NL_TEST_DEF("TestConverter", TestConverter), + NL_TEST_DEF("Test32BitConvert", Test32BitConvert), + NL_TEST_SENTINEL() +}; +// clang-format on + +} // namespace + +int TestJsonToTlv() +{ + nlTestSuite theSuite = { "JsonToTlv", sTests, Initialize, Finalize }; + nlTestRunner(&theSuite, nullptr); + return nlTestRunnerStats(&theSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestJsonToTlv) diff --git a/src/lib/support/tests/TestJsonToTlvToJson.cpp b/src/lib/support/tests/TestJsonToTlvToJson.cpp new file mode 100644 index 00000000000000..d494521b62537e --- /dev/null +++ b/src/lib/support/tests/TestJsonToTlvToJson.cpp @@ -0,0 +1,1913 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include +#include + +namespace { + +using namespace chip::Encoding; +using namespace chip; +using namespace chip::app; + +constexpr uint32_t kImplicitProfileId = 0x1122; + +nlTestSuite * gSuite; + +void PrintSpan(const char * prefix, const ByteSpan & span) +{ + printf("%s", prefix); + for (size_t i = 0; i < span.size(); i++) + { + printf("%02X ", span.data()[i]); + } + printf("\n"); +} + +void CheckValidConversion(const std::string & jsonOriginal, const ByteSpan & tlvEncoding, const std::string & jsonExpected) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + bool match = false; + + uint8_t buf[256]; + MutableByteSpan tlvEncodingLocal(buf); + err = JsonToTlv(jsonOriginal, tlvEncodingLocal); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + match = tlvEncodingLocal.data_equal(tlvEncoding); + NL_TEST_ASSERT(gSuite, match); + if (!match) + { + printf("ERROR: TLV Encoding Doesn't Match!\n"); + PrintSpan("TLV Encoding Provided as Input for Reference: ", tlvEncoding); + PrintSpan("TLV Encoding Generated from Json Input String: ", tlvEncodingLocal); + } + + std::string generatedJsonString; + err = TlvToJson(tlvEncoding, generatedJsonString); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + auto compactExpectedString = PrettyPrintJsonString(jsonExpected); + auto compactGeneratedString = PrettyPrintJsonString(generatedJsonString); + match = (compactGeneratedString == compactExpectedString); + NL_TEST_ASSERT(gSuite, match); + if (!match) + { + printf("ERROR: Json String Doesn't Match!\n"); + printf("Expected Json String:\n%s\n", compactExpectedString.c_str()); + printf("Generated Json String:\n%s\n", compactGeneratedString.c_str()); + } + + // Verify that Expected Json String Converts to the Same TLV Encoding + tlvEncodingLocal = MutableByteSpan(buf); + err = JsonToTlv(jsonOriginal, tlvEncodingLocal); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + match = tlvEncodingLocal.data_equal(tlvEncoding); + NL_TEST_ASSERT(gSuite, match); + if (!match) + { + printf("ERROR: TLV Encoding Doesn't Match!\n"); + PrintSpan("TLV Encoding Provided as Input for Reference: ", tlvEncoding); + PrintSpan("TLV Encoding Generated from Json Expected String: ", tlvEncodingLocal); + } +} + +// Boolean true +void TestConverter_Boolean_True(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:BOOL\" : true\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Signed Integer 42, 1-octet +void TestConverter_SignedInt_1BytePositive(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"2:INT\" : 42\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Signed Integer -17, 1-octet +void TestConverter_SignedInt_1ByteNegative(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(3), static_cast(-17))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"3:INT\" : -17\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Unsigned Integer 42, 1-octet +void TestConverter_UnsignedInt_1Byte(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(4), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"value:4:UINT\" : 42\n" + "}\n"; + + std::string jsonExpected = "{\n" + " \"4:UINT\" : 42\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonExpected); +} + +// Signed Integer 4242, 2-octet +void TestConverter_SignedInt_2Bytes(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(7), static_cast(4242))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"7:INT\" : 4242\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Signed Integer -170000, 4-octet +void TestConverter_SignedInt_4Bytes(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(80), static_cast(-170000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"80:INT\" : -170000\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Signed Long Integer (int64_t) 40000000000, 8-octet +void TestConverter_SignedInt_8Bytes(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(202), static_cast(40000000000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"202:INT\" : \"40000000000\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Unsigned Long Integer (uint64_t) 40000000000, 8-octet +void TestConverter_UnsignedInt_8Bytes(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(222), static_cast(40000000000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"222:UINT\" : \"40000000000\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// UTF-8 String, 1-octet length, "Hello!" +void TestConverter_UTF8String_Hello(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::ContextTag(0), "Hello!")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:STRING\" : \"Hello!\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Octet String, 1-octet length, octets { 00 01 02 03 04 } +void TestConverter_OctetString(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t v[] = { 0, 1, 2, 3, 4 }; + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutBytes(TLV::ContextTag(1), v, sizeof(v))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:BYTES\" : \"AAECAwQ=\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Null +void TestConverter_Null(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutNull(TLV::ContextTag(1))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:NULL\" : null\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Single precision floating point 0.0 +void TestConverter_Float_0(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), static_cast(0.0))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:FLOAT\" : 0.0\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Single precision floating point (1.0 / 3.0) +void TestConverter_Float_1third(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(100), static_cast(1.0 / 3.0))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"100:FLOAT\" : 0.33333334\n" + "}\n"; + std::string jsonExpected = "{\n" + " \"100:FLOAT\" : 0.3333333432674408\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonExpected); +} + +// Single precision floating point 17.9 +void TestConverter_Float_17_9(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(101), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"101:FLOAT\" : 17.9\n" + "}\n"; + std::string jsonExpected = "{\n" + " \"101:FLOAT\" : 17.899999618530273\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonExpected); +} + +// Single precision floating point positive infinity +void TestConverter_Float_PositiveInfinity(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(101), std::numeric_limits::infinity())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"101:FLOAT\" : \"Infinity\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Single precision floating point negative infinity +void TestConverter_Float_NegativeInfinity(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(101), -std::numeric_limits::infinity())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"101:FLOAT\" : \"-Infinity\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Double precision floating point 0.0 +void TestConverter_Double_0(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), static_cast(0.0))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:DOUBLE\" : 0.0\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Double precision floating point (1.0 / 3.0) +void TestConverter_Double_1third(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(100), static_cast(1.0 / 3.0))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"100:DOUBLE\" : 0.33333333333333331\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Double precision floating point 17.9 +void TestConverter_Double_17_9(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(101), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"101:DOUBLE\" : 17.899999999999999\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Double precision floating point positive infinity +void TestConverter_Double_PositiveInfinity(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(101), std::numeric_limits::infinity())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"101:DOUBLE\" : \"Infinity\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Double precision floating point negative infinity +void TestConverter_Double_NegativeInfinity(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(101), -std::numeric_limits::infinity())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"101:DOUBLE\" : \"-Infinity\"\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Empty Top-Level Structure, {} +void TestConverter_Structure_TopLevelEmpty(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{ }"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Empty Nested Structure, { {} } +void TestConverter_Structure_NestedEmpty(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(1), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:STRUCT\" : { }\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Empty Array, { [] } +void TestConverter_Array_Empty(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(1), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:ARRAY-?\" : []\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +void TestConverter_Array_Empty_ImplicitProfileTag2(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + writer.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, + CHIP_NO_ERROR == + writer.StartContainer(TLV::ProfileTag(kImplicitProfileId, 10000), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"emptyarray:10000:ARRAY-?\" : []\n" + "}\n"; + std::string jsonExpected = "{\n" + " \"10000:ARRAY-?\" : []\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonExpected); +} + +void TestConverter_Array_Empty_ImplicitProfileTag4(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + writer.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, + CHIP_NO_ERROR == + writer.StartContainer(TLV::ProfileTag(kImplicitProfileId, 1000000), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1000000:ARRAY-?\" : []\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Two Signed Integers with context specific tags: {0 = 42, 1 = -17} +void TestConverter_IntsWithContextTags(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), static_cast(-17))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:INT\" : 42,\n" + " \"1:INT\" : -17\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Structure with Two Signed Integers with context specific tags: { {0 = 42, 1 = -17} } +void TestConverter_Struct_IntsWithContextTags(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), static_cast(-17))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:STRUCT\" : {\n" + " \"0:INT\" : 42,\n" + " \"1:INT\" : -17\n" + " }\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Array of Signed Integers: { [0, 1, 2, 3, 4] } +void TestConverter_Array_Ints(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(0))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(1))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(2))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(3))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(4))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:ARRAY-INT\" : [\n" + " 0,\n" + " 1,\n" + " 2,\n" + " 3,\n" + " 4\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Array of Long Signed Integers: { [42, -17, -170000, 40000000000] } +void TestConverter_Array_Ints2(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(-17))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(-170000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(40000000000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:ARRAY-INT\" : [\n" + " 42,\n" + " -17,\n" + " -170000,\n" + " \"40000000000\"\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Array of Signed Integers with MIN/MAX values for each type int8_t/int16_t/int32_t/int64_t +void TestConverter_Array_IntsMinMax(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT8_MIN))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT8_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT16_MIN))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT16_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT32_MIN))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT32_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT64_MIN))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(INT64_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:ARRAY-INT\" : [\n" + " -128,\n" + " 127,\n" + " -32768,\n" + " 32767,\n" + " -2147483648,\n" + " 2147483647,\n" + " -9223372036854775808,\n" + " 9223372036854775807\n" + " ]\n" + "}\n"; + std::string expectedString = "{\n" + " \"0:ARRAY-INT\" : [\n" + " -128,\n" + " 127,\n" + " -32768,\n" + " 32767,\n" + " -2147483648,\n" + " 2147483647,\n" + " \"-9223372036854775808\",\n" + " \"9223372036854775807\"\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, expectedString); +} + +// Array of Long Unsigned Integers: { [42, 170000, 40000000000] } +void TestConverter_Array_UInts(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(170000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(40000000000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:ARRAY-UINT\" : [\n" + " 42,\n" + " 170000,\n" + " \"40000000000\"\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Array of Unsigned Integers, where each element represents MAX possible value for unsigned +// integere types uint8_t, uint16_t, uint32_t, uint64_t: [0xFF, 0xFFFF, 0xFFFFFFFF, 0xFFFFFFFF_FFFFFFFF] +void TestConverter_Array_UIntsMax(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(UINT8_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(UINT16_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(UINT32_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(UINT64_MAX))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:ARRAY-UINT\" : [\n" + " 255,\n" + " 65535,\n" + " 4294967295,\n" + " 18446744073709551615\n" + " ]\n" + "}\n"; + std::string expectedString = "{\n" + " \"0:ARRAY-UINT\" : [\n" + " 255,\n" + " 65535,\n" + " 4294967295,\n" + " \"18446744073709551615\"\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, expectedString); +} + +// Array of Doubles: { [1.1, 134.2763, -12345.87] } +void TestConverter_Array_Doubles(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(1.1))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(134.2763))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(-12345.87))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:ARRAY-DOUBLE\" : [\n" + " 1.1,\n" + " 134.2763,\n" + " -12345.87\n" + " ]\n" + "}\n"; + std::string expectedString = "{\n" + " \"0:ARRAY-DOUBLE\" : [\n" + " 1.1000000000000001,\n" + " 134.27629999999999,\n" + " -12345.870000000001\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, expectedString); +} + +// Array of Floats: { [1.1, 134.2763, -12345.87] } +void TestConverter_Array_Floats(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + writer.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, + CHIP_NO_ERROR == + writer.StartContainer(TLV::ProfileTag(kImplicitProfileId, 1000), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(1.1))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(134.2763))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(-12345.87))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1000:ARRAY-FLOAT\" : [\n" + " 1.1,\n" + " 134.2763,\n" + " -12345.87\n" + " ]\n" + "}\n"; + std::string expectedString = "{\n" + " \"1000:ARRAY-FLOAT\" : [\n" + " 1.1000000238418579,\n" + " 134.27630615234375,\n" + " -12345.8701171875\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, expectedString); +} + +// Array of Strings: ["ABC", "Options", "more"] +void TestConverter_Array_Strings(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + writer.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, + CHIP_NO_ERROR == + writer.StartContainer(TLV::ProfileTag(kImplicitProfileId, 100000), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::AnonymousTag(), "ABC")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::AnonymousTag(), "Options")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::AnonymousTag(), "more")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"100000:ARRAY-STRING\" : [\n" + " \"ABC\",\n" + " \"Options\",\n" + " \"more\"\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Array of Booleans: [true, false, false] +void TestConverter_Array_Booleans(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(255), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), false)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), false)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"255:ARRAY-BOOL\" : [\n" + " true,\n" + " false,\n" + " false\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Array of Nulls: [null, null] +void TestConverter_Array_Nulls(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(1), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutNull(TLV::AnonymousTag())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutNull(TLV::AnonymousTag())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1:ARRAY-NULL\" : [\n" + " null,\n" + " null\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Context tag 255 (max), Unsigned Integer, 1-octet value: {255 = 42U} +void TestConverter_Struct_UInt(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(255), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"value:0:STRUCT\" : {\n" + " \"name:255:UINT\" : 42\n" + " }\n" + "}\n"; + std::string jsonExpected = "{\n" + " \"0:STRUCT\" : {\n" + " \"255:UINT\" : 42\n" + " }\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonExpected); +} + +// Context and Common Profile tags, Unsigned Integer structure: {255 = 42, 256 = 17000, 65535 = +// 1, 65536 = 345678, 4294967295 = 500000000000} +void TestConverter_Struct_MixedTags(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + writer.Init(buf); + writer.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(255), static_cast(42))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ProfileTag(kImplicitProfileId, 256), static_cast(17000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ProfileTag(kImplicitProfileId, 65535), static_cast(1))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ProfileTag(kImplicitProfileId, 65536), static_cast(345678))); + NL_TEST_ASSERT( + gSuite, CHIP_NO_ERROR == writer.Put(TLV::ProfileTag(kImplicitProfileId, 4294967295), static_cast(500000000000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"0:STRUCT\" : {\n" + " \"255:UINT\" : 42,\n" + " \"256:UINT\" : 17000,\n" + " \"65535:UINT\" : 1,\n" + " \"65536:UINT\" : 345678,\n" + " \"4294967295:UINT\" : \"500000000000\"\n" + " }\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonString); +} + +// Structure with mixed elements +void TestConverter_Struct_MixedElements(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + char bytes[] = "Test ByteString Value"; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(20))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(0))); + NL_TEST_ASSERT( + gSuite, + CHIP_NO_ERROR == + writer.PutBytes(TLV::ContextTag(3), reinterpret_cast(bytes), static_cast(strlen(bytes)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::ContextTag(4), "hello")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(5), static_cast(-500000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(6), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(7), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"c:0:STRUCT\" : {\n" + " \"z:0:INT\" : 20,\n" + " \"b:1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"abc:3:BYTES\" : \"VGVzdCBCeXRlU3RyaW5nIFZhbHVl\",\n" + " \"cc:4:STRING\" : \"hello\",\n" + " \"tt:5:INT\" : -500000,\n" + " \"AA:6:DOUBLE\" : 17.9,\n" + " \"B:7:FLOAT\" : 17.9\n" + " }\n" + "}\n"; + std::string expectedString = "{\n" + " \"0:STRUCT\" : {\n" + " \"0:INT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"VGVzdCBCeXRlU3RyaW5nIFZhbHVl\",\n" + " \"4:STRING\" : \"hello\",\n" + " \"5:INT\" : -500000,\n" + " \"6:DOUBLE\" : 17.899999999999999,\n" + " \"7:FLOAT\" : 17.899999618530273\n" + " }\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, expectedString); +} + +// Array of structures with mixed elements +void TestConverter_Array_Structures(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + TLV::TLVType containerType3; + char bytes1[] = "Test ByteString Value 1"; + char bytes2[] = "Test ByteString Value 2"; + + writer.Init(buf); + writer.ImplicitProfileId = kImplicitProfileId; + + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, + CHIP_NO_ERROR == + writer.StartContainer(TLV::ProfileTag(kImplicitProfileId, 1000), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(20))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(0))); + NL_TEST_ASSERT( + gSuite, + CHIP_NO_ERROR == + writer.PutBytes(TLV::ContextTag(3), reinterpret_cast(bytes1), static_cast(strlen(bytes1)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::ContextTag(4), "hello1")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(5), static_cast(-500000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(6), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(7), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(-10))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), false)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(128))); + NL_TEST_ASSERT( + gSuite, + CHIP_NO_ERROR == + writer.PutBytes(TLV::ContextTag(3), reinterpret_cast(bytes2), static_cast(strlen(bytes2)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::ContextTag(4), "hello2")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(5), static_cast(40000000000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(6), static_cast(-1754.923))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(7), static_cast(97.945))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"1000:ARRAY-STRUCT\": [\n" + " {\n" + " \"0:INT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"VGVzdCBCeXRlU3RyaW5nIFZhbHVlIDE=\",\n" + " \"4:STRING\" : \"hello1\",\n" + " \"5:INT\" : -500000,\n" + " \"6:DOUBLE\" : 17.9,\n" + " \"7:FLOAT\" : 17.9\n" + " },\n" + " {\n" + " \"0:INT\" : -10,\n" + " \"1:BOOL\" : false,\n" + " \"2:UINT\" : 128,\n" + " \"3:BYTES\" : \"VGVzdCBCeXRlU3RyaW5nIFZhbHVlIDI=\",\n" + " \"4:STRING\" : \"hello2\",\n" + " \"5:INT\" : \"40000000000\",\n" + " \"6:DOUBLE\" : -1754.923,\n" + " \"7:FLOAT\" : 97.945\n" + " }\n" + " ]\n" + "}\n"; + std::string expectedString = "{\n" + " \"1000:ARRAY-STRUCT\": [\n" + " {\n" + " \"0:INT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"VGVzdCBCeXRlU3RyaW5nIFZhbHVlIDE=\",\n" + " \"4:STRING\" : \"hello1\",\n" + " \"5:INT\" : -500000,\n" + " \"6:DOUBLE\" : 17.899999999999999,\n" + " \"7:FLOAT\" : 17.899999618530273\n" + " },\n" + " {\n" + " \"0:INT\" : -10,\n" + " \"1:BOOL\" : false,\n" + " \"2:UINT\" : 128,\n" + " \"3:BYTES\" : \"VGVzdCBCeXRlU3RyaW5nIFZhbHVlIDI=\",\n" + " \"4:STRING\" : \"hello2\",\n" + " \"5:INT\" : \"40000000000\",\n" + " \"6:DOUBLE\" : -1754.923,\n" + " \"7:FLOAT\" : 97.944999694824219\n" + " }\n" + " ]\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, expectedString); +} + +// Top level with mixed elements +void TestConverter_TopLevel_MixedElements(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + TLV::TLVType containerType3; + char bytes[] = "Test array member 0"; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(42))); + NL_TEST_ASSERT( + gSuite, + CHIP_NO_ERROR == + writer.PutBytes(TLV::ContextTag(1), reinterpret_cast(bytes), static_cast(strlen(bytes)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(156.398))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(3), static_cast(73709551615))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(4), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutNull(TLV::ContextTag(5))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(6), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::ContextTag(1), "John")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(34))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(3), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(4), TLV::kTLVType_Array, containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(5))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(10))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(5), TLV::kTLVType_Array, containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::AnonymousTag(), "Ammy")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::AnonymousTag(), "David")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::AnonymousTag(), "Larry")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(6), TLV::kTLVType_Array, containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), false)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(7), static_cast(0.0))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Finalize()); + + std::string jsonString = "{\n" + " \"value:0:INT\": 42,\n" + " \"value:1:BYTES\": \"VGVzdCBhcnJheSBtZW1iZXIgMA==\",\n" + " \"value:2:DOUBLE\": 156.398,\n" + " \"value:3:UINT\": \"73709551615\",\n" + " \"value:4:BOOL\": true,\n" + " \"value:5:NULL\": null,\n" + " \"value:6:STRUCT\": {\n" + " \"name:1:STRING\": \"John\",\n" + " \"age:2:UINT\": 34,\n" + " \"approved:3:BOOL\": true,\n" + " \"kids:4:ARRAY-INT\": [\n" + " 5,\n" + " 9,\n" + " 10\n" + " ],\n" + " \"names:5:ARRAY-STRING\": [\n" + " \"Ammy\",\n" + " \"David\",\n" + " \"Larry\"\n" + " ],\n" + " \"6:ARRAY-BOOL\": [\n" + " true,\n" + " false,\n" + " true\n" + " ]\n" + " },\n" + " \"value:7:FLOAT\": 0.0\n" + "}\n"; + std::string jsonExpected = "{\n" + " \"0:INT\": 42,\n" + " \"1:BYTES\": \"VGVzdCBhcnJheSBtZW1iZXIgMA==\",\n" + " \"2:DOUBLE\": 156.398,\n" + " \"3:UINT\": \"73709551615\",\n" + " \"4:BOOL\": true,\n" + " \"5:NULL\": null,\n" + " \"6:STRUCT\": {\n" + " \"1:STRING\": \"John\",\n" + " \"2:UINT\": 34,\n" + " \"3:BOOL\": true,\n" + " \"4:ARRAY-INT\": [\n" + " 5,\n" + " 9,\n" + " 10\n" + " ],\n" + " \"5:ARRAY-STRING\": [\n" + " \"Ammy\",\n" + " \"David\",\n" + " \"Larry\"\n" + " ],\n" + " \"6:ARRAY-BOOL\": [\n" + " true,\n" + " false,\n" + " true\n" + " ]\n" + " },\n" + " \"7:FLOAT\": 0.0\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonExpected); +} + +// Complex Structure from README +void TestConverter_Structure_FromReadme(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + uint8_t buf[256]; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + TLV::TLVType containerType3; + uint8_t bytes1[] = { 0x00, 0x01, 0x02, 0x03, 0x04 }; + uint8_t bytes2[] = { 0xFF }; + uint8_t bytes3[] = { 0x4A, 0xEF, 0x88 }; + char bytes4[] = "Test Bytes"; + + writer.Init(buf); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(0), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(8))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(1), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(0), static_cast(12))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), false)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::ContextTag(2), "example")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(40000000000))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(3), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(4), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(5), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(1.1))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(134.2763))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(-12345.87))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), std::numeric_limits::infinity())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(62534))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(-62534))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(6), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutBytes(TLV::AnonymousTag(), bytes1, static_cast(sizeof(bytes1)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutBytes(TLV::AnonymousTag(), bytes2, static_cast(sizeof(bytes2)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutBytes(TLV::AnonymousTag(), bytes3, static_cast(sizeof(bytes3)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT( + gSuite, + CHIP_NO_ERROR == + writer.PutBytes(TLV::ContextTag(7), reinterpret_cast(bytes4), static_cast(strlen(bytes4)))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(8), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(9), static_cast(17.9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(10), -std::numeric_limits::infinity())); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(11), TLV::kTLVType_Structure, containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.PutString(TLV::ContextTag(1), "John")); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(2), static_cast(34))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(3), true)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(4), TLV::kTLVType_Array, containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(5))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(9))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(10))); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType3)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(gSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + + std::string jsonString = "{\n" + " \"0:ARRAY-STRUCT\" : [\n" + " {\n" + " \"0:INT\" : 8,\n" + " \"1:BOOL\" : true\n" + " }\n" + " ],\n" + " \"1:STRUCT\" : {\n" + " \"0:INT\" : 12,\n" + " \"1:BOOL\" : false,\n" + " \"2:STRING\" : \"example\"\n" + " },\n" + " \"2:INT\" : \"40000000000\",\n" + " \"isQualified:3:BOOL\" : true,\n" + " \"4:ARRAY-?\" : [],\n" + " \"5:ARRAY-DOUBLE\" : [\n" + " 1.1000000000000001,\n" + " 134.27629999999999,\n" + " -12345.870000000001,\n" + " \"Infinity\",\n" + " 62534.0,\n" + " -62534.0\n" + " ],\n" + " \"6:ARRAY-BYTES\" : [\n" + " \"AAECAwQ=\",\n" + " \"/w==\",\n" + " \"Su+I\"\n" + " ],\n" + " \"7:BYTES\" : \"VGVzdCBCeXRlcw==\",\n" + " \"8:DOUBLE\" : 17.899999999999999,\n" + " \"9:FLOAT\" : 17.899999618530273,\n" + " \"10:FLOAT\" : \"-Infinity\",\n" + " \"contact:11:STRUCT\" : {\n" + " \"name:1:STRING\" : \"John\",\n" + " \"age:2:UINT\" : 34,\n" + " \"approved:3:BOOL\" : true,\n" + " \"kids:4:ARRAY-INT\" : [\n" + " 5,\n" + " 9,\n" + " 10\n" + " ]\n" + " }\n" + "}\n"; + std::string jsonExpected = "{\n" + " \"0:ARRAY-STRUCT\" : [\n" + " {\n" + " \"0:INT\" : 8,\n" + " \"1:BOOL\" : true\n" + " }\n" + " ],\n" + " \"1:STRUCT\" : {\n" + " \"0:INT\" : 12,\n" + " \"1:BOOL\" : false,\n" + " \"2:STRING\" : \"example\"\n" + " },\n" + " \"2:INT\" : \"40000000000\",\n" + " \"3:BOOL\" : true,\n" + " \"4:ARRAY-?\" : [],\n" + " \"5:ARRAY-DOUBLE\" : [\n" + " 1.1000000000000001,\n" + " 134.27629999999999,\n" + " -12345.870000000001,\n" + " \"Infinity\",\n" + " 62534.0,\n" + " -62534.0\n" + " ],\n" + " \"6:ARRAY-BYTES\" : [\n" + " \"AAECAwQ=\",\n" + " \"/w==\",\n" + " \"Su+I\"\n" + " ],\n" + " \"7:BYTES\" : \"VGVzdCBCeXRlcw==\",\n" + " \"8:DOUBLE\" : 17.899999999999999,\n" + " \"9:FLOAT\" : 17.899999618530273,\n" + " \"10:FLOAT\" : \"-Infinity\",\n" + " \"11:STRUCT\" : {\n" + " \"1:STRING\" : \"John\",\n" + " \"2:UINT\" : 34,\n" + " \"3:BOOL\" : true,\n" + " \"4:ARRAY-INT\" : [\n" + " 5,\n" + " 9,\n" + " 10\n" + " ]\n" + " }\n" + "}\n"; + + ByteSpan tlvSpan(buf, writer.GetLengthWritten()); + CheckValidConversion(jsonString, tlvSpan, jsonExpected); +} + +void TestConverter_TlvToJson_ErrorCases(nlTestSuite * inSuite, void * inContext) +{ + CHIP_ERROR err; + TLV::TLVWriter writer; + TLV::TLVType containerType; + TLV::TLVType containerType2; + + struct TestCase + { + const ByteSpan nEncodedTlv; + CHIP_ERROR mExpectedResult; + const char * mNameString; + }; + + uint8_t buf1[32]; + writer.Init(buf1); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::CommonTag(1), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), true)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Finalize()); + ByteSpan topLevelStructWithTag(buf1, writer.GetLengthWritten()); + + uint8_t buf2[32]; + writer.Init(buf2); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Array, containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), true)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Finalize()); + ByteSpan topLevelIsArray(buf2, writer.GetLengthWritten()); + + uint8_t buf3[32]; + writer.Init(buf3); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(1), TLV::kTLVType_List, containerType2)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Put(TLV::ContextTag(1), true)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Finalize()); + ByteSpan usingList(buf3, writer.GetLengthWritten()); + + uint8_t buf8[32]; + writer.Init(buf8); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::ContextTag(1), TLV::kTLVType_Array, containerType2)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(42))); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(-170000))); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Put(TLV::AnonymousTag(), static_cast(42456))); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.EndContainer(containerType2)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Finalize()); + ByteSpan arrayWithMixedElements(buf8, writer.GetLengthWritten()); + + uint8_t buf9[32]; + writer.Init(buf9); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Put(TLV::ProfileTag(0xAA55FEED, 234), static_cast(42))); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.EndContainer(containerType)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == writer.Finalize()); + ByteSpan useFullyQualifiedTag(buf9, writer.GetLengthWritten()); + + // clang-format off + static const TestCase sTestCases[] = { + // TLV Encoded Input Expected Error Test Case String + // ================================================================================================== + { topLevelStructWithTag, CHIP_ERROR_INVALID_TLV_TAG, "Top-Level Struct is Not Anonymous" }, + { topLevelIsArray, CHIP_ERROR_WRONG_TLV_TYPE, "Top-Level is an Array" }, + { usingList, CHIP_ERROR_INVALID_TLV_ELEMENT, "Using Unsupported List Type" }, + { arrayWithMixedElements, CHIP_ERROR_INVALID_TLV_ELEMENT, "Array with Mixed Elements" }, + { useFullyQualifiedTag, CHIP_ERROR_INVALID_TLV_TAG, "Using Unsupported Fully Qualified Tag" }, + }; + // clang-format on + + for (const auto & testCase : sTestCases) + { + std::string jsonString; + err = TlvToJson(testCase.nEncodedTlv, jsonString); + NL_TEST_ASSERT(inSuite, err == testCase.mExpectedResult); + } +} + +void TestConverter_JsonToTlv_ErrorCases(nlTestSuite * inSuite, void * inContext) +{ + CHIP_ERROR err; + + struct TestCase + { + const std::string mJsonString; + CHIP_ERROR mExpectedResult; + const char * mNameString; + }; + + std::string arrayTypeStringExpectedBool = "{\n" + " \"value:1:ARRAY-BOOL\" : [\n" + " \"yes\",\n" + " \"no\"\n" + " ]\n" + "}\n"; + + std::string arrayTypeIntExpectedUInt = "{\n" + " \"value:1:ARRAY-UINT\" : [\n" + " 45,\n" + " -367\n" + " ]\n" + "}\n"; + + std::string arrayElementsWithName = "{\n" + " \"value:1:ARRAY-INT\" : [\n" + " \"1:INT\" : 45,\n" + " \"2:INT\" : -367\n" + " ]\n" + "}\n"; + + std::string invalidNameWithoutTagField = "{\n" + " \"value:ARRAY-BYTES\" : [\n" + " \"AAECAwQ=\"\n" + " ]\n" + "}\n"; + + std::string invalidNameWithoutTagField2 = "{\n" + " \"UINT\" : 42\n" + "}\n"; + + std::string invalidNameTagValueTooBig = "{\n" + " \"invalid:4294967296:UINT\" : 42\n" + "}\n"; + + std::string invalidNameWithNegativeTag = "{\n" + " \"-1:UINT\" : 42\n" + "}\n"; + + std::string invalidNameWithInvalidTypeField = "{\n" + " \"1:INTEGER\" : 42\n" + "}\n"; + + std::string invalidBytesBase64Value1 = "{\n" + " \"1:BYTES\" : \"SGVsbG8!\"\n" + "}\n"; + + std::string invalidBytesBase64Value2 = "{\n" + " \"1:BYTES\" : \"AAECw=Q\"\n" + "}\n"; + + std::string invalidBytesBase64Value3 = "{\n" + " \"1:BYTES\" : \"AAECwQ=\"\n" + "}\n"; + + std::string invalidPositiveInfinityValue = "{\n" + " \"1:DOUBLE\" : \"+Infinity\"\n" + "}\n"; + + std::string invalidFloatValueAsString = "{\n" + " \"1:FLOAT\" : \"1.1\"\n" + "}\n"; + + // clang-format off + static const TestCase sTestCases[] = { + // Json String Expected Error Test Case String + // ========================================================================================================================== + { arrayTypeStringExpectedBool, CHIP_ERROR_INVALID_ARGUMENT, "Array Type Is String While Bool Is Expected" }, + { arrayTypeIntExpectedUInt, CHIP_ERROR_INVALID_ARGUMENT, "Array Type Is Signed Integer While Unsigned Is Expected" }, + { arrayElementsWithName, CHIP_ERROR_INTERNAL, "Array Elements With Json Name" }, + { invalidNameWithoutTagField, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Name String Without Tag Field" }, + { invalidNameWithoutTagField2, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Name String Without Tag Field 2" }, + { invalidNameTagValueTooBig, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Name String Tag Value Larger than UINT32_MAX" }, + { invalidNameWithNegativeTag, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Name With Negative Tag Value" }, + { invalidNameWithInvalidTypeField, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Name With Invalid Type Field" }, + { invalidBytesBase64Value1, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Base64 Encoding: Invalid Character" }, + { invalidBytesBase64Value2, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Base64 Encoding: Invalid Character" }, + { invalidBytesBase64Value3, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Base64 Encoding: Invalid length" }, + { invalidPositiveInfinityValue, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Double Positive Infinity Encoding" }, + { invalidFloatValueAsString, CHIP_ERROR_INVALID_ARGUMENT, "Invalid Float Value Encoding as a String" }, + }; + // clang-format on + + for (const auto & testCase : sTestCases) + { + uint8_t buf[256]; + MutableByteSpan tlvSpan(buf); + err = JsonToTlv(testCase.mJsonString, tlvSpan); + NL_TEST_ASSERT(inSuite, err == testCase.mExpectedResult); + } +} + +int Initialize(void * apSuite) +{ + VerifyOrReturnError(chip::Platform::MemoryInit() == CHIP_NO_ERROR, FAILURE); + return SUCCESS; +} + +int Finalize(void * aContext) +{ + chip::Platform::MemoryShutdown(); + return SUCCESS; +} + +const nlTest sTests[] = { + NL_TEST_DEF("Test Json Tlv Converter - Boolean True", TestConverter_Boolean_True), + NL_TEST_DEF("Test Json Tlv Converter - Signed Integer 1-Byte Positive", TestConverter_SignedInt_1BytePositive), + NL_TEST_DEF("Test Json Tlv Converter - Signed Integer 1-Byte Negative", TestConverter_SignedInt_1ByteNegative), + NL_TEST_DEF("Test Json Tlv Converter - Unsigned Integer 1-Byte", TestConverter_UnsignedInt_1Byte), + NL_TEST_DEF("Test Json Tlv Converter - Signed Integer 2-Bytes", TestConverter_SignedInt_2Bytes), + NL_TEST_DEF("Test Json Tlv Converter - Signed Integer 4-Bytes", TestConverter_SignedInt_4Bytes), + NL_TEST_DEF("Test Json Tlv Converter - Signed Integer 8-Bytes", TestConverter_SignedInt_8Bytes), + NL_TEST_DEF("Test Json Tlv Converter - Unsigned Integer 8-Bytes", TestConverter_UnsignedInt_8Bytes), + NL_TEST_DEF("Test Json Tlv Converter - UTF-8 String Hello!", TestConverter_UTF8String_Hello), + NL_TEST_DEF("Test Json Tlv Converter - Octet String", TestConverter_OctetString), + NL_TEST_DEF("Test Json Tlv Converter - Null", TestConverter_Null), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Single Precision 0.0", TestConverter_Float_0), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Single Precision 1/3", TestConverter_Float_1third), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Single Precision 17.9", TestConverter_Float_17_9), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Single Precision Positive Infinity", + TestConverter_Float_PositiveInfinity), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Single Precision Negative Infinity", + TestConverter_Float_NegativeInfinity), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Double Precision 0.0", TestConverter_Double_0), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Double Precision 1/3", TestConverter_Double_1third), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Double Precision 17.9", TestConverter_Double_17_9), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Double Precision Positive Infinity", + TestConverter_Double_PositiveInfinity), + NL_TEST_DEF("Test Json Tlv Converter - Floating Point Double Precision Negative Infinity", + TestConverter_Double_NegativeInfinity), + NL_TEST_DEF("Test Json Tlv Converter - Structure Top-Level Empty", TestConverter_Structure_TopLevelEmpty), + NL_TEST_DEF("Test Json Tlv Converter - Structure Nested Empty", TestConverter_Structure_NestedEmpty), + NL_TEST_DEF("Test Json Tlv Converter - Array Empty", TestConverter_Array_Empty), + NL_TEST_DEF("Test Json Tlv Converter - Array Empty with Implicit Profile Tag (length 2)", + TestConverter_Array_Empty_ImplicitProfileTag2), + NL_TEST_DEF("Test Json Tlv Converter - Array Empty with Implicit Profile Tag (length 4)", + TestConverter_Array_Empty_ImplicitProfileTag4), + NL_TEST_DEF("Test Json Tlv Converter - Two Signed Integers", TestConverter_IntsWithContextTags), + NL_TEST_DEF("Test Json Tlv Converter - Structure With Two Signed Integers", TestConverter_Struct_IntsWithContextTags), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Signed Integers", TestConverter_Array_Ints), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Long Signed Integers", TestConverter_Array_Ints2), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Min/Max Signed Integers", TestConverter_Array_IntsMinMax), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Long Unsigned Integers", TestConverter_Array_UInts), + NL_TEST_DEF("Test Json Tlv Converter - Array of Unsigned Integers with Max values", TestConverter_Array_UIntsMax), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Doubles", TestConverter_Array_Doubles), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Floats", TestConverter_Array_Floats), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Strings", TestConverter_Array_Strings), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Booleans", TestConverter_Array_Booleans), + NL_TEST_DEF("Test Json Tlv Converter - Array Of Nulls", TestConverter_Array_Nulls), + NL_TEST_DEF("Test Json Tlv Converter - Structure with Unsigned Integer", TestConverter_Struct_UInt), + NL_TEST_DEF("Test Json Tlv Converter - Structure Elements with Mixed Tags", TestConverter_Struct_MixedTags), + NL_TEST_DEF("Test Json Tlv Converter - Structure with Mixed Elements", TestConverter_Struct_MixedElements), + NL_TEST_DEF("Test Json Tlv Converter - Array of Structures with Mixed Elements", TestConverter_Array_Structures), + NL_TEST_DEF("Test Json Tlv Converter - Top-Level Structure with Mixed Elements", TestConverter_TopLevel_MixedElements), + NL_TEST_DEF("Test Json Tlv Converter - Complex Structure from the README File", TestConverter_Structure_FromReadme), + NL_TEST_DEF("Test Json Tlv Converter - Tlv to Json Error Cases", TestConverter_TlvToJson_ErrorCases), + NL_TEST_DEF("Test Json Tlv Converter - Json To Tlv Error Cases", TestConverter_JsonToTlv_ErrorCases), + NL_TEST_SENTINEL() +}; + +} // namespace + +int TestJsonToTlvToJson() +{ + nlTestSuite theSuite = { "JsonToTlvToJson", sTests, Initialize, Finalize }; + nlTestRunner(&theSuite, nullptr); + return nlTestRunnerStats(&theSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestJsonToTlvToJson) diff --git a/src/lib/support/tests/TestTlvJson.cpp b/src/lib/support/tests/TestTlvJson.cpp new file mode 100644 index 00000000000000..95a8967820317e --- /dev/null +++ b/src/lib/support/tests/TestTlvJson.cpp @@ -0,0 +1,259 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace { + +using namespace chip::Encoding; +using namespace chip; +using namespace chip::app; + +System::TLVPacketBufferBackingStore gStore; +TLV::TLVWriter gWriter; +TLV::TLVReader gReader; +nlTestSuite * gSuite; + +void SetupBuf() +{ + System::PacketBufferHandle buf; + + buf = System::PacketBufferHandle::New(1024); + gStore.Init(std::move(buf)); + + gWriter.Init(gStore); + gReader.Init(gStore); +} + +CHIP_ERROR SetupReader() +{ + gReader.Init(gStore); + return gReader.Next(); +} + +bool Matches(const char * referenceString, Json::Value & generatedValue) +{ + auto generatedStr = JsonToString(generatedValue); + + // Normalize the reference string to the expected compact value. + Json::Reader reader; + Json::Value referenceValue; + reader.parse(referenceString, referenceValue); + + Json::FastWriter writer; + writer.omitEndingLineFeed(); + auto compactReferenceString = writer.write(referenceValue); + + auto matches = (generatedStr == compactReferenceString); + + if (!matches) + { + printf("Didn't match!\n"); + printf("Reference:\n"); + printf("%s\n", compactReferenceString.c_str()); + + printf("Generated:\n"); + printf("%s\n", generatedStr.c_str()); + } + + return matches; +} + +template +void EncodeAndValidate(T val, const char * expectedJsonString) +{ + CHIP_ERROR err; + + SetupBuf(); + + err = DataModel::Encode(gWriter, TLV::AnonymousTag(), val); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = gWriter.Finalize(); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = SetupReader(); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + Json::Value d; + err = TlvToJson(gReader, d); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + bool matches = Matches(expectedJsonString, d); + NL_TEST_ASSERT(gSuite, matches); +} + +void TestConverter(nlTestSuite * inSuite, void * inContext) +{ + gSuite = inSuite; + + EncodeAndValidate(static_cast(30), + "{\n" + " \"value\" : 30\n" + "}\n"); + + EncodeAndValidate(static_cast(-30), + "{\n" + " \"value\" : -30\n" + "}\n"); + + EncodeAndValidate(false, + "{\n" + " \"value\" : false\n" + "}\n"); + + EncodeAndValidate(true, + "{\n" + " \"value\" : true\n" + "}\n"); + + EncodeAndValidate(1.0, + "{\n" + " \"value\" : 1.0\n" + "}\n"); + + const char charBuf[] = "hello"; + CharSpan charSpan(charBuf); + EncodeAndValidate(charSpan, + "{\n" + " \"value\" : \"hello\"\n" + "}\n"); + + // + // Validated using https://base64.guru/converter/encode/hex + // + const uint8_t byteBuf[] = { 0x01, 0x02, 0x03, 0x04, 0xff, 0xfe, 0x99, 0x88, 0xdd, 0xcd }; + ByteSpan byteSpan(byteBuf); + EncodeAndValidate(byteSpan, + "{\n" + " \"value\" : \"base64:AQIDBP/+mYjdzQ==\"\n" + "}\n"); + + DataModel::Nullable nullValue; + EncodeAndValidate(nullValue, + "{\n" + " \"value\" : null\n" + "}\n"); + + Clusters::UnitTesting::Structs::SimpleStruct::Type structVal; + structVal.a = 20; + structVal.b = true; + structVal.d = byteBuf; + structVal.e = charSpan; + structVal.g = 1.0; + structVal.h = 1.0; + + EncodeAndValidate(structVal, + "{\n" + " \"value\" : {\n" + " \"0\" : 20,\n" + " \"1\" : true,\n" + " \"2\" : 0,\n" + " \"3\" : \"base64:AQIDBP/+mYjdzQ==\",\n" + " \"4\" : \"hello\",\n" + " \"5\" : 0,\n" + " \"6\" : 1.0,\n" + " \"7\" : 1.0\n" + " }\n" + "}\n"); + + uint8_t int8uListData[] = { 1, 2, 3, 4 }; + DataModel::List int8uList; + + int8uList = int8uListData; + + EncodeAndValidate(int8uList, + "{\n" + " \"value\" : [ 1, 2, 3, 4 ]\n" + "}\n"); + + int8uList = {}; + EncodeAndValidate(int8uList, + "{\n" + " \"value\" : []\n" + "}\n"); + + DataModel::Nullable> nullValueList; + EncodeAndValidate(nullValueList, + "{\n" + " \"value\" : null\n" + "}\n"); + + Clusters::UnitTesting::Structs::SimpleStruct::Type structListData[2] = { structVal, structVal }; + DataModel::List structList; + + structList = structListData; + + EncodeAndValidate(structList, + "{\n" + " \"value\" : [\n" + " {\n" + " \"0\" : 20,\n" + " \"1\" : true,\n" + " \"2\" : 0,\n" + " \"3\" : \"base64:AQIDBP/+mYjdzQ==\",\n" + " \"4\" : \"hello\",\n" + " \"5\" : 0,\n" + " \"6\" : 1.0,\n" + " \"7\" : 1.0\n" + " },\n" + " {\n" + " \"0\" : 20,\n" + " \"1\" : true,\n" + " \"2\" : 0,\n" + " \"3\" : \"base64:AQIDBP/+mYjdzQ==\",\n" + " \"4\" : \"hello\",\n" + " \"5\" : 0,\n" + " \"6\" : 1.0,\n" + " \"7\" : 1.0\n" + " }\n" + " ]\n" + "}\n"); +} + +int Initialize(void * apSuite) +{ + VerifyOrReturnError(chip::Platform::MemoryInit() == CHIP_NO_ERROR, FAILURE); + return SUCCESS; +} + +int Finalize(void * aContext) +{ + (void) gStore.Release(); + chip::Platform::MemoryShutdown(); + return SUCCESS; +} + +const nlTest sTests[] = { NL_TEST_DEF("TestConverter", TestConverter), NL_TEST_SENTINEL() }; + +} // namespace + +int TestTlvJson() +{ + nlTestSuite theSuite = { "TlvJson", sTests, Initialize, Finalize }; + nlTestRunner(&theSuite, nullptr); + return nlTestRunnerStats(&theSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestTlvJson) diff --git a/src/lib/support/tests/TestTlvToJson.cpp b/src/lib/support/tests/TestTlvToJson.cpp index 95a8967820317e..5e4bb77cb9ef13 100644 --- a/src/lib/support/tests/TestTlvToJson.cpp +++ b/src/lib/support/tests/TestTlvToJson.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2023 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -52,20 +52,12 @@ CHIP_ERROR SetupReader() return gReader.Next(); } -bool Matches(const char * referenceString, Json::Value & generatedValue) +bool Matches(const std::string & referenceString, const std::string & generatedString) { - auto generatedStr = JsonToString(generatedValue); + auto compactReferenceString = PrettyPrintJsonString(referenceString); + auto compactGeneratedString = PrettyPrintJsonString(generatedString); - // Normalize the reference string to the expected compact value. - Json::Reader reader; - Json::Value referenceValue; - reader.parse(referenceString, referenceValue); - - Json::FastWriter writer; - writer.omitEndingLineFeed(); - auto compactReferenceString = writer.write(referenceValue); - - auto matches = (generatedStr == compactReferenceString); + auto matches = (compactGeneratedString == compactReferenceString); if (!matches) { @@ -74,20 +66,27 @@ bool Matches(const char * referenceString, Json::Value & generatedValue) printf("%s\n", compactReferenceString.c_str()); printf("Generated:\n"); - printf("%s\n", generatedStr.c_str()); + printf("%s\n", compactGeneratedString.c_str()); } return matches; } template -void EncodeAndValidate(T val, const char * expectedJsonString) +void EncodeAndValidate(T val, const std::string & expectedJsonString) { CHIP_ERROR err; + TLV::TLVType container; SetupBuf(); - err = DataModel::Encode(gWriter, TLV::AnonymousTag(), val); + err = gWriter.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, container); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = DataModel::Encode(gWriter, TLV::ContextTag(1), val); + NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); + + err = gWriter.EndContainer(container); NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); err = gWriter.Finalize(); @@ -96,65 +95,69 @@ void EncodeAndValidate(T val, const char * expectedJsonString) err = SetupReader(); NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); - Json::Value d; - err = TlvToJson(gReader, d); + std::string jsonString; + err = TlvToJson(gReader, jsonString); NL_TEST_ASSERT(gSuite, err == CHIP_NO_ERROR); - bool matches = Matches(expectedJsonString, d); + bool matches = Matches(expectedJsonString, jsonString); NL_TEST_ASSERT(gSuite, matches); } void TestConverter(nlTestSuite * inSuite, void * inContext) { + std::string jsonString; + gSuite = inSuite; - EncodeAndValidate(static_cast(30), - "{\n" - " \"value\" : 30\n" - "}\n"); - - EncodeAndValidate(static_cast(-30), - "{\n" - " \"value\" : -30\n" - "}\n"); - - EncodeAndValidate(false, - "{\n" - " \"value\" : false\n" - "}\n"); - - EncodeAndValidate(true, - "{\n" - " \"value\" : true\n" - "}\n"); - - EncodeAndValidate(1.0, - "{\n" - " \"value\" : 1.0\n" - "}\n"); - - const char charBuf[] = "hello"; - CharSpan charSpan(charBuf); - EncodeAndValidate(charSpan, - "{\n" - " \"value\" : \"hello\"\n" - "}\n"); - - // + jsonString = "{\n" + " \"1:UINT\" : 30\n" + "}\n"; + EncodeAndValidate(static_cast(30), jsonString); + + jsonString = "{\n" + " \"1:INT\" : -30\n" + "}\n"; + EncodeAndValidate(static_cast(-30), jsonString); + + jsonString = "{\n" + " \"1:BOOL\" : false\n" + "}\n"; + EncodeAndValidate(false, jsonString); + + jsonString = "{\n" + " \"1:BOOL\" : true\n" + "}\n"; + EncodeAndValidate(true, jsonString); + + jsonString = "{\n" + " \"1:FLOAT\" : 1.0\n" + "}\n"; + EncodeAndValidate(static_cast(1.0), jsonString); + + jsonString = "{\n" + " \"1:DOUBLE\" : 1.0\n" + "}\n"; + EncodeAndValidate(static_cast(1.0), jsonString); + + CharSpan charSpan = CharSpan::fromCharString("hello"); + jsonString = "{\n" + " \"1:STRING\" : \"hello\"\n" + "}\n"; + EncodeAndValidate(charSpan, jsonString); + // Validated using https://base64.guru/converter/encode/hex - // const uint8_t byteBuf[] = { 0x01, 0x02, 0x03, 0x04, 0xff, 0xfe, 0x99, 0x88, 0xdd, 0xcd }; ByteSpan byteSpan(byteBuf); - EncodeAndValidate(byteSpan, - "{\n" - " \"value\" : \"base64:AQIDBP/+mYjdzQ==\"\n" - "}\n"); + jsonString = "{\n" + " \"1:BYTES\" : \"AQIDBP/+mYjdzQ==\"\n" + "}\n"; + EncodeAndValidate(byteSpan, jsonString); DataModel::Nullable nullValue; - EncodeAndValidate(nullValue, - "{\n" - " \"value\" : null\n" - "}\n"); + jsonString = "{\n" + " \"1:NULL\" : null\n" + "}\n"; + EncodeAndValidate(nullValue, jsonString); Clusters::UnitTesting::Structs::SimpleStruct::Type structVal; structVal.a = 20; @@ -164,72 +167,70 @@ void TestConverter(nlTestSuite * inSuite, void * inContext) structVal.g = 1.0; structVal.h = 1.0; - EncodeAndValidate(structVal, - "{\n" - " \"value\" : {\n" - " \"0\" : 20,\n" - " \"1\" : true,\n" - " \"2\" : 0,\n" - " \"3\" : \"base64:AQIDBP/+mYjdzQ==\",\n" - " \"4\" : \"hello\",\n" - " \"5\" : 0,\n" - " \"6\" : 1.0,\n" - " \"7\" : 1.0\n" - " }\n" - "}\n"); + jsonString = "{\n" + " \"1:STRUCT\" : {\n" + " \"0:UINT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"AQIDBP/+mYjdzQ==\",\n" + " \"4:STRING\" : \"hello\",\n" + " \"5:UINT\" : 0,\n" + " \"6:FLOAT\" : 1.0,\n" + " \"7:DOUBLE\" : 1.0\n" + " }\n" + "}\n"; + EncodeAndValidate(structVal, jsonString); uint8_t int8uListData[] = { 1, 2, 3, 4 }; DataModel::List int8uList; - int8uList = int8uListData; + int8uList = int8uListData; + jsonString = "{\n" + " \"1:ARRAY-UINT\" : [ 1, 2, 3, 4 ]\n" + "}\n"; + EncodeAndValidate(int8uList, jsonString); - EncodeAndValidate(int8uList, - "{\n" - " \"value\" : [ 1, 2, 3, 4 ]\n" - "}\n"); - - int8uList = {}; - EncodeAndValidate(int8uList, - "{\n" - " \"value\" : []\n" - "}\n"); + int8uList = {}; + jsonString = "{\n" + " \"1:ARRAY-?\" : [ ]\n" + "}\n"; + EncodeAndValidate(int8uList, jsonString); DataModel::Nullable> nullValueList; - EncodeAndValidate(nullValueList, - "{\n" - " \"value\" : null\n" - "}\n"); + jsonString = "{\n" + " \"1:NULL\" : null\n" + "}\n"; + EncodeAndValidate(nullValueList, jsonString); Clusters::UnitTesting::Structs::SimpleStruct::Type structListData[2] = { structVal, structVal }; DataModel::List structList; structList = structListData; - - EncodeAndValidate(structList, - "{\n" - " \"value\" : [\n" - " {\n" - " \"0\" : 20,\n" - " \"1\" : true,\n" - " \"2\" : 0,\n" - " \"3\" : \"base64:AQIDBP/+mYjdzQ==\",\n" - " \"4\" : \"hello\",\n" - " \"5\" : 0,\n" - " \"6\" : 1.0,\n" - " \"7\" : 1.0\n" - " },\n" - " {\n" - " \"0\" : 20,\n" - " \"1\" : true,\n" - " \"2\" : 0,\n" - " \"3\" : \"base64:AQIDBP/+mYjdzQ==\",\n" - " \"4\" : \"hello\",\n" - " \"5\" : 0,\n" - " \"6\" : 1.0,\n" - " \"7\" : 1.0\n" - " }\n" - " ]\n" - "}\n"); + jsonString = "{\n" + " \"1:ARRAY-STRUCT\" : [\n" + " {\n" + " \"0:UINT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"AQIDBP/+mYjdzQ==\",\n" + " \"4:STRING\" : \"hello\",\n" + " \"5:UINT\" : 0,\n" + " \"6:FLOAT\" : 1.0,\n" + " \"7:DOUBLE\" : 1.0\n" + " },\n" + " {\n" + " \"0:UINT\" : 20,\n" + " \"1:BOOL\" : true,\n" + " \"2:UINT\" : 0,\n" + " \"3:BYTES\" : \"AQIDBP/+mYjdzQ==\",\n" + " \"4:STRING\" : \"hello\",\n" + " \"5:UINT\" : 0,\n" + " \"6:FLOAT\" : 1.0,\n" + " \"7:DOUBLE\" : 1.0\n" + " }\n" + " ]\n" + "}\n"; + EncodeAndValidate(structList, jsonString); } int Initialize(void * apSuite) @@ -249,11 +250,11 @@ const nlTest sTests[] = { NL_TEST_DEF("TestConverter", TestConverter), NL_TEST_S } // namespace -int TestTlvJson() +int TestTlvToJson() { - nlTestSuite theSuite = { "TlvJson", sTests, Initialize, Finalize }; + nlTestSuite theSuite = { "TlvToJson", sTests, Initialize, Finalize }; nlTestRunner(&theSuite, nullptr); return nlTestRunnerStats(&theSuite); } -CHIP_REGISTER_TEST_SUITE(TestTlvJson) +CHIP_REGISTER_TEST_SUITE(TestTlvToJson) From fe75cd11c1c0beef163e9b60f3552668311af336 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 4 Aug 2023 20:38:35 -0400 Subject: [PATCH 20/74] Reduce the size of FabricInfo by reordering some members. (#28278) * Reduce the size of FabricInfo by reordering some members. On 32-bit systems this changes the size from 152 bytes to 144 bytes. On 64-bit systems this changes the size from 168 bytes to 152 bytes. * Address review comment. * Remove static asserts, because offsetof is not happy on FabricInfo. --- src/credentials/FabricTable.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 60cd54df220041..26102984e81130 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -220,18 +220,27 @@ class DLL_EXPORT FabricInfo return TLV::EstimateStructOverhead(sizeof(uint16_t), Crypto::P256SerializedKeypair::Capacity()); } - NodeId mNodeId = kUndefinedNodeId; - FabricId mFabricId = kUndefinedFabricId; - FabricIndex mFabricIndex = kUndefinedFabricIndex; + NodeId mNodeId = kUndefinedNodeId; + FabricId mFabricId = kUndefinedFabricId; // We cache the compressed fabric id since it's used so often and costly to get. CompressedFabricId mCompressedFabricId = kUndefinedCompressedFabricId; // We cache the root public key since it's used so often and costly to get. Crypto::P256PublicKey mRootPublicKey; - VendorId mVendorId = VendorId::NotSpecified; + // mFabricLabel is 33 bytes, so ends on a 1 mod 4 byte boundary. char mFabricLabel[kFabricLabelMaxLengthInBytes + 1] = { '\0' }; - mutable Crypto::P256Keypair * mOperationalKey = nullptr; - bool mHasExternallyOwnedOperationalKey = false; + + // mFabricIndex, mVendorId, mHasExternallyOwnedOperationalKey are 4 bytes + // and do not end up with any padding if they come after the 33-byte + // mFabricLabel, so end on a 1 mod 4 byte boundary. + FabricIndex mFabricIndex = kUndefinedFabricIndex; + VendorId mVendorId = VendorId::NotSpecified; + bool mHasExternallyOwnedOperationalKey = false; + + // 3 bytes of padding here, since mOperationalKey needs to be void*-aligned, + // so has to be at a 0 mod 4 byte location. + + mutable Crypto::P256Keypair * mOperationalKey = nullptr; CHIP_ERROR CommitToStorage(PersistentStorageDelegate * storage) const; CHIP_ERROR LoadFromStorage(PersistentStorageDelegate * storage, FabricIndex newFabricIndex, const ByteSpan & rcac, From 8363494ab658bdcdf652817c0657a9e71c3d7249 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Sat, 5 Aug 2023 00:50:32 -0400 Subject: [PATCH 21/74] Update template and regen (#28529) Co-authored-by: Andrei Litvin --- .../all-clusters-app.matter | 12 ++++++++---- .../all-clusters-minimal-app.matter | 12 ++++++++---- .../bridge-app/bridge-common/bridge-app.matter | 9 ++++++--- ...ip_rootnode_dimmablelight_bCwGYSDpoe.matter | 6 ++++-- ...humiditysensor_thermostat_56de3d5f45.matter | 18 ++++++++++++------ ...rootnode_basicvideoplayer_0ff86e943b.matter | 6 ++++-- ...ode_colortemperaturelight_hbUnzYVeyn.matter | 6 ++++-- .../rootnode_contactsensor_lFAGG1bfRO.matter | 6 ++++-- .../rootnode_dimmablelight_bCwGYSDpoe.matter | 6 ++++-- .../rootnode_doorlock_aNKYAreMXE.matter | 6 ++++-- ...otnode_extendedcolorlight_8lcaaYJVAa.matter | 6 ++++-- .../devices/rootnode_fan_7N2TobIlOX.matter | 6 ++++-- .../rootnode_flowsensor_1zVxHedlaV.matter | 6 ++++-- ...otnode_heatingcoolingunit_ncdGai1E5a.matter | 6 ++++-- .../rootnode_humiditysensor_Xyj4gda6Hb.matter | 6 ++++-- .../rootnode_lightsensor_lZQycTFcJK.matter | 6 ++++-- .../rootnode_occupancysensor_iHyVgifZuo.matter | 6 ++++-- .../rootnode_onofflight_bbs1b7IaOV.matter | 6 ++++-- ...rootnode_onofflightswitch_FsPlMr090Q.matter | 6 ++++-- .../rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 6 ++++-- .../rootnode_pressuresensor_s0qC9wLH4k.matter | 6 ++++-- .../devices/rootnode_pump_a811bb33a0.matter | 6 ++++-- ...node_roboticvacuumcleaner_1807ff0c49.matter | 6 ++++-- ...otnode_roomairconditioner_9cf3607804.matter | 6 ++++-- .../devices/rootnode_speaker_RpzeXdimqA.matter | 6 ++++-- ...ootnode_temperaturesensor_Qy1zkNW7c3.matter | 6 ++++-- .../rootnode_thermostat_bm3fb8dhYi.matter | 6 ++++-- .../rootnode_windowcovering_RLCxaGi9Yx.matter | 6 ++++-- .../contact-sensor-app.matter | 6 ++++-- .../dishwasher-common/dishwasher-app.matter | 6 ++++-- .../light-switch-app.matter | 9 ++++++--- .../data_model/lighting-app-thread.matter | 6 ++++-- .../data_model/lighting-app-wifi.matter | 6 ++++-- .../lighting-common/lighting-app.matter | 6 ++++-- .../nxp/zap/lighting-on-off.matter | 6 ++++-- examples/lighting-app/qpg/zap/light.matter | 6 ++++-- .../data_model/lighting-thread-app.matter | 6 ++++-- .../silabs/data_model/lighting-wifi-app.matter | 6 ++++-- examples/lock-app/lock-common/lock-app.matter | 6 ++++-- examples/lock-app/nxp/zap/lock-app.matter | 6 ++++-- examples/lock-app/qpg/zap/lock.matter | 6 ++++-- .../log-source-common/log-source-app.matter | 3 ++- .../ota-provider-app.matter | 3 ++- .../ota-requestor-app.matter | 9 ++++++--- .../placeholder/linux/apps/app1/config.matter | 6 ++++-- .../placeholder/linux/apps/app2/config.matter | 6 ++++-- examples/pump-app/pump-common/pump-app.matter | 6 ++++-- .../silabs/data_model/pump-thread-app.matter | 6 ++++-- .../silabs/data_model/pump-wifi-app.matter | 6 ++++-- .../pump-controller-app.matter | 6 ++++-- .../resource-monitoring-app.matter | 6 ++++-- .../smoke-co-alarm-app.matter | 6 ++++-- .../temperature-measurement.matter | 6 ++++-- .../thermostat-common/thermostat.matter | 6 ++++-- examples/tv-app/tv-common/tv-app.matter | 12 ++++++++---- .../tv-casting-common/tv-casting-app.matter | 6 ++++-- .../virtual-device-app.matter | 6 ++++-- examples/window-app/common/window-app.matter | 9 ++++++--- .../templates/app/MatterIDL_Server.zapt | 10 +++++++--- 59 files changed, 263 insertions(+), 131 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 44a852efa8d887..5f5f6a077b93f6 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -6063,7 +6063,8 @@ server cluster FaultInjection = 4294048774 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Identify { @@ -6440,7 +6441,8 @@ endpoint 0 { } } endpoint 1 { - device type onofflight = 256, version 1; + device type ma_onofflight = 256, version 1; + binding cluster OnOff; server cluster Identify { @@ -7449,7 +7451,8 @@ endpoint 1 { } } endpoint 2 { - device type onofflight = 256, version 1; + device type ma_onofflight = 256, version 1; + server cluster Groups { ram attribute nameSupport; @@ -7497,7 +7500,8 @@ endpoint 2 { } } endpoint 65534 { - device type anonymousEndpointType = 61442, version 1; + device type ma_secondary_network_commissioning = 61442, version 1; + server cluster Descriptor { callback attribute deviceTypeList; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 1f31c58a314f35..f374904547521a 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -3960,7 +3960,8 @@ server cluster UnitTesting = 4294048773 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Identify { @@ -4200,7 +4201,8 @@ endpoint 0 { } } endpoint 1 { - device type onofflight = 256, version 1; + device type ma_onofflight = 256, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0000; @@ -4616,7 +4618,8 @@ endpoint 1 { } } endpoint 2 { - device type onofflight = 256, version 1; + device type ma_onofflight = 256, version 1; + server cluster Groups { ram attribute nameSupport; @@ -4657,7 +4660,8 @@ endpoint 2 { } } endpoint 65534 { - device type anonymousEndpointType = 61442, version 1; + device type ma_secondary_network_commissioning = 61442, version 1; + server cluster Descriptor { callback attribute deviceTypeList; diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 9ef1be662e38d9..bc4fba293eaf2a 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -1641,7 +1641,8 @@ server cluster TemperatureMeasurement = 1026 { } endpoint 0 { - device type bridge = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster AccessControl; server cluster Descriptor { @@ -1939,7 +1940,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 14, version 1; + device type ma_aggregator = 14, version 1; + binding cluster Binding; server cluster Identify { @@ -1977,7 +1979,8 @@ endpoint 1 { } } endpoint 2 { - device type dimmablelight = 257, version 1; + device type ma_dimmablelight = 257, version 1; + server cluster OnOff { ram attribute onOff default = 0x00; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index b52350856139ab..dd753ef6604bc4 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1501,7 +1501,8 @@ client cluster OccupancySensing = 1030 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1757,7 +1758,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 257, version 1; + device type ma_dimmablelight = 257, version 1; + binding cluster Binding; binding cluster OccupancySensing; diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index 37d8723570e27f..d80bf1b8090fee 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -1753,7 +1753,8 @@ server cluster RadonConcentrationMeasurement = 1071 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + server cluster Descriptor { callback attribute deviceTypeList; @@ -1876,7 +1877,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 45, version 1; + device type ma_air_purifier = 45, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; @@ -1960,7 +1962,8 @@ endpoint 1 { } } endpoint 2 { - device type anonymousEndpointType = 44, version 1; + device type ma_air_quality_sensor = 44, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; @@ -2187,7 +2190,8 @@ endpoint 2 { } } endpoint 3 { - device type anonymousEndpointType = 770, version 1; + device type ma_tempsensor = 770, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; @@ -2226,7 +2230,8 @@ endpoint 3 { } } endpoint 4 { - device type anonymousEndpointType = 775, version 1; + device type ma_humiditysensor = 775, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; @@ -2265,7 +2270,8 @@ endpoint 4 { } } endpoint 5 { - device type anonymousEndpointType = 769, version 1; + device type ma_thermostat = 769, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 3c51ea71c7b222..a900377942ee7f 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -1463,7 +1463,8 @@ server cluster AudioOutput = 1291 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1629,7 +1630,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 40, version 1; + device type ma_basic_videoplayer = 40, version 1; + server cluster OnOff { ram attribute onOff default = 0; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index ed53816698d54f..ba3a30fa140bbd 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -1534,7 +1534,8 @@ server cluster ColorControl = 768 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1679,7 +1680,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 268, version 1; + device type ma_colortemperaturelight = 268, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 69106c33cf137b..f3effbc359d308 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -1191,7 +1191,8 @@ server cluster BooleanState = 69 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1357,7 +1358,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 21, version 1; + device type ma_contactsensor = 21, version 1; + binding cluster Binding; server cluster Identify { diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 8ee5b39e03d3e4..94dc30652fdf9b 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1365,7 +1365,8 @@ client cluster OccupancySensing = 1030 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1533,7 +1534,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 257, version 1; + device type ma_dimmablelight = 257, version 1; + binding cluster Binding; binding cluster OccupancySensing; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 85f6c9bb9a5be1..3782ad74a986f0 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -1663,7 +1663,8 @@ server cluster DoorLock = 257 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1829,7 +1830,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 10, version 1; + device type ma_doorlock = 10, version 1; + binding cluster Binding; server cluster Identify { diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 25ac0f188072b3..787b30ac3cb1e8 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1594,7 +1594,8 @@ server cluster ColorControl = 768 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1760,7 +1761,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 269, version 1; + device type ma_extendedcolorlight = 269, version 1; + binding cluster Binding; server cluster Identify { diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 2f2fb298b4d5aa..1d3baf23f19183 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -1233,7 +1233,8 @@ server cluster FanControl = 514 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1400,7 +1401,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 43, version 1; + device type ma_fan = 43, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 6c8e865f26610f..213acb75ed9eae 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -1196,7 +1196,8 @@ server cluster FlowMeasurement = 1028 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1362,7 +1363,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 774, version 1; + device type ma_flowsensor = 774, version 1; + binding cluster Groups; binding cluster Binding; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index d57906a51bf465..16e9d0ef0411b6 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1543,7 +1543,8 @@ server cluster FanControl = 514 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1709,7 +1710,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 768, version 1; + device type ma_heatcool = 768, version 1; + binding cluster Binding; binding cluster Thermostat; diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index a37d8142cff436..5c702d2cffa763 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -1196,7 +1196,8 @@ server cluster RelativeHumidityMeasurement = 1029 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1362,7 +1363,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 775, version 1; + device type ma_humiditysensor = 775, version 1; + binding cluster Groups; binding cluster Binding; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 828bede7d73b36..c5f60575c8c1ce 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -1201,7 +1201,8 @@ server cluster IlluminanceMeasurement = 1024 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1367,7 +1368,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 262, version 1; + device type ma_lightsensor = 262, version 1; + binding cluster Groups; binding cluster Binding; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 64035c5820d1aa..13dcbe89df64a9 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -1212,7 +1212,8 @@ server cluster OccupancySensing = 1030 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1378,7 +1379,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 263, version 1; + device type ma_occupancysensor = 263, version 1; + binding cluster Groups; binding cluster Binding; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 26e8c6a26c324a..d94e6fe626812f 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -1326,7 +1326,8 @@ server cluster FixedLabel = 64 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1492,7 +1493,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 256, version 1; + device type ma_onofflight = 256, version 1; + binding cluster Binding; server cluster Identify { diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index c3ba8a911d9e97..3c0073cdabffc7 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -1290,7 +1290,8 @@ server cluster FixedLabel = 64 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1456,7 +1457,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 259, version 1; + device type ma_onofflightswitch = 259, version 1; + binding cluster OnOff; binding cluster Binding; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 4b7cc83be7cd9e..b8b71c9270d45d 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -1225,7 +1225,8 @@ server cluster FixedLabel = 64 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1391,7 +1392,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 266, version 1; + device type ma_onoffpluginunit = 266, version 1; + binding cluster Binding; server cluster Identify { diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 1155193e3cd3d5..2168705b33d12d 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -1215,7 +1215,8 @@ server cluster PressureMeasurement = 1027 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1387,7 +1388,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 773, version 1; + device type ma_pressuresensor = 773, version 1; + binding cluster Groups; binding cluster Binding; diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index f461f2e7c49151..ed7e8711b41d46 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -1016,7 +1016,8 @@ server cluster PumpConfigurationAndControl = 512 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + server cluster Descriptor { callback attribute deviceTypeList; @@ -1168,7 +1169,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 771, version 1; + device type ma_pump = 771, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index e1df348a9052ab..d88a83846a46cb 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -1193,7 +1193,8 @@ server cluster RvcOperationalState = 97 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + server cluster Descriptor { callback attribute deviceTypeList; @@ -1316,7 +1317,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 116, version 1; + device type ma_robotic_vacuum_cleaner = 116, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index 4d2c91b819da14..f61a30fbe1f489 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -1122,7 +1122,8 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + server cluster Descriptor { callback attribute deviceTypeList; @@ -1245,7 +1246,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 114, version 1; + device type ma_room_airconditioner = 114, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index ef5096d4182ecb..7a3e29e9178450 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -1251,7 +1251,8 @@ server cluster FixedLabel = 64 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1417,7 +1418,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 34, version 1; + device type ma_speaker = 34, version 1; + binding cluster Binding; server cluster Identify { diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 1fc82bcf1508b8..91bc0f44a6922b 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -1195,7 +1195,8 @@ server cluster TemperatureMeasurement = 1026 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1361,7 +1362,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 770, version 1; + device type ma_tempsensor = 770, version 1; + binding cluster Groups; binding cluster Binding; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 45831b2a87159b..b0274c116fe950 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1444,7 +1444,8 @@ client cluster OccupancySensing = 1030 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1610,7 +1611,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 769, version 1; + device type ma_thermostat = 769, version 1; + binding cluster Binding; binding cluster FanControl; binding cluster TemperatureMeasurement; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 8bae0ae4946a79..c3f077d00068cc 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -1320,7 +1320,8 @@ server cluster WindowCovering = 258 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1486,7 +1487,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 514, version 1; + device type ma_windowcovering = 514, version 1; + binding cluster Binding; server cluster Identify { diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 965124f01f4518..31e22b6cf28454 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -1500,7 +1500,8 @@ server cluster OccupancySensing = 1030 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Groups { @@ -1781,7 +1782,8 @@ endpoint 0 { } } endpoint 1 { - device type dimmablelight = 21, version 1; + device type ma_contactsensor = 21, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0000; diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index cabe702de3ad44..4cbf4631a76715 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -1102,7 +1102,8 @@ server cluster OperationalState = 96 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0000; @@ -1309,7 +1310,8 @@ endpoint 0 { } } endpoint 1 { - device type dimmablelight = 117, version 1; + device type ma_dishwasher = 117, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0000; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 5faea0c1c4648e..fa297694008ccc 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -2276,7 +2276,8 @@ client cluster ColorControl = 768 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -2582,7 +2583,8 @@ endpoint 0 { } } endpoint 1 { - device type onofflightswitch = 259, version 1; + device type ma_onofflightswitch = 259, version 1; + binding cluster Identify; binding cluster Scenes; binding cluster OnOff; @@ -2619,7 +2621,8 @@ endpoint 1 { } } endpoint 2 { - device type genericswitch = 15, version 1; + device type ma_genericswitch = 15, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index f68eff373f0a5d..ad1494ae56c863 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -1879,7 +1879,8 @@ server cluster OccupancySensing = 1030 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Groups { @@ -2135,7 +2136,8 @@ endpoint 0 { } } endpoint 1 { - device type extendedcolorlight = 269, version 1; + device type ma_extendedcolorlight = 269, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0000; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index 27a1971fb2239d..733e2fb6e74322 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -1789,7 +1789,8 @@ server cluster OccupancySensing = 1030 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Groups { @@ -1997,7 +1998,8 @@ endpoint 0 { } } endpoint 1 { - device type extendedcolorlight = 269, version 1; + device type ma_extendedcolorlight = 269, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0000; diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 90c4d57386023d..2fd62d83a02e66 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -2120,7 +2120,8 @@ server cluster OccupancySensing = 1030 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -2406,7 +2407,8 @@ endpoint 0 { } } endpoint 1 { - device type dimmablelight = 257, version 1; + device type ma_dimmablelight = 257, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0000; diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index b2781f7c7efc0e..ddccf7bbfa4b53 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -1356,7 +1356,8 @@ server cluster GroupKeyManagement = 63 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1547,7 +1548,8 @@ endpoint 0 { } } endpoint 1 { - device type dimmablelight = 256, version 1; + device type ma_onofflight = 256, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0000; diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 6b1ccd4ce982ce..2e80c048f973f3 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -1741,7 +1741,8 @@ server cluster ColorControl = 768 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -2010,7 +2011,8 @@ endpoint 0 { } } endpoint 1 { - device type dimmablelight = 269, version 1; + device type ma_extendedcolorlight = 269, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0000; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 2745e2fd4d5092..80580508259579 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -2183,7 +2183,8 @@ server cluster ColorControl = 768 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -2418,7 +2419,8 @@ endpoint 0 { } } endpoint 1 { - device type dimmablelight = 257, version 1; + device type ma_dimmablelight = 257, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0000; diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index f199cdf557122a..57d28ea2dc19c4 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -2072,7 +2072,8 @@ server cluster ColorControl = 768 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -2257,7 +2258,8 @@ endpoint 0 { } } endpoint 1 { - device type dimmablelight = 257, version 1; + device type ma_dimmablelight = 257, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0000; diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 61dbeb11e226af..5480cb9c3d9283 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -2278,7 +2278,8 @@ server cluster DoorLock = 257 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -2575,7 +2576,8 @@ endpoint 0 { } } endpoint 1 { - device type doorlock = 10, version 1; + device type ma_doorlock = 10, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0000; diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index 8bf3d16ee20939..79c2b7e6929920 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -1444,7 +1444,8 @@ server cluster DoorLock = 257 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + server cluster Descriptor { callback attribute deviceTypeList; @@ -1622,7 +1623,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 10, version 1; + device type ma_doorlock = 10, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index 04faba95ce4713..451f4ff3b11be0 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -1775,7 +1775,8 @@ server cluster DoorLock = 257 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -2044,7 +2045,8 @@ endpoint 0 { } } endpoint 1 { - device type doorlock = 10, version 1; + device type ma_doorlock = 10, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0000; diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 7308cbab74cd68..5f58a971cb2ac8 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -498,7 +498,8 @@ server cluster OperationalCredentials = 62 { } endpoint 0 { - device type anonymousEndpointType = 0, version 1; + device type ma_all_clusters_app = 0, version 1; + binding cluster DiagnosticLogs; server cluster AccessControl { diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index 7adf53eed5a933..57350d99fe60e5 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -988,7 +988,8 @@ server cluster UserLabel = 65 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster AccessControl; server cluster Descriptor { diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index 23bd852d592ed9..d5a48bc61e79dd 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -1171,7 +1171,8 @@ server cluster UserLabel = 65 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1329,7 +1330,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 259, version 1; + device type ma_onofflightswitch = 259, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; @@ -1367,7 +1369,8 @@ endpoint 1 { } } endpoint 65534 { - device type anonymousEndpointType = 61442, version 1; + device type ma_secondary_network_commissioning = 61442, version 1; + server cluster Descriptor { callback attribute deviceTypeList; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 1b3474c8da9562..4e52f3dc9ccb1b 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -6438,7 +6438,8 @@ server cluster AccountLogin = 1294 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster GeneralCommissioning; binding cluster ThreadNetworkDiagnostics; binding cluster Switch; @@ -7085,7 +7086,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 257, version 1; + device type ma_dimmablelight = 257, version 1; + binding cluster Identify; binding cluster OnOff; binding cluster LevelControl; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 0eff28c93b1e8b..9630cd749e11e7 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -6397,7 +6397,8 @@ server cluster AccountLogin = 1294 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster GeneralCommissioning; binding cluster ThreadNetworkDiagnostics; binding cluster Switch; @@ -7063,7 +7064,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 257, version 1; + device type ma_dimmablelight = 257, version 1; + binding cluster Identify; binding cluster OnOff; binding cluster LevelControl; diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 91fbb9ebdff027..c65c77bce28ef6 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -1426,7 +1426,8 @@ client cluster OccupancySensing = 1030 { } endpoint 0 { - device type pump = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1603,7 +1604,8 @@ endpoint 0 { } } endpoint 1 { - device type pump = 771, version 1; + device type ma_pump = 771, version 1; + binding cluster OccupancySensing; server cluster Identify { diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.matter b/examples/pump-app/silabs/data_model/pump-thread-app.matter index 6642cb7c237657..ce290aa780c9f6 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.matter +++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter @@ -1426,7 +1426,8 @@ client cluster OccupancySensing = 1030 { } endpoint 0 { - device type pump = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1603,7 +1604,8 @@ endpoint 0 { } } endpoint 1 { - device type pump = 771, version 1; + device type ma_pump = 771, version 1; + binding cluster OccupancySensing; server cluster Identify { diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.matter b/examples/pump-app/silabs/data_model/pump-wifi-app.matter index 6642cb7c237657..ce290aa780c9f6 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter @@ -1426,7 +1426,8 @@ client cluster OccupancySensing = 1030 { } endpoint 0 { - device type pump = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1603,7 +1604,8 @@ endpoint 0 { } } endpoint 1 { - device type pump = 771, version 1; + device type ma_pump = 771, version 1; + binding cluster OccupancySensing; server cluster Identify { diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index 1f69469501cb44..51a97051592256 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -1312,7 +1312,8 @@ client cluster FlowMeasurement = 1028 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1489,7 +1490,8 @@ endpoint 0 { } } endpoint 1 { - device type pumpcontroller = 772, version 1; + device type ma_pumpcontroller = 772, version 1; + binding cluster OnOff; binding cluster PumpConfigurationAndControl; binding cluster TemperatureMeasurement; diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter index 297294cf44bfb7..c9a11288ef8505 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter @@ -1666,7 +1666,8 @@ server cluster FanControl = 514 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Groups { @@ -1957,7 +1958,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 43, version 1; + device type ma_fan = 43, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index a16b80d49cd1a9..cdeaf613e099d4 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -1730,7 +1730,8 @@ server cluster SmokeCoAlarm = 92 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -1975,7 +1976,8 @@ endpoint 0 { } } endpoint 1 { - device type anonymousEndpointType = 118, version 1; + device type ma_smokecoalarm = 118, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index 07b170ea8325d6..094a376a635f92 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -1052,7 +1052,8 @@ server cluster TemperatureMeasurement = 1026 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + server cluster Descriptor { callback attribute deviceTypeList; @@ -1249,7 +1250,8 @@ endpoint 0 { } } endpoint 1 { - device type tempsensor = 770, version 1; + device type ma_tempsensor = 770, version 1; + server cluster Descriptor { callback attribute deviceTypeList; diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 88d23fdbcc46e4..aff57f8b0d64c7 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1767,7 +1767,8 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Identify { @@ -2060,7 +2061,8 @@ endpoint 0 { } } endpoint 1 { - device type thermostat = 769, version 1; + device type ma_thermostat = 769, version 1; + binding cluster Identify; server cluster Identify { diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index bd3b6687d4b694..4500b8cdd9cdef 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -2449,7 +2449,8 @@ server cluster AccountLogin = 1294 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster Binding; binding cluster GeneralCommissioning; binding cluster NetworkCommissioning; @@ -2743,7 +2744,8 @@ endpoint 0 { } } endpoint 1 { - device type videoplayer = 35, version 1; + device type ma_casting_videoplayer = 35, version 1; + server cluster OnOff { ram attribute onOff default = 0x00; @@ -2838,7 +2840,8 @@ endpoint 1 { } } endpoint 2 { - device type speaker = 34, version 1; + device type ma_speaker = 34, version 1; + server cluster OnOff { ram attribute onOff default = 0x00; @@ -2875,7 +2878,8 @@ endpoint 2 { } } endpoint 3 { - device type contentapplication = 36, version 1; + device type ma_contentapp = 36, version 1; + server cluster Descriptor { callback attribute deviceTypeList; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index cdbf91567fd29b..d85942d769a352 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -2006,7 +2006,8 @@ client cluster AccountLogin = 1294 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + server cluster Descriptor { callback attribute deviceTypeList; @@ -2195,7 +2196,8 @@ endpoint 0 { } } endpoint 1 { - device type videoplayer = 41, version 1; + device type ma_casting_videoclient = 41, version 1; + binding cluster OnOff; binding cluster LevelControl; binding cluster Descriptor; diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index ceb3526d73d508..19524943e6df09 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -1597,7 +1597,8 @@ server cluster UserLabel = 65 { } endpoint 0 { - device type rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 1; + server cluster Descriptor { callback attribute deviceTypeList; @@ -1880,7 +1881,8 @@ endpoint 0 { } } endpoint 1 { - device type videoplayer = 256, version 1; + device type ma_onofflight = 256, version 1; + server cluster Identify { ram attribute identifyTime default = 0x0; diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 7b2840b18cf469..8a7ef763ef0eed 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -1935,7 +1935,8 @@ server cluster WindowCovering = 258 { } endpoint 0 { - device type windowcovering = 22, version 1; + device type ma_rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { @@ -2260,7 +2261,8 @@ endpoint 0 { } } endpoint 1 { - device type windowcovering = 514, version 2; + device type ma_windowcovering = 514, version 2; + server cluster Identify { ram attribute identifyTime default = 0x0; @@ -2337,7 +2339,8 @@ endpoint 1 { } } endpoint 2 { - device type windowcovering = 514, version 2; + device type ma_windowcovering = 514, version 2; + server cluster Identify { ram attribute identifyTime default = 0x0; diff --git a/src/app/zap-templates/templates/app/MatterIDL_Server.zapt b/src/app/zap-templates/templates/app/MatterIDL_Server.zapt index 7180d2fb78d7eb..02e857d8c43f08 100644 --- a/src/app/zap-templates/templates/app/MatterIDL_Server.zapt +++ b/src/app/zap-templates/templates/app/MatterIDL_Server.zapt @@ -16,9 +16,13 @@ {{/all_user_clusters}} {{#user_endpoints}} endpoint {{endpointId}} { - {{#if deviceIdentifier}} - device type {{chip_friendly_endpoint_type_name}} = {{deviceIdentifier}}, version {{endpointVersion}}; - {{/if~}} + {{#user_device_types}} + device type + {{~#zcl_device_types}} + {{~#if (is_num_equal id ../deviceTypeRef)}} {{as_underscore_lowercase name}} {{/if~}} + {{/zcl_device_types~}} + = {{deviceIdentifier}}, version {{deviceVersion}}; + {{/user_device_types}} {{#user_clusters}} {{#if enabled}} From 32efabd6f6b9d6fc31ae77b064913cca2a1210ad Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Sun, 6 Aug 2023 18:53:43 -0700 Subject: [PATCH 22/74] [Java] Remove duplicated implemenation for ReportCallback (#28541) --- src/controller/java/AndroidCallbacks-JNI.cpp | 18 -- src/controller/java/AndroidCallbacks.cpp | 256 ------------------ src/controller/java/BUILD.gn | 2 - .../devicecontroller/ReportEventCallback.java | 30 -- .../ReportEventCallbackJni.java | 61 ----- 5 files changed, 367 deletions(-) delete mode 100644 src/controller/java/src/chip/devicecontroller/ReportEventCallback.java delete mode 100644 src/controller/java/src/chip/devicecontroller/ReportEventCallbackJni.java diff --git a/src/controller/java/AndroidCallbacks-JNI.cpp b/src/controller/java/AndroidCallbacks-JNI.cpp index 57aadcc8c4bbcd..f0da85a3c6d29e 100644 --- a/src/controller/java/AndroidCallbacks-JNI.cpp +++ b/src/controller/java/AndroidCallbacks-JNI.cpp @@ -59,24 +59,6 @@ JNI_METHOD(void, ReportCallbackJni, deleteCallback)(JNIEnv * env, jobject self, chip::Platform::Delete(reportCallback); } -JNI_METHOD(jlong, ReportEventCallbackJni, newCallback) -(JNIEnv * env, jobject self, jobject subscriptionEstablishedCallbackJava, jobject reportCallbackJava, - jobject resubscriptionAttemptCallbackJava) -{ - chip::DeviceLayer::StackLock lock; - ReportEventCallback * reportCallback = chip::Platform::New( - self, subscriptionEstablishedCallbackJava, reportCallbackJava, resubscriptionAttemptCallbackJava); - return reinterpret_cast(reportCallback); -} - -JNI_METHOD(void, ReportEventCallbackJni, deleteCallback)(JNIEnv * env, jobject self, jlong callbackHandle) -{ - chip::DeviceLayer::StackLock lock; - ReportEventCallback * reportCallback = reinterpret_cast(callbackHandle); - VerifyOrReturn(reportCallback != nullptr, ChipLogError(Controller, "ReportCallback handle is nullptr")); - delete reportCallback; -} - JNI_METHOD(jlong, WriteAttributesCallbackJni, newCallback) (JNIEnv * env, jobject self, jobject writeAttributesCallbackJava) { diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index 4d8e536bfde4c5..5d787dc35c45cc 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -612,262 +612,6 @@ void ReportCallback::ReportError(jobject attributePath, jobject eventPath, const VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe()); } -ReportEventCallback::ReportEventCallback(jobject wrapperCallback, jobject subscriptionEstablishedCallback, jobject reportCallback, - jobject resubscriptionAttemptCallback) : - mBufferedReadAdapter(*this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Controller, "Could not get JNIEnv for current thread")); - if (subscriptionEstablishedCallback != nullptr) - { - mSubscriptionEstablishedCallbackRef = env->NewGlobalRef(subscriptionEstablishedCallback); - if (mSubscriptionEstablishedCallbackRef == nullptr) - { - ChipLogError(Controller, "Could not create global reference for Java callback"); - } - } - mReportCallbackRef = env->NewGlobalRef(reportCallback); - if (mReportCallbackRef == nullptr) - { - ChipLogError(Controller, "Could not create global reference for Java callback"); - } - mWrapperCallbackRef = env->NewGlobalRef(wrapperCallback); - if (mWrapperCallbackRef == nullptr) - { - ChipLogError(Controller, "Could not create global reference for Java callback"); - } - if (resubscriptionAttemptCallback != nullptr) - { - mResubscriptionAttemptCallbackRef = env->NewGlobalRef(resubscriptionAttemptCallback); - if (mResubscriptionAttemptCallbackRef == nullptr) - { - ChipLogError(Controller, "Could not create global reference for Java callback"); - } - } -} - -ReportEventCallback::~ReportEventCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - VerifyOrReturn(env != nullptr, ChipLogError(Controller, "Could not get JNIEnv for current thread")); - if (mSubscriptionEstablishedCallbackRef != nullptr) - { - env->DeleteGlobalRef(mSubscriptionEstablishedCallbackRef); - } - env->DeleteGlobalRef(mReportCallbackRef); - if (mReadClient != nullptr) - { - Platform::Delete(mReadClient); - } -} - -void ReportEventCallback::OnReportBegin() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - CHIP_ERROR err = CHIP_NO_ERROR; - - err = JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/model/NodeState", mNodeStateCls); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Could not get NodeState class")); - jmethodID nodeStateCtor = env->GetMethodID(mNodeStateCls, "", "(Ljava/util/Map;)V"); - VerifyOrReturn(nodeStateCtor != nullptr, ChipLogError(Controller, "Could not find NodeState constructor")); - - jobject map = nullptr; - err = JniReferences::GetInstance().CreateHashMap(map); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Could not create HashMap")); - mNodeStateObj = env->NewObject(mNodeStateCls, nodeStateCtor, map); -} - -void ReportEventCallback::OnReportEnd() -{ - // Transform C++ jobject pair list to a Java HashMap, and call onReport() on the Java callback. - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - - jmethodID onReportMethod; - err = JniReferences::GetInstance().FindMethod(env, mReportCallbackRef, "onReport", "(Lchip/devicecontroller/model/NodeState;)V", - &onReportMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Could not find onReport method")); - - DeviceLayer::StackUnlock unlock; - env->CallVoidMethod(mReportCallbackRef, onReportMethod, mNodeStateObj); -} - -void ReportEventCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLVReader * apData, - const app::StatusIB * apStatus) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject eventPathObj = nullptr; - err = CreateChipEventPath(aEventHeader.mPath, eventPathObj); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Unable to create Java ChipEventPath: %s", ErrorStr(err))); - - if (apData == nullptr) - { - ReportError(eventPathObj, CHIP_ERROR_INVALID_ARGUMENT); - return; - } - - TLV::TLVReader readerForJavaTLV; - TLV::TLVReader readerForJson; - readerForJavaTLV.Init(*apData); - readerForJson.Init(*apData); - - jlong eventNumber = static_cast(aEventHeader.mEventNumber); - jlong priorityLevel = static_cast(aEventHeader.mPriorityLevel); - jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); - - jobject value = nullptr; -#if USE_JAVA_TLV_ENCODE_DECODE - TLV::TLVReader readerForJavaObject; - readerForJavaObject.Init(*apData); - value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); - // If we don't know this event, just skip it. - VerifyOrReturn(err != CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB); - VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(eventPathObj, err)); - VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(eventPathObj, CHIP_JNI_ERROR_EXCEPTION_THROWN)); -#endif - - // Create TLV byte array to pass to Java layer - size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); - std::unique_ptr buffer = std::unique_ptr(new uint8_t[bufferLen]); - uint32_t size = 0; - // The TLVReader's read head is not pointing to the first element in the container, instead of the container itself, use - // a TLVWriter to get a TLV with a normalized TLV buffer (Wrapped with an anonymous tag, no extra "end of container" tag - // at the end.) - TLV::TLVWriter writer; - writer.Init(buffer.get(), bufferLen); - err = writer.CopyElement(TLV::AnonymousTag(), readerForJavaTLV); - VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(eventPathObj, err)); - size = writer.GetLengthWritten(); - chip::ByteArray jniByteArray(env, reinterpret_cast(buffer.get()), size); - - // Convert TLV to JSON - Json::Value json; - err = TlvToJson(readerForJson, json); - VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(eventPathObj, err)); - - UtfString jsonString(env, JsonToString(json).c_str()); - - // Create EventState object - jclass eventStateCls; - err = JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/model/EventState", eventStateCls); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Could not find EventState class")); - VerifyOrReturn(eventStateCls != nullptr, ChipLogError(Controller, "Could not find EventState class")); - chip::JniClass eventStateJniCls(eventStateCls); - jmethodID eventStateCtor = env->GetMethodID(eventStateCls, "", "(JIJLjava/lang/Object;[BLjava/lang/String;)V"); - VerifyOrReturn(eventStateCtor != nullptr, ChipLogError(Controller, "Could not find EventState constructor")); - jobject eventStateObj = env->NewObject(eventStateCls, eventStateCtor, eventNumber, priorityLevel, timestamp, value, - jniByteArray.jniValue(), jsonString.jniValue()); - VerifyOrReturn(eventStateObj != nullptr, ChipLogError(Controller, "Could not create EventState object")); - - // Add EventState to NodeState - jmethodID addEventMethod; - err = JniReferences::GetInstance().FindMethod(env, mNodeStateObj, "addEvent", "(IJJLchip/devicecontroller/model/EventState;)V", - &addEventMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Could not find addEvent method")); - env->CallVoidMethod(mNodeStateObj, addEventMethod, static_cast(aEventHeader.mPath.mEndpointId), - static_cast(aEventHeader.mPath.mClusterId), static_cast(aEventHeader.mPath.mEventId), - eventStateObj); - VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe()); -} - -CHIP_ERROR ReportEventCallback::CreateChipEventPath(const app::ConcreteEventPath & aPath, jobject & outObj) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - CHIP_ERROR err = CHIP_NO_ERROR; - - jclass eventPathCls = nullptr; - err = JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/model/ChipEventPath", eventPathCls); - VerifyOrReturnError(err == CHIP_NO_ERROR, err); - JniClass eventPathJniCls(eventPathCls); - - jmethodID eventPathCtor = - env->GetStaticMethodID(eventPathCls, "newInstance", "(IJJ)Lchip/devicecontroller/model/ChipEventPath;"); - VerifyOrReturnError(eventPathCtor != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); - - outObj = env->CallStaticObjectMethod(eventPathCls, eventPathCtor, static_cast(aPath.mEndpointId), - static_cast(aPath.mClusterId), static_cast(aPath.mEventId)); - VerifyOrReturnError(outObj != nullptr, CHIP_JNI_ERROR_NULL_OBJECT); - - return err; -} - -void ReportEventCallback::OnError(CHIP_ERROR aError) -{ - ReportError(nullptr, aError); -} - -void ReportEventCallback::OnDone(app::ReadClient *) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - - jmethodID onDoneMethod; - err = JniReferences::GetInstance().FindMethod(env, mReportCallbackRef, "onDone", "()V", &onDoneMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Could not find onDone method")); - - DeviceLayer::StackUnlock unlock; - env->CallVoidMethod(mReportCallbackRef, onDoneMethod); - - JniReferences::GetInstance().GetEnvForCurrentThread()->DeleteGlobalRef(mWrapperCallbackRef); -} - -void ReportEventCallback::OnSubscriptionEstablished(SubscriptionId aSubscriptionId) -{ - chip::DeviceLayer::StackUnlock unlock; - JniReferences::GetInstance().CallSubscriptionEstablished(mSubscriptionEstablishedCallbackRef, aSubscriptionId); -} - -CHIP_ERROR ReportEventCallback::OnResubscriptionNeeded(app::ReadClient * apReadClient, CHIP_ERROR aTerminationCause) -{ - VerifyOrReturnLogError(mResubscriptionAttemptCallbackRef != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - - ReturnErrorOnFailure(app::ReadClient::Callback::OnResubscriptionNeeded(apReadClient, aTerminationCause)); - - jmethodID onResubscriptionAttemptMethod; - ReturnLogErrorOnFailure(JniReferences::GetInstance().FindMethod( - env, mResubscriptionAttemptCallbackRef, "onResubscriptionAttempt", "(JJ)V", &onResubscriptionAttemptMethod)); - - DeviceLayer::StackUnlock unlock; - env->CallVoidMethod(mResubscriptionAttemptCallbackRef, onResubscriptionAttemptMethod, - static_cast(aTerminationCause.AsInteger()), - static_cast(apReadClient->ComputeTimeTillNextSubscription())); - - return CHIP_NO_ERROR; -} - -void ReportEventCallback::ReportError(jobject eventPath, CHIP_ERROR err) -{ - ReportError(eventPath, ErrorStr(err), err.AsInteger()); -} - -void ReportEventCallback::ReportError(jobject eventPath, Protocols::InteractionModel::Status status) -{ - ReportError(eventPath, "IM Status", static_cast>(status)); -} - -void ReportEventCallback::ReportError(jobject eventPath, const char * message, ChipError::StorageType errorCode) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - - jthrowable exception; - err = AndroidControllerExceptions::GetInstance().CreateAndroidControllerException(env, message, errorCode, exception); - VerifyOrReturn(err == CHIP_NO_ERROR, - ChipLogError(Controller, "Unable to create AndroidControllerException: %s on eportEventCallback::ReportError", - ErrorStr(err))); - - jmethodID onErrorMethod; - err = JniReferences::GetInstance().FindMethod( - env, mReportCallbackRef, "onError", "(Lchip/devicecontroller/model/ChipEventPath;Ljava/lang/Exception;)V", &onErrorMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Unable to find onError method: %s", ErrorStr(err))); - - DeviceLayer::StackUnlock unlock; - env->CallVoidMethod(mReportCallbackRef, onErrorMethod, eventPath, exception); -} - WriteAttributesCallback::WriteAttributesCallback(jobject wrapperCallback, jobject javaCallback) : mChunkedWriteCallback(this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index 39a8ab889d48ba..ee227cf1cf4c06 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -345,8 +345,6 @@ android_library("java") { "src/chip/devicecontroller/PaseVerifierParams.java", "src/chip/devicecontroller/ReportCallback.java", "src/chip/devicecontroller/ReportCallbackJni.java", - "src/chip/devicecontroller/ReportEventCallback.java", - "src/chip/devicecontroller/ReportEventCallbackJni.java", "src/chip/devicecontroller/ResubscriptionAttemptCallback.java", "src/chip/devicecontroller/SubscriptionEstablishedCallback.java", "src/chip/devicecontroller/ThreadScanResult.java", diff --git a/src/controller/java/src/chip/devicecontroller/ReportEventCallback.java b/src/controller/java/src/chip/devicecontroller/ReportEventCallback.java deleted file mode 100644 index b82a355f49c464..00000000000000 --- a/src/controller/java/src/chip/devicecontroller/ReportEventCallback.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package chip.devicecontroller; - -import chip.devicecontroller.model.ChipEventPath; -import chip.devicecontroller.model.NodeState; - -/** An interface for receiving read/subscribe CHIP reports. */ -public interface ReportEventCallback { - void onError(ChipEventPath eventPath, Exception e); - - void onReport(NodeState nodeState); - - default void onDone() {} -} diff --git a/src/controller/java/src/chip/devicecontroller/ReportEventCallbackJni.java b/src/controller/java/src/chip/devicecontroller/ReportEventCallbackJni.java deleted file mode 100644 index 1f786060b84d93..00000000000000 --- a/src/controller/java/src/chip/devicecontroller/ReportEventCallbackJni.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package chip.devicecontroller; - -import javax.annotation.Nullable; - -/** JNI wrapper callback class for {@link ReportCallback}. */ -public class ReportEventCallbackJni { - @Nullable private SubscriptionEstablishedCallback wrappedSubscriptionEstablishedCallback; - @Nullable private ResubscriptionAttemptCallback wrappedResubscriptionAttemptCallback; - private ReportEventCallback wrappedReportCallback; - private long callbackHandle; - - public ReportEventCallbackJni( - @Nullable SubscriptionEstablishedCallback subscriptionEstablishedCallback, - ReportEventCallback reportCallback, - ResubscriptionAttemptCallback resubscriptionAttemptCallback) { - this.wrappedSubscriptionEstablishedCallback = subscriptionEstablishedCallback; - this.wrappedReportCallback = reportCallback; - this.wrappedResubscriptionAttemptCallback = resubscriptionAttemptCallback; - this.callbackHandle = - newCallback(subscriptionEstablishedCallback, reportCallback, resubscriptionAttemptCallback); - } - - long getCallbackHandle() { - return callbackHandle; - } - - private native long newCallback( - @Nullable SubscriptionEstablishedCallback subscriptionEstablishedCallback, - ReportEventCallback wrappedCallback, - @Nullable ResubscriptionAttemptCallback resubscriptionAttemptCallback); - - private native void deleteCallback(long callbackHandle); - - // TODO(#8578): Replace finalizer with PhantomReference. - @SuppressWarnings("deprecation") - protected void finalize() throws Throwable { - super.finalize(); - - if (callbackHandle != 0) { - deleteCallback(callbackHandle); - callbackHandle = 0; - } - } -} From 6bcd87c1c38826e81ef36e6824e05ec73b69ae3a Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Mon, 7 Aug 2023 15:42:51 +0530 Subject: [PATCH 23/74] [ESP32] CI: Build applications for C6 and H2 targets and added light-switch (#28515) * [ESP32] CI: Build applications for C6 and H2 targets and added light-swich * Its a 4M flash device * Enable CONFIG_MBEDTLS_HKDF_C for C6 --- .github/workflows/examples-esp32.yaml | 14 +++-- .../esp32/sdkconfig.defaults.esp32c3 | 35 +++++++++++ .../esp32/sdkconfig.defaults.esp32h2 | 3 + .../lock-app/esp32/sdkconfig.defaults.esp32c6 | 60 +++++++++++++++++++ 4 files changed, 108 insertions(+), 4 deletions(-) create mode 100644 examples/light-switch-app/esp32/sdkconfig.defaults.esp32c3 create mode 100644 examples/lock-app/esp32/sdkconfig.defaults.esp32c6 diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 3757d952b29fda..87533e0b09f17a 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -107,12 +107,15 @@ jobs: esp32 c3devkit all-clusters-app \ example_binaries/esp32-build/chip-all-clusters-app.elf \ /tmp/bloat_reports/ + - name: Build example Pigweed App run: scripts/examples/esp_example.sh pigweed-app sdkconfig.defaults - - name: Build example Lighting App - run: scripts/examples/esp_example.sh lighting-app sdkconfig.defaults - - name: Build example Lock App - run: scripts/examples/esp_example.sh lock-app sdkconfig.defaults + + - name: Build example Lighting App (Target:ESP32H2) + run: scripts/examples/esp_example.sh lighting-app sdkconfig.defaults.esp32h2 + + - name: Build example Lock App (Target:ESP32C6) + run: scripts/examples/esp_example.sh lock-app sdkconfig.defaults.esp32c6 - name: Uploading Size Reports uses: ./.github/actions/upload-size-reports @@ -156,3 +159,6 @@ jobs: - name: Build example OTA Provider App run: scripts/examples/esp_example.sh ota-provider-app sdkconfig.defaults + + - name: Build example Light Switch App (Target:ESP32C3) + run: scripts/examples/esp_example.sh light-switch-app sdkconfig.defaults.esp32c3 diff --git a/examples/light-switch-app/esp32/sdkconfig.defaults.esp32c3 b/examples/light-switch-app/esp32/sdkconfig.defaults.esp32c3 new file mode 100644 index 00000000000000..4db6e947e506ba --- /dev/null +++ b/examples/light-switch-app/esp32/sdkconfig.defaults.esp32c3 @@ -0,0 +1,35 @@ +CONFIG_IDF_TARGET="esp32c3" +CONFIG_IDF_TARGET_ESP32C3=y +CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM=y + +# Default to 921600 baud when flashing and monitoring device +CONFIG_ESPTOOLPY_BAUD_921600B=y +CONFIG_ESPTOOLPY_BAUD=921600 +CONFIG_ESPTOOLPY_COMPRESSED=y +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 + +#enable BT +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y + +#enable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=y + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" + +#enable lwIP route hooks +CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y +CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y + +# Serial Flasher config +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_ESPTOOLPY_FLASHSIZE="4MB" + +# Enable HKDF in mbedtls +CONFIG_MBEDTLS_HKDF_C=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/lighting-app/esp32/sdkconfig.defaults.esp32h2 b/examples/lighting-app/esp32/sdkconfig.defaults.esp32h2 index c8d20b0e61339d..d5f98fc81d2393 100644 --- a/examples/lighting-app/esp32/sdkconfig.defaults.esp32h2 +++ b/examples/lighting-app/esp32/sdkconfig.defaults.esp32h2 @@ -14,6 +14,9 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 # libsodium CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y +# Serial Flasher config +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_ESPTOOLPY_FLASHSIZE="4MB" # NIMBLE CONFIG_BT_ENABLED=y diff --git a/examples/lock-app/esp32/sdkconfig.defaults.esp32c6 b/examples/lock-app/esp32/sdkconfig.defaults.esp32c6 new file mode 100644 index 00000000000000..b8d458e24fc0f9 --- /dev/null +++ b/examples/lock-app/esp32/sdkconfig.defaults.esp32c6 @@ -0,0 +1,60 @@ +CONFIG_IDF_TARGET="esp32c6" + +# Default to 921600 baud when flashing and monitoring device +CONFIG_ESPTOOLPY_BAUD_921600B=y +CONFIG_ESPTOOLPY_BAUD=921600 +CONFIG_ESPTOOLPY_COMPRESSED=y +CONFIG_ESPTOOLPY_FLASHMODE_QIO=y +CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +CONFIG_ESPTOOLPY_FLASHFREQ="40m" +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 + +# libsodium +CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y + +# NIMBLE +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y +CONFIG_BT_NIMBLE_EXT_ADV=n +CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 +CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=n + +# Disable OpenThread +CONFIG_OPENTHREAD_ENABLED=n + +# Disable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=n + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" + +# LwIP config for OpenThread +CONFIG_LWIP_IPV6_NUM_ADDRESSES=8 +CONFIG_LWIP_MULTICAST_PING=y + +# mbedTLS +CONFIG_MBEDTLS_HARDWARE_AES=n +CONFIG_MBEDTLS_HARDWARE_MPI=n +CONFIG_MBEDTLS_HARDWARE_SHA=n +CONFIG_MBEDTLS_HARDWARE_ECC=y +CONFIG_MBEDTLS_CMAC_C=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECJPAKE=y +CONFIG_MBEDTLS_ECJPAKE_C=y + +# MDNS platform +CONFIG_USE_MINIMAL_MDNS=y +CONFIG_ENABLE_EXTENDED_DISCOVERY=y + +# FreeRTOS should use legacy API +CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y + +# Wi-Fi Settings +CONFIG_ENABLE_WIFI_STATION=y +CONFIG_ENABLE_WIFI_AP=n +# Enable this to avoid implicit declaration of function 'esp_send_assoc_resp' +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y + +# Enable HKDF in mbedtls +CONFIG_MBEDTLS_HKDF_C=y From 0c600085fe7c5ceda5df6610571938daef50d4a6 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 7 Aug 2023 09:17:31 -0400 Subject: [PATCH 24/74] Improve encoding of lists where first item can't fit in packet. (#28346) * Improve encoding of lists where first item can't fit in packet. When the first item of a list can't fit in the current packet, it's better to just send the packet without the list at all, then encode as many items as we can in the packet that follows before we start doing IB-per-item. Otherwise (before this change) we encode an empty list IB, then end up doing IB-per-item for the whole list. * Improve unit tests. --- src/app/AttributeAccessInterface.cpp | 13 ++ src/app/AttributeAccessInterface.h | 3 + src/app/tests/TestReadInteraction.cpp | 12 +- src/controller/tests/TestReadChunking.cpp | 190 ++++++++++++++++++++-- 4 files changed, 194 insertions(+), 24 deletions(-) diff --git a/src/app/AttributeAccessInterface.cpp b/src/app/AttributeAccessInterface.cpp index f4fbec03b34ac4..3152bbf604ffd9 100644 --- a/src/app/AttributeAccessInterface.cpp +++ b/src/app/AttributeAccessInterface.cpp @@ -130,6 +130,19 @@ void AttributeValueEncoder::EnsureListEnded() AttributeReportBuilder builder; VerifyOrDie(builder.FinishAttribute(mAttributeReportIBsBuilder) == CHIP_NO_ERROR); + + if (!mEncodedAtLeastOneListItem) + { + // If we have not managed to encode any list items, we don't actually + // want to output the single "empty list" IB that will then be followed + // by one-IB-per-item in the next packet. Just have the reporting + // engine roll back our entire attribute and put us in the next packet. + // + // If we succeeded at encoding the whole list (i.e. the list is in fact + // empty and we fit in the packet), mAllowPartialData will be ignored, + // so it's safe to set it to false even if encoding succeeded. + mEncodeState.mAllowPartialData = false; + } } } // namespace app diff --git a/src/app/AttributeAccessInterface.h b/src/app/AttributeAccessInterface.h index 8b4ec3a0c91d47..c195dd4f8b66ef 100644 --- a/src/app/AttributeAccessInterface.h +++ b/src/app/AttributeAccessInterface.h @@ -292,6 +292,7 @@ class AttributeValueEncoder mCurrentEncodingListIndex++; mEncodeState.mCurrentEncodingListIndex++; + mEncodedAtLeastOneListItem = true; return CHIP_NO_ERROR; } @@ -340,6 +341,8 @@ class AttributeValueEncoder // started chunking it yet, so we're encoding a single attribute report IB // for the whole list, not one per item. bool mEncodingInitialList = false; + // mEncodedAtLeastOneListItem becomes true once we successfully encode a list item. + bool mEncodedAtLeastOneListItem = false; AttributeEncodeState mEncodeState; ListIndex mCurrentEncodingListIndex = kInvalidListIndex; }; diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index 0c490f86002f73..0026b1567abb66 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -1309,8 +1309,8 @@ void TestReadInteraction::TestSetDirtyBetweenChunks(nlTestSuite * apSuite, void !aPath.IsListItemOperation()) { mGotStartOfSecondReport = true; - // Wait for an actual data chunk. - return; + // We always have data chunks, so go ahead to mark things + // dirty as needed. } if (!mGotStartOfSecondReport) @@ -2359,12 +2359,12 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap #else // When EventList is not enabled, the packet boundaries shift and for the first // report for the list attribute we receive two of its items in the initial list, - // then 4 additional items. For the second report we receive 0 items in - // the initial list followed by 6 additional items. + // then 4 additional items. For the second report we receive 3 items in + // the initial list followed by 3 additional items. // - // Thus we should receive 29*2 + 4 + 6 = 68 attribute data when the eventlist + // Thus we should receive 29*2 + 4 + 3 = 65 attribute data when the eventlist // attribute is not available. - constexpr size_t kExpectedAttributeResponse = 68; + constexpr size_t kExpectedAttributeResponse = 65; #endif NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == kExpectedAttributeResponse); NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == 12); diff --git a/src/controller/tests/TestReadChunking.cpp b/src/controller/tests/TestReadChunking.cpp index 03a6c85a6f7c92..d98d0586180940 100644 --- a/src/controller/tests/TestReadChunking.cpp +++ b/src/controller/tests/TestReadChunking.cpp @@ -70,6 +70,8 @@ constexpr AttributeId kTestListAttribute = 6; constexpr AttributeId kTestBadAttribute = 7; // Reading this attribute will return CHIP_ERROR_NO_MEMORY but nothing is actually encoded. +constexpr int kListAttributeItems = 5; + class TestReadChunking { public: @@ -125,6 +127,116 @@ DECLARE_DYNAMIC_ENDPOINT(testEndpoint5, testEndpoint5Clusters); uint8_t sAnStringThatCanNeverFitIntoTheMTU[4096] = { 0 }; +// Buffered callback class that lets us count the number of attribute data IBs +// we receive. BufferedReadCallback has all its ReadClient::Callback bits +// private, so we can't just inherit from it and call our super-class functions. +class TestBufferedReadCallback : public ReadClient::Callback +{ +public: + TestBufferedReadCallback(ReadClient::Callback & aNextCallback) : mBufferedCallback(aNextCallback) {} + + // Workaround for all the methods on BufferedReadCallback being private. + ReadClient::Callback & NextCallback() { return *static_cast(&mBufferedCallback); } + + void OnReportBegin() override { NextCallback().OnReportBegin(); } + void OnReportEnd() override { NextCallback().OnReportEnd(); } + + void OnAttributeData(const ConcreteDataAttributePath & aPath, TLV::TLVReader * apData, const StatusIB & aStatus) override + { + if (apData) + { + ++mAttributeDataIBCount; + + TLV::TLVReader reader(*apData); + do + { + if (reader.GetType() != TLV::TLVType::kTLVType_Array) + { + // Not a list. + break; + } + + TLV::TLVType containerType; + CHIP_ERROR err = reader.EnterContainer(containerType); + if (err != CHIP_NO_ERROR) + { + mDecodingFailed = true; + break; + } + + err = reader.Next(); + if (err == CHIP_END_OF_TLV) + { + mSawEmptyList = true; + } + else if (err != CHIP_NO_ERROR) + { + mDecodingFailed = true; + break; + } + } while (false); + } + else + { + ++mAttributeStatusIBCount; + } + + NextCallback().OnAttributeData(aPath, apData, aStatus); + } + + void OnError(CHIP_ERROR aError) override { NextCallback().OnError(aError); } + + void OnEventData(const EventHeader & aEventHeader, TLV::TLVReader * apData, const StatusIB * apStatus) override + { + NextCallback().OnEventData(aEventHeader, apData, apStatus); + } + + void OnDone(ReadClient * apReadClient) override { NextCallback().OnDone(apReadClient); } + + void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) override + { + NextCallback().OnSubscriptionEstablished(aSubscriptionId); + } + + CHIP_ERROR OnResubscriptionNeeded(ReadClient * apReadClient, CHIP_ERROR aTerminationCause) override + { + return NextCallback().OnResubscriptionNeeded(apReadClient, aTerminationCause); + } + + void OnDeallocatePaths(ReadPrepareParams && aReadPrepareParams) override + { + NextCallback().OnDeallocatePaths(std::move(aReadPrepareParams)); + } + + CHIP_ERROR OnUpdateDataVersionFilterList(DataVersionFilterIBs::Builder & aDataVersionFilterIBsBuilder, + const Span & aAttributePaths, + bool & aEncodedDataVersionList) override + { + return NextCallback().OnUpdateDataVersionFilterList(aDataVersionFilterIBsBuilder, aAttributePaths, aEncodedDataVersionList); + } + + CHIP_ERROR GetHighestReceivedEventNumber(Optional & aEventNumber) override + { + return NextCallback().GetHighestReceivedEventNumber(aEventNumber); + } + + void OnUnsolicitedMessageFromPublisher(ReadClient * apReadClient) override + { + NextCallback().OnUnsolicitedMessageFromPublisher(apReadClient); + } + + void OnCASESessionEstablished(const SessionHandle & aSession, ReadPrepareParams & aSubscriptionParams) override + { + NextCallback().OnCASESessionEstablished(aSession, aSubscriptionParams); + } + + BufferedReadCallback mBufferedCallback; + bool mSawEmptyList = false; + bool mDecodingFailed = false; + uint32_t mAttributeDataIBCount = 0; + uint32_t mAttributeStatusIBCount = 0; +}; + class TestReadCallback : public app::ReadClient::Callback { public: @@ -138,10 +250,13 @@ class TestReadCallback : public app::ReadClient::Callback void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) override { mOnSubscriptionEstablished = true; } + void OnError(CHIP_ERROR aError) override { mReadError = aError; } + uint32_t mAttributeCount = 0; bool mOnReportEnd = false; bool mOnSubscriptionEstablished = false; - app::BufferedReadCallback mBufferedCallback; + CHIP_ERROR mReadError = CHIP_NO_ERROR; + TestBufferedReadCallback mBufferedCallback; }; void TestReadCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPath, TLV::TLVReader * apData, @@ -276,7 +391,7 @@ CHIP_ERROR TestAttrAccess::Read(const app::ConcreteReadAttributePath & aPath, ap { case kTestListAttribute: return aEncoder.EncodeList([](const auto & encoder) { - for (int i = 0; i < 5; i++) + for (int i = 0; i < kListAttributeItems; i++) { ReturnErrorOnFailure(encoder.Encode((uint8_t) gIterationCount)); } @@ -446,23 +561,36 @@ void TestReadChunking::TestListChunking(nlTestSuite * apSuite, void * apContext) app::AttributePathParams attributePath(kTestEndpointId3, app::Clusters::UnitTesting::Id, kTestListAttribute); app::ReadPrepareParams readParams(sessionHandle); - readParams.mpAttributePathParamsList = &attributePath; - readParams.mAttributePathParamsListSize = 1; + // Read the path twice, so we get two lists. This make it easier to check + // for what happens when one of the lists starts near the end of a packet + // boundary. + + AttributePathParams pathList[] = { attributePath, attributePath }; + + readParams.mpAttributePathParamsList = pathList; + readParams.mAttributePathParamsListSize = ArraySize(pathList); + + constexpr size_t maxPacketSize = kMaxSecureSduLengthBytes; + bool gotSuccessfulEncode = false; + bool gotFailureResponse = false; // - // We've empirically determined that by reserving 950 bytes in the packet buffer, we can fit 2 - // AttributeDataIBs into the packet. ~30-40 bytes covers a single AttributeDataIB, but let's 2-3x that - // to ensure we'll sweep from fitting 2 IBs to 3-4 IBs. + // Make sure we start off the packet size large enough that we can fit a + // single status response in it. Verify that we get at least one status + // response. Then sweep up over packet sizes until we're big enough to hold + // something like 7 IBs (at 30-40 bytes each, so call it 200 bytes) and check + // the behavior for all those cases. // - for (int i = 100; i > 0; i--) + for (uint32_t packetSize = 30; packetSize < 200; packetSize++) { TestReadCallback readCallback; - ChipLogDetail(DataManagement, "Running iteration %d\n", i); + ChipLogDetail(DataManagement, "Running iteration %d\n", packetSize); - gIterationCount = (uint32_t) i; + gIterationCount = packetSize; - app::InteractionModelEngine::GetInstance()->GetReportingEngine().SetWriterReserved(static_cast(850 + i)); + app::InteractionModelEngine::GetInstance()->GetReportingEngine().SetWriterReserved( + static_cast(maxPacketSize - packetSize)); app::ReadClient readClient(engine, &ctx.GetExchangeManager(), readCallback.mBufferedCallback, app::ReadClient::InteractionType::Read); @@ -470,14 +598,37 @@ void TestReadChunking::TestListChunking(nlTestSuite * apSuite, void * apContext) NL_TEST_ASSERT(apSuite, readClient.SendRequest(readParams) == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); - NL_TEST_ASSERT(apSuite, readCallback.mOnReportEnd); - // - // Always returns the same number of attributes read (merged by buffered read callback). The content is checked in - // TestReadCallback::OnAttributeData - // - NL_TEST_ASSERT(apSuite, readCallback.mAttributeCount == 1); - readCallback.mAttributeCount = 0; + // Up until our packets are big enough, we might just keep getting + // errors due to the inability to encode even a single IB in a packet. + // But once we manage a successful encode, we should not have any more failures. + if (!gotSuccessfulEncode && readCallback.mReadError != CHIP_NO_ERROR) + { + gotFailureResponse = true; + // Check for the right error type. + NL_TEST_ASSERT(apSuite, + StatusIB(readCallback.mReadError).mStatus == Protocols::InteractionModel::Status::ResourceExhausted); + } + else + { + gotSuccessfulEncode = true; + + NL_TEST_ASSERT(apSuite, readCallback.mOnReportEnd); + + // + // Always returns the same number of attributes read (merged by buffered read callback). The content is checked in + // TestReadCallback::OnAttributeData. The attribute count is 1 + // because the buffered callback treats the second read's path as being + // just a replace of the first read's path and buffers it all up as a + // single value. + // + NL_TEST_ASSERT(apSuite, readCallback.mAttributeCount == 1); + readCallback.mAttributeCount = 0; + + // Check that we never saw an empty-list data IB. + NL_TEST_ASSERT(apSuite, !readCallback.mBufferedCallback.mDecodingFailed); + NL_TEST_ASSERT(apSuite, !readCallback.mBufferedCallback.mSawEmptyList); + } NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); @@ -490,6 +641,9 @@ void TestReadChunking::TestListChunking(nlTestSuite * apSuite, void * apContext) } } + // If this fails, our smallest packet size was not small enough. + NL_TEST_ASSERT(apSuite, gotFailureResponse); + emberAfClearDynamicEndpoint(0); } From fb7bc792aa5a5e4a5639108a2c2c1b6537633a6a Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 7 Aug 2023 09:19:29 -0400 Subject: [PATCH 25/74] Add a way to have tests run only in the python-chip-tool driver. (#28526) Switches TestGroupKeyManagementCluster to the new setup and enables the disabled parts of it. Fixes https://github.com/project-chip/connectedhomeip/issues/28396 --- .../chip-tool/templates/tests/commands.zapt | 13 + scripts/setup/zap.json | 4 +- scripts/setup/zap.version | 2 +- scripts/tests/chiptest/__init__.py | 54 +- scripts/tests/chiptest/test_definition.py | 1 + scripts/tests/run_test_suite.py | 3 + scripts/tools/zap/zap_execution.py | 2 +- src/app/tests/suites/TestEqualities.yaml | 8 +- .../suites/TestGroupKeyManagementCluster.yaml | 63 +- .../certification/Test_TC_SMOKECO_2_3.yaml | 2 +- src/app/tests/suites/ciTests.json | 1 - .../tests/suites/pythonRunnerOnlyTests.json | 5 + .../tests/simulated-cluster-objects.h | 192 + .../chip-tool/zap-generated/test/Commands.h | 2864 +++------------ .../zap-generated/test/Commands.h | 3255 ----------------- 15 files changed, 725 insertions(+), 5744 deletions(-) create mode 100644 src/app/tests/suites/pythonRunnerOnlyTests.json diff --git a/examples/chip-tool/templates/tests/commands.zapt b/examples/chip-tool/templates/tests/commands.zapt index 34e80ddfb44843..acafcaa626f3dc 100644 --- a/examples/chip-tool/templates/tests/commands.zapt +++ b/examples/chip-tool/templates/tests/commands.zapt @@ -36,6 +36,18 @@ public: } }; +class PythonRunnerOnlyTestList : public Command +{ +public: + PythonRunnerOnlyTestList() : Command("list-python-runner-only") {}; + CHIP_ERROR Run() override + { + {{#chip_tests "../../../../src/app/tests/suites/pythonRunnerOnlyTests.json" includeAllClusters=true}}printf("{{filename}}\n");{{/chip_tests}} + + return CHIP_NO_ERROR; + } +}; + {{>test_cluster tests="../../../../src/app/tests/suites/ciTests.json" credsIssuerConfigArg=true needsWaitDuration=true}} {{>test_cluster tests="../../../../src/app/tests/suites/manualTests.json" credsIssuerConfigArg=true needsWaitDuration=true}} @@ -49,6 +61,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds #if CONFIG_ENABLE_YAML_TESTS make_unique(), make_unique(), + make_unique(), {{#chip_tests "../../../../src/app/tests/suites/ciTests.json" includeAllClusters=true}} make_unique<{{filename}}Suite>(credsIssuerConfig), {{/chip_tests}} diff --git a/scripts/setup/zap.json b/scripts/setup/zap.json index 95b8b0a56c4495..4f837c2f012b7f 100644 --- a/scripts/setup/zap.json +++ b/scripts/setup/zap.json @@ -8,13 +8,13 @@ "mac-amd64", "windows-amd64" ], - "tags": ["version:2@v2023.08.01-nightly.1"] + "tags": ["version:2@v2023.08.04-nightly.1"] }, { "_comment": "Always get the amd64 version on mac until usable arm64 zap build is available", "path": "fuchsia/third_party/zap/mac-amd64", "platforms": ["mac-arm64"], - "tags": ["version:2@v2023.08.01-nightly.1"] + "tags": ["version:2@v2023.08.04-nightly.1"] } ] } diff --git a/scripts/setup/zap.version b/scripts/setup/zap.version index ea7688be7708a5..e30f5e8a88c715 100644 --- a/scripts/setup/zap.version +++ b/scripts/setup/zap.version @@ -1 +1 @@ -v2023.08.01-nightly +v2023.08.04-nightly diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 4e5390495bdac5..c00d1ce6735d91 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -129,27 +129,48 @@ def _GetSlowTests() -> Set[str]: def _GetInDevelopmentTests() -> Set[str]: """Tests that fail in YAML for some reason.""" + return { + "Test_TC_TIMESYNC_1_1.yaml", # Time sync SDK is not yet ready + "Test_TC_TIMESYNC_2_3.yaml", # Time sync SDK is not yet ready + "Test_TC_PSCFG_1_1.yaml", # Power source configuration cluster is deprecated and removed from all-clusters + "Test_TC_PSCFG_2_1.yaml", # Power source configuration cluster is deprecated and removed from all-clusters + "Test_TC_PSCFG_2_2.yaml", # Power source configuration cluster is deprecated and removed from all-clusters + "Test_TC_SMOKECO_2_6.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes + # TestEventTriggersEnabled is true, which it's not in CI. Also, test + # has wrong key for eventNumber: because using the right key leads to + # codegen that does not compile. + "Test_TC_SMOKECO_2_2.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes + # TestEventTriggersEnabled is true, which it's not in CI. Also, test + # has wrong key for eventNumber: because using the right key leads to + # codegen that does not compile. + "Test_TC_SMOKECO_2_3.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes + # TestEventTriggersEnabled is true, which it's not in CI. Also, test + # has wrong key for eventNumber: because using the right key leads to + # codegen that does not compile. + "Test_TC_SMOKECO_2_4.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes + # TestEventTriggersEnabled is true, which it's not in CI. Also, test + # has wrong key for eventNumber: because using the right key leads to + # codegen that does not compile. + "Test_TC_SMOKECO_2_5.yaml", # chip-repl does not support local timeout (07/20/2023) and test uses unknown + # keepSubscriptions key in the YAML. Also, test has wrong key for eventNumber: + # because using the right key leads to codegen that does not compile. + } + + +def _GetChipReplUnsupportedTests() -> Set[str]: + """Tests that fail in chip-repl for some reason""" return { "Test_AddNewFabricFromExistingFabric.yaml", # chip-repl does not support GetCommissionerRootCertificate and IssueNocChain command "TestEqualities.yaml", # chip-repl does not support pseudo-cluster commands that return a value "TestExampleCluster.yaml", # chip-repl does not load custom pseudo clusters - "Test_TC_TIMESYNC_1_1.yaml", # Time sync SDK is not yet ready - "Test_TC_TIMESYNC_2_3.yaml", # Time sync SDK is not yet ready "TestAttributesById.yaml", # chip-repl does not support AnyCommands (06/06/2023) "TestCommandsById.yaml", # chip-repl does not support AnyCommands (06/06/2023) "TestEventsById.yaml", # chip-repl does not support AnyCommands (06/06/2023) "TestReadNoneSubscribeNone.yaml", # chip-repl does not support AnyCommands (07/27/2023) "Test_TC_DRLK_2_8.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27011#issuecomment-1593339855 "Test_TC_ACE_1_6.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27910#issuecomment-1632485584 - "Test_TC_PSCFG_1_1.yaml", # Power source configuration cluster is deprecated and removed from all-clusters - "Test_TC_PSCFG_2_1.yaml", # Power source configuration cluster is deprecated and removed from all-clusters - "Test_TC_PSCFG_2_2.yaml", # Power source configuration cluster is deprecated and removed from all-clusters - "Test_TC_SMOKECO_2_2.yaml", # chip-repl does not support local timeout (07/20/2023) - "Test_TC_SMOKECO_2_3.yaml", # chip-repl does not support local timeout (07/20/2023) - "Test_TC_SMOKECO_2_4.yaml", # chip-repl does not support local timeout (07/20/2023) - "Test_TC_SMOKECO_2_5.yaml", # chip-repl does not support local timeout (07/20/2023) - "Test_TC_SMOKECO_2_6.yaml", # chip-repl does not support local timeout (07/20/2023) "Test_TC_IDM_1_2.yaml", # chip-repl does not support AnyCommands (19/07/2023) + "TestGroupKeyManagementCluster.yaml", # chip-repl does not support EqualityCommands (2023-08-04) } @@ -185,19 +206,23 @@ def target_for_name(name: str): return TestTarget.ALL_CLUSTERS -def tests_with_command(chip_tool: str, is_manual: bool): +def tests_with_command(chip_tool: str, is_manual: bool, is_chip_tool_python_only: bool = False): """Executes `chip_tool` binary to see what tests are available, using cmd to get the list. """ cmd = "list" if is_manual: cmd += "-manual" + elif is_chip_tool_python_only: + cmd += "-python-runner-only" result = subprocess.run([chip_tool, "tests", cmd], capture_output=True) test_tags = set() if is_manual: test_tags.add(TestTag.MANUAL) + if is_chip_tool_python_only: + test_tags.add(TestTag.CHIP_TOOL_PYTHON_ONLY) in_development_tests = [s.replace(".yaml", "") for s in _GetInDevelopmentTests()] @@ -222,6 +247,7 @@ def _hardcoded_python_yaml_tests(): flaky_tests = _GetFlakyTests() slow_tests = _GetSlowTests() in_development_tests = _GetInDevelopmentTests() + chip_repl_unsupported_tests = _GetChipReplUnsupportedTests() for path in _AllYamlTests(): if not _IsValidYamlTest(path.name): @@ -240,6 +266,9 @@ def _hardcoded_python_yaml_tests(): if path.name in in_development_tests: tags.add(TestTag.IN_DEVELOPMENT) + if path.name in chip_repl_unsupported_tests: + tags.add(TestTag.IN_DEVELOPMENT) + yield TestDefinition( run_name=str(path), name=path.stem, # `path.stem` converts "some/path/Test_ABC_1.2.yaml" to "Test_ABC.1.2" @@ -260,6 +289,9 @@ def AllChipToolTests(chip_tool: str): for test in tests_with_command(chip_tool, is_manual=True): yield test + for test in tests_with_command(chip_tool, is_manual=False, is_chip_tool_python_only=True): + yield test + __all__ = [ "TestTarget", diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index 5009ad90109dae..08f97c98a2ea4e 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -217,6 +217,7 @@ class TestTag(Enum): SLOW = auto() # test uses Sleep and is generally slow (>=10s is a typical threshold) FLAKY = auto() # test is considered flaky (usually a bug/time dependent issue) IN_DEVELOPMENT = auto() # test may not pass or undergoes changes + CHIP_TOOL_PYTHON_ONLY = auto() # test uses YAML features only supported by the CHIP_TOOL_PYTHON runner. def to_s(self): for (k, v) in TestTag.__members__.items(): diff --git a/scripts/tests/run_test_suite.py b/scripts/tests/run_test_suite.py index 53ce7da5d07a01..7493539e2c2e4c 100755 --- a/scripts/tests/run_test_suite.py +++ b/scripts/tests/run_test_suite.py @@ -174,6 +174,9 @@ def main(context, dry_run, log_level, target, target_glob, target_skip_glob, TestTag.FLAKY, } + if runtime != TestRunTime.CHIP_TOOL_PYTHON: + exclude_tags.add(TestTag.CHIP_TOOL_PYTHON_ONLY) + if 'all' not in target: tests = [] for name in target: diff --git a/scripts/tools/zap/zap_execution.py b/scripts/tools/zap/zap_execution.py index 9db6537dc32e8d..2bae1f00004f30 100644 --- a/scripts/tools/zap/zap_execution.py +++ b/scripts/tools/zap/zap_execution.py @@ -23,7 +23,7 @@ # Use scripts/tools/zap/version_update.py to manage ZAP versioning as many # files may need updating for versions # -MIN_ZAP_VERSION = '2023.8.1' +MIN_ZAP_VERSION = '2023.8.4' class ZapTool: diff --git a/src/app/tests/suites/TestEqualities.yaml b/src/app/tests/suites/TestEqualities.yaml index 0bbddb3cbfb0ef..aba880c398ea64 100644 --- a/src/app/tests/suites/TestEqualities.yaml +++ b/src/app/tests/suites/TestEqualities.yaml @@ -18,8 +18,12 @@ config: nodeId: 0x12344321 cluster: "EqualityCommands" endpoint: 1 - expectedValue: 20003 - unexpectedValue: 20004 + expectedValue: + type: INT16U + defaultValue: 20003 + unexpectedValue: + type: INT16U + defaultValue: 20004 tests: - label: "Wait for the commissioned device to be retrieved" diff --git a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml index cc69380fa16796..11d190c78738d6 100644 --- a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml +++ b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml @@ -74,30 +74,29 @@ tests: constraints: minValue: 3 - # TODO(#28396): Re-enabled when CI wouldn't break on this syntax - # - # command: "readAttribute" - # attribute: "ClusterRevision" - # response: - # saveAs: ClusterRevisionValue - # constraints: - # minValue: 1 - # maxValue: 2 - # type: int16u - - # - label: "Creates a new variable to hold if the cluster revision is == 2" - # cluster: EqualityCommands - # command: UnsignedNumberEquals - # arguments: - # values: - # - name: Value1 - # value: ClusterRevisionValue - # - name: Value2 - # value: 2 - # response: - # - values: - # - name: Equals - # saveAs: ClusterIsRevision2 + - label: "Read the ClusterRevision attribute" + command: "readAttribute" + attribute: "ClusterRevision" + response: + saveAs: ClusterRevisionValue + constraints: + minValue: 1 + maxValue: 2 + type: int16u + + - label: "Creates a new variable to hold if the cluster revision is == 2" + cluster: EqualityCommands + command: UnsignedNumberEquals + arguments: + values: + - name: Value1 + value: ClusterRevisionValue + - name: Value2 + value: 2 + response: + - values: + - name: Equals + saveAs: ClusterIsRevision2 ########### KeySetWrite Epoch0 field validations - label: "KeySetWrite with EpochKey0 null fails INVALID_COMMAND" @@ -161,7 +160,7 @@ tests: - label: "KeySetWrite with EpochKey0 with length 1 != 16 fails with CONSTRAINT_ERROR" - # runIf: ClusterIsRevision2 + runIf: ClusterIsRevision2 command: "KeySetWrite" arguments: values: @@ -183,7 +182,7 @@ tests: - label: "KeySetWrite with EpochKey0 with length 0 != 16 fails with CONSTRAINT_ERROR" - # runIf: ClusterIsRevision2 + runIf: ClusterIsRevision2 command: "KeySetWrite" arguments: values: @@ -204,7 +203,7 @@ tests: ########### KeySetWrite Epoch1 field validations - label: "KeySetWrite with EpochStartTime1 null fails INVALID_COMMAND" - # runIf: ClusterIsRevision2 + runIf: ClusterIsRevision2 command: "KeySetWrite" arguments: values: @@ -245,7 +244,7 @@ tests: - label: "KeySetWrite with EpochKey1 with length 1 != 16 fails with CONSTRAINT_ERROR" - # runIf: ClusterIsRevision2 + runIf: ClusterIsRevision2 command: "KeySetWrite" arguments: values: @@ -267,7 +266,7 @@ tests: - label: "KeySetWrite with EpochKey1 with length 0 != 16 fails with CONSTRAINT_ERROR" - # runIf: ClusterIsRevision2 + runIf: ClusterIsRevision2 command: "KeySetWrite" arguments: values: @@ -310,7 +309,7 @@ tests: ########### KeySetWrite Epoch2 field validations - label: "KeySetWrite with EpochStartTime2 null fails INVALID_COMMAND" command: "KeySetWrite" - # runIf: ClusterIsRevision2 + runIf: ClusterIsRevision2 arguments: values: - name: "GroupKeySet" @@ -350,7 +349,7 @@ tests: - label: "KeySetWrite with EpochKey2 with length 1 != 16 fails with CONSTRAINT_ERROR" - # runIf: ClusterIsRevision2 + runIf: ClusterIsRevision2 command: "KeySetWrite" arguments: values: @@ -372,7 +371,7 @@ tests: - label: "KeySetWrite with EpochKey2 with length 0 != 16 fails with CONSTRAINT_ERROR" - # runIf: ClusterIsRevision2 + runIf: ClusterIsRevision2 command: "KeySetWrite" arguments: values: diff --git a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml index eed913616c10cd..caad36dd80ac2e 100644 --- a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml @@ -55,7 +55,7 @@ tests: minInterval: 3 maxInterval: 30 response: - Value: 0 + value: 0 constraints: type: enum8 diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 7db3d988af0d3b..30f793e64c6f46 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -297,7 +297,6 @@ "Groups": [ "TestGroupMessaging", "TestGroupsCluster", - "TestGroupKeyManagementCluster", "Test_TC_G_1_1", "Test_TC_G_2_1" ], diff --git a/src/app/tests/suites/pythonRunnerOnlyTests.json b/src/app/tests/suites/pythonRunnerOnlyTests.json new file mode 100644 index 00000000000000..64c8257e2862d0 --- /dev/null +++ b/src/app/tests/suites/pythonRunnerOnlyTests.json @@ -0,0 +1,5 @@ +{ + "Groups": ["TestGroupKeyManagementCluster"], + "Others": ["TestEqualities"], + "collection": ["Groups", "Others"] +} diff --git a/zzz_generated/app-common/app-common/zap-generated/tests/simulated-cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/tests/simulated-cluster-objects.h index cdeb96347a0132..dcb93f3806b370 100644 --- a/zzz_generated/app-common/app-common/zap-generated/tests/simulated-cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/tests/simulated-cluster-objects.h @@ -864,6 +864,181 @@ struct DiscoveryCommandResponse } }; +struct BooleanEqualsCommand +{ + bool Value1; + bool Value2; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), Value1)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), Value2)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, Value1)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, Value2)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct SignedNumberEqualsCommand +{ + int64_t Value1; + int64_t Value2; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), Value1)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), Value2)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, Value1)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, Value2)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct UnsignedNumberEqualsCommand +{ + uint64_t Value1; + uint64_t Value2; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), Value1)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), Value2)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, Value1)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, Value2)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct EqualityResponse +{ + bool Equals; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), Equals)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, Equals)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + struct LogCommand { chip::CharSpan message; @@ -1309,6 +1484,23 @@ using DecodableType = struct DiscoveryCommandResponse; } // namespace Commands } // namespace DiscoveryCommands +namespace EqualityCommands { +namespace Commands { +namespace BooleanEquals { +using Type = struct BooleanEqualsCommand; +} +namespace SignedNumberEquals { +using Type = struct SignedNumberEqualsCommand; +} +namespace UnsignedNumberEquals { +using Type = struct UnsignedNumberEqualsCommand; +} +namespace EqualityResponse { +using DecodableType = struct EqualityResponse; +} +} // namespace Commands +} // namespace EqualityCommands + namespace LogCommands { namespace Commands { namespace Log { diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index d157cf5183082c..cdb7b4274c4968 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -319,7 +319,6 @@ class TestList : public Command printf("Test_TC_DRLK_2_12\n"); printf("TestGroupMessaging\n"); printf("TestGroupsCluster\n"); - printf("TestGroupKeyManagementCluster\n"); printf("Test_TC_G_1_1\n"); printf("Test_TC_G_2_1\n"); printf("TestActivatedCarbonFilterMonitoring\n"); @@ -657,6 +656,19 @@ class ManualTestList : public Command } }; +class PythonRunnerOnlyTestList : public Command +{ +public: + PythonRunnerOnlyTestList() : Command("list-python-runner-only"){}; + CHIP_ERROR Run() override + { + printf("TestGroupKeyManagementCluster\n"); + printf("TestEqualities\n"); + + return CHIP_NO_ERROR; + } +}; + class TestAccessControlClusterSuite : public TestCommand { public: @@ -61654,137 +61666,6 @@ class Test_TC_SMOKECO_2_3Suite : public TestCommand shouldContinue = true; break; case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEventTriggersEnabled", value, 1)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COState", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 7: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::COAlarm::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COAlarm.alarmSeverityLevel", value.alarmSeverityLevel, 1U)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testInProgress", value, 0)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_BUSY)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testInProgress", value, 0)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COState", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 15: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::COAlarm::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COAlarm.alarmSeverityLevel", value.alarmSeverityLevel, 2U)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; @@ -61792,286 +61673,418 @@ class Test_TC_SMOKECO_2_3Suite : public TestCommand VerifyOrReturn(CheckValue("COState", value, 0U)); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); } - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 19: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::AllClear::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Commission DUT to TH"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH subscribes to COState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::COState::Id, 3, - 30, true, chip::NullOptional, chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Warning CO Alarm Test Event"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerWarningCoAlarm.HasValue() ? mTestEventTriggerWarningCoAlarm.Value() : 0xffffffff00000091ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "TH waits for a report of COState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 6: { - LogStep(6, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "TH reads COAlarm event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::COAlarm::Id, false, - chip::NullOptional); - } - case 8: { - LogStep(8, "Start manually DUT self-test"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SMOKECO.M.ManuallyControlledTest"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "TH reads TestInProgress attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::TestInProgress::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "TH sends SelfTestRequest command to DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Commands::SelfTestRequest::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "TH reads TestInProgress attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::TestInProgress::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Critical CO Alarm Test Event"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerCriticalCoAlarm.HasValue() ? mTestEventTriggerCriticalCoAlarm.Value() : 0xffffffff0000009dULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 13: { - LogStep(13, "TH waits for a report of COState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 14: { - LogStep(14, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "TH reads COAlarm event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::COAlarm::Id, false, - chip::NullOptional); - } - case 16: { - LogStep(16, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for CO " - "Alarm Test Event Clear"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerCoAlarmClear.HasValue() ? mTestEventTriggerCoAlarmClear.Value() : 0xffffffff000000a1ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 17: { - LogStep(17, "TH waits for a report of COState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 18: { - LogStep(18, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "TH reads AllClear event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::AllClear::Id, false, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SMOKECO_2_4Suite : public TestCommand -{ -public: - Test_TC_SMOKECO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SMOKECO_2_4", 50, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("TEST_EVENT_TRIGGER_KEY", &mTestEventTriggerKey); - AddArgument("TEST_EVENT_TRIGGER_WARNING_BATTERY_ALERT", 0, UINT64_MAX, &mTestEventTriggerWarningBatteryAlert); - AddArgument("TEST_EVENT_TRIGGER_CRITICAL_BATTERY_ALERT", 0, UINT64_MAX, &mTestEventTriggerCriticalBatteryAlert); - AddArgument("TEST_EVENT_TRIGGER_BATTERY_ALERT_CLEAR", 0, UINT64_MAX, &mTestEventTriggerBatteryAlertClear); - AddArgument("TEST_EVENT_TRIGGER_HARDWARE_FAULT_ALERT", 0, UINT64_MAX, &mTestEventTriggerHardwareFaultAlert); - AddArgument("TEST_EVENT_TRIGGER_HARDWARE_FAULT_ALERT_CLEAR", 0, UINT64_MAX, &mTestEventTriggerHardwareFaultAlertClear); - AddArgument("TEST_EVENT_TRIGGER_END_OF_SERVICE_ALERT", 0, UINT64_MAX, &mTestEventTriggerEndOfServiceAlert); - AddArgument("TEST_EVENT_TRIGGER_END_OF_SERVICE_ALERT_CLEAR", 0, UINT64_MAX, &mTestEventTriggerEndOfServiceAlertClear); - AddArgument("EVENT_NUMBER", 0, UINT64_MAX, &mEventNumber); - } - - ~Test_TC_SMOKECO_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(2910)); } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - chip::Optional mTestEventTriggerKey; - chip::Optional mTestEventTriggerWarningBatteryAlert; - chip::Optional mTestEventTriggerCriticalBatteryAlert; - chip::Optional mTestEventTriggerBatteryAlertClear; - chip::Optional mTestEventTriggerHardwareFaultAlert; - chip::Optional mTestEventTriggerHardwareFaultAlertClear; - chip::Optional mTestEventTriggerEndOfServiceAlert; - chip::Optional mTestEventTriggerEndOfServiceAlertClear; - chip::Optional mEventNumber; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("batteryAlert", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("expressedState", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("testEventTriggersEnabled", value, 1)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("COState", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + } + shouldContinue = true; + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("expressedState", value, 2U)); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + } + break; + case 7: + switch (mTestSubStepIndex) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::SmokeCoAlarm::Events::COAlarm::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("COAlarm.alarmSeverityLevel", value.alarmSeverityLevel, 1U)); + } + mTestSubStepIndex++; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + break; + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("testInProgress", value, 0)); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_BUSY)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("testInProgress", value, 0)); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("COState", value, 2U)); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + } + shouldContinue = true; + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("expressedState", value, 2U)); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + } + break; + case 15: + switch (mTestSubStepIndex) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::SmokeCoAlarm::Events::COAlarm::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("COAlarm.alarmSeverityLevel", value.alarmSeverityLevel, 2U)); + } + mTestSubStepIndex++; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + break; + } + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("COState", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + } + shouldContinue = true; + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("expressedState", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + } + break; + case 19: + switch (mTestSubStepIndex) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::SmokeCoAlarm::Events::AllClear::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + mTestSubStepIndex++; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + break; + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Commission DUT to TH"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH subscribes to COState attribute from DUT"); + VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::COState::Id, 3, + 30, true, chip::NullOptional, chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads ExpressedState attribute from DUT"); + VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, + true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster"); + VerifyOrDo(!ShouldSkip("DGGEN.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, + GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, + "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " + "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " + "Warning CO Alarm Test Event"); + VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; + value.enableKey = mTestEventTriggerKey.HasValue() + ? mTestEventTriggerKey.Value() + : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), + 16); + value.eventTrigger = + mTestEventTriggerWarningCoAlarm.HasValue() ? mTestEventTriggerWarningCoAlarm.Value() : 0xffffffff00000091ULL; + return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, + GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional + + ); + } + case 5: { + LogStep(5, "TH waits for a report of COState attribute from DUT with a timeout of 300 seconds"); + VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitForReport(); + } + case 6: { + LogStep(6, "TH reads ExpressedState attribute from DUT"); + VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, + true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads COAlarm event from DUT"); + VerifyOrDo(!ShouldSkip("SMOKECO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + mTestSubStepCount = 1; + return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::COAlarm::Id, false, + chip::NullOptional); + } + case 8: { + LogStep(8, "Start manually DUT self-test"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SMOKECO.M.ManuallyControlledTest"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 9: { + LogStep(9, "TH reads TestInProgress attribute from DUT"); + VerifyOrDo(!ShouldSkip("SMOKECO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::TestInProgress::Id, + true, chip::NullOptional); + } + case 10: { + LogStep(10, "TH sends SelfTestRequest command to DUT"); + VerifyOrDo(!ShouldSkip("SMOKECO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Commands::SelfTestRequest::Id, value, + chip::NullOptional + + ); + } + case 11: { + LogStep(11, "TH reads TestInProgress attribute from DUT"); + VerifyOrDo(!ShouldSkip("SMOKECO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::TestInProgress::Id, + true, chip::NullOptional); + } + case 12: { + LogStep(12, + "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " + "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " + "Critical CO Alarm Test Event"); + VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; + value.enableKey = mTestEventTriggerKey.HasValue() + ? mTestEventTriggerKey.Value() + : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), + 16); + value.eventTrigger = + mTestEventTriggerCriticalCoAlarm.HasValue() ? mTestEventTriggerCriticalCoAlarm.Value() : 0xffffffff0000009dULL; + return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, + GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional + + ); + } + case 13: { + LogStep(13, "TH waits for a report of COState attribute from DUT with a timeout of 300 seconds"); + VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitForReport(); + } + case 14: { + LogStep(14, "TH reads ExpressedState attribute from DUT"); + VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, + true, chip::NullOptional); + } + case 15: { + LogStep(15, "TH reads COAlarm event from DUT"); + VerifyOrDo(!ShouldSkip("SMOKECO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + mTestSubStepCount = 1; + return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::COAlarm::Id, false, + chip::NullOptional); + } + case 16: { + LogStep(16, + "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " + "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for CO " + "Alarm Test Event Clear"); + VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; + value.enableKey = mTestEventTriggerKey.HasValue() + ? mTestEventTriggerKey.Value() + : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), + 16); + value.eventTrigger = + mTestEventTriggerCoAlarmClear.HasValue() ? mTestEventTriggerCoAlarmClear.Value() : 0xffffffff000000a1ULL; + return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, + GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional + + ); + } + case 17: { + LogStep(17, "TH waits for a report of COState attribute from DUT with a timeout of 300 seconds"); + VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitForReport(); + } + case 18: { + LogStep(18, "TH reads ExpressedState attribute from DUT"); + VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, + true, chip::NullOptional); + } + case 19: { + LogStep(19, "TH reads AllClear event from DUT"); + VerifyOrDo(!ShouldSkip("SMOKECO.S.E0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + mTestSubStepCount = 1; + return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::AllClear::Id, false, + chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SMOKECO_2_4Suite : public TestCommand +{ +public: + Test_TC_SMOKECO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SMOKECO_2_4", 50, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("TEST_EVENT_TRIGGER_KEY", &mTestEventTriggerKey); + AddArgument("TEST_EVENT_TRIGGER_WARNING_BATTERY_ALERT", 0, UINT64_MAX, &mTestEventTriggerWarningBatteryAlert); + AddArgument("TEST_EVENT_TRIGGER_CRITICAL_BATTERY_ALERT", 0, UINT64_MAX, &mTestEventTriggerCriticalBatteryAlert); + AddArgument("TEST_EVENT_TRIGGER_BATTERY_ALERT_CLEAR", 0, UINT64_MAX, &mTestEventTriggerBatteryAlertClear); + AddArgument("TEST_EVENT_TRIGGER_HARDWARE_FAULT_ALERT", 0, UINT64_MAX, &mTestEventTriggerHardwareFaultAlert); + AddArgument("TEST_EVENT_TRIGGER_HARDWARE_FAULT_ALERT_CLEAR", 0, UINT64_MAX, &mTestEventTriggerHardwareFaultAlertClear); + AddArgument("TEST_EVENT_TRIGGER_END_OF_SERVICE_ALERT", 0, UINT64_MAX, &mTestEventTriggerEndOfServiceAlert); + AddArgument("TEST_EVENT_TRIGGER_END_OF_SERVICE_ALERT_CLEAR", 0, UINT64_MAX, &mTestEventTriggerEndOfServiceAlertClear); + AddArgument("EVENT_NUMBER", 0, UINT64_MAX, &mEventNumber); + } + + ~Test_TC_SMOKECO_2_4Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(2910)); } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + chip::Optional mTestEventTriggerKey; + chip::Optional mTestEventTriggerWarningBatteryAlert; + chip::Optional mTestEventTriggerCriticalBatteryAlert; + chip::Optional mTestEventTriggerBatteryAlertClear; + chip::Optional mTestEventTriggerHardwareFaultAlert; + chip::Optional mTestEventTriggerHardwareFaultAlertClear; + chip::Optional mTestEventTriggerEndOfServiceAlert; + chip::Optional mTestEventTriggerEndOfServiceAlertClear; + chip::Optional mEventNumber; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("batteryAlert", value, 0U)); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -113400,2031 +113413,6 @@ class TestGroupsClusterSuite : public TestCommand } }; -class TestGroupKeyManagementClusterSuite : public TestCommand -{ -public: - TestGroupKeyManagementClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestGroupKeyManagementCluster", 64, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("payload", &mPayload); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestGroupKeyManagementClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mPayload; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 3U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("groupKeySet.groupKeySetID", value.groupKeySet.groupKeySetID, 417U)); - VerifyOrReturn(CheckValue("groupKeySet.groupKeySecurityPolicy", value.groupKeySet.groupKeySecurityPolicy, 0U)); - VerifyOrReturn(CheckValueNull("groupKeySet.epochKey0", value.groupKeySet.epochKey0)); - VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime0", value.groupKeySet.epochStartTime0)); - VerifyOrReturn( - CheckValue("groupKeySet.epochStartTime0.Value()", value.groupKeySet.epochStartTime0.Value(), 1110000ULL)); - VerifyOrReturn(CheckValueNull("groupKeySet.epochKey1", value.groupKeySet.epochKey1)); - VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime1", value.groupKeySet.epochStartTime1)); - VerifyOrReturn( - CheckValue("groupKeySet.epochStartTime1.Value()", value.groupKeySet.epochStartTime1.Value(), 1110001ULL)); - VerifyOrReturn(CheckValueNull("groupKeySet.epochKey2", value.groupKeySet.epochKey2)); - VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime2", value.groupKeySet.epochStartTime2)); - VerifyOrReturn( - CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 1110002ULL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value.groupKeySetIDs, 417U)); - VerifyOrReturn(CheckConstraintContains("value", value.groupKeySetIDs, 418U)); - VerifyOrReturn(CheckConstraintContains("value", value.groupKeySetIDs, 0U)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 0)); - VerifyOrReturn(CheckValue("groupKeyMap[0].groupId", iter_0.GetValue().groupId, 257U)); - VerifyOrReturn(CheckValue("groupKeyMap[0].groupKeySetID", iter_0.GetValue().groupKeySetID, 417U)); - VerifyOrReturn(CheckValue("groupKeyMap[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 1)); - VerifyOrReturn(CheckValue("groupKeyMap[1].groupId", iter_0.GetValue().groupId, 258U)); - VerifyOrReturn(CheckValue("groupKeyMap[1].groupKeySetID", iter_0.GetValue().groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("groupKeyMap[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 2)); - VerifyOrReturn(CheckValue("groupKeyMap[2].groupId", iter_0.GetValue().groupId, 259U)); - VerifyOrReturn(CheckValue("groupKeyMap[2].groupKeySetID", iter_0.GetValue().groupKeySetID, 417U)); - VerifyOrReturn(CheckValue("groupKeyMap[2].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 3)); - VerifyOrReturn(CheckValue("groupKeyMap[3].groupId", iter_0.GetValue().groupId, 260U)); - VerifyOrReturn(CheckValue("groupKeyMap[3].groupKeySetID", iter_0.GetValue().groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("groupKeyMap[3].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("groupKeyMap", iter_0, 4)); - } - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 0)); - VerifyOrReturn(CheckValue("groupKeyMap[0].groupId", iter_0.GetValue().groupId, 257U)); - VerifyOrReturn(CheckValue("groupKeyMap[0].groupKeySetID", iter_0.GetValue().groupKeySetID, 417U)); - VerifyOrReturn(CheckValue("groupKeyMap[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 1)); - VerifyOrReturn(CheckValue("groupKeyMap[1].groupId", iter_0.GetValue().groupId, 258U)); - VerifyOrReturn(CheckValue("groupKeyMap[1].groupKeySetID", iter_0.GetValue().groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("groupKeyMap[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 2)); - VerifyOrReturn(CheckValue("groupKeyMap[2].groupId", iter_0.GetValue().groupId, 259U)); - VerifyOrReturn(CheckValue("groupKeyMap[2].groupKeySetID", iter_0.GetValue().groupKeySetID, 417U)); - VerifyOrReturn(CheckValue("groupKeyMap[2].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 3)); - VerifyOrReturn(CheckValue("groupKeyMap[3].groupId", iter_0.GetValue().groupId, 260U)); - VerifyOrReturn(CheckValue("groupKeyMap[3].groupKeySetID", iter_0.GetValue().groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("groupKeyMap[3].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 4)); - VerifyOrReturn(CheckValue("groupKeyMap[4].groupId", iter_0.GetValue().groupId, 258U)); - VerifyOrReturn(CheckValue("groupKeyMap[4].groupKeySetID", iter_0.GetValue().groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeyMap[4].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 5)); - VerifyOrReturn(CheckValue("groupKeyMap[5].groupId", iter_0.GetValue().groupId, 259U)); - VerifyOrReturn(CheckValue("groupKeyMap[5].groupKeySetID", iter_0.GetValue().groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeyMap[5].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 6)); - VerifyOrReturn(CheckValue("groupKeyMap[6].groupId", iter_0.GetValue().groupId, 260U)); - VerifyOrReturn(CheckValue("groupKeyMap[6].groupKeySetID", iter_0.GetValue().groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeyMap[6].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 7)); - VerifyOrReturn(CheckValue("groupKeyMap[7].groupId", iter_0.GetValue().groupId, 261U)); - VerifyOrReturn(CheckValue("groupKeyMap[7].groupKeySetID", iter_0.GetValue().groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeyMap[7].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNoMoreListItems("groupKeyMap", iter_0, 8)); - } - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 0)); - VerifyOrReturn(CheckValue("groupKeyMap[0].groupId", iter_0.GetValue().groupId, 258U)); - VerifyOrReturn(CheckValue("groupKeyMap[0].groupKeySetID", iter_0.GetValue().groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeyMap[0].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 1)); - VerifyOrReturn(CheckValue("groupKeyMap[1].groupId", iter_0.GetValue().groupId, 259U)); - VerifyOrReturn(CheckValue("groupKeyMap[1].groupKeySetID", iter_0.GetValue().groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeyMap[1].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 2)); - VerifyOrReturn(CheckValue("groupKeyMap[2].groupId", iter_0.GetValue().groupId, 260U)); - VerifyOrReturn(CheckValue("groupKeyMap[2].groupKeySetID", iter_0.GetValue().groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeyMap[2].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 3)); - VerifyOrReturn(CheckValue("groupKeyMap[3].groupId", iter_0.GetValue().groupId, 261U)); - VerifyOrReturn(CheckValue("groupKeyMap[3].groupKeySetID", iter_0.GetValue().groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeyMap[3].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNoMoreListItems("groupKeyMap", iter_0, 4)); - } - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 0)); - VerifyOrReturn(CheckValue("groupKeyMap[0].groupId", iter_0.GetValue().groupId, 257U)); - VerifyOrReturn(CheckValue("groupKeyMap[0].groupKeySetID", iter_0.GetValue().groupKeySetID, 417U)); - VerifyOrReturn(CheckValue("groupKeyMap[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 1)); - VerifyOrReturn(CheckValue("groupKeyMap[1].groupId", iter_0.GetValue().groupId, 258U)); - VerifyOrReturn(CheckValue("groupKeyMap[1].groupKeySetID", iter_0.GetValue().groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("groupKeyMap[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 2)); - VerifyOrReturn(CheckValue("groupKeyMap[2].groupId", iter_0.GetValue().groupId, 259U)); - VerifyOrReturn(CheckValue("groupKeyMap[2].groupKeySetID", iter_0.GetValue().groupKeySetID, 417U)); - VerifyOrReturn(CheckValue("groupKeyMap[2].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 3)); - VerifyOrReturn(CheckValue("groupKeyMap[3].groupId", iter_0.GetValue().groupId, 260U)); - VerifyOrReturn(CheckValue("groupKeyMap[3].groupKeySetID", iter_0.GetValue().groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("groupKeyMap[3].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 4)); - VerifyOrReturn(CheckValue("groupKeyMap[4].groupId", iter_0.GetValue().groupId, 258U)); - VerifyOrReturn(CheckValue("groupKeyMap[4].groupKeySetID", iter_0.GetValue().groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeyMap[4].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 5)); - VerifyOrReturn(CheckValue("groupKeyMap[5].groupId", iter_0.GetValue().groupId, 259U)); - VerifyOrReturn(CheckValue("groupKeyMap[5].groupKeySetID", iter_0.GetValue().groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeyMap[5].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 6)); - VerifyOrReturn(CheckValue("groupKeyMap[6].groupId", iter_0.GetValue().groupId, 260U)); - VerifyOrReturn(CheckValue("groupKeyMap[6].groupKeySetID", iter_0.GetValue().groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeyMap[6].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 7)); - VerifyOrReturn(CheckValue("groupKeyMap[7].groupId", iter_0.GetValue().groupId, 261U)); - VerifyOrReturn(CheckValue("groupKeyMap[7].groupKeySetID", iter_0.GetValue().groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeyMap[7].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNoMoreListItems("groupKeyMap", iter_0, 8)); - } - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); - } - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 260U)); - } - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 261U)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 0)); - VerifyOrReturn(CheckValue("groupTable[0].groupId", iter_0.GetValue().groupId, 257U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[0].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[0].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[0].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[0].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[0].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #1", 8))); - VerifyOrReturn(CheckValue("groupTable[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 1)); - VerifyOrReturn(CheckValue("groupTable[1].groupId", iter_0.GetValue().groupId, 258U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[1].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[1].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[1].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[1].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[1].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #2", 8))); - VerifyOrReturn(CheckValue("groupTable[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 2)); - VerifyOrReturn(CheckValue("groupTable[2].groupId", iter_0.GetValue().groupId, 259U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[2].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[2].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[2].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[2].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[2].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #3", 8))); - VerifyOrReturn(CheckValue("groupTable[2].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 3)); - VerifyOrReturn(CheckValue("groupTable[3].groupId", iter_0.GetValue().groupId, 260U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[3].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[3].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[3].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[3].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[3].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #4", 8))); - VerifyOrReturn(CheckValue("groupTable[3].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 4)); - } - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 0)); - VerifyOrReturn(CheckValue("groupTable[0].groupId", iter_0.GetValue().groupId, 257U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[0].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[0].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[0].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[0].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[0].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #1", 8))); - VerifyOrReturn(CheckValue("groupTable[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 1)); - VerifyOrReturn(CheckValue("groupTable[1].groupId", iter_0.GetValue().groupId, 258U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[1].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[1].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[1].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[1].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[1].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #2", 8))); - VerifyOrReturn(CheckValue("groupTable[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 2)); - VerifyOrReturn(CheckValue("groupTable[2].groupId", iter_0.GetValue().groupId, 259U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[2].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[2].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[2].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[2].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[2].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #3", 8))); - VerifyOrReturn(CheckValue("groupTable[2].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 3)); - VerifyOrReturn(CheckValue("groupTable[3].groupId", iter_0.GetValue().groupId, 260U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[3].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[3].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[3].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[3].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[3].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #4", 8))); - VerifyOrReturn(CheckValue("groupTable[3].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 4)); - VerifyOrReturn(CheckValue("groupTable[4].groupId", iter_0.GetValue().groupId, 261U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[4].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[4].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[4].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[4].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[4].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #5", 8))); - VerifyOrReturn(CheckValue("groupTable[4].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 5)); - } - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 0)); - VerifyOrReturn(CheckValue("groupTable[0].groupId", iter_0.GetValue().groupId, 261U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[0].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[0].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[0].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[0].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[0].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #5", 8))); - VerifyOrReturn(CheckValue("groupTable[0].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 1)); - } - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 0)); - VerifyOrReturn(CheckValue("groupTable[0].groupId", iter_0.GetValue().groupId, 257U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[0].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[0].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[0].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[0].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[0].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #1", 8))); - VerifyOrReturn(CheckValue("groupTable[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 1)); - VerifyOrReturn(CheckValue("groupTable[1].groupId", iter_0.GetValue().groupId, 258U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[1].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[1].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[1].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[1].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[1].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #2", 8))); - VerifyOrReturn(CheckValue("groupTable[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 2)); - VerifyOrReturn(CheckValue("groupTable[2].groupId", iter_0.GetValue().groupId, 259U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[2].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[2].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[2].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[2].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[2].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #3", 8))); - VerifyOrReturn(CheckValue("groupTable[2].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 3)); - VerifyOrReturn(CheckValue("groupTable[3].groupId", iter_0.GetValue().groupId, 260U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[3].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[3].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[3].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[3].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[3].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #4", 8))); - VerifyOrReturn(CheckValue("groupTable[3].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 4)); - VerifyOrReturn(CheckValue("groupTable[4].groupId", iter_0.GetValue().groupId, 261U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[4].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[4].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[4].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[4].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[4].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #5", 8))); - VerifyOrReturn(CheckValue("groupTable[4].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 5)); - } - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("groupKeySet.groupKeySetID", value.groupKeySet.groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("groupKeySet.groupKeySecurityPolicy", value.groupKeySet.groupKeySecurityPolicy, 1U)); - VerifyOrReturn(CheckValueNull("groupKeySet.epochKey0", value.groupKeySet.epochKey0)); - VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime0", value.groupKeySet.epochStartTime0)); - VerifyOrReturn( - CheckValue("groupKeySet.epochStartTime0.Value()", value.groupKeySet.epochStartTime0.Value(), 2110000ULL)); - VerifyOrReturn(CheckValueNull("groupKeySet.epochKey1", value.groupKeySet.epochKey1)); - VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime1", value.groupKeySet.epochStartTime1)); - VerifyOrReturn( - CheckValue("groupKeySet.epochStartTime1.Value()", value.groupKeySet.epochStartTime1.Value(), 2110001ULL)); - VerifyOrReturn(CheckValueNull("groupKeySet.epochKey2", value.groupKeySet.epochKey2)); - VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime2", value.groupKeySet.epochStartTime2)); - VerifyOrReturn( - CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("groupKeySet.groupKeySetID", value.groupKeySet.groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("groupKeySet.groupKeySecurityPolicy", value.groupKeySet.groupKeySecurityPolicy, 0U)); - VerifyOrReturn(CheckValueNull("groupKeySet.epochKey0", value.groupKeySet.epochKey0)); - VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime0", value.groupKeySet.epochStartTime0)); - VerifyOrReturn( - CheckValue("groupKeySet.epochStartTime0.Value()", value.groupKeySet.epochStartTime0.Value(), 2110000ULL)); - VerifyOrReturn(CheckValueNull("groupKeySet.epochKey1", value.groupKeySet.epochKey1)); - VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime1", value.groupKeySet.epochStartTime1)); - VerifyOrReturn( - CheckValue("groupKeySet.epochStartTime1.Value()", value.groupKeySet.epochStartTime1.Value(), 2110001ULL)); - VerifyOrReturn(CheckValueNull("groupKeySet.epochKey2", value.groupKeySet.epochKey2)); - VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime2", value.groupKeySet.epochStartTime2)); - VerifyOrReturn( - CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); - } - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - } - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 0)); - VerifyOrReturn(CheckValue("groupTable[0].groupId", iter_0.GetValue().groupId, 258U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[0].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[0].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[0].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[0].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[0].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #2", 8))); - VerifyOrReturn(CheckValue("groupTable[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 1)); - VerifyOrReturn(CheckValue("groupTable[1].groupId", iter_0.GetValue().groupId, 259U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[1].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[1].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[1].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[1].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[1].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #3", 8))); - VerifyOrReturn(CheckValue("groupTable[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 2)); - VerifyOrReturn(CheckValue("groupTable[2].groupId", iter_0.GetValue().groupId, 260U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[2].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[2].endpoints[0]", iter_2.GetValue(), 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[2].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[2].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[2].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Group #4", 8))); - VerifyOrReturn(CheckValue("groupTable[2].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 3)); - } - } - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 0)); - } - } - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 0)); - VerifyOrReturn(CheckValue("groupKeyMap[0].groupId", iter_0.GetValue().groupId, 258U)); - VerifyOrReturn(CheckValue("groupKeyMap[0].groupKeySetID", iter_0.GetValue().groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("groupKeyMap[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("groupKeyMap", iter_0, 1)); - } - } - break; - case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("groupKeyMap", iter_0, 0)); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved for alpha"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Open Commissioning Window from alpha"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Commission from beta"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 3: { - LogStep(3, "Wait for the commissioned device to be retrieved for beta"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 4: { - LogStep(4, "Read maxGroupsPerFabric"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::MaxGroupsPerFabric::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read maxGroupKeysPerFabric"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "KeySetWrite with EpochKey0 null fails INVALID_COMMAND"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNull(); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNull(); - value.groupKeySet.epochStartTime1.SetNull(); - value.groupKeySet.epochKey2.SetNull(); - value.groupKeySet.epochStartTime2.SetNull(); - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "KeySetWrite with EpochStartTime0 null fails INVALID_COMMAND"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNull(); - value.groupKeySet.epochKey1.SetNull(); - value.groupKeySet.epochStartTime1.SetNull(); - value.groupKeySet.epochKey2.SetNull(); - value.groupKeySet.epochStartTime2.SetNull(); - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 8: { - LogStep(8, "KeySetWrite with EpochStartTime0 set to zero fails INVALID_COMMAND"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 0ULL; - value.groupKeySet.epochKey1.SetNull(); - value.groupKeySet.epochStartTime1.SetNull(); - value.groupKeySet.epochKey2.SetNull(); - value.groupKeySet.epochStartTime2.SetNull(); - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 9: { - LogStep(9, "KeySetWrite with EpochKey0 with length 1 != 16 fails with CONSTRAINT_ERROR"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = - chip::ByteSpan(chip::Uint8::from_const_char("\240garbage: not in length on purpose"), 1); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1ULL; - value.groupKeySet.epochKey1.SetNull(); - value.groupKeySet.epochStartTime1.SetNull(); - value.groupKeySet.epochKey2.SetNull(); - value.groupKeySet.epochStartTime2.SetNull(); - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 10: { - LogStep(10, "KeySetWrite with EpochKey0 with length 0 != 16 fails with CONSTRAINT_ERROR"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = - chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1ULL; - value.groupKeySet.epochKey1.SetNull(); - value.groupKeySet.epochStartTime1.SetNull(); - value.groupKeySet.epochKey2.SetNull(); - value.groupKeySet.epochStartTime2.SetNull(); - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 11: { - LogStep(11, "KeySetWrite with EpochStartTime1 null fails INVALID_COMMAND"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNull(); - value.groupKeySet.epochKey2.SetNull(); - value.groupKeySet.epochStartTime2.SetNull(); - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 12: { - LogStep(12, "KeySetWrite with EpochKey1 null fails INVALID_COMMAND"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNull(); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNull(); - value.groupKeySet.epochStartTime2.SetNull(); - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 13: { - LogStep(13, "KeySetWrite with EpochKey1 with length 1 != 16 fails with CONSTRAINT_ERROR"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = - chip::ByteSpan(chip::Uint8::from_const_char("\260garbage: not in length on purpose"), 1); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNull(); - value.groupKeySet.epochStartTime2.SetNull(); - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 14: { - LogStep(14, "KeySetWrite with EpochKey1 with length 0 != 16 fails with CONSTRAINT_ERROR"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = - chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNull(); - value.groupKeySet.epochStartTime2.SetNull(); - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 15: { - LogStep(15, "KeySetWrite with EpochStartTime1 not later than EpochStart0 fails with INVALID_COMMAND"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1ULL; - value.groupKeySet.epochKey2.SetNull(); - value.groupKeySet.epochStartTime2.SetNull(); - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 16: { - LogStep(16, "KeySetWrite with EpochStartTime2 null fails INVALID_COMMAND"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNull(); - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 17: { - LogStep(17, "KeySetWrite with EpochKey2 null fails INVALID_COMMAND"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNull(); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 1110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 18: { - LogStep(18, "KeySetWrite with EpochKey2 with length 1 != 16 fails with CONSTRAINT_ERROR"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = - chip::ByteSpan(chip::Uint8::from_const_char("\300garbage: not in length on purpose"), 1); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 1110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 19: { - LogStep(19, "KeySetWrite with EpochKey2 with length 0 != 16 fails with CONSTRAINT_ERROR"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = - chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 1110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 20: { - LogStep(20, "KeySetWrite with EpochStartTime2 not later than EpochStart1 fails with INVALID_COMMAND"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 100ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 21: { - LogStep(21, "KeySet Write 1"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 1110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 22: { - LogStep(22, "KeySet Write 2 CacheAndSync"); - VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 418U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(1); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 2110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 2110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 2110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 23: { - LogStep(23, "KeySet Write 2 TrustFirst"); - VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 418U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 2110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 2110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 2110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 24: { - LogStep(24, "KeySet Write 3 CacheAndSync"); - VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 419U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(1); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 2110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 2110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = - chip::ByteSpan(chip::Uint8::from_const_char(" !\042#$%&'()*+,-./garbage: not in length on purpose"), 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 2110002ULL; - - return SendCommand(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetWrite::Id, - value, chip::NullOptional - - ); - } - case 25: { - LogStep(25, "KeySet Write 3 TrustFirst"); - VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 419U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 2110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 2110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = - chip::ByteSpan(chip::Uint8::from_const_char(" !\042#$%&'()*+,-./garbage: not in length on purpose"), 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 2110002ULL; - - return SendCommand(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetWrite::Id, - value, chip::NullOptional - - ); - } - case 26: { - LogStep(26, "KeySet Read"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; - value.groupKeySetID = 417U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetRead::Id, - value, chip::NullOptional - - ); - } - case 27: { - LogStep(27, "KeySet Read All Indices"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetReadAllIndices::Id, value, chip::NullOptional - - ); - } - case 28: { - LogStep(28, "Write one keyset too many when already full"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 546U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\321\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 3110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\341\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 3110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\361\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 3110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 29: { - LogStep(29, "Write Group Keys (invalid)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 258U; - listHolder_0->mList[0].groupKeySetID = 0U; - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 30: { - LogStep(30, "Write Group Keys (too many)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(14); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 257U; - listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].groupId = 257U; - listHolder_0->mList[1].groupKeySetID = 418U; - listHolder_0->mList[1].fabricIndex = 1U; - - listHolder_0->mList[2].groupId = 258U; - listHolder_0->mList[2].groupKeySetID = 417U; - listHolder_0->mList[2].fabricIndex = 1U; - - listHolder_0->mList[3].groupId = 258U; - listHolder_0->mList[3].groupKeySetID = 418U; - listHolder_0->mList[3].fabricIndex = 1U; - - listHolder_0->mList[4].groupId = 259U; - listHolder_0->mList[4].groupKeySetID = 417U; - listHolder_0->mList[4].fabricIndex = 1U; - - listHolder_0->mList[5].groupId = 259U; - listHolder_0->mList[5].groupKeySetID = 418U; - listHolder_0->mList[5].fabricIndex = 1U; - - listHolder_0->mList[6].groupId = 260U; - listHolder_0->mList[6].groupKeySetID = 417U; - listHolder_0->mList[6].fabricIndex = 1U; - - listHolder_0->mList[7].groupId = 260U; - listHolder_0->mList[7].groupKeySetID = 418U; - listHolder_0->mList[7].fabricIndex = 1U; - - listHolder_0->mList[8].groupId = 261U; - listHolder_0->mList[8].groupKeySetID = 417U; - listHolder_0->mList[8].fabricIndex = 1U; - - listHolder_0->mList[9].groupId = 261U; - listHolder_0->mList[9].groupKeySetID = 418U; - listHolder_0->mList[9].fabricIndex = 1U; - - listHolder_0->mList[10].groupId = 262U; - listHolder_0->mList[10].groupKeySetID = 417U; - listHolder_0->mList[10].fabricIndex = 1U; - - listHolder_0->mList[11].groupId = 262U; - listHolder_0->mList[11].groupKeySetID = 418U; - listHolder_0->mList[11].fabricIndex = 1U; - - listHolder_0->mList[12].groupId = 263U; - listHolder_0->mList[12].groupKeySetID = 417U; - listHolder_0->mList[12].fabricIndex = 1U; - - listHolder_0->mList[13].groupId = 263U; - listHolder_0->mList[13].groupKeySetID = 418U; - listHolder_0->mList[13].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 14); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 31: { - LogStep(31, "Write Group Keys on alpha"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(4); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 257U; - listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].groupId = 258U; - listHolder_0->mList[1].groupKeySetID = 418U; - listHolder_0->mList[1].fabricIndex = 1U; - - listHolder_0->mList[2].groupId = 259U; - listHolder_0->mList[2].groupKeySetID = 417U; - listHolder_0->mList[2].fabricIndex = 1U; - - listHolder_0->mList[3].groupId = 260U; - listHolder_0->mList[3].groupKeySetID = 418U; - listHolder_0->mList[3].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 4); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 32: { - LogStep(32, "Write Group Keys on beta"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(4); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 258U; - listHolder_0->mList[0].groupKeySetID = 419U; - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].groupId = 259U; - listHolder_0->mList[1].groupKeySetID = 419U; - listHolder_0->mList[1].fabricIndex = 1U; - - listHolder_0->mList[2].groupId = 260U; - listHolder_0->mList[2].groupKeySetID = 419U; - listHolder_0->mList[2].fabricIndex = 1U; - - listHolder_0->mList[3].groupId = 261U; - listHolder_0->mList[3].groupKeySetID = 419U; - listHolder_0->mList[3].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 4); - } - return WriteAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 33: { - LogStep(33, "Read Group Keys on alpha"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); - } - case 34: { - LogStep(34, "Read Group Keys on alpha without fabric filtering"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); - } - case 35: { - LogStep(35, "Read Group Keys on beta"); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); - } - case 36: { - LogStep(36, "Read Group Keys on beta without fabric filtering"); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); - } - case 37: { - LogStep(37, "Add Group 1"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 257U; - value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 38: { - LogStep(38, "Add Group 2"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 258U; - value.groupName = chip::Span("Group #2garbage: not in length on purpose", 8); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 39: { - LogStep(39, "Add Group 3"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 259U; - value.groupName = chip::Span("Group #3garbage: not in length on purpose", 8); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 40: { - LogStep(40, "Add Group 4"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 260U; - value.groupName = chip::Span("Group #4garbage: not in length on purpose", 8); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 41: { - LogStep(41, "Add Group 5"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 261U; - value.groupName = chip::Span("Group #5garbage: not in length on purpose", 8); - return SendCommand(kIdentityBeta, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 42: { - LogStep(42, "Read GroupTable from alpha"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); - } - case 43: { - LogStep(43, "Read GroupTable from alpha without fabric filtering"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); - } - case 44: { - LogStep(44, "Read GroupTable from beta"); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); - } - case 45: { - LogStep(45, "Read GroupTable from beta without fabric filtering"); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); - } - case 46: { - LogStep(46, "KeySet Remove 1"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; - value.groupKeySetID = 417U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetRemove::Id, value, chip::NullOptional - - ); - } - case 47: { - LogStep(47, "KeySet Read (removed)"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; - value.groupKeySetID = 417U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetRead::Id, - value, chip::NullOptional - - ); - } - case 48: { - LogStep(48, "KeySet Read (not removed) CacheAndSync"); - VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; - value.groupKeySetID = 418U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetRead::Id, - value, chip::NullOptional - - ); - } - case 49: { - LogStep(49, "KeySet Read (not removed) TrustFirst"); - VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; - value.groupKeySetID = 418U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetRead::Id, - value, chip::NullOptional - - ); - } - case 50: { - LogStep(50, "Remove Group 1"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveGroup::Type value; - value.groupID = 257U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveGroup::Id, value, - chip::NullOptional - - ); - } - case 51: { - LogStep(51, "Read GroupTable 2"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); - } - case 52: { - LogStep(52, "Remove All"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, - chip::NullOptional - - ); - } - case 53: { - LogStep(53, "Read GroupTable 3"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); - } - case 54: { - LogStep(54, "KeySet Remove 2"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; - value.groupKeySetID = 418U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetRemove::Id, value, chip::NullOptional - - ); - } - case 55: { - LogStep(55, "KeySet Read (also removed)"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; - value.groupKeySetID = 418U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetRead::Id, - value, chip::NullOptional - - ); - } - case 56: { - LogStep(56, "KeySet Write 1"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 1110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 57: { - LogStep(57, "KeySet Write 2 CacheAndSync"); - VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 418U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(1); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 2110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 2110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 2110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 58: { - LogStep(58, "KeySet Write 2 TrustFirst"); - VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 418U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 2110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 2110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 2110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 59: { - LogStep(59, "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(3); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 257U; - listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].groupId = 258U; - listHolder_0->mList[1].groupKeySetID = 418U; - listHolder_0->mList[1].fabricIndex = 1U; - - listHolder_0->mList[2].groupId = 258U; - listHolder_0->mList[2].groupKeySetID = 417U; - listHolder_0->mList[2].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 3); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 60: { - LogStep(60, "Remove keyset 1"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; - value.groupKeySetID = 417U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetRemove::Id, value, chip::NullOptional - - ); - } - case 61: { - LogStep(61, "TH verifies GroupKeyMap entries for KeySet 1 have been removed"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); - } - case 62: { - LogStep(62, "Remove keyset 2"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; - value.groupKeySetID = 418U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetRemove::Id, value, chip::NullOptional - - ); - } - case 63: { - LogStep(63, "TH verifies GroupKeyMap entries for KeySet 2 have been removed"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_G_1_1Suite : public TestCommand { public: @@ -147164,6 +145152,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds #if CONFIG_ENABLE_YAML_TESTS make_unique(), make_unique(), + make_unique(), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -147448,7 +145437,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index e753c024da9f07..9de07fa1b127ee 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -287,7 +287,6 @@ class TestList : public Command { printf("Test_TC_DRLK_2_11\n"); printf("Test_TC_DRLK_2_12\n"); printf("TestGroupsCluster\n"); - printf("TestGroupKeyManagementCluster\n"); printf("Test_TC_G_1_1\n"); printf("TestActivatedCarbonFilterMonitoring\n"); printf("TestHepaFilterMonitoring\n"); @@ -175652,3259 +175651,6 @@ class TestGroupsCluster : public TestCommandBridge { } }; -class TestGroupKeyManagementCluster : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestGroupKeyManagementCluster() - : TestCommandBridge("TestGroupKeyManagementCluster") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("payload", &mPayload); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~TestGroupKeyManagementCluster() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestGroupKeyManagementCluster\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestGroupKeyManagementCluster\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved for alpha\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrievedForAlpha_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Open Commissioning Window from alpha\n"); - err = TestOpenCommissioningWindowFromAlpha_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Commission from beta\n"); - err = TestCommissionFromBeta_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait for the commissioned device to be retrieved for beta\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read maxGroupsPerFabric\n"); - err = TestReadMaxGroupsPerFabric_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read maxGroupKeysPerFabric\n"); - err = TestReadMaxGroupKeysPerFabric_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : KeySetWrite with EpochKey0 null fails INVALID_COMMAND\n"); - err = TestKeySetWriteWithEpochKey0NullFailsInvalidCommand_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : KeySetWrite with EpochStartTime0 null fails INVALID_COMMAND\n"); - err = TestKeySetWriteWithEpochStartTime0NullFailsInvalidCommand_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : KeySetWrite with EpochStartTime0 set to zero fails INVALID_COMMAND\n"); - err = TestKeySetWriteWithEpochStartTime0SetToZeroFailsInvalidCommand_8(); - break; - case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : KeySetWrite with EpochKey0 with length 1 != 16 fails with CONSTRAINT_ERROR\n"); - err = TestKeySetWriteWithEpochKey0WithLength116FailsWithConstraintError_9(); - break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : KeySetWrite with EpochKey0 with length 0 != 16 fails with CONSTRAINT_ERROR\n"); - err = TestKeySetWriteWithEpochKey0WithLength016FailsWithConstraintError_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : KeySetWrite with EpochStartTime1 null fails INVALID_COMMAND\n"); - err = TestKeySetWriteWithEpochStartTime1NullFailsInvalidCommand_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : KeySetWrite with EpochKey1 null fails INVALID_COMMAND\n"); - err = TestKeySetWriteWithEpochKey1NullFailsInvalidCommand_12(); - break; - case 13: - ChipLogProgress( - chipTool, " ***** Test Step 13 : KeySetWrite with EpochKey1 with length 1 != 16 fails with CONSTRAINT_ERROR\n"); - err = TestKeySetWriteWithEpochKey1WithLength116FailsWithConstraintError_13(); - break; - case 14: - ChipLogProgress( - chipTool, " ***** Test Step 14 : KeySetWrite with EpochKey1 with length 0 != 16 fails with CONSTRAINT_ERROR\n"); - err = TestKeySetWriteWithEpochKey1WithLength016FailsWithConstraintError_14(); - break; - case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : KeySetWrite with EpochStartTime1 not later than EpochStart0 fails with INVALID_COMMAND\n"); - err = TestKeySetWriteWithEpochStartTime1NotLaterThanEpochStart0FailsWithInvalidCommand_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : KeySetWrite with EpochStartTime2 null fails INVALID_COMMAND\n"); - err = TestKeySetWriteWithEpochStartTime2NullFailsInvalidCommand_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : KeySetWrite with EpochKey2 null fails INVALID_COMMAND\n"); - err = TestKeySetWriteWithEpochKey2NullFailsInvalidCommand_17(); - break; - case 18: - ChipLogProgress( - chipTool, " ***** Test Step 18 : KeySetWrite with EpochKey2 with length 1 != 16 fails with CONSTRAINT_ERROR\n"); - err = TestKeySetWriteWithEpochKey2WithLength116FailsWithConstraintError_18(); - break; - case 19: - ChipLogProgress( - chipTool, " ***** Test Step 19 : KeySetWrite with EpochKey2 with length 0 != 16 fails with CONSTRAINT_ERROR\n"); - err = TestKeySetWriteWithEpochKey2WithLength016FailsWithConstraintError_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : KeySetWrite with EpochStartTime2 not later than EpochStart1 fails with INVALID_COMMAND\n"); - err = TestKeySetWriteWithEpochStartTime2NotLaterThanEpochStart1FailsWithInvalidCommand_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : KeySet Write 1\n"); - err = TestKeySetWrite1_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : KeySet Write 2 CacheAndSync\n"); - if (ShouldSkip("GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetWrite2CacheAndSync_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : KeySet Write 2 TrustFirst\n"); - if (ShouldSkip("!GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetWrite2TrustFirst_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : KeySet Write 3 CacheAndSync\n"); - if (ShouldSkip("GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetWrite3CacheAndSync_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : KeySet Write 3 TrustFirst\n"); - if (ShouldSkip("!GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetWrite3TrustFirst_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : KeySet Read\n"); - err = TestKeySetRead_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : KeySet Read All Indices\n"); - err = TestKeySetReadAllIndices_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Write one keyset too many when already full\n"); - err = TestWriteOneKeysetTooManyWhenAlreadyFull_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Write Group Keys (invalid)\n"); - err = TestWriteGroupKeysInvalid_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Write Group Keys (too many)\n"); - err = TestWriteGroupKeysTooMany_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Write Group Keys on alpha\n"); - err = TestWriteGroupKeysOnAlpha_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Write Group Keys on beta\n"); - err = TestWriteGroupKeysOnBeta_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read Group Keys on alpha\n"); - err = TestReadGroupKeysOnAlpha_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Read Group Keys on alpha without fabric filtering\n"); - err = TestReadGroupKeysOnAlphaWithoutFabricFiltering_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read Group Keys on beta\n"); - err = TestReadGroupKeysOnBeta_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Read Group Keys on beta without fabric filtering\n"); - err = TestReadGroupKeysOnBetaWithoutFabricFiltering_36(); - break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Add Group 1\n"); - err = TestAddGroup1_37(); - break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Add Group 2\n"); - err = TestAddGroup2_38(); - break; - case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Add Group 3\n"); - err = TestAddGroup3_39(); - break; - case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Add Group 4\n"); - err = TestAddGroup4_40(); - break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Add Group 5\n"); - err = TestAddGroup5_41(); - break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Read GroupTable from alpha\n"); - err = TestReadGroupTableFromAlpha_42(); - break; - case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Read GroupTable from alpha without fabric filtering\n"); - err = TestReadGroupTableFromAlphaWithoutFabricFiltering_43(); - break; - case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Read GroupTable from beta\n"); - err = TestReadGroupTableFromBeta_44(); - break; - case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Read GroupTable from beta without fabric filtering\n"); - err = TestReadGroupTableFromBetaWithoutFabricFiltering_45(); - break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : KeySet Remove 1\n"); - err = TestKeySetRemove1_46(); - break; - case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : KeySet Read (removed)\n"); - err = TestKeySetReadRemoved_47(); - break; - case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : KeySet Read (not removed) CacheAndSync\n"); - if (ShouldSkip("GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetReadNotRemovedCacheAndSync_48(); - break; - case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : KeySet Read (not removed) TrustFirst\n"); - if (ShouldSkip("GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetReadNotRemovedTrustFirst_49(); - break; - case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Remove Group 1\n"); - err = TestRemoveGroup1_50(); - break; - case 51: - ChipLogProgress(chipTool, " ***** Test Step 51 : Read GroupTable 2\n"); - err = TestReadGroupTable2_51(); - break; - case 52: - ChipLogProgress(chipTool, " ***** Test Step 52 : Remove All\n"); - err = TestRemoveAll_52(); - break; - case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : Read GroupTable 3\n"); - err = TestReadGroupTable3_53(); - break; - case 54: - ChipLogProgress(chipTool, " ***** Test Step 54 : KeySet Remove 2\n"); - err = TestKeySetRemove2_54(); - break; - case 55: - ChipLogProgress(chipTool, " ***** Test Step 55 : KeySet Read (also removed)\n"); - err = TestKeySetReadAlsoRemoved_55(); - break; - case 56: - ChipLogProgress(chipTool, " ***** Test Step 56 : KeySet Write 1\n"); - err = TestKeySetWrite1_56(); - break; - case 57: - ChipLogProgress(chipTool, " ***** Test Step 57 : KeySet Write 2 CacheAndSync\n"); - if (ShouldSkip("GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetWrite2CacheAndSync_57(); - break; - case 58: - ChipLogProgress(chipTool, " ***** Test Step 58 : KeySet Write 2 TrustFirst\n"); - if (ShouldSkip("!GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetWrite2TrustFirst_58(); - break; - case 59: - ChipLogProgress(chipTool, " ***** Test Step 59 : Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2\n"); - err = TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_59(); - break; - case 60: - ChipLogProgress(chipTool, " ***** Test Step 60 : Remove keyset 1\n"); - err = TestRemoveKeyset1_60(); - break; - case 61: - ChipLogProgress(chipTool, " ***** Test Step 61 : TH verifies GroupKeyMap entries for KeySet 1 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_61(); - break; - case 62: - ChipLogProgress(chipTool, " ***** Test Step 62 : Remove keyset 2\n"); - err = TestRemoveKeyset2_62(); - break; - case 63: - ChipLogProgress(chipTool, " ***** Test Step 63 : TH verifies GroupKeyMap entries for KeySet 2 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_63(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 64; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mPayload; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForAlpha_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestOpenCommissioningWindowFromAlpha_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - [cluster openBasicCommissioningWindowWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from alpha Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCommissionFromBeta_2() - { - - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_3() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("beta", value); - } - - CHIP_ERROR TestReadMaxGroupsPerFabric_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read maxGroupsPerFabric Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMinValue("maxGroupsPerFabric", [value unsignedShortValue], 4U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadMaxGroupKeysPerFabric_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read maxGroupKeysPerFabric Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMinValue("maxGroupKeysPerFabric", [value unsignedShortValue], 3U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWriteWithEpochKey0NullFailsInvalidCommand_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySetWrite with EpochKey0 null fails INVALID_COMMAND Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWriteWithEpochStartTime0NullFailsInvalidCommand_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySetWrite with EpochStartTime0 null fails INVALID_COMMAND Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWriteWithEpochStartTime0SetToZeroFailsInvalidCommand_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:0ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySetWrite with EpochStartTime0 set to zero fails INVALID_COMMAND Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWriteWithEpochKey0WithLength116FailsWithConstraintError_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = [[NSData alloc] initWithBytes:"\240" - length:1]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySetWrite with EpochKey0 with length 1 != 16 fails with CONSTRAINT_ERROR Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWriteWithEpochKey0WithLength016FailsWithConstraintError_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = [[NSData alloc] initWithBytes:"" - length:0]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySetWrite with EpochKey0 with length 0 != 16 fails with CONSTRAINT_ERROR Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWriteWithEpochStartTime1NullFailsInvalidCommand_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySetWrite with EpochStartTime1 null fails INVALID_COMMAND Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWriteWithEpochKey1NullFailsInvalidCommand_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:1110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySetWrite with EpochKey1 null fails INVALID_COMMAND Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWriteWithEpochKey1WithLength116FailsWithConstraintError_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = [[NSData alloc] initWithBytes:"\260" - length:1]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:1110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySetWrite with EpochKey1 with length 1 != 16 fails with CONSTRAINT_ERROR Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWriteWithEpochKey1WithLength016FailsWithConstraintError_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = [[NSData alloc] initWithBytes:"" - length:0]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:1110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySetWrite with EpochKey1 with length 0 != 16 fails with CONSTRAINT_ERROR Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWriteWithEpochStartTime1NotLaterThanEpochStart0FailsWithInvalidCommand_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:1ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog( - @"KeySetWrite with EpochStartTime1 not later than EpochStart0 fails with INVALID_COMMAND Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWriteWithEpochStartTime2NullFailsInvalidCommand_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:1110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySetWrite with EpochStartTime2 null fails INVALID_COMMAND Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWriteWithEpochKey2NullFailsInvalidCommand_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:1110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:1110002ULL]; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySetWrite with EpochKey2 null fails INVALID_COMMAND Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWriteWithEpochKey2WithLength116FailsWithConstraintError_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:1110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = [[NSData alloc] initWithBytes:"\300" - length:1]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:1110002ULL]; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySetWrite with EpochKey2 with length 1 != 16 fails with CONSTRAINT_ERROR Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWriteWithEpochKey2WithLength016FailsWithConstraintError_19() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:1110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = [[NSData alloc] initWithBytes:"" - length:0]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:1110002ULL]; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySetWrite with EpochKey2 with length 0 != 16 fails with CONSTRAINT_ERROR Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWriteWithEpochStartTime2NotLaterThanEpochStart1FailsWithInvalidCommand_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:1110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:100ULL]; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog( - @"KeySetWrite with EpochStartTime2 not later than EpochStart1 fails with INVALID_COMMAND Error: %@", - err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWrite1_21() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:1110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:1110002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWrite2CacheAndSync_22() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:1U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:2110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:2110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:2110002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 2 CacheAndSync Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWrite2TrustFirst_23() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:2110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:2110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:2110002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 2 TrustFirst Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWrite3CacheAndSync_24() - { - - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:1U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:2110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:2110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:" !\042#$%&'()*+,-./" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:2110002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 3 CacheAndSync Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWrite3TrustFirst_25() - { - - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:2110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:2110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:" !\042#$%&'()*+,-./" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:2110002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 3 TrustFirst Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetRead_26() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - [cluster - keySetReadWithParams:params - completion:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.groupKeySet; - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 417U)); - VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); - VerifyOrReturn(CheckValueNull( - "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); - VerifyOrReturn(CheckValue("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 1110000ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); - VerifyOrReturn(CheckValue("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 1110001ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); - VerifyOrReturn(CheckValue("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 1110002ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetReadAllIndices_27() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster keySetReadAllIndicesWithCompletion:^( - MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read All Indices Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintContains("groupKeySetIDs", values.groupKeySetIDs, 417U)); - VerifyOrReturn(CheckConstraintContains("groupKeySetIDs", values.groupKeySetIDs, 418U)); - VerifyOrReturn(CheckConstraintContains("groupKeySetIDs", values.groupKeySetIDs, 0U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteOneKeysetTooManyWhenAlreadyFull_28() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:546U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\321\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:3110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\341\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:3110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\361\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:3110002ULL]; - - [cluster - keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Write one keyset too many when already full Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteGroupKeysInvalid_29() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id groupKeyMapArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:258U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:0U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - groupKeyMapArgument = temp_0; - } - [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write Group Keys (invalid) Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteGroupKeysTooMany_30() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id groupKeyMapArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:257U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[1] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupId = [NSNumber numberWithUnsignedShort:257U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[2] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupId = [NSNumber numberWithUnsignedShort:258U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[3] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupId = [NSNumber numberWithUnsignedShort:258U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[4] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[4]).groupId = [NSNumber numberWithUnsignedShort:259U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[4]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[4]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[5] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[5]).groupId = [NSNumber numberWithUnsignedShort:259U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[5]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[5]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[6] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[6]).groupId = [NSNumber numberWithUnsignedShort:260U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[6]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[6]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[7] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[7]).groupId = [NSNumber numberWithUnsignedShort:260U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[7]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[7]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[8] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[8]).groupId = [NSNumber numberWithUnsignedShort:261U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[8]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[8]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[9] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[9]).groupId = [NSNumber numberWithUnsignedShort:261U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[9]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[9]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[10] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[10]).groupId = [NSNumber numberWithUnsignedShort:262U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[10]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[10]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[11] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[11]).groupId = [NSNumber numberWithUnsignedShort:262U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[11]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[11]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[12] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[12]).groupId = [NSNumber numberWithUnsignedShort:263U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[12]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[12]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[13] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[13]).groupId = [NSNumber numberWithUnsignedShort:263U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[13]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[13]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - groupKeyMapArgument = temp_0; - } - [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write Group Keys (too many) Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteGroupKeysOnAlpha_31() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id groupKeyMapArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:257U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[1] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupId = [NSNumber numberWithUnsignedShort:258U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[2] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupId = [NSNumber numberWithUnsignedShort:259U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[3] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupId = [NSNumber numberWithUnsignedShort:260U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - groupKeyMapArgument = temp_0; - } - [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write Group Keys on alpha Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteGroupKeysOnBeta_32() - { - - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id groupKeyMapArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:258U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[1] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupId = [NSNumber numberWithUnsignedShort:259U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[2] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupId = [NSNumber numberWithUnsignedShort:260U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[3] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupId = [NSNumber numberWithUnsignedShort:261U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[3]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - groupKeyMapArgument = temp_0; - } - [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Write Group Keys on beta Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadGroupKeysOnAlpha_33() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Group Keys on alpha Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(4))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 257U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, - 417U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupId, 258U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupKeySetID, - 418U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupId, 259U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupKeySetID, - 417U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupId, 260U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupKeySetID, - 418U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).fabricIndex, - 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_34() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = false; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Group Keys on alpha without fabric filtering Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(8))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 257U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, - 417U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupId, 258U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupKeySetID, - 418U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupId, 259U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupKeySetID, - 417U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupId, 260U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupKeySetID, - 418U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).groupId, 258U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).groupId, 259U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).groupId, 260U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).groupId, 261U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).fabricIndex, - 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadGroupKeysOnBeta_35() - { - - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Group Keys on beta Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(4))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 258U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupId, 259U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupId, 260U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupId, 261U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).fabricIndex, - 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_36() - { - - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = false; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Group Keys on beta without fabric filtering Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(8))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 257U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, - 417U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupId, 258U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupKeySetID, - 418U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupId, 259U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupKeySetID, - 417U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupId, 260U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).groupKeySetID, - 418U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[3]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).groupId, 258U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[4]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).groupId, 259U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[5]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).groupId, 260U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[6]).fabricIndex, - 2U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).groupId, 261U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[7]).fabricIndex, - 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestAddGroup1_37() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:257U]; - params.groupName = @"Group #1"; - [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Group 1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 257U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestAddGroup2_38() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:258U]; - params.groupName = @"Group #2"; - [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Group 2 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 258U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestAddGroup3_39() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:259U]; - params.groupName = @"Group #3"; - [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Group 3 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 259U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestAddGroup4_40() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:260U]; - params.groupName = @"Group #4"; - [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Group 4 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 260U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestAddGroup5_41() - { - - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:261U]; - params.groupName = @"Group #5"; - [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Group 5 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 261U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadGroupTableFromAlpha_42() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable from alpha Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(4))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 257U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, - @"Group #1")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupId, 258U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[1]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupName, - @"Group #2")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupId, 259U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[2]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupName, - @"Group #3")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupId, 260U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[3]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupName, - @"Group #4")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).fabricIndex, - 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_43() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = false; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable from alpha without fabric filtering Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(5))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 257U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, - @"Group #1")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupId, 258U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[1]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupName, - @"Group #2")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupId, 259U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[2]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupName, - @"Group #3")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupId, 260U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[3]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupName, - @"Group #4")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).groupId, 261U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[4]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).groupName, - @"Group #5")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).fabricIndex, - 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadGroupTableFromBeta_44() - { - - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable from beta Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 261U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, - @"Group #5")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, - 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_45() - { - - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = false; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable from beta without fabric filtering Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(5))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 257U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, - @"Group #1")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupId, 258U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[1]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupName, - @"Group #2")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupId, 259U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[2]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupName, - @"Group #3")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupId, 260U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[3]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).groupName, - @"Group #4")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[3]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).groupId, 261U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[4]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).groupName, - @"Group #5")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[4]).fabricIndex, - 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetRemove1_46() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Remove 1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetReadRemoved_47() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - [cluster - keySetReadWithParams:params - completion:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read (removed) Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_NOT_FOUND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_48() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - [cluster - keySetReadWithParams:params - completion:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read (not removed) CacheAndSync Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.groupKeySet; - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 1U)); - VerifyOrReturn(CheckValueNull( - "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); - VerifyOrReturn(CheckValue("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 2110000ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); - VerifyOrReturn(CheckValue("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 2110001ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); - VerifyOrReturn(CheckValue("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 2110002ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_49() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - [cluster - keySetReadWithParams:params - completion:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read (not removed) TrustFirst Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.groupKeySet; - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); - VerifyOrReturn(CheckValueNull( - "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); - VerifyOrReturn(CheckValue("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 2110000ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); - VerifyOrReturn(CheckValue("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 2110001ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); - VerifyOrReturn(CheckValue("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 2110002ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestRemoveGroup1_50() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:257U]; - [cluster removeGroupWithParams:params - completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove Group 1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 257U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadGroupTable2_51() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable 2 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 258U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, - @"Group #2")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupId, 259U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[1]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupName, - @"Group #3")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, - 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupId, 260U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[2]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).endpoints[0], - 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).groupName, - @"Group #4")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[2]).fabricIndex, - 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestRemoveAll_52() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Remove All Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadGroupTable3_53() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable 3 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(0))); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetRemove2_54() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Remove 2 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetReadAlsoRemoved_55() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - [cluster - keySetReadWithParams:params - completion:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read (also removed) Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_NOT_FOUND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWrite1_56() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:1110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:1110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:1110002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWrite2CacheAndSync_57() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:1U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:2110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:2110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:2110002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 2 CacheAndSync Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestKeySetWrite2TrustFirst_58() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:2110000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:2110001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:2110002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 2 TrustFirst Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_59() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id groupKeyMapArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:257U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[1] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupId = [NSNumber numberWithUnsignedShort:258U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[2] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupId = [NSNumber numberWithUnsignedShort:258U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - groupKeyMapArgument = temp_0; - } - [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestRemoveKeyset1_60() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Remove keyset 1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_61() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH verifies GroupKeyMap entries for KeySet 1 have been removed Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 258U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, - 418U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, - 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestRemoveKeyset2_62() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Remove keyset 2 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_63() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH verifies GroupKeyMap entries for KeySet 2 have been removed Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(0))); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - class Test_TC_G_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -181395,7 +178141,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), From d4e1bca8b088cda599da7e0f6d8fb534345a53c7 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 7 Aug 2023 09:21:36 -0400 Subject: [PATCH 26/74] Remove special-case in ToInteractionModelStatus. (#28538) EMBER_ZCL_STATUS_DUPLICATE_EXISTS is now only returned from emberAfSetDynamicEndpoint, which is never on any IM codepaths. --- src/app/chip_data_model.cmake | 1 - src/app/chip_data_model.gni | 1 - src/app/util/error-mapping.cpp | 37 ------------------- src/app/util/error-mapping.h | 5 ++- .../Matter.xcodeproj/project.pbxproj | 4 -- 5 files changed, 4 insertions(+), 44 deletions(-) delete mode 100644 src/app/util/error-mapping.cpp diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index 63ebf1b4ef1eee..fb18dd8b16c5fc 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -140,7 +140,6 @@ function(chip_configure_data_model APP_TARGET) ${CHIP_APP_BASE_DIR}/icd/IcdManagementServer.cpp ${CHIP_APP_BASE_DIR}/util/DataModelHandler.cpp ${CHIP_APP_BASE_DIR}/util/ember-compatibility-functions.cpp - ${CHIP_APP_BASE_DIR}/util/error-mapping.cpp ${CHIP_APP_BASE_DIR}/util/generic-callback-stubs.cpp ${CHIP_APP_BASE_DIR}/util/message.cpp ${CHIP_APP_BASE_DIR}/util/privilege-storage.cpp diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 1724d1048a304c..20b1f9d0e18e1e 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -171,7 +171,6 @@ template("chip_data_model") { "${_app_root}/util/binding-table.cpp", "${_app_root}/util/binding-table.h", "${_app_root}/util/ember-compatibility-functions.cpp", - "${_app_root}/util/error-mapping.cpp", "${_app_root}/util/generic-callback-stubs.cpp", "${_app_root}/util/message.cpp", "${_app_root}/util/privilege-storage.cpp", diff --git a/src/app/util/error-mapping.cpp b/src/app/util/error-mapping.cpp deleted file mode 100644 index 4bdc398d7479f6..00000000000000 --- a/src/app/util/error-mapping.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * - * Copyright (c) 2020 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "error-mapping.h" - -namespace chip { -namespace app { - -Protocols::InteractionModel::Status ToInteractionModelStatus(EmberAfStatus code) -{ - using imcode = Protocols::InteractionModel::Status; - if (code == EMBER_ZCL_STATUS_DUPLICATE_EXISTS /* 0x8A */) - { - // For now, this is still used, and should be mapped to success. Once - // we update bindings to no longer use it, this case can go away. - return imcode::Success; - } - - return static_cast(code); -} - -} // namespace app -} // namespace chip diff --git a/src/app/util/error-mapping.h b/src/app/util/error-mapping.h index 17c994ec7ad57a..de47b27f859d59 100644 --- a/src/app/util/error-mapping.h +++ b/src/app/util/error-mapping.h @@ -28,7 +28,10 @@ inline EmberAfStatus ToEmberAfStatus(Protocols::InteractionModel::Status code) return static_cast(code); } -Protocols::InteractionModel::Status ToInteractionModelStatus(EmberAfStatus code); +inline Protocols::InteractionModel::Status ToInteractionModelStatus(EmberAfStatus code) +{ + return static_cast(code); +} } // namespace app } // namespace chip diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 93d491bf23ac1f..5481acdf5ea66a 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -111,7 +111,6 @@ 2CB7163B252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CB71638252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h */; }; 2CB7163C252E8A7C0026E2BB /* MTRDeviceControllerDelegateBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2CB71639252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.mm */; }; 2CB7163F252F731E0026E2BB /* MTRDeviceControllerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CB7163E252F731E0026E2BB /* MTRDeviceControllerDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2FD775552695557E00FF4B12 /* error-mapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2FD775542695557E00FF4B12 /* error-mapping.cpp */; }; 3CF134A7289D8ADA0017A19E /* MTRCSRInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CF134A6289D8AD90017A19E /* MTRCSRInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3CF134A9289D8D800017A19E /* MTRCSRInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CF134A8289D8D800017A19E /* MTRCSRInfo.mm */; }; 3CF134AB289D8DF70017A19E /* MTRDeviceAttestationInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CF134AA289D8DF70017A19E /* MTRDeviceAttestationInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -392,7 +391,6 @@ 2CB71638252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerDelegateBridge.h; sourceTree = ""; }; 2CB71639252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceControllerDelegateBridge.mm; sourceTree = ""; }; 2CB7163E252F731E0026E2BB /* MTRDeviceControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerDelegate.h; sourceTree = ""; }; - 2FD775542695557E00FF4B12 /* error-mapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "error-mapping.cpp"; path = "util/error-mapping.cpp"; sourceTree = ""; }; 3CF134A6289D8AD90017A19E /* MTRCSRInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRCSRInfo.h; sourceTree = ""; }; 3CF134A8289D8D800017A19E /* MTRCSRInfo.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRCSRInfo.mm; sourceTree = ""; }; 3CF134AA289D8DF70017A19E /* MTRDeviceAttestationInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceAttestationInfo.h; sourceTree = ""; }; @@ -852,7 +850,6 @@ 1E857311265519DE0050A4D9 /* app */ = { isa = PBXGroup; children = ( - 2FD775542695557E00FF4B12 /* error-mapping.cpp */, 5143041F2914CED9004DC7FE /* generic-callback-stubs.cpp */, 51431AFA27D29CA4008A7943 /* ota-provider.cpp */, 3D84374A29498BAE0070D20A /* privilege-storage.cpp */, @@ -1513,7 +1510,6 @@ 5ACDDD7D27CD16D200EFD68A /* MTRClusterStateCacheContainer.mm in Sources */, 513DDB8A2761F6F900DAA01A /* MTRAttributeTLVValueDecoder.mm in Sources */, 5117DD3829A931AE00FFA1AA /* MTROperationalBrowser.mm in Sources */, - 2FD775552695557E00FF4B12 /* error-mapping.cpp in Sources */, 3D843757294AD25A0070D20A /* MTRCertificateInfo.mm in Sources */, 5A7947E427C0129600434CF2 /* MTRDeviceController+XPC.mm in Sources */, 5A6FEC9027B563D900F25F42 /* MTRDeviceControllerOverXPC.mm in Sources */, From 35cb562f3a21568c3b8c214fb617dc4069d4d48d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 7 Aug 2023 09:22:15 -0400 Subject: [PATCH 27/74] Fix reservation logic in reporting engine. (#28542) In BuildSingleReportDataAttributeReportIBs if we failed to successfully call ReserveBuffer(kReservedSizeEndOfReportIBs) (because there was not enough space in the packet), we would end up trying to EndOfAttributeReportIBs() after unreserving (which would not match our never-happened reserve) and then VerifyOrDie that we succeeded. The fix is to keep track of whether we actually successfully reserved things, and not override out-of-space-errors if we have not. --- src/app/reporting/Engine.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index 1243fff3ac1775..a1eae3abe0d1b0 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -98,6 +98,7 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu bool hasMoreChunks = true; TLV::TLVWriter backup; const uint32_t kReservedSizeEndOfReportIBs = 1; + bool reservedEndOfReportIBs = false; aReportDataBuilder.Checkpoint(backup); @@ -110,7 +111,8 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu // // Reserve enough space for closing out the Report IB list // - attributeReportIBs.GetWriter()->ReserveBuffer(kReservedSizeEndOfReportIBs); + SuccessOrExit(err = attributeReportIBs.GetWriter()->ReserveBuffer(kReservedSizeEndOfReportIBs)); + reservedEndOfReportIBs = true; { // TODO: Figure out how AttributePathExpandIterator should handle read @@ -251,7 +253,7 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu // These are are guaranteed to not fail since we've already reserved memory for the remaining 'close out' TLV operations in this // function and its callers. // - if (IsOutOfWriterSpaceError(err)) + if (IsOutOfWriterSpaceError(err) && reservedEndOfReportIBs) { ChipLogDetail(DataManagement, " We cannot put more chunks into this report. Enable chunking."); err = CHIP_NO_ERROR; From c2e4559a2c5a77c77028f8ebe34f8ea4cea8bcb7 Mon Sep 17 00:00:00 2001 From: joonhaengHeo <85541460+joonhaengHeo@users.noreply.github.com> Date: Tue, 8 Aug 2023 00:40:52 +0900 Subject: [PATCH 28/74] [Android, Java] Fix JNI Type casting issue (#28464) * Fix Jni Typecasting issue * Restyled by clang-format * Update ZAP version * Zap generated --------- Co-authored-by: Restyled.io --- .../app/src/main/jni/cpp/ConversionUtils.cpp | 5 +- .../java/AndroidDeviceControllerWrapper.cpp | 48 +- .../java/templates/partials/decode_value.zapt | 9 +- .../CHIPAttributeTLVValueDecoder.cpp | 8384 ++++++++++------- .../CHIPEventTLVValueDecoder.cpp | 786 +- .../zap-generated/CHIPInvokeCallbacks.cpp | 1325 +-- .../java/zap-generated/CHIPReadCallbacks.cpp | 4078 ++++---- 7 files changed, 8723 insertions(+), 5912 deletions(-) diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/ConversionUtils.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/ConversionUtils.cpp index 16b2cec60f201f..e1e174d940c007 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/ConversionUtils.cpp +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/ConversionUtils.cpp @@ -111,8 +111,9 @@ CHIP_ERROR convertTargetEndpointInfoToJContentApp(TargetEndpointInfo * targetEnd chip::JniReferences::GetInstance().CreateArrayList(jClustersArrayList); for (size_t i = 0; i < kMaxNumberOfClustersPerEndpoint && clusters[i] != chip::kInvalidClusterId; i++) { - jobject jCluster = nullptr; - chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", clusters[i], jCluster); + jobject jCluster = nullptr; + jint jniclusterId = static_cast(clusters[i]); + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", jniclusterId, jCluster); chip::JniReferences::GetInstance().AddToList(jClustersArrayList, jCluster); } } diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index 110121d6e2e41c..2b8c699f96bdb1 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -597,9 +597,9 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( jobject NetworkingStatus; std::string NetworkingStatusClassName = "java/lang/Integer"; std::string NetworkingStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), - static_cast(dataResponse.networkingStatus), NetworkingStatus); + jint jniNetworkingStatus = static_cast(dataResponse.networkingStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), jniNetworkingStatus, NetworkingStatus); jobject DebugText; if (!dataResponse.debugText.HasValue()) { @@ -630,9 +630,10 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( jobject newElement_security; std::string newElement_securityClassName = "java/lang/Integer"; std::string newElement_securityCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_securityClassName.c_str(), - newElement_securityCtorSignature.c_str(), - entry.security.Raw(), newElement_security); + jint jniNewElementSecurity = static_cast(entry.security.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_securityClassName.c_str(), + newElement_securityCtorSignature.c_str(), + jniNewElementSecurity, newElement_security); jobject newElement_ssid; jbyteArray newElement_ssidByteArray = env->NewByteArray(static_cast(entry.ssid.size())); env->SetByteArrayRegion(newElement_ssidByteArray, 0, static_cast(entry.ssid.size()), @@ -644,13 +645,15 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( reinterpret_cast(entry.bssid.data())); newElement_bssid = newElement_bssidByteArray; jobject newElement_channel; - chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.channel, - newElement_channel); + jint jniChannel = static_cast(entry.channel); + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", jniChannel, newElement_channel); jobject newElement_wiFiBand; - chip::JniReferences::GetInstance().CreateBoxedObject( - "java/lang/Integer", "(I)V", static_cast(entry.wiFiBand), newElement_wiFiBand); + jint jniWiFiBand = static_cast(entry.wiFiBand); + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", jniWiFiBand, + newElement_wiFiBand); jobject newElement_rssi; - chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.rssi, newElement_rssi); + jint jniRssi = static_cast(entry.rssi); + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", jniRssi, newElement_rssi); jclass wiFiInterfaceScanResultStructClass; err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/WiFiScanResult", @@ -691,28 +694,31 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( { auto & entry = iter_ThreadScanResultsInsideOptional.GetValue(); jobject newElement_panId; - chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.panId, - newElement_panId); + jint jniPanId = static_cast(entry.panId); + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", jniPanId, newElement_panId); jobject newElement_extendedPanId; - chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Long", "(J)V", entry.extendedPanId, - newElement_extendedPanId); + jlong jniExtendedPanId = static_cast(entry.extendedPanId); + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Long", "(J)V", jniExtendedPanId, + newElement_extendedPanId); jobject newElement_networkName; newElement_networkName = env->NewStringUTF(std::string(entry.networkName.data(), entry.networkName.size()).c_str()); jobject newElement_channel; - chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.channel, - newElement_channel); + jint jniChannel = static_cast(entry.channel); + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", jniChannel, newElement_channel); jobject newElement_version; - chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.version, - newElement_version); + jint jniVersion = static_cast(entry.version); + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", jniVersion, newElement_version); jobject newElement_extendedAddress; jbyteArray newElement_extendedAddressByteArray = env->NewByteArray(static_cast(entry.extendedAddress.size())); env->SetByteArrayRegion(newElement_extendedAddressByteArray, 0, static_cast(entry.extendedAddress.size()), reinterpret_cast(entry.extendedAddress.data())); newElement_extendedAddress = newElement_extendedAddressByteArray; jobject newElement_rssi; - chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.rssi, newElement_rssi); + jint jniRssi = static_cast(entry.rssi); + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", jniRssi, newElement_rssi); jobject newElement_lqi; - chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.lqi, newElement_lqi); + jint jniLqi = static_cast(entry.lqi); + chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", jniLqi, newElement_lqi); jclass threadInterfaceScanResultStructClass; err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ThreadScanResult", diff --git a/src/controller/java/templates/partials/decode_value.zapt b/src/controller/java/templates/partials/decode_value.zapt index 8837a43711e578..e09ba800dd9183 100644 --- a/src/controller/java/templates/partials/decode_value.zapt +++ b/src/controller/java/templates/partials/decode_value.zapt @@ -53,7 +53,8 @@ if ({{source}}.IsNull()) { {{#if_is_strongly_typed_chip_enum type}} std::string {{target}}ClassName = "{{asJniClassName type null (asUpperCamelCase cluster)}}"; std::string {{target}}CtorSignature = "({{asJniSignature type null (asUpperCamelCase cluster) false}})V"; - chip::JniReferences::GetInstance().CreateBoxedObject<{{asUnderlyingBasicType type}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), static_cast<{{asUnderlyingBasicType type}}>({{source}}), {{target}}); + {{asJniBasicType type false}} jni{{target}} = static_cast<{{asJniBasicType type false}}>({{source}}); + chip::JniReferences::GetInstance().CreateBoxedObject<{{asJniBasicType type false}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), jni{{target}}, {{target}}); {{else}} {{#if (isOctetString type)}} jbyteArray {{target}}ByteArray = env->NewByteArray(static_cast({{source}}.size())); @@ -65,9 +66,11 @@ if ({{source}}.IsNull()) { std::string {{target}}ClassName = "{{asJniClassName type null (asUpperCamelCase cluster)}}"; std::string {{target}}CtorSignature = "({{asJniSignature type null (asUpperCamelCase cluster) false}})V"; {{#if_is_strongly_typed_bitmap type}} - chip::JniReferences::GetInstance().CreateBoxedObject<{{asUnderlyingBasicType type}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), {{source}}.Raw(), {{target}}); + {{asJniBasicType type false}} jni{{target}} = static_cast<{{asJniBasicType type false}}>({{source}}.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject<{{asJniBasicType type false}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), jni{{target}}, {{target}}); {{else}} - chip::JniReferences::GetInstance().CreateBoxedObject<{{asUnderlyingBasicType type}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), {{source}}, {{target}}); + {{asJniBasicType type false}} jni{{target}} = static_cast<{{asJniBasicType type false}}>({{source}}); + chip::JniReferences::GetInstance().CreateBoxedObject<{{asJniBasicType type false}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), jni{{target}}, {{target}}); {{/if_is_strongly_typed_bitmap}} {{/if}} {{/if_is_strongly_typed_chip_enum}} diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 111b0828a57a99..8701d512deaeeb 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -52,8 +52,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::IdentifyType::Id: { @@ -67,8 +68,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -89,8 +91,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -113,8 +116,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -137,8 +141,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -161,8 +166,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -178,8 +184,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -193,8 +200,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -218,8 +226,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -240,8 +249,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -264,8 +274,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -288,8 +299,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -312,8 +324,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -329,8 +342,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -344,8 +358,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -369,8 +384,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::CurrentScene::Id: { @@ -384,8 +400,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::CurrentGroup::Id: { @@ -399,8 +416,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SceneValid::Id: { @@ -414,8 +432,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::NameSupport::Id: { @@ -429,8 +448,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LastConfiguredBy::Id: { @@ -450,8 +470,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -466,8 +487,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RemainingCapacity::Id: { @@ -481,8 +503,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -503,8 +526,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -527,8 +551,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -551,8 +576,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -575,8 +601,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -592,8 +619,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -607,8 +635,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -632,8 +661,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::GlobalSceneControl::Id: { @@ -647,8 +677,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::OnTime::Id: { @@ -662,8 +693,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::OffWaitTime::Id: { @@ -677,8 +709,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::StartUpOnOff::Id: { @@ -698,8 +731,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue.Value()), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -721,8 +755,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -745,8 +780,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -769,8 +805,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -793,8 +830,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -810,8 +848,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -825,8 +864,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -850,8 +890,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SwitchActions::Id: { @@ -865,8 +906,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -887,8 +929,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -911,8 +954,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -935,8 +979,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -959,8 +1004,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -976,8 +1022,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -991,8 +1038,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -1022,8 +1070,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -1038,8 +1087,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MinLevel::Id: { @@ -1053,8 +1103,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MaxLevel::Id: { @@ -1068,8 +1119,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::CurrentFrequency::Id: { @@ -1083,8 +1135,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MinFrequency::Id: { @@ -1098,8 +1151,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MaxFrequency::Id: { @@ -1113,8 +1167,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Options::Id: { @@ -1128,8 +1183,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::OnOffTransitionTime::Id: { @@ -1143,8 +1199,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::OnLevel::Id: { @@ -1164,8 +1221,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -1186,8 +1244,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -1208,8 +1267,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -1230,8 +1290,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -1252,8 +1313,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -1275,8 +1337,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1299,8 +1362,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1323,8 +1387,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1347,8 +1412,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1364,8 +1430,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -1379,8 +1446,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -1440,8 +1508,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Polarity::Id: { @@ -1455,8 +1524,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PresentValue::Id: { @@ -1470,8 +1540,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Reliability::Id: { @@ -1485,8 +1556,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::StatusFlags::Id: { @@ -1500,8 +1572,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ApplicationType::Id: { @@ -1515,8 +1588,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -1537,8 +1611,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1561,8 +1636,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1585,8 +1661,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1609,8 +1686,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1626,8 +1704,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -1641,8 +1720,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -1673,8 +1753,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1697,8 +1778,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1721,8 +1803,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1745,8 +1828,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1762,8 +1846,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -1777,8 +1862,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -1810,15 +1896,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_deviceType; std::string newElement_0_deviceTypeClassName = "java/lang/Long"; std::string newElement_0_deviceTypeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceTypeClassName.c_str(), - newElement_0_deviceTypeCtorSignature.c_str(), - entry_0.deviceType, newElement_0_deviceType); + jlong jninewElement_0_deviceType = static_cast(entry_0.deviceType); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceTypeClassName.c_str(), + newElement_0_deviceTypeCtorSignature.c_str(), + jninewElement_0_deviceType, newElement_0_deviceType); jobject newElement_0_revision; std::string newElement_0_revisionClassName = "java/lang/Integer"; std::string newElement_0_revisionCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_revisionClassName.c_str(), - newElement_0_revisionCtorSignature.c_str(), - entry_0.revision, newElement_0_revision); + jint jninewElement_0_revision = static_cast(entry_0.revision); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_revisionClassName.c_str(), + newElement_0_revisionCtorSignature.c_str(), + jninewElement_0_revision, newElement_0_revision); jclass deviceTypeStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -1860,8 +1948,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1884,8 +1973,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1908,8 +1998,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1939,21 +2030,25 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string newElement_0_mfgCodeClassName = "java/lang/Integer"; std::string newElement_0_mfgCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_mfgCodeClassName.c_str(), newElement_0_mfgCodeCtorSignature.c_str(), - static_cast(entry_0.mfgCode.Value()), newElement_0_mfgCode); + jint jninewElement_0_mfgCode = static_cast(entry_0.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_mfgCodeClassName.c_str(), + newElement_0_mfgCodeCtorSignature.c_str(), + jninewElement_0_mfgCode, newElement_0_mfgCode); } jobject newElement_0_namespaceID; std::string newElement_0_namespaceIDClassName = "java/lang/Integer"; std::string newElement_0_namespaceIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_namespaceIDClassName.c_str(), - newElement_0_namespaceIDCtorSignature.c_str(), - entry_0.namespaceID, newElement_0_namespaceID); + jint jninewElement_0_namespaceID = static_cast(entry_0.namespaceID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_namespaceIDClassName.c_str(), + newElement_0_namespaceIDCtorSignature.c_str(), + jninewElement_0_namespaceID, newElement_0_namespaceID); jobject newElement_0_tag; std::string newElement_0_tagClassName = "java/lang/Integer"; std::string newElement_0_tagCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_tagClassName.c_str(), newElement_0_tagCtorSignature.c_str(), entry_0.tag, newElement_0_tag); + jint jninewElement_0_tag = static_cast(entry_0.tag); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_tagClassName.c_str(), + newElement_0_tagCtorSignature.c_str(), + jninewElement_0_tag, newElement_0_tag); jobject newElement_0_label; if (!entry_0.label.HasValue()) { @@ -2015,8 +2110,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2039,8 +2135,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2063,8 +2160,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2087,8 +2185,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2104,8 +2203,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -2119,8 +2219,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -2159,9 +2260,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_nodeInsideOptional; std::string newElement_0_nodeInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_nodeInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_0_nodeInsideOptional = static_cast(entry_0.node.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nodeInsideOptionalClassName.c_str(), newElement_0_nodeInsideOptionalCtorSignature.c_str(), - entry_0.node.Value(), newElement_0_nodeInsideOptional); + jninewElement_0_nodeInsideOptional, newElement_0_nodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_nodeInsideOptional, newElement_0_node); } jobject newElement_0_group; @@ -2174,9 +2276,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_groupInsideOptional; std::string newElement_0_groupInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_groupInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_groupInsideOptional = static_cast(entry_0.group.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_groupInsideOptionalClassName.c_str(), newElement_0_groupInsideOptionalCtorSignature.c_str(), - entry_0.group.Value(), newElement_0_groupInsideOptional); + jninewElement_0_groupInsideOptional, newElement_0_groupInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_groupInsideOptional, newElement_0_group); } jobject newElement_0_endpoint; @@ -2189,9 +2292,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_endpointInsideOptional; std::string newElement_0_endpointInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_endpointInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_endpointInsideOptional = static_cast(entry_0.endpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_endpointInsideOptionalClassName.c_str(), - newElement_0_endpointInsideOptionalCtorSignature.c_str(), entry_0.endpoint.Value(), + newElement_0_endpointInsideOptionalCtorSignature.c_str(), jninewElement_0_endpointInsideOptional, newElement_0_endpointInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_endpointInsideOptional, newElement_0_endpoint); } @@ -2205,18 +2309,20 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_clusterInsideOptional; std::string newElement_0_clusterInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_clusterInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_0_clusterInsideOptional = static_cast(entry_0.cluster.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_clusterInsideOptionalClassName.c_str(), - newElement_0_clusterInsideOptionalCtorSignature.c_str(), entry_0.cluster.Value(), + newElement_0_clusterInsideOptionalCtorSignature.c_str(), jninewElement_0_clusterInsideOptional, newElement_0_clusterInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_clusterInsideOptional, newElement_0_cluster); } jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass targetStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2260,8 +2366,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2284,8 +2391,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2308,8 +2416,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2332,8 +2441,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2349,8 +2459,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -2364,8 +2475,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -2397,15 +2509,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_privilege; std::string newElement_0_privilegeClassName = "java/lang/Integer"; std::string newElement_0_privilegeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_privilegeClassName.c_str(), newElement_0_privilegeCtorSignature.c_str(), - static_cast(entry_0.privilege), newElement_0_privilege); + jint jninewElement_0_privilege = static_cast(entry_0.privilege); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_privilegeClassName.c_str(), + newElement_0_privilegeCtorSignature.c_str(), + jninewElement_0_privilege, newElement_0_privilege); jobject newElement_0_authMode; std::string newElement_0_authModeClassName = "java/lang/Integer"; std::string newElement_0_authModeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_authModeClassName.c_str(), newElement_0_authModeCtorSignature.c_str(), - static_cast(entry_0.authMode), newElement_0_authMode); + jint jninewElement_0_authMode = static_cast(entry_0.authMode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_authModeClassName.c_str(), + newElement_0_authModeCtorSignature.c_str(), + jninewElement_0_authMode, newElement_0_authMode); jobject newElement_0_subjects; if (entry_0.subjects.IsNull()) { @@ -2422,8 +2536,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_3; std::string newElement_3ClassName = "java/lang/Long"; std::string newElement_3CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), entry_3, newElement_3); + jlong jninewElement_3 = static_cast(entry_3); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); chip::JniReferences::GetInstance().AddToList(newElement_0_subjects, newElement_3); } } @@ -2450,9 +2565,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string newElement_3_clusterClassName = "java/lang/Long"; std::string newElement_3_clusterCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_3_cluster = static_cast(entry_3.cluster.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3_clusterClassName.c_str(), newElement_3_clusterCtorSignature.c_str(), - entry_3.cluster.Value(), newElement_3_cluster); + jninewElement_3_cluster, newElement_3_cluster); } jobject newElement_3_endpoint; if (entry_3.endpoint.IsNull()) @@ -2463,9 +2579,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string newElement_3_endpointClassName = "java/lang/Integer"; std::string newElement_3_endpointCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_3_endpoint = static_cast(entry_3.endpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3_endpointClassName.c_str(), newElement_3_endpointCtorSignature.c_str(), - entry_3.endpoint.Value(), newElement_3_endpoint); + jninewElement_3_endpoint, newElement_3_endpoint); } jobject newElement_3_deviceType; if (entry_3.deviceType.IsNull()) @@ -2476,9 +2593,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string newElement_3_deviceTypeClassName = "java/lang/Long"; std::string newElement_3_deviceTypeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_3_deviceType = static_cast(entry_3.deviceType.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3_deviceTypeClassName.c_str(), newElement_3_deviceTypeCtorSignature.c_str(), - entry_3.deviceType.Value(), newElement_3_deviceType); + jninewElement_3_deviceType, newElement_3_deviceType); } jclass accessControlTargetStructStructClass_4; @@ -2508,9 +2626,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass accessControlEntryStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2561,9 +2680,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass accessControlExtensionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2599,8 +2719,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::TargetsPerAccessControlEntry::Id: { @@ -2614,8 +2735,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AccessControlEntriesPerFabric::Id: { @@ -2629,8 +2751,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -2651,8 +2774,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2675,8 +2799,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2699,8 +2824,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2723,8 +2849,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2740,8 +2867,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -2755,8 +2883,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -2788,35 +2917,40 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_actionID; std::string newElement_0_actionIDClassName = "java/lang/Integer"; std::string newElement_0_actionIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_actionIDClassName.c_str(), - newElement_0_actionIDCtorSignature.c_str(), - entry_0.actionID, newElement_0_actionID); + jint jninewElement_0_actionID = static_cast(entry_0.actionID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_actionIDClassName.c_str(), + newElement_0_actionIDCtorSignature.c_str(), + jninewElement_0_actionID, newElement_0_actionID); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); jobject newElement_0_type; std::string newElement_0_typeClassName = "java/lang/Integer"; std::string newElement_0_typeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), static_cast(entry_0.type), - newElement_0_type); + jint jninewElement_0_type = static_cast(entry_0.type); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_typeClassName.c_str(), + newElement_0_typeCtorSignature.c_str(), + jninewElement_0_type, newElement_0_type); jobject newElement_0_endpointListID; std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; std::string newElement_0_endpointListIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointListIDClassName.c_str(), - newElement_0_endpointListIDCtorSignature.c_str(), - entry_0.endpointListID, newElement_0_endpointListID); + jint jninewElement_0_endpointListID = static_cast(entry_0.endpointListID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_endpointListIDClassName.c_str(), newElement_0_endpointListIDCtorSignature.c_str(), + jninewElement_0_endpointListID, newElement_0_endpointListID); jobject newElement_0_supportedCommands; std::string newElement_0_supportedCommandsClassName = "java/lang/Integer"; std::string newElement_0_supportedCommandsCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_supportedCommands = static_cast(entry_0.supportedCommands.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_supportedCommandsClassName.c_str(), newElement_0_supportedCommandsCtorSignature.c_str(), - entry_0.supportedCommands.Raw(), newElement_0_supportedCommands); + jninewElement_0_supportedCommands, newElement_0_supportedCommands); jobject newElement_0_state; std::string newElement_0_stateClassName = "java/lang/Integer"; std::string newElement_0_stateCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_stateClassName.c_str(), newElement_0_stateCtorSignature.c_str(), - static_cast(entry_0.state), newElement_0_state); + jint jninewElement_0_state = static_cast(entry_0.state); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_stateClassName.c_str(), + newElement_0_stateCtorSignature.c_str(), + jninewElement_0_state, newElement_0_state); jclass actionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2862,17 +2996,19 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_endpointListID; std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; std::string newElement_0_endpointListIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointListIDClassName.c_str(), - newElement_0_endpointListIDCtorSignature.c_str(), - entry_0.endpointListID, newElement_0_endpointListID); + jint jninewElement_0_endpointListID = static_cast(entry_0.endpointListID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_endpointListIDClassName.c_str(), newElement_0_endpointListIDCtorSignature.c_str(), + jninewElement_0_endpointListID, newElement_0_endpointListID); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); jobject newElement_0_type; std::string newElement_0_typeClassName = "java/lang/Integer"; std::string newElement_0_typeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), static_cast(entry_0.type), - newElement_0_type); + jint jninewElement_0_type = static_cast(entry_0.type); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_typeClassName.c_str(), + newElement_0_typeCtorSignature.c_str(), + jninewElement_0_type, newElement_0_type); jobject newElement_0_endpoints; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); @@ -2883,8 +3019,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_2; std::string newElement_2ClassName = "java/lang/Integer"; std::string newElement_2CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), entry_2, newElement_2); + jint jninewElement_2 = static_cast(entry_2); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); } @@ -2942,8 +3079,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2966,8 +3104,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2990,8 +3129,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3014,8 +3154,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3031,8 +3172,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -3046,8 +3188,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -3071,8 +3214,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::VendorName::Id: { @@ -3098,8 +3242,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ProductName::Id: { @@ -3125,8 +3270,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::NodeLabel::Id: { @@ -3164,8 +3310,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::HardwareVersionString::Id: { @@ -3191,8 +3338,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::SoftwareVersionString::Id: { @@ -3278,8 +3426,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Reachable::Id: { @@ -3293,8 +3442,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::UniqueID::Id: { @@ -3321,15 +3471,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_caseSessionsPerFabric; std::string value_caseSessionsPerFabricClassName = "java/lang/Integer"; std::string value_caseSessionsPerFabricCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_caseSessionsPerFabricClassName.c_str(), value_caseSessionsPerFabricCtorSignature.c_str(), - cppValue.caseSessionsPerFabric, value_caseSessionsPerFabric); + jint jnivalue_caseSessionsPerFabric = static_cast(cppValue.caseSessionsPerFabric); + chip::JniReferences::GetInstance().CreateBoxedObject(value_caseSessionsPerFabricClassName.c_str(), + value_caseSessionsPerFabricCtorSignature.c_str(), + jnivalue_caseSessionsPerFabric, value_caseSessionsPerFabric); jobject value_subscriptionsPerFabric; std::string value_subscriptionsPerFabricClassName = "java/lang/Integer"; std::string value_subscriptionsPerFabricCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jnivalue_subscriptionsPerFabric = static_cast(cppValue.subscriptionsPerFabric); + chip::JniReferences::GetInstance().CreateBoxedObject( value_subscriptionsPerFabricClassName.c_str(), value_subscriptionsPerFabricCtorSignature.c_str(), - cppValue.subscriptionsPerFabric, value_subscriptionsPerFabric); + jnivalue_subscriptionsPerFabric, value_subscriptionsPerFabric); jclass capabilityMinimaStructStructClass_0; err = chip::JniReferences::GetInstance().GetClassRef( @@ -3364,9 +3516,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_finish; std::string value_finishClassName = "java/lang/Integer"; std::string value_finishCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_finishClassName.c_str(), - value_finishCtorSignature.c_str(), - static_cast(cppValue.finish), value_finish); + jint jnivalue_finish = static_cast(cppValue.finish); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_finishClassName.c_str(), value_finishCtorSignature.c_str(), jnivalue_finish, value_finish); jobject value_primaryColor; if (cppValue.primaryColor.IsNull()) { @@ -3376,9 +3528,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string value_primaryColorClassName = "java/lang/Integer"; std::string value_primaryColorCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_primaryColorClassName.c_str(), value_primaryColorCtorSignature.c_str(), - static_cast(cppValue.primaryColor.Value()), value_primaryColor); + jint jnivalue_primaryColor = static_cast(cppValue.primaryColor.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_primaryColorClassName.c_str(), + value_primaryColorCtorSignature.c_str(), + jnivalue_primaryColor, value_primaryColor); } jclass productAppearanceStructStructClass_0; @@ -3420,8 +3573,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3444,8 +3598,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3468,8 +3623,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3492,8 +3648,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3509,8 +3666,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -3524,8 +3682,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -3556,8 +3715,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3580,8 +3740,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3604,8 +3765,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3628,8 +3790,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3645,8 +3808,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -3660,8 +3824,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -3693,21 +3858,24 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_providerNodeID; std::string newElement_0_providerNodeIDClassName = "java/lang/Long"; std::string newElement_0_providerNodeIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_providerNodeIDClassName.c_str(), - newElement_0_providerNodeIDCtorSignature.c_str(), - entry_0.providerNodeID, newElement_0_providerNodeID); + jlong jninewElement_0_providerNodeID = static_cast(entry_0.providerNodeID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_providerNodeIDClassName.c_str(), newElement_0_providerNodeIDCtorSignature.c_str(), + jninewElement_0_providerNodeID, newElement_0_providerNodeID); jobject newElement_0_endpoint; std::string newElement_0_endpointClassName = "java/lang/Integer"; std::string newElement_0_endpointCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointClassName.c_str(), - newElement_0_endpointCtorSignature.c_str(), - entry_0.endpoint, newElement_0_endpoint); + jint jninewElement_0_endpoint = static_cast(entry_0.endpoint); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointClassName.c_str(), + newElement_0_endpointCtorSignature.c_str(), + jninewElement_0_endpoint, newElement_0_endpoint); jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass providerLocationStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -3743,8 +3911,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::UpdateState::Id: { @@ -3758,8 +3927,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::UpdateStateProgress::Id: { @@ -3779,8 +3949,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -3802,8 +3973,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3826,8 +3998,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3850,8 +4023,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3874,8 +4048,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3891,8 +4066,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -3906,8 +4082,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -3971,8 +4148,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3995,8 +4173,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4019,8 +4198,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4043,8 +4223,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4060,8 +4241,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -4075,8 +4257,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -4100,8 +4283,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ActiveCalendarType::Id: { @@ -4115,8 +4299,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SupportedCalendarTypes::Id: { @@ -4137,8 +4322,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4161,8 +4347,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4185,8 +4372,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4209,8 +4397,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4233,8 +4422,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4250,8 +4440,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -4265,8 +4456,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -4290,8 +4482,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -4312,8 +4505,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4336,8 +4530,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4360,8 +4555,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4384,8 +4580,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4401,8 +4598,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -4416,8 +4614,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -4448,8 +4647,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4472,8 +4672,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4496,8 +4697,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4520,8 +4722,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4544,8 +4747,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4561,8 +4765,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -4576,8 +4781,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -4601,8 +4807,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Order::Id: { @@ -4616,8 +4823,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Description::Id: { @@ -4649,8 +4857,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -4671,8 +4880,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -4687,8 +4897,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::WiredAssessedCurrent::Id: { @@ -4708,8 +4919,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -4724,8 +4936,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::WiredMaximumCurrent::Id: { @@ -4739,8 +4952,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::WiredPresent::Id: { @@ -4754,8 +4968,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ActiveWiredFaults::Id: { @@ -4776,8 +4991,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4799,8 +5015,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -4821,8 +5038,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -4843,8 +5061,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -4859,8 +5078,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BatReplacementNeeded::Id: { @@ -4874,8 +5094,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::BatReplaceability::Id: { @@ -4889,8 +5110,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BatPresent::Id: { @@ -4904,8 +5126,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ActiveBatFaults::Id: { @@ -4926,8 +5149,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -4955,8 +5179,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BatANSIDesignation::Id: { @@ -4994,8 +5219,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BatCapacity::Id: { @@ -5009,8 +5235,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::BatQuantity::Id: { @@ -5024,8 +5251,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BatChargeState::Id: { @@ -5039,8 +5267,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BatTimeToFullCharge::Id: { @@ -5060,8 +5289,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -5076,8 +5306,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::BatChargingCurrent::Id: { @@ -5097,8 +5328,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -5120,8 +5352,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5144,8 +5377,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5168,8 +5402,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5192,8 +5427,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5216,8 +5452,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5240,8 +5477,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5257,8 +5495,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -5272,8 +5511,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -5297,8 +5537,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::BasicCommissioningInfo::Id: { @@ -5313,15 +5554,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_failSafeExpiryLengthSeconds; std::string value_failSafeExpiryLengthSecondsClassName = "java/lang/Integer"; std::string value_failSafeExpiryLengthSecondsCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jnivalue_failSafeExpiryLengthSeconds = static_cast(cppValue.failSafeExpiryLengthSeconds); + chip::JniReferences::GetInstance().CreateBoxedObject( value_failSafeExpiryLengthSecondsClassName.c_str(), value_failSafeExpiryLengthSecondsCtorSignature.c_str(), - cppValue.failSafeExpiryLengthSeconds, value_failSafeExpiryLengthSeconds); + jnivalue_failSafeExpiryLengthSeconds, value_failSafeExpiryLengthSeconds); jobject value_maxCumulativeFailsafeSeconds; std::string value_maxCumulativeFailsafeSecondsClassName = "java/lang/Integer"; std::string value_maxCumulativeFailsafeSecondsCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jnivalue_maxCumulativeFailsafeSeconds = static_cast(cppValue.maxCumulativeFailsafeSeconds); + chip::JniReferences::GetInstance().CreateBoxedObject( value_maxCumulativeFailsafeSecondsClassName.c_str(), value_maxCumulativeFailsafeSecondsCtorSignature.c_str(), - cppValue.maxCumulativeFailsafeSeconds, value_maxCumulativeFailsafeSeconds); + jnivalue_maxCumulativeFailsafeSeconds, value_maxCumulativeFailsafeSeconds); jclass basicCommissioningInfoStructClass_0; err = chip::JniReferences::GetInstance().GetClassRef( @@ -5355,8 +5598,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LocationCapability::Id: { @@ -5370,8 +5614,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SupportsConcurrentConnection::Id: { @@ -5385,8 +5630,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -5407,8 +5653,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5431,8 +5678,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5455,8 +5703,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5479,8 +5728,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5496,8 +5746,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -5511,8 +5762,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -5536,8 +5788,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Networks::Id: { @@ -5564,9 +5817,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_connected; std::string newElement_0_connectedClassName = "java/lang/Boolean"; std::string newElement_0_connectedCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_connectedClassName.c_str(), - newElement_0_connectedCtorSignature.c_str(), - entry_0.connected, newElement_0_connected); + jboolean jninewElement_0_connected = static_cast(entry_0.connected); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_connectedClassName.c_str(), + newElement_0_connectedCtorSignature.c_str(), + jninewElement_0_connected, newElement_0_connected); jclass networkInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -5602,8 +5856,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ConnectMaxTimeSeconds::Id: { @@ -5617,8 +5872,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::InterfaceEnabled::Id: { @@ -5632,8 +5888,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::LastNetworkingStatus::Id: { @@ -5653,8 +5910,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue.Value()), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -5697,8 +5955,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -5720,8 +5979,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5744,8 +6004,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5768,8 +6029,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5792,8 +6054,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5809,8 +6072,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -5824,8 +6088,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -5856,8 +6121,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5880,8 +6146,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5904,8 +6171,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5928,8 +6196,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5945,8 +6214,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -5960,8 +6230,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -5995,9 +6266,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_isOperational; std::string newElement_0_isOperationalClassName = "java/lang/Boolean"; std::string newElement_0_isOperationalCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_isOperationalClassName.c_str(), - newElement_0_isOperationalCtorSignature.c_str(), - entry_0.isOperational, newElement_0_isOperational); + jboolean jninewElement_0_isOperational = static_cast(entry_0.isOperational); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_isOperationalClassName.c_str(), newElement_0_isOperationalCtorSignature.c_str(), + jninewElement_0_isOperational, newElement_0_isOperational); jobject newElement_0_offPremiseServicesReachableIPv4; if (entry_0.offPremiseServicesReachableIPv4.IsNull()) { @@ -6007,10 +6279,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string newElement_0_offPremiseServicesReachableIPv4ClassName = "java/lang/Boolean"; std::string newElement_0_offPremiseServicesReachableIPv4CtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jninewElement_0_offPremiseServicesReachableIPv4 = + static_cast(entry_0.offPremiseServicesReachableIPv4.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_offPremiseServicesReachableIPv4ClassName.c_str(), newElement_0_offPremiseServicesReachableIPv4CtorSignature.c_str(), - entry_0.offPremiseServicesReachableIPv4.Value(), newElement_0_offPremiseServicesReachableIPv4); + jninewElement_0_offPremiseServicesReachableIPv4, newElement_0_offPremiseServicesReachableIPv4); } jobject newElement_0_offPremiseServicesReachableIPv6; if (entry_0.offPremiseServicesReachableIPv6.IsNull()) @@ -6021,10 +6295,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string newElement_0_offPremiseServicesReachableIPv6ClassName = "java/lang/Boolean"; std::string newElement_0_offPremiseServicesReachableIPv6CtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jninewElement_0_offPremiseServicesReachableIPv6 = + static_cast(entry_0.offPremiseServicesReachableIPv6.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_offPremiseServicesReachableIPv6ClassName.c_str(), newElement_0_offPremiseServicesReachableIPv6CtorSignature.c_str(), - entry_0.offPremiseServicesReachableIPv6.Value(), newElement_0_offPremiseServicesReachableIPv6); + jninewElement_0_offPremiseServicesReachableIPv6, newElement_0_offPremiseServicesReachableIPv6); } jobject newElement_0_hardwareAddress; jbyteArray newElement_0_hardwareAddressByteArray = @@ -6064,9 +6340,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_type; std::string newElement_0_typeClassName = "java/lang/Integer"; std::string newElement_0_typeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), static_cast(entry_0.type), - newElement_0_type); + jint jninewElement_0_type = static_cast(entry_0.type); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_typeClassName.c_str(), + newElement_0_typeCtorSignature.c_str(), + jninewElement_0_type, newElement_0_type); jclass networkInterfaceStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -6106,8 +6383,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::UpTime::Id: { @@ -6121,8 +6399,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TotalOperationalHours::Id: { @@ -6136,8 +6415,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::BootReason::Id: { @@ -6151,8 +6431,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ActiveHardwareFaults::Id: { @@ -6173,8 +6454,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -6197,8 +6479,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -6221,8 +6504,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -6238,8 +6522,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -6260,8 +6545,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -6284,8 +6570,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -6308,8 +6595,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -6332,8 +6620,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -6349,8 +6638,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -6364,8 +6654,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -6397,8 +6688,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_id; std::string newElement_0_idClassName = "java/lang/Long"; std::string newElement_0_idCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_idClassName.c_str(), newElement_0_idCtorSignature.c_str(), entry_0.id, newElement_0_id); + jlong jninewElement_0_id = static_cast(entry_0.id); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_idClassName.c_str(), newElement_0_idCtorSignature.c_str(), jninewElement_0_id, newElement_0_id); jobject newElement_0_name; if (!entry_0.name.HasValue()) { @@ -6421,10 +6713,11 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_stackFreeCurrentInsideOptional; std::string newElement_0_stackFreeCurrentInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_stackFreeCurrentInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_0_stackFreeCurrentInsideOptional = static_cast(entry_0.stackFreeCurrent.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_stackFreeCurrentInsideOptionalClassName.c_str(), - newElement_0_stackFreeCurrentInsideOptionalCtorSignature.c_str(), entry_0.stackFreeCurrent.Value(), - newElement_0_stackFreeCurrentInsideOptional); + newElement_0_stackFreeCurrentInsideOptionalCtorSignature.c_str(), + jninewElement_0_stackFreeCurrentInsideOptional, newElement_0_stackFreeCurrentInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackFreeCurrentInsideOptional, newElement_0_stackFreeCurrent); } @@ -6438,10 +6731,11 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_stackFreeMinimumInsideOptional; std::string newElement_0_stackFreeMinimumInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_stackFreeMinimumInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_0_stackFreeMinimumInsideOptional = static_cast(entry_0.stackFreeMinimum.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_stackFreeMinimumInsideOptionalClassName.c_str(), - newElement_0_stackFreeMinimumInsideOptionalCtorSignature.c_str(), entry_0.stackFreeMinimum.Value(), - newElement_0_stackFreeMinimumInsideOptional); + newElement_0_stackFreeMinimumInsideOptionalCtorSignature.c_str(), + jninewElement_0_stackFreeMinimumInsideOptional, newElement_0_stackFreeMinimumInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackFreeMinimumInsideOptional, newElement_0_stackFreeMinimum); } @@ -6455,9 +6749,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_stackSizeInsideOptional; std::string newElement_0_stackSizeInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_stackSizeInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_0_stackSizeInsideOptional = static_cast(entry_0.stackSize.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_stackSizeInsideOptionalClassName.c_str(), - newElement_0_stackSizeInsideOptionalCtorSignature.c_str(), entry_0.stackSize.Value(), + newElement_0_stackSizeInsideOptionalCtorSignature.c_str(), jninewElement_0_stackSizeInsideOptional, newElement_0_stackSizeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackSizeInsideOptional, newElement_0_stackSize); } @@ -6498,8 +6793,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::CurrentHeapUsed::Id: { @@ -6513,8 +6809,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::CurrentHeapHighWatermark::Id: { @@ -6528,8 +6825,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -6550,8 +6848,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -6574,8 +6873,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -6598,8 +6898,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -6622,8 +6923,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -6639,8 +6941,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -6654,8 +6957,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -6685,8 +6989,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -6707,8 +7012,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue.Value()), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -6748,8 +7054,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -6770,8 +7077,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -6808,8 +7116,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::NeighborTable::Id: { @@ -6831,37 +7140,45 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_extAddress; std::string newElement_0_extAddressClassName = "java/lang/Long"; std::string newElement_0_extAddressCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), - newElement_0_extAddressCtorSignature.c_str(), - entry_0.extAddress, newElement_0_extAddress); + jlong jninewElement_0_extAddress = static_cast(entry_0.extAddress); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), + newElement_0_extAddressCtorSignature.c_str(), + jninewElement_0_extAddress, newElement_0_extAddress); jobject newElement_0_age; std::string newElement_0_ageClassName = "java/lang/Long"; std::string newElement_0_ageCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), entry_0.age, newElement_0_age); + jlong jninewElement_0_age = static_cast(entry_0.age); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_ageClassName.c_str(), + newElement_0_ageCtorSignature.c_str(), + jninewElement_0_age, newElement_0_age); jobject newElement_0_rloc16; std::string newElement_0_rloc16ClassName = "java/lang/Integer"; std::string newElement_0_rloc16CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rloc16ClassName.c_str(), - newElement_0_rloc16CtorSignature.c_str(), - entry_0.rloc16, newElement_0_rloc16); + jint jninewElement_0_rloc16 = static_cast(entry_0.rloc16); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rloc16ClassName.c_str(), + newElement_0_rloc16CtorSignature.c_str(), + jninewElement_0_rloc16, newElement_0_rloc16); jobject newElement_0_linkFrameCounter; std::string newElement_0_linkFrameCounterClassName = "java/lang/Long"; std::string newElement_0_linkFrameCounterCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_0_linkFrameCounter = static_cast(entry_0.linkFrameCounter); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_linkFrameCounterClassName.c_str(), newElement_0_linkFrameCounterCtorSignature.c_str(), - entry_0.linkFrameCounter, newElement_0_linkFrameCounter); + jninewElement_0_linkFrameCounter, newElement_0_linkFrameCounter); jobject newElement_0_mleFrameCounter; std::string newElement_0_mleFrameCounterClassName = "java/lang/Long"; std::string newElement_0_mleFrameCounterCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_0_mleFrameCounter = static_cast(entry_0.mleFrameCounter); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_mleFrameCounterClassName.c_str(), newElement_0_mleFrameCounterCtorSignature.c_str(), - entry_0.mleFrameCounter, newElement_0_mleFrameCounter); + jninewElement_0_mleFrameCounter, newElement_0_mleFrameCounter); jobject newElement_0_lqi; std::string newElement_0_lqiClassName = "java/lang/Integer"; std::string newElement_0_lqiCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_lqiClassName.c_str(), newElement_0_lqiCtorSignature.c_str(), entry_0.lqi, newElement_0_lqi); + jint jninewElement_0_lqi = static_cast(entry_0.lqi); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_lqiClassName.c_str(), + newElement_0_lqiCtorSignature.c_str(), + jninewElement_0_lqi, newElement_0_lqi); jobject newElement_0_averageRssi; if (entry_0.averageRssi.IsNull()) { @@ -6871,9 +7188,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string newElement_0_averageRssiClassName = "java/lang/Integer"; std::string newElement_0_averageRssiCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_averageRssi = static_cast(entry_0.averageRssi.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_averageRssiClassName.c_str(), newElement_0_averageRssiCtorSignature.c_str(), - entry_0.averageRssi.Value(), newElement_0_averageRssi); + jninewElement_0_averageRssi, newElement_0_averageRssi); } jobject newElement_0_lastRssi; if (entry_0.lastRssi.IsNull()) @@ -6884,46 +7202,53 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string newElement_0_lastRssiClassName = "java/lang/Integer"; std::string newElement_0_lastRssiCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_lastRssiClassName.c_str(), - newElement_0_lastRssiCtorSignature.c_str(), - entry_0.lastRssi.Value(), newElement_0_lastRssi); + jint jninewElement_0_lastRssi = static_cast(entry_0.lastRssi.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_lastRssiClassName.c_str(), + newElement_0_lastRssiCtorSignature.c_str(), + jninewElement_0_lastRssi, newElement_0_lastRssi); } jobject newElement_0_frameErrorRate; std::string newElement_0_frameErrorRateClassName = "java/lang/Integer"; std::string newElement_0_frameErrorRateCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_frameErrorRateClassName.c_str(), - newElement_0_frameErrorRateCtorSignature.c_str(), - entry_0.frameErrorRate, newElement_0_frameErrorRate); + jint jninewElement_0_frameErrorRate = static_cast(entry_0.frameErrorRate); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_frameErrorRateClassName.c_str(), newElement_0_frameErrorRateCtorSignature.c_str(), + jninewElement_0_frameErrorRate, newElement_0_frameErrorRate); jobject newElement_0_messageErrorRate; std::string newElement_0_messageErrorRateClassName = "java/lang/Integer"; std::string newElement_0_messageErrorRateCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_messageErrorRate = static_cast(entry_0.messageErrorRate); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_messageErrorRateClassName.c_str(), newElement_0_messageErrorRateCtorSignature.c_str(), - entry_0.messageErrorRate, newElement_0_messageErrorRate); + jninewElement_0_messageErrorRate, newElement_0_messageErrorRate); jobject newElement_0_rxOnWhenIdle; std::string newElement_0_rxOnWhenIdleClassName = "java/lang/Boolean"; std::string newElement_0_rxOnWhenIdleCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rxOnWhenIdleClassName.c_str(), - newElement_0_rxOnWhenIdleCtorSignature.c_str(), - entry_0.rxOnWhenIdle, newElement_0_rxOnWhenIdle); + jboolean jninewElement_0_rxOnWhenIdle = static_cast(entry_0.rxOnWhenIdle); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_rxOnWhenIdleClassName.c_str(), newElement_0_rxOnWhenIdleCtorSignature.c_str(), + jninewElement_0_rxOnWhenIdle, newElement_0_rxOnWhenIdle); jobject newElement_0_fullThreadDevice; std::string newElement_0_fullThreadDeviceClassName = "java/lang/Boolean"; std::string newElement_0_fullThreadDeviceCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fullThreadDeviceClassName.c_str(), - newElement_0_fullThreadDeviceCtorSignature.c_str(), - entry_0.fullThreadDevice, newElement_0_fullThreadDevice); + jboolean jninewElement_0_fullThreadDevice = static_cast(entry_0.fullThreadDevice); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_fullThreadDeviceClassName.c_str(), newElement_0_fullThreadDeviceCtorSignature.c_str(), + jninewElement_0_fullThreadDevice, newElement_0_fullThreadDevice); jobject newElement_0_fullNetworkData; std::string newElement_0_fullNetworkDataClassName = "java/lang/Boolean"; std::string newElement_0_fullNetworkDataCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fullNetworkDataClassName.c_str(), - newElement_0_fullNetworkDataCtorSignature.c_str(), - entry_0.fullNetworkData, newElement_0_fullNetworkData); + jboolean jninewElement_0_fullNetworkData = static_cast(entry_0.fullNetworkData); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_fullNetworkDataClassName.c_str(), newElement_0_fullNetworkDataCtorSignature.c_str(), + jninewElement_0_fullNetworkData, newElement_0_fullNetworkData); jobject newElement_0_isChild; std::string newElement_0_isChildClassName = "java/lang/Boolean"; std::string newElement_0_isChildCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_isChildClassName.c_str(), - newElement_0_isChildCtorSignature.c_str(), - entry_0.isChild, newElement_0_isChild); + jboolean jninewElement_0_isChild = static_cast(entry_0.isChild); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_isChildClassName.c_str(), + newElement_0_isChildCtorSignature.c_str(), + jninewElement_0_isChild, newElement_0_isChild); jclass neighborTableStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -6973,62 +7298,73 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_extAddress; std::string newElement_0_extAddressClassName = "java/lang/Long"; std::string newElement_0_extAddressCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), - newElement_0_extAddressCtorSignature.c_str(), - entry_0.extAddress, newElement_0_extAddress); + jlong jninewElement_0_extAddress = static_cast(entry_0.extAddress); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), + newElement_0_extAddressCtorSignature.c_str(), + jninewElement_0_extAddress, newElement_0_extAddress); jobject newElement_0_rloc16; std::string newElement_0_rloc16ClassName = "java/lang/Integer"; std::string newElement_0_rloc16CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rloc16ClassName.c_str(), - newElement_0_rloc16CtorSignature.c_str(), - entry_0.rloc16, newElement_0_rloc16); + jint jninewElement_0_rloc16 = static_cast(entry_0.rloc16); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rloc16ClassName.c_str(), + newElement_0_rloc16CtorSignature.c_str(), + jninewElement_0_rloc16, newElement_0_rloc16); jobject newElement_0_routerId; std::string newElement_0_routerIdClassName = "java/lang/Integer"; std::string newElement_0_routerIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_routerIdClassName.c_str(), - newElement_0_routerIdCtorSignature.c_str(), - entry_0.routerId, newElement_0_routerId); + jint jninewElement_0_routerId = static_cast(entry_0.routerId); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_routerIdClassName.c_str(), + newElement_0_routerIdCtorSignature.c_str(), + jninewElement_0_routerId, newElement_0_routerId); jobject newElement_0_nextHop; std::string newElement_0_nextHopClassName = "java/lang/Integer"; std::string newElement_0_nextHopCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nextHopClassName.c_str(), - newElement_0_nextHopCtorSignature.c_str(), - entry_0.nextHop, newElement_0_nextHop); + jint jninewElement_0_nextHop = static_cast(entry_0.nextHop); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nextHopClassName.c_str(), + newElement_0_nextHopCtorSignature.c_str(), + jninewElement_0_nextHop, newElement_0_nextHop); jobject newElement_0_pathCost; std::string newElement_0_pathCostClassName = "java/lang/Integer"; std::string newElement_0_pathCostCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_pathCostClassName.c_str(), - newElement_0_pathCostCtorSignature.c_str(), - entry_0.pathCost, newElement_0_pathCost); + jint jninewElement_0_pathCost = static_cast(entry_0.pathCost); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_pathCostClassName.c_str(), + newElement_0_pathCostCtorSignature.c_str(), + jninewElement_0_pathCost, newElement_0_pathCost); jobject newElement_0_LQIIn; std::string newElement_0_LQIInClassName = "java/lang/Integer"; std::string newElement_0_LQIInCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_LQIInClassName.c_str(), - newElement_0_LQIInCtorSignature.c_str(), - entry_0.LQIIn, newElement_0_LQIIn); + jint jninewElement_0_LQIIn = static_cast(entry_0.LQIIn); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_LQIInClassName.c_str(), + newElement_0_LQIInCtorSignature.c_str(), + jninewElement_0_LQIIn, newElement_0_LQIIn); jobject newElement_0_LQIOut; std::string newElement_0_LQIOutClassName = "java/lang/Integer"; std::string newElement_0_LQIOutCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_LQIOutClassName.c_str(), - newElement_0_LQIOutCtorSignature.c_str(), - entry_0.LQIOut, newElement_0_LQIOut); + jint jninewElement_0_LQIOut = static_cast(entry_0.LQIOut); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_LQIOutClassName.c_str(), + newElement_0_LQIOutCtorSignature.c_str(), + jninewElement_0_LQIOut, newElement_0_LQIOut); jobject newElement_0_age; std::string newElement_0_ageClassName = "java/lang/Integer"; std::string newElement_0_ageCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), entry_0.age, newElement_0_age); + jint jninewElement_0_age = static_cast(entry_0.age); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_ageClassName.c_str(), + newElement_0_ageCtorSignature.c_str(), + jninewElement_0_age, newElement_0_age); jobject newElement_0_allocated; std::string newElement_0_allocatedClassName = "java/lang/Boolean"; std::string newElement_0_allocatedCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_allocatedClassName.c_str(), - newElement_0_allocatedCtorSignature.c_str(), - entry_0.allocated, newElement_0_allocated); + jboolean jninewElement_0_allocated = static_cast(entry_0.allocated); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_allocatedClassName.c_str(), + newElement_0_allocatedCtorSignature.c_str(), + jninewElement_0_allocated, newElement_0_allocated); jobject newElement_0_linkEstablished; std::string newElement_0_linkEstablishedClassName = "java/lang/Boolean"; std::string newElement_0_linkEstablishedCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_linkEstablishedClassName.c_str(), - newElement_0_linkEstablishedCtorSignature.c_str(), - entry_0.linkEstablished, newElement_0_linkEstablished); + jboolean jninewElement_0_linkEstablished = static_cast(entry_0.linkEstablished); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_linkEstablishedClassName.c_str(), newElement_0_linkEstablishedCtorSignature.c_str(), + jninewElement_0_linkEstablished, newElement_0_linkEstablished); jclass routeTableStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -7074,8 +7410,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -7096,8 +7433,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -7118,8 +7456,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -7140,8 +7479,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -7162,8 +7502,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -7178,8 +7519,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ChildRoleCount::Id: { @@ -7193,8 +7535,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RouterRoleCount::Id: { @@ -7208,8 +7551,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LeaderRoleCount::Id: { @@ -7223,8 +7567,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AttachAttemptCount::Id: { @@ -7238,8 +7583,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PartitionIdChangeCount::Id: { @@ -7253,8 +7599,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BetterPartitionAttachAttemptCount::Id: { @@ -7268,8 +7615,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ParentChangeCount::Id: { @@ -7283,8 +7631,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::TxTotalCount::Id: { @@ -7298,8 +7647,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxUnicastCount::Id: { @@ -7313,8 +7663,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxBroadcastCount::Id: { @@ -7328,8 +7679,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxAckRequestedCount::Id: { @@ -7343,8 +7695,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxAckedCount::Id: { @@ -7358,8 +7711,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxNoAckRequestedCount::Id: { @@ -7373,8 +7727,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxDataCount::Id: { @@ -7388,8 +7743,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxDataPollCount::Id: { @@ -7403,8 +7759,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxBeaconCount::Id: { @@ -7418,8 +7775,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxBeaconRequestCount::Id: { @@ -7433,8 +7791,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxOtherCount::Id: { @@ -7448,8 +7807,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxRetryCount::Id: { @@ -7463,8 +7823,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxDirectMaxRetryExpiryCount::Id: { @@ -7478,8 +7839,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxIndirectMaxRetryExpiryCount::Id: { @@ -7493,8 +7855,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxErrCcaCount::Id: { @@ -7508,8 +7871,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxErrAbortCount::Id: { @@ -7523,8 +7887,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxErrBusyChannelCount::Id: { @@ -7538,8 +7903,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxTotalCount::Id: { @@ -7553,8 +7919,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxUnicastCount::Id: { @@ -7568,8 +7935,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxBroadcastCount::Id: { @@ -7583,8 +7951,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxDataCount::Id: { @@ -7598,8 +7967,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxDataPollCount::Id: { @@ -7613,8 +7983,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxBeaconCount::Id: { @@ -7628,8 +7999,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxBeaconRequestCount::Id: { @@ -7643,8 +8015,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxOtherCount::Id: { @@ -7658,8 +8031,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxAddressFilteredCount::Id: { @@ -7673,8 +8047,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxDestAddrFilteredCount::Id: { @@ -7688,8 +8063,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxDuplicatedCount::Id: { @@ -7703,8 +8079,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxErrNoFrameCount::Id: { @@ -7718,8 +8095,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxErrUnknownNeighborCount::Id: { @@ -7733,8 +8111,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxErrInvalidSrcAddrCount::Id: { @@ -7748,8 +8127,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxErrSecCount::Id: { @@ -7763,8 +8143,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxErrFcsCount::Id: { @@ -7778,8 +8159,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RxErrOtherCount::Id: { @@ -7793,8 +8175,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ActiveTimestamp::Id: { @@ -7814,8 +8197,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -7836,8 +8220,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -7858,8 +8243,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -7881,14 +8267,16 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_rotationTime; std::string value_rotationTimeClassName = "java/lang/Integer"; std::string value_rotationTimeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_rotationTimeClassName.c_str(), - value_rotationTimeCtorSignature.c_str(), - cppValue.Value().rotationTime, value_rotationTime); + jint jnivalue_rotationTime = static_cast(cppValue.Value().rotationTime); + chip::JniReferences::GetInstance().CreateBoxedObject(value_rotationTimeClassName.c_str(), + value_rotationTimeCtorSignature.c_str(), + jnivalue_rotationTime, value_rotationTime); jobject value_flags; std::string value_flagsClassName = "java/lang/Integer"; std::string value_flagsCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_flagsClassName.c_str(), value_flagsCtorSignature.c_str(), cppValue.Value().flags, value_flags); + jint jnivalue_flags = static_cast(cppValue.Value().flags); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_flagsClassName.c_str(), value_flagsCtorSignature.c_str(), jnivalue_flags, value_flags); jclass securityPolicyStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -7951,75 +8339,87 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_activeTimestampPresent; std::string value_activeTimestampPresentClassName = "java/lang/Boolean"; std::string value_activeTimestampPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jnivalue_activeTimestampPresent = static_cast(cppValue.Value().activeTimestampPresent); + chip::JniReferences::GetInstance().CreateBoxedObject( value_activeTimestampPresentClassName.c_str(), value_activeTimestampPresentCtorSignature.c_str(), - cppValue.Value().activeTimestampPresent, value_activeTimestampPresent); + jnivalue_activeTimestampPresent, value_activeTimestampPresent); jobject value_pendingTimestampPresent; std::string value_pendingTimestampPresentClassName = "java/lang/Boolean"; std::string value_pendingTimestampPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jnivalue_pendingTimestampPresent = static_cast(cppValue.Value().pendingTimestampPresent); + chip::JniReferences::GetInstance().CreateBoxedObject( value_pendingTimestampPresentClassName.c_str(), value_pendingTimestampPresentCtorSignature.c_str(), - cppValue.Value().pendingTimestampPresent, value_pendingTimestampPresent); + jnivalue_pendingTimestampPresent, value_pendingTimestampPresent); jobject value_masterKeyPresent; std::string value_masterKeyPresentClassName = "java/lang/Boolean"; std::string value_masterKeyPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_masterKeyPresentClassName.c_str(), value_masterKeyPresentCtorSignature.c_str(), - cppValue.Value().masterKeyPresent, value_masterKeyPresent); + jboolean jnivalue_masterKeyPresent = static_cast(cppValue.Value().masterKeyPresent); + chip::JniReferences::GetInstance().CreateBoxedObject(value_masterKeyPresentClassName.c_str(), + value_masterKeyPresentCtorSignature.c_str(), + jnivalue_masterKeyPresent, value_masterKeyPresent); jobject value_networkNamePresent; std::string value_networkNamePresentClassName = "java/lang/Boolean"; std::string value_networkNamePresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jnivalue_networkNamePresent = static_cast(cppValue.Value().networkNamePresent); + chip::JniReferences::GetInstance().CreateBoxedObject( value_networkNamePresentClassName.c_str(), value_networkNamePresentCtorSignature.c_str(), - cppValue.Value().networkNamePresent, value_networkNamePresent); + jnivalue_networkNamePresent, value_networkNamePresent); jobject value_extendedPanIdPresent; std::string value_extendedPanIdPresentClassName = "java/lang/Boolean"; std::string value_extendedPanIdPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jnivalue_extendedPanIdPresent = static_cast(cppValue.Value().extendedPanIdPresent); + chip::JniReferences::GetInstance().CreateBoxedObject( value_extendedPanIdPresentClassName.c_str(), value_extendedPanIdPresentCtorSignature.c_str(), - cppValue.Value().extendedPanIdPresent, value_extendedPanIdPresent); + jnivalue_extendedPanIdPresent, value_extendedPanIdPresent); jobject value_meshLocalPrefixPresent; std::string value_meshLocalPrefixPresentClassName = "java/lang/Boolean"; std::string value_meshLocalPrefixPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jnivalue_meshLocalPrefixPresent = static_cast(cppValue.Value().meshLocalPrefixPresent); + chip::JniReferences::GetInstance().CreateBoxedObject( value_meshLocalPrefixPresentClassName.c_str(), value_meshLocalPrefixPresentCtorSignature.c_str(), - cppValue.Value().meshLocalPrefixPresent, value_meshLocalPrefixPresent); + jnivalue_meshLocalPrefixPresent, value_meshLocalPrefixPresent); jobject value_delayPresent; std::string value_delayPresentClassName = "java/lang/Boolean"; std::string value_delayPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_delayPresentClassName.c_str(), - value_delayPresentCtorSignature.c_str(), - cppValue.Value().delayPresent, value_delayPresent); + jboolean jnivalue_delayPresent = static_cast(cppValue.Value().delayPresent); + chip::JniReferences::GetInstance().CreateBoxedObject(value_delayPresentClassName.c_str(), + value_delayPresentCtorSignature.c_str(), + jnivalue_delayPresent, value_delayPresent); jobject value_panIdPresent; std::string value_panIdPresentClassName = "java/lang/Boolean"; std::string value_panIdPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_panIdPresentClassName.c_str(), - value_panIdPresentCtorSignature.c_str(), - cppValue.Value().panIdPresent, value_panIdPresent); + jboolean jnivalue_panIdPresent = static_cast(cppValue.Value().panIdPresent); + chip::JniReferences::GetInstance().CreateBoxedObject(value_panIdPresentClassName.c_str(), + value_panIdPresentCtorSignature.c_str(), + jnivalue_panIdPresent, value_panIdPresent); jobject value_channelPresent; std::string value_channelPresentClassName = "java/lang/Boolean"; std::string value_channelPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_channelPresentClassName.c_str(), - value_channelPresentCtorSignature.c_str(), - cppValue.Value().channelPresent, value_channelPresent); + jboolean jnivalue_channelPresent = static_cast(cppValue.Value().channelPresent); + chip::JniReferences::GetInstance().CreateBoxedObject(value_channelPresentClassName.c_str(), + value_channelPresentCtorSignature.c_str(), + jnivalue_channelPresent, value_channelPresent); jobject value_pskcPresent; std::string value_pskcPresentClassName = "java/lang/Boolean"; std::string value_pskcPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_pskcPresentClassName.c_str(), - value_pskcPresentCtorSignature.c_str(), - cppValue.Value().pskcPresent, value_pskcPresent); + jboolean jnivalue_pskcPresent = static_cast(cppValue.Value().pskcPresent); + chip::JniReferences::GetInstance().CreateBoxedObject(value_pskcPresentClassName.c_str(), + value_pskcPresentCtorSignature.c_str(), + jnivalue_pskcPresent, value_pskcPresent); jobject value_securityPolicyPresent; std::string value_securityPolicyPresentClassName = "java/lang/Boolean"; std::string value_securityPolicyPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jnivalue_securityPolicyPresent = static_cast(cppValue.Value().securityPolicyPresent); + chip::JniReferences::GetInstance().CreateBoxedObject( value_securityPolicyPresentClassName.c_str(), value_securityPolicyPresentCtorSignature.c_str(), - cppValue.Value().securityPolicyPresent, value_securityPolicyPresent); + jnivalue_securityPolicyPresent, value_securityPolicyPresent); jobject value_channelMaskPresent; std::string value_channelMaskPresentClassName = "java/lang/Boolean"; std::string value_channelMaskPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jnivalue_channelMaskPresent = static_cast(cppValue.Value().channelMaskPresent); + chip::JniReferences::GetInstance().CreateBoxedObject( value_channelMaskPresentClassName.c_str(), value_channelMaskPresentCtorSignature.c_str(), - cppValue.Value().channelMaskPresent, value_channelMaskPresent); + jnivalue_channelMaskPresent, value_channelMaskPresent); jclass operationalDatasetComponentsStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -8069,8 +8469,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -8093,8 +8494,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -8117,8 +8519,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -8141,8 +8544,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -8165,8 +8569,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -8182,8 +8587,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -8197,8 +8603,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -8250,8 +8657,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue.Value()), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8272,8 +8680,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue.Value()), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8294,8 +8703,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8316,8 +8726,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8338,8 +8749,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8360,8 +8772,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8382,8 +8795,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8404,8 +8818,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8426,8 +8841,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8448,8 +8864,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8470,8 +8887,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8492,8 +8910,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8515,8 +8934,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -8539,8 +8959,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -8563,8 +8984,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -8587,8 +9009,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -8604,8 +9027,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -8619,8 +9043,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -8650,8 +9075,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue.Value()), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8672,8 +9098,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jboolean jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8688,8 +9115,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::PacketTxCount::Id: { @@ -8703,8 +9131,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TxErrCount::Id: { @@ -8718,8 +9147,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::CollisionCount::Id: { @@ -8733,8 +9163,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::OverrunCount::Id: { @@ -8748,8 +9179,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::CarrierDetect::Id: { @@ -8769,8 +9201,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jboolean jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8785,8 +9218,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -8807,8 +9241,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -8831,8 +9266,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -8855,8 +9291,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -8879,8 +9316,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -8896,8 +9334,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -8911,8 +9350,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -8942,8 +9382,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -8958,8 +9399,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::TimeSource::Id: { @@ -8973,8 +9415,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::TrustedTimeSource::Id: { @@ -8995,20 +9438,22 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_fabricIndex; std::string value_fabricIndexClassName = "java/lang/Integer"; std::string value_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), - value_fabricIndexCtorSignature.c_str(), - cppValue.Value().fabricIndex, value_fabricIndex); + jint jnivalue_fabricIndex = static_cast(cppValue.Value().fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), + jnivalue_fabricIndex, value_fabricIndex); jobject value_nodeID; std::string value_nodeIDClassName = "java/lang/Long"; std::string value_nodeIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_nodeIDClassName.c_str(), value_nodeIDCtorSignature.c_str(), cppValue.Value().nodeID, value_nodeID); + jlong jnivalue_nodeID = static_cast(cppValue.Value().nodeID); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_nodeIDClassName.c_str(), value_nodeIDCtorSignature.c_str(), jnivalue_nodeID, value_nodeID); jobject value_endpoint; std::string value_endpointClassName = "java/lang/Integer"; std::string value_endpointCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_endpointClassName.c_str(), - value_endpointCtorSignature.c_str(), - cppValue.Value().endpoint, value_endpoint); + jint jnivalue_endpoint = static_cast(cppValue.Value().endpoint); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_endpointClassName.c_str(), value_endpointCtorSignature.c_str(), jnivalue_endpoint, value_endpoint); jclass trustedTimeSourceStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -9070,15 +9515,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_offset; std::string newElement_0_offsetClassName = "java/lang/Long"; std::string newElement_0_offsetCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), - newElement_0_offsetCtorSignature.c_str(), - entry_0.offset, newElement_0_offset); + jlong jninewElement_0_offset = static_cast(entry_0.offset); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), + newElement_0_offsetCtorSignature.c_str(), + jninewElement_0_offset, newElement_0_offset); jobject newElement_0_validAt; std::string newElement_0_validAtClassName = "java/lang/Long"; std::string newElement_0_validAtCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validAtClassName.c_str(), - newElement_0_validAtCtorSignature.c_str(), - entry_0.validAt, newElement_0_validAt); + jlong jninewElement_0_validAt = static_cast(entry_0.validAt); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validAtClassName.c_str(), + newElement_0_validAtCtorSignature.c_str(), + jninewElement_0_validAt, newElement_0_validAt); jobject newElement_0_name; if (!entry_0.name.HasValue()) { @@ -9133,15 +9580,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_offset; std::string newElement_0_offsetClassName = "java/lang/Long"; std::string newElement_0_offsetCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), - newElement_0_offsetCtorSignature.c_str(), - entry_0.offset, newElement_0_offset); + jlong jninewElement_0_offset = static_cast(entry_0.offset); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), + newElement_0_offsetCtorSignature.c_str(), + jninewElement_0_offset, newElement_0_offset); jobject newElement_0_validStarting; std::string newElement_0_validStartingClassName = "java/lang/Long"; std::string newElement_0_validStartingCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validStartingClassName.c_str(), - newElement_0_validStartingCtorSignature.c_str(), - entry_0.validStarting, newElement_0_validStarting); + jlong jninewElement_0_validStarting = static_cast(entry_0.validStarting); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_validStartingClassName.c_str(), newElement_0_validStartingCtorSignature.c_str(), + jninewElement_0_validStarting, newElement_0_validStarting); jobject newElement_0_validUntil; if (entry_0.validUntil.IsNull()) { @@ -9151,9 +9600,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string newElement_0_validUntilClassName = "java/lang/Long"; std::string newElement_0_validUntilCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_0_validUntil = static_cast(entry_0.validUntil.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_validUntilClassName.c_str(), newElement_0_validUntilCtorSignature.c_str(), - entry_0.validUntil.Value(), newElement_0_validUntil); + jninewElement_0_validUntil, newElement_0_validUntil); } jclass DSTOffsetStructStructClass_1; @@ -9196,8 +9646,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -9212,8 +9663,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::NTPServerAvailable::Id: { @@ -9227,8 +9679,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TimeZoneListMaxSize::Id: { @@ -9242,8 +9695,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DSTOffsetListMaxSize::Id: { @@ -9257,8 +9711,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SupportsDNSResolve::Id: { @@ -9272,8 +9727,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -9294,8 +9750,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -9318,8 +9775,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -9342,8 +9800,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -9366,8 +9825,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -9383,8 +9843,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -9398,8 +9859,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -9435,8 +9897,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ProductName::Id: { @@ -9474,8 +9937,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::HardwareVersionString::Id: { @@ -9501,8 +9965,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::SoftwareVersionString::Id: { @@ -9588,8 +10053,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::UniqueID::Id: { @@ -9616,9 +10082,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_finish; std::string value_finishClassName = "java/lang/Integer"; std::string value_finishCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_finishClassName.c_str(), - value_finishCtorSignature.c_str(), - static_cast(cppValue.finish), value_finish); + jint jnivalue_finish = static_cast(cppValue.finish); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_finishClassName.c_str(), value_finishCtorSignature.c_str(), jnivalue_finish, value_finish); jobject value_primaryColor; if (cppValue.primaryColor.IsNull()) { @@ -9628,9 +10094,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string value_primaryColorClassName = "java/lang/Integer"; std::string value_primaryColorCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_primaryColorClassName.c_str(), value_primaryColorCtorSignature.c_str(), - static_cast(cppValue.primaryColor.Value()), value_primaryColor); + jint jnivalue_primaryColor = static_cast(cppValue.primaryColor.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_primaryColorClassName.c_str(), + value_primaryColorCtorSignature.c_str(), + jnivalue_primaryColor, value_primaryColor); } jclass productAppearanceStructStructClass_0; @@ -9673,8 +10140,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -9697,8 +10165,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -9721,8 +10190,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -9745,8 +10215,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -9762,8 +10233,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -9777,8 +10249,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -9802,8 +10275,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::CurrentPosition::Id: { @@ -9817,8 +10291,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MultiPressMax::Id: { @@ -9832,8 +10307,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -9854,8 +10330,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -9878,8 +10355,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -9902,8 +10380,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -9926,8 +10405,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -9943,8 +10423,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -9958,8 +10439,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -9983,8 +10465,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AdminFabricIndex::Id: { @@ -10004,8 +10487,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -10026,8 +10510,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -10049,8 +10534,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10073,8 +10559,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10097,8 +10584,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10121,8 +10609,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10138,8 +10627,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -10153,8 +10643,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -10203,9 +10694,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass NOCStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -10253,29 +10745,33 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_vendorID; std::string newElement_0_vendorIDClassName = "java/lang/Integer"; std::string newElement_0_vendorIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_vendorIDClassName.c_str(), newElement_0_vendorIDCtorSignature.c_str(), - static_cast(entry_0.vendorID), newElement_0_vendorID); + jint jninewElement_0_vendorID = static_cast(entry_0.vendorID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_vendorIDClassName.c_str(), + newElement_0_vendorIDCtorSignature.c_str(), + jninewElement_0_vendorID, newElement_0_vendorID); jobject newElement_0_fabricID; std::string newElement_0_fabricIDClassName = "java/lang/Long"; std::string newElement_0_fabricIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIDClassName.c_str(), - newElement_0_fabricIDCtorSignature.c_str(), - entry_0.fabricID, newElement_0_fabricID); + jlong jninewElement_0_fabricID = static_cast(entry_0.fabricID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIDClassName.c_str(), + newElement_0_fabricIDCtorSignature.c_str(), + jninewElement_0_fabricID, newElement_0_fabricID); jobject newElement_0_nodeID; std::string newElement_0_nodeIDClassName = "java/lang/Long"; std::string newElement_0_nodeIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nodeIDClassName.c_str(), - newElement_0_nodeIDCtorSignature.c_str(), - entry_0.nodeID, newElement_0_nodeID); + jlong jninewElement_0_nodeID = static_cast(entry_0.nodeID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nodeIDClassName.c_str(), + newElement_0_nodeIDCtorSignature.c_str(), + jninewElement_0_nodeID, newElement_0_nodeID); jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass fabricDescriptorStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -10313,8 +10809,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::CommissionedFabrics::Id: { @@ -10328,8 +10825,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::TrustedRootCertificates::Id: { @@ -10367,8 +10865,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -10389,8 +10888,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10413,8 +10913,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10437,8 +10938,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10461,8 +10963,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10478,8 +10981,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -10493,8 +10997,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -10526,21 +11031,24 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_groupId; std::string newElement_0_groupIdClassName = "java/lang/Integer"; std::string newElement_0_groupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), - newElement_0_groupIdCtorSignature.c_str(), - entry_0.groupId, newElement_0_groupId); + jint jninewElement_0_groupId = static_cast(entry_0.groupId); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), + newElement_0_groupIdCtorSignature.c_str(), + jninewElement_0_groupId, newElement_0_groupId); jobject newElement_0_groupKeySetID; std::string newElement_0_groupKeySetIDClassName = "java/lang/Integer"; std::string newElement_0_groupKeySetIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupKeySetIDClassName.c_str(), - newElement_0_groupKeySetIDCtorSignature.c_str(), - entry_0.groupKeySetID, newElement_0_groupKeySetID); + jint jninewElement_0_groupKeySetID = static_cast(entry_0.groupKeySetID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_groupKeySetIDClassName.c_str(), newElement_0_groupKeySetIDCtorSignature.c_str(), + jninewElement_0_groupKeySetID, newElement_0_groupKeySetID); jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass groupKeyMapStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -10584,9 +11092,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_groupId; std::string newElement_0_groupIdClassName = "java/lang/Integer"; std::string newElement_0_groupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), - newElement_0_groupIdCtorSignature.c_str(), - entry_0.groupId, newElement_0_groupId); + jint jninewElement_0_groupId = static_cast(entry_0.groupId); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), + newElement_0_groupIdCtorSignature.c_str(), + jninewElement_0_groupId, newElement_0_groupId); jobject newElement_0_endpoints; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); @@ -10597,8 +11106,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_2; std::string newElement_2ClassName = "java/lang/Integer"; std::string newElement_2CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), entry_2, newElement_2); + jint jninewElement_2 = static_cast(entry_2); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); } jobject newElement_0_groupName; @@ -10616,9 +11126,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass groupInfoMapStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -10655,8 +11166,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MaxGroupKeysPerFabric::Id: { @@ -10670,8 +11182,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -10692,8 +11205,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10716,8 +11230,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10740,8 +11255,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10764,8 +11280,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10781,8 +11298,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -10796,8 +11314,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -10871,8 +11390,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10895,8 +11415,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10919,8 +11440,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10943,8 +11465,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10960,8 +11483,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -10975,8 +11499,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -11050,8 +11575,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11074,8 +11600,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11098,8 +11625,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11122,8 +11650,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11139,8 +11668,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -11154,8 +11684,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -11186,8 +11717,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11210,8 +11742,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11234,8 +11767,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11258,8 +11792,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11275,8 +11810,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -11290,8 +11826,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -11322,8 +11859,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11346,8 +11884,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11370,8 +11909,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11394,8 +11934,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11411,8 +11952,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -11426,8 +11968,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -11458,8 +12001,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11482,8 +12026,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11506,8 +12051,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11530,8 +12076,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11547,8 +12094,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -11562,8 +12110,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -11587,8 +12136,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -11609,8 +12159,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11633,8 +12184,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11657,8 +12209,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11681,8 +12234,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11698,8 +12252,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -11713,8 +12268,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -11738,8 +12294,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ActiveModeInterval::Id: { @@ -11753,8 +12310,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ActiveModeThreshold::Id: { @@ -11768,8 +12326,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RegisteredClients::Id: { @@ -11791,15 +12350,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_checkInNodeID; std::string newElement_0_checkInNodeIDClassName = "java/lang/Long"; std::string newElement_0_checkInNodeIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_checkInNodeIDClassName.c_str(), - newElement_0_checkInNodeIDCtorSignature.c_str(), - entry_0.checkInNodeID, newElement_0_checkInNodeID); + jlong jninewElement_0_checkInNodeID = static_cast(entry_0.checkInNodeID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_checkInNodeIDClassName.c_str(), newElement_0_checkInNodeIDCtorSignature.c_str(), + jninewElement_0_checkInNodeID, newElement_0_checkInNodeID); jobject newElement_0_monitoredSubject; std::string newElement_0_monitoredSubjectClassName = "java/lang/Long"; std::string newElement_0_monitoredSubjectCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_0_monitoredSubject = static_cast(entry_0.monitoredSubject); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_monitoredSubjectClassName.c_str(), newElement_0_monitoredSubjectCtorSignature.c_str(), - entry_0.monitoredSubject, newElement_0_monitoredSubject); + jninewElement_0_monitoredSubject, newElement_0_monitoredSubject); jobject newElement_0_key; jbyteArray newElement_0_keyByteArray = env->NewByteArray(static_cast(entry_0.key.size())); env->SetByteArrayRegion(newElement_0_keyByteArray, 0, static_cast(entry_0.key.size()), @@ -11808,9 +12369,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass monitoringRegistrationStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -11848,8 +12410,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClientsSupportedPerFabric::Id: { @@ -11863,8 +12426,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -11885,8 +12449,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11909,8 +12474,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11933,8 +12499,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11957,8 +12524,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11974,8 +12542,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -11989,8 +12558,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -12032,8 +12602,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -12058,8 +12629,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), + newElement_0_modeCtorSignature.c_str(), + jninewElement_0_mode, newElement_0_mode); jobject newElement_0_semanticTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); @@ -12071,15 +12644,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_2_mfgCode; std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeClassName.c_str(), newElement_2_mfgCodeCtorSignature.c_str(), - static_cast(entry_2.mfgCode), newElement_2_mfgCode); + jint jninewElement_2_mfgCode = static_cast(entry_2.mfgCode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_mfgCodeClassName.c_str(), + newElement_2_mfgCodeCtorSignature.c_str(), + jninewElement_2_mfgCode, newElement_2_mfgCode); jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - entry_2.value, newElement_2_value); + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); jclass semanticTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -12136,8 +12711,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::StartUpMode::Id: { @@ -12157,8 +12733,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -12179,8 +12756,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -12202,8 +12780,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -12226,8 +12805,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -12250,8 +12830,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -12274,8 +12855,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -12291,8 +12873,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -12306,8 +12889,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -12341,8 +12925,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), + newElement_0_modeCtorSignature.c_str(), + jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); @@ -12361,18 +12947,20 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), - newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), static_cast(entry_2.mfgCode.Value()), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - entry_2.value, newElement_2_value); + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -12429,8 +13017,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::StartUpMode::Id: { @@ -12450,8 +13039,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -12472,8 +13062,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -12495,8 +13086,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -12519,8 +13111,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -12543,8 +13136,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -12567,8 +13161,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -12584,8 +13179,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -12599,8 +13195,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -12634,8 +13231,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), + newElement_0_modeCtorSignature.c_str(), + jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); @@ -12654,18 +13253,20 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), - newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), static_cast(entry_2.mfgCode.Value()), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - entry_2.value, newElement_2_value); + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -12732,8 +13333,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::StartUpMode::Id: { @@ -12753,8 +13355,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -12775,8 +13378,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -12798,8 +13402,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -12822,8 +13427,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -12846,8 +13452,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -12870,8 +13477,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -12887,8 +13495,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -12902,8 +13511,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -12954,8 +13564,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -12970,8 +13581,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SupportedRinses::Id: { @@ -12992,8 +13604,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13016,8 +13629,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13040,8 +13654,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13064,8 +13679,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13088,8 +13704,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13105,8 +13722,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -13120,8 +13738,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -13155,8 +13774,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), + newElement_0_modeCtorSignature.c_str(), + jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); @@ -13175,18 +13796,20 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), - newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), static_cast(entry_2.mfgCode.Value()), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - entry_2.value, newElement_2_value); + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -13242,8 +13865,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::StartUpMode::Id: { @@ -13263,8 +13887,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -13285,8 +13910,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -13308,8 +13934,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13332,8 +13959,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13356,8 +13984,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13380,8 +14009,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13397,8 +14027,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -13412,8 +14043,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -13447,8 +14079,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), + newElement_0_modeCtorSignature.c_str(), + jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); @@ -13467,18 +14101,20 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), - newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), static_cast(entry_2.mfgCode.Value()), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - entry_2.value, newElement_2_value); + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -13534,8 +14170,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::StartUpMode::Id: { @@ -13555,8 +14192,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -13577,8 +14215,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -13600,8 +14239,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13624,8 +14264,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13648,8 +14289,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13672,8 +14314,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13689,8 +14332,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -13704,8 +14348,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -13729,8 +14374,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MinTemperature::Id: { @@ -13744,8 +14390,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MaxTemperature::Id: { @@ -13759,8 +14406,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Step::Id: { @@ -13774,8 +14422,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SelectedTemperatureLevel::Id: { @@ -13789,8 +14438,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SupportedTemperatureLevels::Id: { @@ -13832,8 +14482,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13856,8 +14507,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13880,8 +14532,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13904,8 +14557,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13921,8 +14575,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -13936,8 +14591,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -13961,8 +14617,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::State::Id: { @@ -13976,8 +14633,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Supported::Id: { @@ -13991,8 +14649,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -14013,8 +14672,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14037,8 +14697,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14061,8 +14722,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14085,8 +14747,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14102,8 +14765,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -14117,8 +14781,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -14152,8 +14817,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), + newElement_0_modeCtorSignature.c_str(), + jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); @@ -14172,18 +14839,20 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), - newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), static_cast(entry_2.mfgCode.Value()), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - entry_2.value, newElement_2_value); + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -14239,8 +14908,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::StartUpMode::Id: { @@ -14260,8 +14930,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -14282,8 +14953,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -14305,8 +14977,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14329,8 +15002,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14353,8 +15027,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14377,8 +15052,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14394,8 +15070,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -14409,8 +15086,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -14434,8 +15112,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -14456,8 +15135,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14480,8 +15160,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14504,8 +15185,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14528,8 +15210,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14545,8 +15228,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -14560,8 +15244,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -14585,8 +15270,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SmokeState::Id: { @@ -14600,8 +15286,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::COState::Id: { @@ -14615,8 +15302,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BatteryAlert::Id: { @@ -14630,8 +15318,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DeviceMuted::Id: { @@ -14645,8 +15334,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::TestInProgress::Id: { @@ -14660,8 +15350,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::HardwareFaultAlert::Id: { @@ -14675,8 +15366,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::EndOfServiceAlert::Id: { @@ -14690,8 +15382,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::InterconnectSmokeAlarm::Id: { @@ -14705,8 +15398,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::InterconnectCOAlarm::Id: { @@ -14720,8 +15414,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ContaminationState::Id: { @@ -14735,8 +15430,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SmokeSensitivityLevel::Id: { @@ -14750,8 +15446,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ExpiryDate::Id: { @@ -14765,8 +15462,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -14787,8 +15485,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14811,8 +15510,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14835,8 +15535,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14859,8 +15560,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14876,8 +15578,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -14891,8 +15594,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -14916,8 +15620,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Latch::Id: { @@ -14931,8 +15636,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::State::Id: { @@ -14946,8 +15652,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Supported::Id: { @@ -14961,8 +15668,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -14983,8 +15691,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15007,8 +15716,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15031,8 +15741,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15055,8 +15766,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15072,8 +15784,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -15087,8 +15800,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -15146,8 +15860,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -15168,8 +15883,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -15192,9 +15908,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_operationalStateID; std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), - entry_0.operationalStateID, newElement_0_operationalStateID); + jninewElement_0_operationalStateID, newElement_0_operationalStateID); jobject newElement_0_operationalStateLabel; if (!entry_0.operationalStateLabel.HasValue()) { @@ -15243,8 +15960,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::OperationalError::Id: { @@ -15259,9 +15977,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_errorStateID; std::string value_errorStateIDClassName = "java/lang/Integer"; std::string value_errorStateIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_errorStateIDClassName.c_str(), - value_errorStateIDCtorSignature.c_str(), - cppValue.errorStateID, value_errorStateID); + jint jnivalue_errorStateID = static_cast(cppValue.errorStateID); + chip::JniReferences::GetInstance().CreateBoxedObject(value_errorStateIDClassName.c_str(), + value_errorStateIDCtorSignature.c_str(), + jnivalue_errorStateID, value_errorStateID); jobject value_errorStateLabel; if (!cppValue.errorStateLabel.HasValue()) { @@ -15325,8 +16044,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15349,8 +16069,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15373,8 +16094,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15397,8 +16119,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15414,8 +16137,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -15429,8 +16153,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -15488,8 +16213,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -15510,8 +16236,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -15534,9 +16261,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_operationalStateID; std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), - entry_0.operationalStateID, newElement_0_operationalStateID); + jninewElement_0_operationalStateID, newElement_0_operationalStateID); jobject newElement_0_operationalStateLabel; if (!entry_0.operationalStateLabel.HasValue()) { @@ -15585,8 +16313,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::OperationalError::Id: { @@ -15601,9 +16330,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_errorStateID; std::string value_errorStateIDClassName = "java/lang/Integer"; std::string value_errorStateIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_errorStateIDClassName.c_str(), - value_errorStateIDCtorSignature.c_str(), - cppValue.errorStateID, value_errorStateID); + jint jnivalue_errorStateID = static_cast(cppValue.errorStateID); + chip::JniReferences::GetInstance().CreateBoxedObject(value_errorStateIDClassName.c_str(), + value_errorStateIDCtorSignature.c_str(), + jnivalue_errorStateID, value_errorStateID); jobject value_errorStateLabel; if (!cppValue.errorStateLabel.HasValue()) { @@ -15667,8 +16397,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15691,8 +16422,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15715,8 +16447,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15739,8 +16472,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15756,8 +16490,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -15771,8 +16506,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -15796,8 +16532,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DegradationDirection::Id: { @@ -15811,8 +16548,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ChangeIndication::Id: { @@ -15826,8 +16564,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::InPlaceIndicator::Id: { @@ -15841,8 +16580,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::LastChangedTime::Id: { @@ -15862,8 +16602,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -15886,9 +16627,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_productIdentifierType; std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), - static_cast(entry_0.productIdentifierType), newElement_0_productIdentifierType); + jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); jobject newElement_0_productIdentifierValue; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, newElement_0_productIdentifierValue)); @@ -15934,8 +16676,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15958,8 +16701,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15982,8 +16726,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -16006,8 +16751,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -16023,8 +16769,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -16038,8 +16785,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -16063,8 +16811,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DegradationDirection::Id: { @@ -16078,8 +16827,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ChangeIndication::Id: { @@ -16093,8 +16843,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::InPlaceIndicator::Id: { @@ -16108,8 +16859,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::LastChangedTime::Id: { @@ -16129,8 +16881,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -16153,9 +16906,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_productIdentifierType; std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), - static_cast(entry_0.productIdentifierType), newElement_0_productIdentifierType); + jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); jobject newElement_0_productIdentifierValue; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, newElement_0_productIdentifierValue)); @@ -16204,8 +16958,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -16228,8 +16983,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -16252,8 +17008,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -16276,8 +17033,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -16293,8 +17051,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -16308,8 +17067,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -16339,8 +17099,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue.Value()), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -16355,8 +17116,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ActuatorEnabled::Id: { @@ -16370,8 +17132,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::DoorState::Id: { @@ -16391,8 +17154,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue.Value()), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -16407,8 +17171,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::DoorClosedEvents::Id: { @@ -16422,8 +17187,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::OpenPeriod::Id: { @@ -16437,8 +17203,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::NumberOfTotalUsersSupported::Id: { @@ -16452,8 +17219,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::NumberOfPINUsersSupported::Id: { @@ -16467,8 +17235,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::NumberOfRFIDUsersSupported::Id: { @@ -16482,8 +17251,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id: { @@ -16497,8 +17267,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id: { @@ -16512,8 +17283,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::NumberOfHolidaySchedulesSupported::Id: { @@ -16527,8 +17299,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MaxPINCodeLength::Id: { @@ -16542,8 +17315,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MinPINCodeLength::Id: { @@ -16557,8 +17331,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MaxRFIDCodeLength::Id: { @@ -16572,8 +17347,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MinRFIDCodeLength::Id: { @@ -16587,8 +17363,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::CredentialRulesSupport::Id: { @@ -16602,8 +17379,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::NumberOfCredentialsSupportedPerUser::Id: { @@ -16617,8 +17395,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Language::Id: { @@ -16644,8 +17423,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AutoRelockTime::Id: { @@ -16659,8 +17439,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::SoundVolume::Id: { @@ -16674,8 +17455,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::OperatingMode::Id: { @@ -16689,8 +17471,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SupportedOperatingModes::Id: { @@ -16704,8 +17487,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DefaultConfigurationRegister::Id: { @@ -16719,8 +17503,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::EnableLocalProgramming::Id: { @@ -16734,8 +17519,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::EnableOneTouchLocking::Id: { @@ -16749,8 +17535,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::EnableInsideStatusLED::Id: { @@ -16764,8 +17551,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::EnablePrivacyModeButton::Id: { @@ -16779,8 +17567,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::LocalProgrammingFeatures::Id: { @@ -16794,8 +17583,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::WrongCodeEntryLimit::Id: { @@ -16809,8 +17599,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::UserCodeTemporaryDisableTime::Id: { @@ -16824,8 +17615,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SendPINOverTheAir::Id: { @@ -16839,8 +17631,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::RequirePINforRemoteOperation::Id: { @@ -16854,8 +17647,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ExpiringUserTimeout::Id: { @@ -16869,8 +17663,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -16891,8 +17686,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -16915,8 +17711,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -16939,8 +17736,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -16963,8 +17761,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -16980,8 +17779,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -16995,8 +17795,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -17020,8 +17821,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PhysicalClosedLimitLift::Id: { @@ -17035,8 +17837,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PhysicalClosedLimitTilt::Id: { @@ -17050,8 +17853,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::CurrentPositionLift::Id: { @@ -17071,8 +17875,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -17093,8 +17898,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -17109,8 +17915,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::NumberOfActuationsTilt::Id: { @@ -17124,8 +17931,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ConfigStatus::Id: { @@ -17139,8 +17947,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::CurrentPositionLiftPercentage::Id: { @@ -17160,8 +17969,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -17182,8 +17992,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -17198,8 +18009,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::TargetPositionLiftPercent100ths::Id: { @@ -17219,8 +18031,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -17241,8 +18054,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -17257,8 +18071,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::CurrentPositionLiftPercent100ths::Id: { @@ -17278,8 +18093,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -17300,8 +18116,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -17316,8 +18133,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::InstalledClosedLimitLift::Id: { @@ -17331,8 +18149,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::InstalledOpenLimitTilt::Id: { @@ -17346,8 +18165,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::InstalledClosedLimitTilt::Id: { @@ -17361,8 +18181,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Mode::Id: { @@ -17376,8 +18197,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SafetyStatus::Id: { @@ -17391,8 +18213,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -17413,8 +18236,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -17437,8 +18261,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -17461,8 +18286,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -17485,8 +18311,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -17502,8 +18329,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -17517,8 +18345,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -17542,8 +18371,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BarrierSafetyStatus::Id: { @@ -17557,8 +18387,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BarrierCapabilities::Id: { @@ -17572,8 +18403,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BarrierOpenEvents::Id: { @@ -17587,8 +18419,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BarrierCloseEvents::Id: { @@ -17602,8 +18435,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BarrierCommandOpenEvents::Id: { @@ -17617,8 +18451,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BarrierCommandCloseEvents::Id: { @@ -17632,8 +18467,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BarrierOpenPeriod::Id: { @@ -17647,8 +18483,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BarrierClosePeriod::Id: { @@ -17662,8 +18499,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BarrierPosition::Id: { @@ -17677,8 +18515,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -17699,8 +18538,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -17723,8 +18563,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -17747,8 +18588,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -17771,8 +18613,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -17788,8 +18631,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -17803,8 +18647,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -17834,8 +18679,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -17856,8 +18702,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -17878,8 +18725,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -17900,8 +18748,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -17922,8 +18771,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -17944,8 +18794,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -17966,8 +18817,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -17988,8 +18840,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -18010,8 +18863,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -18032,8 +18886,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -18054,8 +18909,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -18076,8 +18932,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -18098,8 +18955,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -18114,8 +18972,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::EffectiveOperationMode::Id: { @@ -18129,8 +18988,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::EffectiveControlMode::Id: { @@ -18144,8 +19004,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Capacity::Id: { @@ -18165,8 +19026,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -18187,8 +19049,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -18209,8 +19072,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -18231,8 +19095,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -18253,8 +19118,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -18269,8 +19135,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ControlMode::Id: { @@ -18284,8 +19151,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -18306,8 +19174,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -18330,8 +19199,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -18354,8 +19224,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -18378,8 +19249,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -18395,8 +19267,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -18410,8 +19283,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -18441,8 +19315,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -18463,8 +19338,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -18479,8 +19355,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AbsMinHeatSetpointLimit::Id: { @@ -18494,8 +19371,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AbsMaxHeatSetpointLimit::Id: { @@ -18509,8 +19387,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AbsMinCoolSetpointLimit::Id: { @@ -18524,8 +19403,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AbsMaxCoolSetpointLimit::Id: { @@ -18539,8 +19419,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PICoolingDemand::Id: { @@ -18554,8 +19435,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PIHeatingDemand::Id: { @@ -18569,8 +19451,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::HVACSystemTypeConfiguration::Id: { @@ -18584,8 +19467,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LocalTemperatureCalibration::Id: { @@ -18599,8 +19483,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::OccupiedCoolingSetpoint::Id: { @@ -18614,8 +19499,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::OccupiedHeatingSetpoint::Id: { @@ -18629,8 +19515,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::UnoccupiedCoolingSetpoint::Id: { @@ -18644,8 +19531,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::UnoccupiedHeatingSetpoint::Id: { @@ -18659,8 +19547,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MinHeatSetpointLimit::Id: { @@ -18674,8 +19563,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MaxHeatSetpointLimit::Id: { @@ -18689,8 +19579,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MinCoolSetpointLimit::Id: { @@ -18704,8 +19595,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MaxCoolSetpointLimit::Id: { @@ -18719,8 +19611,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MinSetpointDeadBand::Id: { @@ -18734,8 +19627,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RemoteSensing::Id: { @@ -18749,8 +19643,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ControlSequenceOfOperation::Id: { @@ -18764,8 +19659,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SystemMode::Id: { @@ -18779,8 +19675,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ThermostatRunningMode::Id: { @@ -18794,8 +19691,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::StartOfWeek::Id: { @@ -18809,8 +19707,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::NumberOfWeeklyTransitions::Id: { @@ -18824,8 +19723,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::NumberOfDailyTransitions::Id: { @@ -18839,8 +19739,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::TemperatureSetpointHold::Id: { @@ -18854,8 +19755,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::TemperatureSetpointHoldDuration::Id: { @@ -18875,8 +19777,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -18891,8 +19794,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ThermostatRunningState::Id: { @@ -18906,8 +19810,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SetpointChangeSource::Id: { @@ -18921,8 +19826,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SetpointChangeAmount::Id: { @@ -18942,8 +19848,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -18958,8 +19865,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::OccupiedSetback::Id: { @@ -18979,8 +19887,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -19001,8 +19910,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -19023,8 +19933,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -19045,8 +19956,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -19067,8 +19979,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -19089,8 +20002,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -19105,8 +20019,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ACType::Id: { @@ -19120,8 +20035,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ACCapacity::Id: { @@ -19135,8 +20051,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ACRefrigerantType::Id: { @@ -19150,8 +20067,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ACCompressorType::Id: { @@ -19165,8 +20083,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ACErrorCode::Id: { @@ -19180,8 +20099,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ACLouverPosition::Id: { @@ -19195,8 +20115,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ACCoilTemperature::Id: { @@ -19216,8 +20137,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -19232,8 +20154,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -19254,8 +20177,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -19278,8 +20202,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -19302,8 +20227,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -19326,8 +20252,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -19343,8 +20270,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -19358,8 +20286,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -19383,8 +20312,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::FanModeSequence::Id: { @@ -19398,8 +20328,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PercentSetting::Id: { @@ -19419,8 +20350,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -19435,8 +20367,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SpeedMax::Id: { @@ -19450,8 +20383,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::SpeedSetting::Id: { @@ -19471,8 +20405,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -19487,8 +20422,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RockSupport::Id: { @@ -19502,8 +20438,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RockSetting::Id: { @@ -19517,8 +20454,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::WindSupport::Id: { @@ -19532,8 +20470,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::WindSetting::Id: { @@ -19547,8 +20486,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AirflowDirection::Id: { @@ -19562,8 +20502,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -19584,8 +20525,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -19608,8 +20550,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -19632,8 +20575,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -19656,8 +20600,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -19673,8 +20618,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -19688,8 +20634,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -19713,8 +20660,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::KeypadLockout::Id: { @@ -19728,8 +20676,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ScheduleProgrammingVisibility::Id: { @@ -19743,8 +20692,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -19765,8 +20715,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -19789,8 +20740,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -19813,8 +20765,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -19837,8 +20790,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -19854,8 +20808,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -19869,8 +20824,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -19894,8 +20850,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::CurrentSaturation::Id: { @@ -19909,8 +20866,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RemainingTime::Id: { @@ -19924,8 +20882,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::CurrentX::Id: { @@ -19939,8 +20898,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::CurrentY::Id: { @@ -19954,8 +20914,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DriftCompensation::Id: { @@ -19969,8 +20930,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::CompensationText::Id: { @@ -19996,8 +20958,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorMode::Id: { @@ -20011,8 +20974,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Options::Id: { @@ -20026,8 +20990,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::NumberOfPrimaries::Id: { @@ -20047,8 +21012,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -20063,8 +21029,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Primary1Y::Id: { @@ -20078,8 +21045,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Primary1Intensity::Id: { @@ -20099,8 +21067,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -20115,8 +21084,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Primary2Y::Id: { @@ -20130,8 +21100,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Primary2Intensity::Id: { @@ -20151,8 +21122,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -20167,8 +21139,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Primary3Y::Id: { @@ -20182,8 +21155,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Primary3Intensity::Id: { @@ -20203,8 +21177,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -20219,8 +21194,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Primary4Y::Id: { @@ -20234,8 +21210,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Primary4Intensity::Id: { @@ -20255,8 +21232,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -20271,8 +21249,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Primary5Y::Id: { @@ -20286,8 +21265,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Primary5Intensity::Id: { @@ -20307,8 +21287,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -20323,8 +21304,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Primary6Y::Id: { @@ -20338,8 +21320,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Primary6Intensity::Id: { @@ -20359,8 +21342,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -20375,8 +21359,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::WhitePointY::Id: { @@ -20390,8 +21375,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorPointRX::Id: { @@ -20405,8 +21391,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorPointRY::Id: { @@ -20420,8 +21407,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorPointRIntensity::Id: { @@ -20441,8 +21429,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -20457,8 +21446,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorPointGY::Id: { @@ -20472,8 +21462,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorPointGIntensity::Id: { @@ -20493,8 +21484,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -20509,8 +21501,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorPointBY::Id: { @@ -20524,8 +21517,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorPointBIntensity::Id: { @@ -20545,8 +21539,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -20561,8 +21556,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::EnhancedColorMode::Id: { @@ -20576,8 +21572,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorLoopActive::Id: { @@ -20591,8 +21588,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorLoopDirection::Id: { @@ -20606,8 +21604,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorLoopTime::Id: { @@ -20621,8 +21620,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorLoopStartEnhancedHue::Id: { @@ -20636,8 +21636,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorLoopStoredEnhancedHue::Id: { @@ -20651,8 +21652,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorCapabilities::Id: { @@ -20666,8 +21668,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorTempPhysicalMinMireds::Id: { @@ -20681,8 +21684,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ColorTempPhysicalMaxMireds::Id: { @@ -20696,8 +21700,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::CoupleColorTempToLevelMinMireds::Id: { @@ -20711,8 +21716,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::StartUpColorTemperatureMireds::Id: { @@ -20732,8 +21738,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -20755,8 +21762,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -20779,8 +21787,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -20803,8 +21812,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -20827,8 +21837,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -20844,8 +21855,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -20859,8 +21871,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -20884,8 +21897,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PhysicalMaxLevel::Id: { @@ -20899,8 +21913,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::BallastStatus::Id: { @@ -20914,8 +21929,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MinLevel::Id: { @@ -20929,8 +21945,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MaxLevel::Id: { @@ -20944,8 +21961,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::IntrinsicBallastFactor::Id: { @@ -20965,8 +21983,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -20987,8 +22006,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21003,8 +22023,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LampType::Id: { @@ -21048,8 +22069,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21070,8 +22092,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21086,8 +22109,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LampBurnHoursTripPoint::Id: { @@ -21107,8 +22131,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21130,8 +22155,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21154,8 +22180,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21178,8 +22205,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21202,8 +22230,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21219,8 +22248,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -21234,8 +22264,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -21265,8 +22296,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21287,8 +22319,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21309,8 +22342,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21325,8 +22359,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LightSensorType::Id: { @@ -21346,8 +22381,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue.Value()), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21369,8 +22405,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21393,8 +22430,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21417,8 +22455,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21441,8 +22480,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21458,8 +22498,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -21473,8 +22514,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -21504,8 +22546,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21526,8 +22569,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21548,8 +22592,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21564,8 +22609,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -21586,8 +22632,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21610,8 +22657,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21634,8 +22682,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21658,8 +22707,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21675,8 +22725,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -21690,8 +22741,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -21721,8 +22773,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21743,8 +22796,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21765,8 +22819,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21781,8 +22836,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ScaledValue::Id: { @@ -21802,8 +22858,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21824,8 +22881,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21846,8 +22904,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -21862,8 +22921,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Scale::Id: { @@ -21877,8 +22937,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -21899,8 +22960,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21923,8 +22985,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21947,8 +23010,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21971,8 +23035,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -21988,8 +23053,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -22003,8 +23069,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -22034,8 +23101,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -22056,8 +23124,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -22078,8 +23147,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -22094,8 +23164,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -22116,8 +23187,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -22140,8 +23212,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -22164,8 +23237,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -22188,8 +23262,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -22205,8 +23280,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -22220,8 +23296,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -22251,8 +23328,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -22273,8 +23351,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -22295,8 +23374,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -22311,8 +23391,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -22333,8 +23414,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -22357,8 +23439,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -22381,8 +23464,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -22405,8 +23489,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -22422,8 +23507,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -22437,8 +23523,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -22462,8 +23549,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::OccupancySensorType::Id: { @@ -22477,8 +23565,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::OccupancySensorTypeBitmap::Id: { @@ -22492,8 +23581,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PIROccupiedToUnoccupiedDelay::Id: { @@ -22507,8 +23597,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PIRUnoccupiedToOccupiedDelay::Id: { @@ -22522,8 +23613,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PIRUnoccupiedToOccupiedThreshold::Id: { @@ -22537,8 +23629,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id: { @@ -22552,8 +23645,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id: { @@ -22567,8 +23661,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id: { @@ -22582,8 +23677,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id: { @@ -22597,8 +23693,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id: { @@ -22612,8 +23709,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { @@ -22627,8 +23725,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -22649,8 +23748,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -22673,8 +23773,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -22697,8 +23798,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -22721,8 +23823,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -22738,8 +23841,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -22753,8 +23857,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -22784,8 +23889,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -22806,8 +23912,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -22828,8 +23935,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -22850,8 +23958,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -22866,8 +23975,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { @@ -22887,8 +23997,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -22903,8 +24014,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Uncertainty::Id: { @@ -22918,8 +24030,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jfloat jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { @@ -22933,8 +24046,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasurementMedium::Id: { @@ -22948,8 +24062,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LevelValue::Id: { @@ -22963,8 +24078,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -22985,8 +24101,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -23009,8 +24126,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -23033,8 +24151,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -23057,8 +24176,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -23074,8 +24194,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -23089,8 +24210,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -23120,8 +24242,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -23142,8 +24265,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -23164,8 +24288,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -23186,8 +24311,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -23202,8 +24328,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { @@ -23223,8 +24350,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -23239,8 +24367,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Uncertainty::Id: { @@ -23254,8 +24383,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jfloat jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { @@ -23269,8 +24399,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasurementMedium::Id: { @@ -23284,8 +24415,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LevelValue::Id: { @@ -23299,8 +24431,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -23321,8 +24454,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -23345,8 +24479,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -23369,8 +24504,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -23393,8 +24529,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -23410,8 +24547,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -23425,8 +24563,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -23456,8 +24595,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -23478,8 +24618,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -23500,8 +24641,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -23522,8 +24664,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -23538,8 +24681,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { @@ -23559,8 +24703,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -23575,8 +24720,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Uncertainty::Id: { @@ -23590,8 +24736,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jfloat jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { @@ -23605,8 +24752,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasurementMedium::Id: { @@ -23620,8 +24768,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LevelValue::Id: { @@ -23635,8 +24784,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -23657,8 +24807,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -23681,8 +24832,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -23705,8 +24857,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -23729,8 +24882,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -23746,8 +24900,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -23761,8 +24916,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -23792,8 +24948,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -23814,8 +24971,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -23836,8 +24994,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -23858,8 +25017,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -23874,8 +25034,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { @@ -23895,8 +25056,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -23911,8 +25073,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Uncertainty::Id: { @@ -23926,8 +25089,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jfloat jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { @@ -23941,8 +25105,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasurementMedium::Id: { @@ -23956,8 +25121,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LevelValue::Id: { @@ -23971,8 +25137,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -23993,8 +25160,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -24017,8 +25185,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -24041,8 +25210,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -24065,8 +25235,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -24082,8 +25253,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -24097,8 +25269,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -24128,8 +25301,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -24150,8 +25324,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -24172,8 +25347,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -24194,8 +25370,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -24210,8 +25387,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { @@ -24231,8 +25409,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -24247,8 +25426,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Uncertainty::Id: { @@ -24262,8 +25442,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jfloat jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { @@ -24277,8 +25458,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasurementMedium::Id: { @@ -24292,8 +25474,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LevelValue::Id: { @@ -24307,8 +25490,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -24329,8 +25513,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -24353,8 +25538,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -24377,8 +25563,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -24401,8 +25588,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -24418,8 +25606,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -24433,8 +25622,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -24464,8 +25654,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -24486,8 +25677,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -24508,8 +25700,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -24530,8 +25723,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -24546,8 +25740,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { @@ -24567,8 +25762,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -24583,8 +25779,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Uncertainty::Id: { @@ -24598,8 +25795,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jfloat jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { @@ -24613,8 +25811,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasurementMedium::Id: { @@ -24628,8 +25827,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LevelValue::Id: { @@ -24643,8 +25843,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -24665,8 +25866,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -24689,8 +25891,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -24713,8 +25916,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -24737,8 +25941,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -24754,8 +25959,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -24769,8 +25975,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -24800,8 +26007,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -24822,8 +26030,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -24844,8 +26053,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -24866,8 +26076,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -24882,8 +26093,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { @@ -24903,8 +26115,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -24919,8 +26132,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Uncertainty::Id: { @@ -24934,8 +26148,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jfloat jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { @@ -24949,8 +26164,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasurementMedium::Id: { @@ -24964,8 +26180,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LevelValue::Id: { @@ -24979,8 +26196,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -25001,8 +26219,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25025,8 +26244,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25049,8 +26269,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25073,8 +26294,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25090,8 +26312,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -25105,8 +26328,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -25136,8 +26360,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -25158,8 +26383,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -25180,8 +26406,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -25202,8 +26429,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -25218,8 +26446,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { @@ -25239,8 +26468,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -25255,8 +26485,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Uncertainty::Id: { @@ -25270,8 +26501,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jfloat jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { @@ -25285,8 +26517,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasurementMedium::Id: { @@ -25300,8 +26533,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LevelValue::Id: { @@ -25315,8 +26549,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -25337,8 +26572,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25361,8 +26597,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25385,8 +26622,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25409,8 +26647,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25426,8 +26665,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -25441,8 +26681,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -25472,8 +26713,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -25494,8 +26736,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -25516,8 +26759,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -25538,8 +26782,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -25554,8 +26799,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { @@ -25575,8 +26821,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -25591,8 +26838,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Uncertainty::Id: { @@ -25606,8 +26854,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jfloat jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { @@ -25621,8 +26870,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasurementMedium::Id: { @@ -25636,8 +26886,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LevelValue::Id: { @@ -25651,8 +26902,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -25673,8 +26925,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25697,8 +26950,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25721,8 +26975,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25745,8 +27000,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25762,8 +27018,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -25777,8 +27034,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -25808,8 +27066,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -25830,8 +27089,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -25852,8 +27112,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -25874,8 +27135,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -25890,8 +27152,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { @@ -25911,8 +27174,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -25927,8 +27191,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Uncertainty::Id: { @@ -25942,8 +27207,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jfloat jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { @@ -25957,8 +27223,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasurementMedium::Id: { @@ -25972,8 +27239,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LevelValue::Id: { @@ -25987,8 +27255,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -26009,8 +27278,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26033,8 +27303,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26057,8 +27328,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26081,8 +27353,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26098,8 +27371,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -26113,8 +27387,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -26157,8 +27432,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26181,8 +27457,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26205,8 +27482,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26229,8 +27507,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26246,8 +27525,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -26261,8 +27541,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -26294,15 +27575,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_majorNumber; std::string newElement_0_majorNumberClassName = "java/lang/Integer"; std::string newElement_0_majorNumberCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_majorNumberClassName.c_str(), - newElement_0_majorNumberCtorSignature.c_str(), - entry_0.majorNumber, newElement_0_majorNumber); + jint jninewElement_0_majorNumber = static_cast(entry_0.majorNumber); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_majorNumberClassName.c_str(), + newElement_0_majorNumberCtorSignature.c_str(), + jninewElement_0_majorNumber, newElement_0_majorNumber); jobject newElement_0_minorNumber; std::string newElement_0_minorNumberClassName = "java/lang/Integer"; std::string newElement_0_minorNumberCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minorNumberClassName.c_str(), - newElement_0_minorNumberCtorSignature.c_str(), - entry_0.minorNumber, newElement_0_minorNumber); + jint jninewElement_0_minorNumber = static_cast(entry_0.minorNumber); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minorNumberClassName.c_str(), + newElement_0_minorNumberCtorSignature.c_str(), + jninewElement_0_minorNumber, newElement_0_minorNumber); jobject newElement_0_name; if (!entry_0.name.HasValue()) { @@ -26410,9 +27693,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_lineupInfoType; std::string value_lineupInfoTypeClassName = "java/lang/Integer"; std::string value_lineupInfoTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_lineupInfoTypeClassName.c_str(), value_lineupInfoTypeCtorSignature.c_str(), - static_cast(cppValue.Value().lineupInfoType), value_lineupInfoType); + jint jnivalue_lineupInfoType = static_cast(cppValue.Value().lineupInfoType); + chip::JniReferences::GetInstance().CreateBoxedObject(value_lineupInfoTypeClassName.c_str(), + value_lineupInfoTypeCtorSignature.c_str(), + jnivalue_lineupInfoType, value_lineupInfoType); jclass lineupInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -26454,15 +27738,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_majorNumber; std::string value_majorNumberClassName = "java/lang/Integer"; std::string value_majorNumberCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_majorNumberClassName.c_str(), - value_majorNumberCtorSignature.c_str(), - cppValue.Value().majorNumber, value_majorNumber); + jint jnivalue_majorNumber = static_cast(cppValue.Value().majorNumber); + chip::JniReferences::GetInstance().CreateBoxedObject(value_majorNumberClassName.c_str(), + value_majorNumberCtorSignature.c_str(), + jnivalue_majorNumber, value_majorNumber); jobject value_minorNumber; std::string value_minorNumberClassName = "java/lang/Integer"; std::string value_minorNumberCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_minorNumberClassName.c_str(), - value_minorNumberCtorSignature.c_str(), - cppValue.Value().minorNumber, value_minorNumber); + jint jnivalue_minorNumber = static_cast(cppValue.Value().minorNumber); + chip::JniReferences::GetInstance().CreateBoxedObject(value_minorNumberClassName.c_str(), + value_minorNumberCtorSignature.c_str(), + jnivalue_minorNumber, value_minorNumber); jobject value_name; if (!cppValue.Value().name.HasValue()) { @@ -26541,8 +27827,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26565,8 +27852,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26589,8 +27877,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26613,8 +27902,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26630,8 +27920,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -26645,8 +27936,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -26678,9 +27970,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_identifier; std::string newElement_0_identifierClassName = "java/lang/Integer"; std::string newElement_0_identifierCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_identifierClassName.c_str(), - newElement_0_identifierCtorSignature.c_str(), - entry_0.identifier, newElement_0_identifier); + jint jninewElement_0_identifier = static_cast(entry_0.identifier); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_identifierClassName.c_str(), + newElement_0_identifierCtorSignature.c_str(), + jninewElement_0_identifier, newElement_0_identifier); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); @@ -26717,8 +28010,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -26739,8 +28033,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26763,8 +28058,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26787,8 +28083,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26811,8 +28108,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26828,8 +28126,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -26843,8 +28142,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -26868,8 +28168,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::StartTime::Id: { @@ -26889,8 +28190,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -26911,8 +28213,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -26934,9 +28237,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_updatedAt; std::string value_updatedAtClassName = "java/lang/Long"; std::string value_updatedAtCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_updatedAtClassName.c_str(), - value_updatedAtCtorSignature.c_str(), - cppValue.Value().updatedAt, value_updatedAt); + jlong jnivalue_updatedAt = static_cast(cppValue.Value().updatedAt); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_updatedAtClassName.c_str(), value_updatedAtCtorSignature.c_str(), jnivalue_updatedAt, value_updatedAt); jobject value_position; if (cppValue.Value().position.IsNull()) { @@ -26946,9 +28249,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string value_positionClassName = "java/lang/Long"; std::string value_positionCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_positionClassName.c_str(), value_positionCtorSignature.c_str(), cppValue.Value().position.Value(), - value_position); + jlong jnivalue_position = static_cast(cppValue.Value().position.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_positionClassName.c_str(), value_positionCtorSignature.c_str(), jnivalue_position, value_position); } jclass playbackPositionStructStructClass_1; @@ -26984,8 +28287,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jfloat jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::SeekRangeEnd::Id: { @@ -27005,8 +28309,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -27027,8 +28332,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -27050,8 +28356,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27074,8 +28381,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27098,8 +28406,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27122,8 +28431,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27139,8 +28449,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -27154,8 +28465,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -27187,15 +28499,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_index; std::string newElement_0_indexClassName = "java/lang/Integer"; std::string newElement_0_indexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), - newElement_0_indexCtorSignature.c_str(), - entry_0.index, newElement_0_index); + jint jninewElement_0_index = static_cast(entry_0.index); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), + newElement_0_indexCtorSignature.c_str(), + jninewElement_0_index, newElement_0_index); jobject newElement_0_inputType; std::string newElement_0_inputTypeClassName = "java/lang/Integer"; std::string newElement_0_inputTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_inputTypeClassName.c_str(), newElement_0_inputTypeCtorSignature.c_str(), - static_cast(entry_0.inputType), newElement_0_inputType); + jint jninewElement_0_inputType = static_cast(entry_0.inputType); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_inputTypeClassName.c_str(), + newElement_0_inputTypeCtorSignature.c_str(), + jninewElement_0_inputType, newElement_0_inputType); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); jobject newElement_0_description; @@ -27236,8 +28550,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -27258,8 +28573,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27282,8 +28598,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27306,8 +28623,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27330,8 +28648,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27347,8 +28666,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -27362,8 +28682,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -27394,8 +28715,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27418,8 +28740,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27442,8 +28765,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27466,8 +28790,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27483,8 +28808,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -27498,8 +28824,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -27530,8 +28857,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27554,8 +28882,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27578,8 +28907,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27602,8 +28932,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27619,8 +28950,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -27634,8 +28966,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -27680,8 +29013,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -27702,8 +29036,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27726,8 +29061,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27750,8 +29086,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27774,8 +29111,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27791,8 +29129,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -27806,8 +29145,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -27839,15 +29179,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_index; std::string newElement_0_indexClassName = "java/lang/Integer"; std::string newElement_0_indexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), - newElement_0_indexCtorSignature.c_str(), - entry_0.index, newElement_0_index); + jint jninewElement_0_index = static_cast(entry_0.index); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), + newElement_0_indexCtorSignature.c_str(), + jninewElement_0_index, newElement_0_index); jobject newElement_0_outputType; std::string newElement_0_outputTypeClassName = "java/lang/Integer"; std::string newElement_0_outputTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_outputTypeClassName.c_str(), newElement_0_outputTypeCtorSignature.c_str(), - static_cast(entry_0.outputType), newElement_0_outputType); + jint jninewElement_0_outputType = static_cast(entry_0.outputType); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_outputTypeClassName.c_str(), + newElement_0_outputTypeCtorSignature.c_str(), + jninewElement_0_outputType, newElement_0_outputType); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); @@ -27884,8 +29226,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -27906,8 +29249,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27930,8 +29274,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27954,8 +29299,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27978,8 +29324,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -27995,8 +29342,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -28010,8 +29358,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -28042,8 +29391,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28067,9 +29417,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_application_catalogVendorID; std::string value_application_catalogVendorIDClassName = "java/lang/Integer"; std::string value_application_catalogVendorIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jnivalue_application_catalogVendorID = static_cast(cppValue.Value().application.catalogVendorID); + chip::JniReferences::GetInstance().CreateBoxedObject( value_application_catalogVendorIDClassName.c_str(), value_application_catalogVendorIDCtorSignature.c_str(), - cppValue.Value().application.catalogVendorID, value_application_catalogVendorID); + jnivalue_application_catalogVendorID, value_application_catalogVendorID); jobject value_application_applicationID; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().application.applicationID, value_application_applicationID)); @@ -28103,9 +29454,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_endpointInsideOptional; std::string value_endpointInsideOptionalClassName = "java/lang/Integer"; std::string value_endpointInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jnivalue_endpointInsideOptional = static_cast(cppValue.Value().endpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( value_endpointInsideOptionalClassName.c_str(), value_endpointInsideOptionalCtorSignature.c_str(), - cppValue.Value().endpoint.Value(), value_endpointInsideOptional); + jnivalue_endpointInsideOptional, value_endpointInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_endpointInsideOptional, value_endpoint); } @@ -28150,8 +29502,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28174,8 +29527,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28198,8 +29552,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28222,8 +29577,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28239,8 +29595,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -28254,8 +29611,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -28291,8 +29649,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ApplicationName::Id: { @@ -28318,8 +29677,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Application::Id: { @@ -28334,9 +29694,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_catalogVendorID; std::string value_catalogVendorIDClassName = "java/lang/Integer"; std::string value_catalogVendorIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_catalogVendorIDClassName.c_str(), - value_catalogVendorIDCtorSignature.c_str(), - cppValue.catalogVendorID, value_catalogVendorID); + jint jnivalue_catalogVendorID = static_cast(cppValue.catalogVendorID); + chip::JniReferences::GetInstance().CreateBoxedObject(value_catalogVendorIDClassName.c_str(), + value_catalogVendorIDCtorSignature.c_str(), + jnivalue_catalogVendorID, value_catalogVendorID); jobject value_applicationID; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.applicationID, value_applicationID)); @@ -28371,8 +29732,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ApplicationVersion::Id: { @@ -28405,8 +29767,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28429,8 +29792,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28453,8 +29817,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28477,8 +29842,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28501,8 +29867,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28518,8 +29885,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -28533,8 +29901,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -28565,8 +29934,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28589,8 +29959,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28613,8 +29984,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28637,8 +30009,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28654,8 +30027,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -28669,8 +30043,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -28694,8 +30069,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::DcVoltage::Id: { @@ -28709,8 +30085,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DcVoltageMin::Id: { @@ -28724,8 +30101,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DcVoltageMax::Id: { @@ -28739,8 +30117,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DcCurrent::Id: { @@ -28754,8 +30133,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DcCurrentMin::Id: { @@ -28769,8 +30149,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DcCurrentMax::Id: { @@ -28784,8 +30165,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DcPower::Id: { @@ -28799,8 +30181,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DcPowerMin::Id: { @@ -28814,8 +30197,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DcPowerMax::Id: { @@ -28829,8 +30213,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DcVoltageMultiplier::Id: { @@ -28844,8 +30229,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DcVoltageDivisor::Id: { @@ -28859,8 +30245,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DcCurrentMultiplier::Id: { @@ -28874,8 +30261,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DcCurrentDivisor::Id: { @@ -28889,8 +30277,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DcPowerMultiplier::Id: { @@ -28904,8 +30293,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::DcPowerDivisor::Id: { @@ -28919,8 +30309,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcFrequency::Id: { @@ -28934,8 +30325,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcFrequencyMin::Id: { @@ -28949,8 +30341,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcFrequencyMax::Id: { @@ -28964,8 +30357,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::NeutralCurrent::Id: { @@ -28979,8 +30373,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::TotalActivePower::Id: { @@ -28994,8 +30389,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TotalReactivePower::Id: { @@ -29009,8 +30405,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::TotalApparentPower::Id: { @@ -29024,8 +30421,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Measured1stHarmonicCurrent::Id: { @@ -29039,8 +30437,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Measured3rdHarmonicCurrent::Id: { @@ -29054,8 +30453,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Measured5thHarmonicCurrent::Id: { @@ -29069,8 +30469,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Measured7thHarmonicCurrent::Id: { @@ -29084,8 +30485,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Measured9thHarmonicCurrent::Id: { @@ -29099,8 +30501,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Measured11thHarmonicCurrent::Id: { @@ -29114,8 +30517,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasuredPhase1stHarmonicCurrent::Id: { @@ -29129,8 +30533,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasuredPhase3rdHarmonicCurrent::Id: { @@ -29144,8 +30549,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasuredPhase5thHarmonicCurrent::Id: { @@ -29159,8 +30565,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasuredPhase7thHarmonicCurrent::Id: { @@ -29174,8 +30581,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasuredPhase9thHarmonicCurrent::Id: { @@ -29189,8 +30597,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::MeasuredPhase11thHarmonicCurrent::Id: { @@ -29204,8 +30613,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcFrequencyMultiplier::Id: { @@ -29219,8 +30629,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcFrequencyDivisor::Id: { @@ -29234,8 +30645,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PowerMultiplier::Id: { @@ -29249,8 +30661,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::PowerDivisor::Id: { @@ -29264,8 +30677,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::HarmonicCurrentMultiplier::Id: { @@ -29279,8 +30693,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PhaseHarmonicCurrentMultiplier::Id: { @@ -29294,8 +30709,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::InstantaneousVoltage::Id: { @@ -29309,8 +30725,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::InstantaneousLineCurrent::Id: { @@ -29324,8 +30741,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::InstantaneousActiveCurrent::Id: { @@ -29339,8 +30757,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::InstantaneousReactiveCurrent::Id: { @@ -29354,8 +30773,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::InstantaneousPower::Id: { @@ -29369,8 +30789,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltage::Id: { @@ -29384,8 +30805,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltageMin::Id: { @@ -29399,8 +30821,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltageMax::Id: { @@ -29414,8 +30837,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsCurrent::Id: { @@ -29429,8 +30853,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsCurrentMin::Id: { @@ -29444,8 +30869,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsCurrentMax::Id: { @@ -29459,8 +30885,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ActivePower::Id: { @@ -29474,8 +30901,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ActivePowerMin::Id: { @@ -29489,8 +30917,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ActivePowerMax::Id: { @@ -29504,8 +30933,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ReactivePower::Id: { @@ -29519,8 +30949,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ApparentPower::Id: { @@ -29534,8 +30965,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PowerFactor::Id: { @@ -29549,8 +30981,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AverageRmsVoltageMeasurementPeriod::Id: { @@ -29564,8 +30997,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AverageRmsUnderVoltageCounter::Id: { @@ -29579,8 +31013,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsExtremeOverVoltagePeriod::Id: { @@ -29594,8 +31029,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsExtremeUnderVoltagePeriod::Id: { @@ -29609,8 +31045,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltageSagPeriod::Id: { @@ -29624,8 +31061,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltageSwellPeriod::Id: { @@ -29639,8 +31077,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcVoltageMultiplier::Id: { @@ -29654,8 +31093,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcVoltageDivisor::Id: { @@ -29669,8 +31109,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcCurrentMultiplier::Id: { @@ -29684,8 +31125,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcCurrentDivisor::Id: { @@ -29699,8 +31141,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcPowerMultiplier::Id: { @@ -29714,8 +31157,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcPowerDivisor::Id: { @@ -29729,8 +31173,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::OverloadAlarmsMask::Id: { @@ -29744,8 +31189,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::VoltageOverload::Id: { @@ -29759,8 +31205,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::CurrentOverload::Id: { @@ -29774,8 +31221,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcOverloadAlarmsMask::Id: { @@ -29789,8 +31237,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcVoltageOverload::Id: { @@ -29804,8 +31253,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcCurrentOverload::Id: { @@ -29819,8 +31269,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcActivePowerOverload::Id: { @@ -29834,8 +31285,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AcReactivePowerOverload::Id: { @@ -29849,8 +31301,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AverageRmsOverVoltage::Id: { @@ -29864,8 +31317,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AverageRmsUnderVoltage::Id: { @@ -29879,8 +31333,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsExtremeOverVoltage::Id: { @@ -29894,8 +31349,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsExtremeUnderVoltage::Id: { @@ -29909,8 +31365,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltageSag::Id: { @@ -29924,8 +31381,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltageSwell::Id: { @@ -29939,8 +31397,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LineCurrentPhaseB::Id: { @@ -29954,8 +31413,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ActiveCurrentPhaseB::Id: { @@ -29969,8 +31429,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ReactiveCurrentPhaseB::Id: { @@ -29984,8 +31445,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltagePhaseB::Id: { @@ -29999,8 +31461,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltageMinPhaseB::Id: { @@ -30014,8 +31477,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltageMaxPhaseB::Id: { @@ -30029,8 +31493,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsCurrentPhaseB::Id: { @@ -30044,8 +31509,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsCurrentMinPhaseB::Id: { @@ -30059,8 +31525,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsCurrentMaxPhaseB::Id: { @@ -30074,8 +31541,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ActivePowerPhaseB::Id: { @@ -30089,8 +31557,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ActivePowerMinPhaseB::Id: { @@ -30104,8 +31573,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ActivePowerMaxPhaseB::Id: { @@ -30119,8 +31589,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ReactivePowerPhaseB::Id: { @@ -30134,8 +31605,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ApparentPowerPhaseB::Id: { @@ -30149,8 +31621,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PowerFactorPhaseB::Id: { @@ -30164,8 +31637,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id: { @@ -30179,8 +31653,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AverageRmsOverVoltageCounterPhaseB::Id: { @@ -30194,8 +31669,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AverageRmsUnderVoltageCounterPhaseB::Id: { @@ -30209,8 +31685,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id: { @@ -30224,8 +31701,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id: { @@ -30239,8 +31717,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltageSagPeriodPhaseB::Id: { @@ -30254,8 +31733,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltageSwellPeriodPhaseB::Id: { @@ -30269,8 +31749,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::LineCurrentPhaseC::Id: { @@ -30284,8 +31765,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ActiveCurrentPhaseC::Id: { @@ -30299,8 +31781,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ReactiveCurrentPhaseC::Id: { @@ -30314,8 +31797,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltagePhaseC::Id: { @@ -30329,8 +31813,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltageMinPhaseC::Id: { @@ -30344,8 +31829,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltageMaxPhaseC::Id: { @@ -30359,8 +31845,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsCurrentPhaseC::Id: { @@ -30374,8 +31861,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsCurrentMinPhaseC::Id: { @@ -30389,8 +31877,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsCurrentMaxPhaseC::Id: { @@ -30404,8 +31893,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ActivePowerPhaseC::Id: { @@ -30419,8 +31909,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ActivePowerMinPhaseC::Id: { @@ -30434,8 +31925,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ActivePowerMaxPhaseC::Id: { @@ -30449,8 +31941,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ReactivePowerPhaseC::Id: { @@ -30464,8 +31957,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ApparentPowerPhaseC::Id: { @@ -30479,8 +31973,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::PowerFactorPhaseC::Id: { @@ -30494,8 +31989,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { @@ -30509,8 +32005,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AverageRmsOverVoltageCounterPhaseC::Id: { @@ -30524,8 +32021,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::AverageRmsUnderVoltageCounterPhaseC::Id: { @@ -30539,8 +32037,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id: { @@ -30554,8 +32053,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id: { @@ -30569,8 +32069,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltageSagPeriodPhaseC::Id: { @@ -30584,8 +32085,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RmsVoltageSwellPeriodPhaseC::Id: { @@ -30599,8 +32101,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -30621,8 +32124,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -30645,8 +32149,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -30669,8 +32174,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -30693,8 +32199,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -30710,8 +32217,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -30725,8 +32233,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -30750,8 +32259,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Bitmap8::Id: { @@ -30765,8 +32275,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Bitmap16::Id: { @@ -30780,8 +32291,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Bitmap32::Id: { @@ -30795,8 +32307,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Bitmap64::Id: { @@ -30810,8 +32323,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Raw(), value); + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Int8u::Id: { @@ -30825,8 +32339,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Int16u::Id: { @@ -30840,8 +32355,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Int24u::Id: { @@ -30855,8 +32371,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Int32u::Id: { @@ -30870,8 +32387,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Int40u::Id: { @@ -30885,8 +32403,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Int48u::Id: { @@ -30900,8 +32419,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Int56u::Id: { @@ -30915,8 +32435,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Int64u::Id: { @@ -30930,8 +32451,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Int8s::Id: { @@ -30945,8 +32467,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Int16s::Id: { @@ -30960,8 +32483,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Int24s::Id: { @@ -30975,8 +32499,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Int32s::Id: { @@ -30990,8 +32515,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Int40s::Id: { @@ -31005,8 +32531,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Int48s::Id: { @@ -31020,8 +32547,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Int56s::Id: { @@ -31035,8 +32563,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Int64s::Id: { @@ -31050,8 +32579,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Enum8::Id: { @@ -31065,8 +32595,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::Enum16::Id: { @@ -31080,8 +32611,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::FloatSingle::Id: { @@ -31095,8 +32627,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jfloat jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::FloatDouble::Id: { @@ -31110,8 +32643,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Double"; std::string valueCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jdouble jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::OctetString::Id: { @@ -31147,8 +32681,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -31196,9 +32731,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_member1; std::string newElement_0_member1ClassName = "java/lang/Long"; std::string newElement_0_member1CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_member1ClassName.c_str(), - newElement_0_member1CtorSignature.c_str(), - entry_0.member1, newElement_0_member1); + jlong jninewElement_0_member1 = static_cast(entry_0.member1); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_member1ClassName.c_str(), + newElement_0_member1CtorSignature.c_str(), + jninewElement_0_member1, newElement_0_member1); jobject newElement_0_member2; jbyteArray newElement_0_member2ByteArray = env->NewByteArray(static_cast(entry_0.member2.size())); env->SetByteArrayRegion(newElement_0_member2ByteArray, 0, static_cast(entry_0.member2.size()), @@ -31278,8 +32814,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::EpochS::Id: { @@ -31293,8 +32830,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::VendorId::Id: { @@ -31308,8 +32846,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ListNullablesAndOptionalsStruct::Id: { @@ -31337,9 +32876,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string newElement_0_nullableIntClassName = "java/lang/Integer"; std::string newElement_0_nullableIntCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableInt = static_cast(entry_0.nullableInt.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableIntClassName.c_str(), newElement_0_nullableIntCtorSignature.c_str(), - entry_0.nullableInt.Value(), newElement_0_nullableInt); + jninewElement_0_nullableInt, newElement_0_nullableInt); } jobject newElement_0_optionalInt; if (!entry_0.optionalInt.HasValue()) @@ -31351,9 +32891,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_optionalIntInsideOptional; std::string newElement_0_optionalIntInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_optionalIntInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_optionalIntInsideOptional = static_cast(entry_0.optionalInt.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalIntInsideOptionalClassName.c_str(), - newElement_0_optionalIntInsideOptionalCtorSignature.c_str(), entry_0.optionalInt.Value(), + newElement_0_optionalIntInsideOptionalCtorSignature.c_str(), jninewElement_0_optionalIntInsideOptional, newElement_0_optionalIntInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalIntInsideOptional, newElement_0_optionalInt); @@ -31374,10 +32915,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string newElement_0_nullableOptionalIntInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalIntInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableOptionalIntInsideOptional = + static_cast(entry_0.nullableOptionalInt.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalIntInsideOptionalClassName.c_str(), newElement_0_nullableOptionalIntInsideOptionalCtorSignature.c_str(), - entry_0.nullableOptionalInt.Value().Value(), newElement_0_nullableOptionalIntInsideOptional); + jninewElement_0_nullableOptionalIntInsideOptional, newElement_0_nullableOptionalIntInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalIntInsideOptional, newElement_0_nullableOptionalInt); @@ -31435,21 +32978,24 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_nullableStruct_a; std::string newElement_0_nullableStruct_aClassName = "java/lang/Integer"; std::string newElement_0_nullableStruct_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableStruct_a = static_cast(entry_0.nullableStruct.Value().a); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_aClassName.c_str(), newElement_0_nullableStruct_aCtorSignature.c_str(), - entry_0.nullableStruct.Value().a, newElement_0_nullableStruct_a); + jninewElement_0_nullableStruct_a, newElement_0_nullableStruct_a); jobject newElement_0_nullableStruct_b; std::string newElement_0_nullableStruct_bClassName = "java/lang/Boolean"; std::string newElement_0_nullableStruct_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jninewElement_0_nullableStruct_b = static_cast(entry_0.nullableStruct.Value().b); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_bClassName.c_str(), newElement_0_nullableStruct_bCtorSignature.c_str(), - entry_0.nullableStruct.Value().b, newElement_0_nullableStruct_b); + jninewElement_0_nullableStruct_b, newElement_0_nullableStruct_b); jobject newElement_0_nullableStruct_c; std::string newElement_0_nullableStruct_cClassName = "java/lang/Integer"; std::string newElement_0_nullableStruct_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableStruct_c = static_cast(entry_0.nullableStruct.Value().c); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_cClassName.c_str(), newElement_0_nullableStruct_cCtorSignature.c_str(), - static_cast(entry_0.nullableStruct.Value().c), newElement_0_nullableStruct_c); + jninewElement_0_nullableStruct_c, newElement_0_nullableStruct_c); jobject newElement_0_nullableStruct_d; jbyteArray newElement_0_nullableStruct_dByteArray = env->NewByteArray(static_cast(entry_0.nullableStruct.Value().d.size())); @@ -31463,21 +33009,24 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_nullableStruct_f; std::string newElement_0_nullableStruct_fClassName = "java/lang/Integer"; std::string newElement_0_nullableStruct_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableStruct_f = static_cast(entry_0.nullableStruct.Value().f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_fClassName.c_str(), newElement_0_nullableStruct_fCtorSignature.c_str(), - entry_0.nullableStruct.Value().f.Raw(), newElement_0_nullableStruct_f); + jninewElement_0_nullableStruct_f, newElement_0_nullableStruct_f); jobject newElement_0_nullableStruct_g; std::string newElement_0_nullableStruct_gClassName = "java/lang/Float"; std::string newElement_0_nullableStruct_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jfloat jninewElement_0_nullableStruct_g = static_cast(entry_0.nullableStruct.Value().g); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_gClassName.c_str(), newElement_0_nullableStruct_gCtorSignature.c_str(), - entry_0.nullableStruct.Value().g, newElement_0_nullableStruct_g); + jninewElement_0_nullableStruct_g, newElement_0_nullableStruct_g); jobject newElement_0_nullableStruct_h; std::string newElement_0_nullableStruct_hClassName = "java/lang/Double"; std::string newElement_0_nullableStruct_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jdouble jninewElement_0_nullableStruct_h = static_cast(entry_0.nullableStruct.Value().h); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_hClassName.c_str(), newElement_0_nullableStruct_hCtorSignature.c_str(), - entry_0.nullableStruct.Value().h, newElement_0_nullableStruct_h); + jninewElement_0_nullableStruct_h, newElement_0_nullableStruct_h); jclass simpleStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -31514,24 +33063,28 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_optionalStructInsideOptional_a; std::string newElement_0_optionalStructInsideOptional_aClassName = "java/lang/Integer"; std::string newElement_0_optionalStructInsideOptional_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_optionalStructInsideOptional_a = static_cast(entry_0.optionalStruct.Value().a); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_aClassName.c_str(), - newElement_0_optionalStructInsideOptional_aCtorSignature.c_str(), entry_0.optionalStruct.Value().a, - newElement_0_optionalStructInsideOptional_a); + newElement_0_optionalStructInsideOptional_aCtorSignature.c_str(), + jninewElement_0_optionalStructInsideOptional_a, newElement_0_optionalStructInsideOptional_a); jobject newElement_0_optionalStructInsideOptional_b; std::string newElement_0_optionalStructInsideOptional_bClassName = "java/lang/Boolean"; std::string newElement_0_optionalStructInsideOptional_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jninewElement_0_optionalStructInsideOptional_b = + static_cast(entry_0.optionalStruct.Value().b); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_bClassName.c_str(), - newElement_0_optionalStructInsideOptional_bCtorSignature.c_str(), entry_0.optionalStruct.Value().b, - newElement_0_optionalStructInsideOptional_b); + newElement_0_optionalStructInsideOptional_bCtorSignature.c_str(), + jninewElement_0_optionalStructInsideOptional_b, newElement_0_optionalStructInsideOptional_b); jobject newElement_0_optionalStructInsideOptional_c; std::string newElement_0_optionalStructInsideOptional_cClassName = "java/lang/Integer"; std::string newElement_0_optionalStructInsideOptional_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_optionalStructInsideOptional_c = static_cast(entry_0.optionalStruct.Value().c); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_cClassName.c_str(), newElement_0_optionalStructInsideOptional_cCtorSignature.c_str(), - static_cast(entry_0.optionalStruct.Value().c), newElement_0_optionalStructInsideOptional_c); + jninewElement_0_optionalStructInsideOptional_c, newElement_0_optionalStructInsideOptional_c); jobject newElement_0_optionalStructInsideOptional_d; jbyteArray newElement_0_optionalStructInsideOptional_dByteArray = env->NewByteArray(static_cast(entry_0.optionalStruct.Value().d.size())); @@ -31545,24 +33098,27 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_optionalStructInsideOptional_f; std::string newElement_0_optionalStructInsideOptional_fClassName = "java/lang/Integer"; std::string newElement_0_optionalStructInsideOptional_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_optionalStructInsideOptional_f = static_cast(entry_0.optionalStruct.Value().f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_fClassName.c_str(), - newElement_0_optionalStructInsideOptional_fCtorSignature.c_str(), entry_0.optionalStruct.Value().f.Raw(), - newElement_0_optionalStructInsideOptional_f); + newElement_0_optionalStructInsideOptional_fCtorSignature.c_str(), + jninewElement_0_optionalStructInsideOptional_f, newElement_0_optionalStructInsideOptional_f); jobject newElement_0_optionalStructInsideOptional_g; std::string newElement_0_optionalStructInsideOptional_gClassName = "java/lang/Float"; std::string newElement_0_optionalStructInsideOptional_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jfloat jninewElement_0_optionalStructInsideOptional_g = static_cast(entry_0.optionalStruct.Value().g); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_gClassName.c_str(), - newElement_0_optionalStructInsideOptional_gCtorSignature.c_str(), entry_0.optionalStruct.Value().g, - newElement_0_optionalStructInsideOptional_g); + newElement_0_optionalStructInsideOptional_gCtorSignature.c_str(), + jninewElement_0_optionalStructInsideOptional_g, newElement_0_optionalStructInsideOptional_g); jobject newElement_0_optionalStructInsideOptional_h; std::string newElement_0_optionalStructInsideOptional_hClassName = "java/lang/Double"; std::string newElement_0_optionalStructInsideOptional_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jdouble jninewElement_0_optionalStructInsideOptional_h = static_cast(entry_0.optionalStruct.Value().h); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_hClassName.c_str(), - newElement_0_optionalStructInsideOptional_hCtorSignature.c_str(), entry_0.optionalStruct.Value().h, - newElement_0_optionalStructInsideOptional_h); + newElement_0_optionalStructInsideOptional_hCtorSignature.c_str(), + jninewElement_0_optionalStructInsideOptional_h, newElement_0_optionalStructInsideOptional_h); jclass simpleStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -31608,24 +33164,32 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_nullableOptionalStructInsideOptional_a; std::string newElement_0_nullableOptionalStructInsideOptional_aClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalStructInsideOptional_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableOptionalStructInsideOptional_a = + static_cast(entry_0.nullableOptionalStruct.Value().Value().a); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_aClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_aCtorSignature.c_str(), - entry_0.nullableOptionalStruct.Value().Value().a, newElement_0_nullableOptionalStructInsideOptional_a); + jninewElement_0_nullableOptionalStructInsideOptional_a, + newElement_0_nullableOptionalStructInsideOptional_a); jobject newElement_0_nullableOptionalStructInsideOptional_b; std::string newElement_0_nullableOptionalStructInsideOptional_bClassName = "java/lang/Boolean"; std::string newElement_0_nullableOptionalStructInsideOptional_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jninewElement_0_nullableOptionalStructInsideOptional_b = + static_cast(entry_0.nullableOptionalStruct.Value().Value().b); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_bClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_bCtorSignature.c_str(), - entry_0.nullableOptionalStruct.Value().Value().b, newElement_0_nullableOptionalStructInsideOptional_b); + jninewElement_0_nullableOptionalStructInsideOptional_b, + newElement_0_nullableOptionalStructInsideOptional_b); jobject newElement_0_nullableOptionalStructInsideOptional_c; std::string newElement_0_nullableOptionalStructInsideOptional_cClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalStructInsideOptional_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableOptionalStructInsideOptional_c = + static_cast(entry_0.nullableOptionalStruct.Value().Value().c); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_cClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_cCtorSignature.c_str(), - static_cast(entry_0.nullableOptionalStruct.Value().Value().c), + jninewElement_0_nullableOptionalStructInsideOptional_c, newElement_0_nullableOptionalStructInsideOptional_c); jobject newElement_0_nullableOptionalStructInsideOptional_d; jbyteArray newElement_0_nullableOptionalStructInsideOptional_dByteArray = @@ -31642,25 +33206,33 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_nullableOptionalStructInsideOptional_f; std::string newElement_0_nullableOptionalStructInsideOptional_fClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalStructInsideOptional_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableOptionalStructInsideOptional_f = + static_cast(entry_0.nullableOptionalStruct.Value().Value().f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_fClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_fCtorSignature.c_str(), - entry_0.nullableOptionalStruct.Value().Value().f.Raw(), + jninewElement_0_nullableOptionalStructInsideOptional_f, newElement_0_nullableOptionalStructInsideOptional_f); jobject newElement_0_nullableOptionalStructInsideOptional_g; std::string newElement_0_nullableOptionalStructInsideOptional_gClassName = "java/lang/Float"; std::string newElement_0_nullableOptionalStructInsideOptional_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jfloat jninewElement_0_nullableOptionalStructInsideOptional_g = + static_cast(entry_0.nullableOptionalStruct.Value().Value().g); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_gClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_gCtorSignature.c_str(), - entry_0.nullableOptionalStruct.Value().Value().g, newElement_0_nullableOptionalStructInsideOptional_g); + jninewElement_0_nullableOptionalStructInsideOptional_g, + newElement_0_nullableOptionalStructInsideOptional_g); jobject newElement_0_nullableOptionalStructInsideOptional_h; std::string newElement_0_nullableOptionalStructInsideOptional_hClassName = "java/lang/Double"; std::string newElement_0_nullableOptionalStructInsideOptional_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jdouble jninewElement_0_nullableOptionalStructInsideOptional_h = + static_cast(entry_0.nullableOptionalStruct.Value().Value().h); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_hClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_hCtorSignature.c_str(), - entry_0.nullableOptionalStruct.Value().Value().h, newElement_0_nullableOptionalStructInsideOptional_h); + jninewElement_0_nullableOptionalStructInsideOptional_h, + newElement_0_nullableOptionalStructInsideOptional_h); jclass simpleStructStructClass_4; err = chip::JniReferences::GetInstance().GetClassRef( @@ -31710,9 +33282,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_3; std::string newElement_3ClassName = "java/lang/Integer"; std::string newElement_3CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3ClassName.c_str(), - newElement_3CtorSignature.c_str(), - static_cast(entry_3), newElement_3); + jint jninewElement_3 = static_cast(entry_3); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); chip::JniReferences::GetInstance().AddToList(newElement_0_nullableList, newElement_3); } } @@ -31733,9 +33305,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_3; std::string newElement_3ClassName = "java/lang/Integer"; std::string newElement_3CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3ClassName.c_str(), - newElement_3CtorSignature.c_str(), - static_cast(entry_3), newElement_3); + jint jninewElement_3 = static_cast(entry_3); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); chip::JniReferences::GetInstance().AddToList(newElement_0_optionalListInsideOptional, newElement_3); } chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalListInsideOptional, @@ -31765,9 +33337,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_4; std::string newElement_4ClassName = "java/lang/Integer"; std::string newElement_4CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_4ClassName.c_str(), newElement_4CtorSignature.c_str(), static_cast(entry_4), - newElement_4); + jint jninewElement_4 = static_cast(entry_4); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_4ClassName.c_str(), newElement_4CtorSignature.c_str(), jninewElement_4, newElement_4); chip::JniReferences::GetInstance().AddToList(newElement_0_nullableOptionalListInsideOptional, newElement_4); } @@ -31817,8 +33389,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::StructAttr::Id: { @@ -31833,18 +33406,21 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_a; std::string value_aClassName = "java/lang/Integer"; std::string value_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_aClassName.c_str(), value_aCtorSignature.c_str(), - cppValue.a, value_a); + jint jnivalue_a = static_cast(cppValue.a); + chip::JniReferences::GetInstance().CreateBoxedObject(value_aClassName.c_str(), value_aCtorSignature.c_str(), + jnivalue_a, value_a); jobject value_b; std::string value_bClassName = "java/lang/Boolean"; std::string value_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_bClassName.c_str(), value_bCtorSignature.c_str(), - cppValue.b, value_b); + jboolean jnivalue_b = static_cast(cppValue.b); + chip::JniReferences::GetInstance().CreateBoxedObject(value_bClassName.c_str(), value_bCtorSignature.c_str(), + jnivalue_b, value_b); jobject value_c; std::string value_cClassName = "java/lang/Integer"; std::string value_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_cClassName.c_str(), value_cCtorSignature.c_str(), - static_cast(cppValue.c), value_c); + jint jnivalue_c = static_cast(cppValue.c); + chip::JniReferences::GetInstance().CreateBoxedObject(value_cClassName.c_str(), value_cCtorSignature.c_str(), + jnivalue_c, value_c); jobject value_d; jbyteArray value_dByteArray = env->NewByteArray(static_cast(cppValue.d.size())); env->SetByteArrayRegion(value_dByteArray, 0, static_cast(cppValue.d.size()), @@ -31855,18 +33431,21 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_f; std::string value_fClassName = "java/lang/Integer"; std::string value_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_fClassName.c_str(), value_fCtorSignature.c_str(), - cppValue.f.Raw(), value_f); + jint jnivalue_f = static_cast(cppValue.f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_fClassName.c_str(), value_fCtorSignature.c_str(), + jnivalue_f, value_f); jobject value_g; std::string value_gClassName = "java/lang/Float"; std::string value_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_gClassName.c_str(), value_gCtorSignature.c_str(), - cppValue.g, value_g); + jfloat jnivalue_g = static_cast(cppValue.g); + chip::JniReferences::GetInstance().CreateBoxedObject(value_gClassName.c_str(), value_gCtorSignature.c_str(), + jnivalue_g, value_g); jobject value_h; std::string value_hClassName = "java/lang/Double"; std::string value_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_hClassName.c_str(), value_hCtorSignature.c_str(), - cppValue.h, value_h); + jdouble jnivalue_h = static_cast(cppValue.h); + chip::JniReferences::GetInstance().CreateBoxedObject(value_hClassName.c_str(), value_hCtorSignature.c_str(), + jnivalue_h, value_h); jclass simpleStructStructClass_0; err = chip::JniReferences::GetInstance().GetClassRef( @@ -31901,8 +33480,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RangeRestrictedInt8s::Id: { @@ -31916,8 +33496,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RangeRestrictedInt16u::Id: { @@ -31931,8 +33512,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::RangeRestrictedInt16s::Id: { @@ -31946,8 +33528,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::ListLongOctetString::Id: { @@ -31993,9 +33576,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_fabricSensitiveInt8u; std::string newElement_0_fabricSensitiveInt8uClassName = "java/lang/Integer"; std::string newElement_0_fabricSensitiveInt8uCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_fabricSensitiveInt8u = static_cast(entry_0.fabricSensitiveInt8u); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveInt8uClassName.c_str(), newElement_0_fabricSensitiveInt8uCtorSignature.c_str(), - entry_0.fabricSensitiveInt8u, newElement_0_fabricSensitiveInt8u); + jninewElement_0_fabricSensitiveInt8u, newElement_0_fabricSensitiveInt8u); jobject newElement_0_optionalFabricSensitiveInt8u; if (!entry_0.optionalFabricSensitiveInt8u.HasValue()) { @@ -32006,10 +33590,13 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_optionalFabricSensitiveInt8uInsideOptional; std::string newElement_0_optionalFabricSensitiveInt8uInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_optionalFabricSensitiveInt8uInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_optionalFabricSensitiveInt8uInsideOptional = + static_cast(entry_0.optionalFabricSensitiveInt8u.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalFabricSensitiveInt8uInsideOptionalClassName.c_str(), newElement_0_optionalFabricSensitiveInt8uInsideOptionalCtorSignature.c_str(), - entry_0.optionalFabricSensitiveInt8u.Value(), newElement_0_optionalFabricSensitiveInt8uInsideOptional); + jninewElement_0_optionalFabricSensitiveInt8uInsideOptional, + newElement_0_optionalFabricSensitiveInt8uInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalFabricSensitiveInt8uInsideOptional, newElement_0_optionalFabricSensitiveInt8u); } @@ -32022,10 +33609,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string newElement_0_nullableFabricSensitiveInt8uClassName = "java/lang/Integer"; std::string newElement_0_nullableFabricSensitiveInt8uCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableFabricSensitiveInt8u = + static_cast(entry_0.nullableFabricSensitiveInt8u.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableFabricSensitiveInt8uClassName.c_str(), newElement_0_nullableFabricSensitiveInt8uCtorSignature.c_str(), - entry_0.nullableFabricSensitiveInt8u.Value(), newElement_0_nullableFabricSensitiveInt8u); + jninewElement_0_nullableFabricSensitiveInt8u, newElement_0_nullableFabricSensitiveInt8u); } jobject newElement_0_nullableOptionalFabricSensitiveInt8u; if (!entry_0.nullableOptionalFabricSensitiveInt8u.HasValue()) @@ -32043,10 +33632,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional = + static_cast(entry_0.nullableOptionalFabricSensitiveInt8u.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalClassName.c_str(), newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalCtorSignature.c_str(), - entry_0.nullableOptionalFabricSensitiveInt8u.Value().Value(), + jninewElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional, newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional); } chip::JniReferences::GetInstance().CreateOptional( @@ -32060,24 +33651,27 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_fabricSensitiveStruct_a; std::string newElement_0_fabricSensitiveStruct_aClassName = "java/lang/Integer"; std::string newElement_0_fabricSensitiveStruct_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_fabricSensitiveStruct_a = static_cast(entry_0.fabricSensitiveStruct.a); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_aClassName.c_str(), - newElement_0_fabricSensitiveStruct_aCtorSignature.c_str(), entry_0.fabricSensitiveStruct.a, + newElement_0_fabricSensitiveStruct_aCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_a, newElement_0_fabricSensitiveStruct_a); jobject newElement_0_fabricSensitiveStruct_b; std::string newElement_0_fabricSensitiveStruct_bClassName = "java/lang/Boolean"; std::string newElement_0_fabricSensitiveStruct_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jninewElement_0_fabricSensitiveStruct_b = static_cast(entry_0.fabricSensitiveStruct.b); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_bClassName.c_str(), - newElement_0_fabricSensitiveStruct_bCtorSignature.c_str(), entry_0.fabricSensitiveStruct.b, + newElement_0_fabricSensitiveStruct_bCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_b, newElement_0_fabricSensitiveStruct_b); jobject newElement_0_fabricSensitiveStruct_c; std::string newElement_0_fabricSensitiveStruct_cClassName = "java/lang/Integer"; std::string newElement_0_fabricSensitiveStruct_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_fabricSensitiveStruct_c = static_cast(entry_0.fabricSensitiveStruct.c); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_cClassName.c_str(), - newElement_0_fabricSensitiveStruct_cCtorSignature.c_str(), - static_cast(entry_0.fabricSensitiveStruct.c), newElement_0_fabricSensitiveStruct_c); + newElement_0_fabricSensitiveStruct_cCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_c, + newElement_0_fabricSensitiveStruct_c); jobject newElement_0_fabricSensitiveStruct_d; jbyteArray newElement_0_fabricSensitiveStruct_dByteArray = env->NewByteArray(static_cast(entry_0.fabricSensitiveStruct.d.size())); @@ -32091,23 +33685,26 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_fabricSensitiveStruct_f; std::string newElement_0_fabricSensitiveStruct_fClassName = "java/lang/Integer"; std::string newElement_0_fabricSensitiveStruct_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_fabricSensitiveStruct_f = static_cast(entry_0.fabricSensitiveStruct.f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_fClassName.c_str(), - newElement_0_fabricSensitiveStruct_fCtorSignature.c_str(), entry_0.fabricSensitiveStruct.f.Raw(), + newElement_0_fabricSensitiveStruct_fCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_f, newElement_0_fabricSensitiveStruct_f); jobject newElement_0_fabricSensitiveStruct_g; std::string newElement_0_fabricSensitiveStruct_gClassName = "java/lang/Float"; std::string newElement_0_fabricSensitiveStruct_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jfloat jninewElement_0_fabricSensitiveStruct_g = static_cast(entry_0.fabricSensitiveStruct.g); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_gClassName.c_str(), - newElement_0_fabricSensitiveStruct_gCtorSignature.c_str(), entry_0.fabricSensitiveStruct.g, + newElement_0_fabricSensitiveStruct_gCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_g, newElement_0_fabricSensitiveStruct_g); jobject newElement_0_fabricSensitiveStruct_h; std::string newElement_0_fabricSensitiveStruct_hClassName = "java/lang/Double"; std::string newElement_0_fabricSensitiveStruct_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jdouble jninewElement_0_fabricSensitiveStruct_h = static_cast(entry_0.fabricSensitiveStruct.h); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_hClassName.c_str(), - newElement_0_fabricSensitiveStruct_hCtorSignature.c_str(), entry_0.fabricSensitiveStruct.h, + newElement_0_fabricSensitiveStruct_hCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_h, newElement_0_fabricSensitiveStruct_h); jclass simpleStructStructClass_2; @@ -32144,16 +33741,18 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_2; std::string newElement_2ClassName = "java/lang/Integer"; std::string newElement_2CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), entry_2, newElement_2); + jint jninewElement_2 = static_cast(entry_2); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); chip::JniReferences::GetInstance().AddToList(newElement_0_fabricSensitiveInt8uList, newElement_2); } jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass testFabricScopedStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -32193,8 +33792,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::GeneralErrorBoolean::Id: { @@ -32208,8 +33808,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterErrorBoolean::Id: { @@ -32223,8 +33824,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::Unsupported::Id: { @@ -32238,8 +33840,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, - value); + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::NullableBoolean::Id: { @@ -32259,8 +33862,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jboolean jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32281,8 +33885,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value().Raw(), value); + jint jnivalue = static_cast(cppValue.Value().Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32303,8 +33908,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value().Raw(), value); + jint jnivalue = static_cast(cppValue.Value().Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32325,8 +33931,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value().Raw(), value); + jlong jnivalue = static_cast(cppValue.Value().Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32347,8 +33954,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value().Raw(), value); + jlong jnivalue = static_cast(cppValue.Value().Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32369,8 +33977,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32391,8 +34000,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32413,8 +34023,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32435,8 +34046,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32457,8 +34069,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32479,8 +34092,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32501,8 +34115,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32523,8 +34138,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32545,8 +34161,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32567,8 +34184,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32589,8 +34207,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32611,8 +34230,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32633,8 +34253,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32655,8 +34276,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32677,8 +34299,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32699,8 +34322,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32721,8 +34345,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32743,8 +34368,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32765,8 +34391,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jfloat jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32787,8 +34414,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Double"; std::string valueCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jdouble jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32850,8 +34478,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue.Value()), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32873,18 +34502,21 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_a; std::string value_aClassName = "java/lang/Integer"; std::string value_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_aClassName.c_str(), value_aCtorSignature.c_str(), cppValue.Value().a, value_a); + jint jnivalue_a = static_cast(cppValue.Value().a); + chip::JniReferences::GetInstance().CreateBoxedObject(value_aClassName.c_str(), value_aCtorSignature.c_str(), + jnivalue_a, value_a); jobject value_b; std::string value_bClassName = "java/lang/Boolean"; std::string value_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_bClassName.c_str(), value_bCtorSignature.c_str(), - cppValue.Value().b, value_b); + jboolean jnivalue_b = static_cast(cppValue.Value().b); + chip::JniReferences::GetInstance().CreateBoxedObject(value_bClassName.c_str(), + value_bCtorSignature.c_str(), jnivalue_b, value_b); jobject value_c; std::string value_cClassName = "java/lang/Integer"; std::string value_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_cClassName.c_str(), value_cCtorSignature.c_str(), static_cast(cppValue.Value().c), value_c); + jint jnivalue_c = static_cast(cppValue.Value().c); + chip::JniReferences::GetInstance().CreateBoxedObject(value_cClassName.c_str(), value_cCtorSignature.c_str(), + jnivalue_c, value_c); jobject value_d; jbyteArray value_dByteArray = env->NewByteArray(static_cast(cppValue.Value().d.size())); env->SetByteArrayRegion(value_dByteArray, 0, static_cast(cppValue.Value().d.size()), @@ -32895,18 +34527,21 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_f; std::string value_fClassName = "java/lang/Integer"; std::string value_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_fClassName.c_str(), value_fCtorSignature.c_str(), cppValue.Value().f.Raw(), value_f); + jint jnivalue_f = static_cast(cppValue.Value().f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_fClassName.c_str(), value_fCtorSignature.c_str(), + jnivalue_f, value_f); jobject value_g; std::string value_gClassName = "java/lang/Float"; std::string value_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_gClassName.c_str(), value_gCtorSignature.c_str(), - cppValue.Value().g, value_g); + jfloat jnivalue_g = static_cast(cppValue.Value().g); + chip::JniReferences::GetInstance().CreateBoxedObject(value_gClassName.c_str(), value_gCtorSignature.c_str(), + jnivalue_g, value_g); jobject value_h; std::string value_hClassName = "java/lang/Double"; std::string value_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_hClassName.c_str(), value_hCtorSignature.c_str(), - cppValue.Value().h, value_h); + jdouble jnivalue_h = static_cast(cppValue.Value().h); + chip::JniReferences::GetInstance().CreateBoxedObject(value_hClassName.c_str(), + value_hCtorSignature.c_str(), jnivalue_h, value_h); jclass simpleStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -32948,8 +34583,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32970,8 +34606,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -32992,8 +34629,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -33014,8 +34652,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -33030,8 +34669,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } case Attributes::GeneratedCommandList::Id: { @@ -33052,8 +34692,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -33076,8 +34717,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -33100,8 +34742,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -33124,8 +34767,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -33141,8 +34785,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -33156,8 +34801,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: @@ -33188,8 +34834,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -33212,8 +34859,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -33236,8 +34884,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -33260,8 +34909,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -33277,8 +34927,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { @@ -33292,8 +34943,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } default: diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 6dc58a8b49ab40..245413bb6abe30 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -157,9 +157,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_adminNodeIDClassName = "java/lang/Long"; std::string value_adminNodeIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_adminNodeIDClassName.c_str(), - value_adminNodeIDCtorSignature.c_str(), - cppValue.adminNodeID.Value(), value_adminNodeID); + jlong jnivalue_adminNodeID = static_cast(cppValue.adminNodeID.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_adminNodeIDClassName.c_str(), + value_adminNodeIDCtorSignature.c_str(), + jnivalue_adminNodeID, value_adminNodeID); } jobject value_adminPasscodeID; @@ -171,17 +172,18 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_adminPasscodeIDClassName = "java/lang/Integer"; std::string value_adminPasscodeIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_adminPasscodeIDClassName.c_str(), value_adminPasscodeIDCtorSignature.c_str(), - cppValue.adminPasscodeID.Value(), value_adminPasscodeID); + jint jnivalue_adminPasscodeID = static_cast(cppValue.adminPasscodeID.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_adminPasscodeIDClassName.c_str(), + value_adminPasscodeIDCtorSignature.c_str(), + jnivalue_adminPasscodeID, value_adminPasscodeID); } jobject value_changeType; std::string value_changeTypeClassName = "java/lang/Integer"; std::string value_changeTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_changeTypeClassName.c_str(), value_changeTypeCtorSignature.c_str(), static_cast(cppValue.changeType), - value_changeType); + jint jnivalue_changeType = static_cast(cppValue.changeType); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_changeTypeClassName.c_str(), value_changeTypeCtorSignature.c_str(), jnivalue_changeType, value_changeType); jobject value_latestValue; if (cppValue.latestValue.IsNull()) @@ -193,15 +195,17 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_latestValue_privilege; std::string value_latestValue_privilegeClassName = "java/lang/Integer"; std::string value_latestValue_privilegeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jnivalue_latestValue_privilege = static_cast(cppValue.latestValue.Value().privilege); + chip::JniReferences::GetInstance().CreateBoxedObject( value_latestValue_privilegeClassName.c_str(), value_latestValue_privilegeCtorSignature.c_str(), - static_cast(cppValue.latestValue.Value().privilege), value_latestValue_privilege); + jnivalue_latestValue_privilege, value_latestValue_privilege); jobject value_latestValue_authMode; std::string value_latestValue_authModeClassName = "java/lang/Integer"; std::string value_latestValue_authModeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jnivalue_latestValue_authMode = static_cast(cppValue.latestValue.Value().authMode); + chip::JniReferences::GetInstance().CreateBoxedObject( value_latestValue_authModeClassName.c_str(), value_latestValue_authModeCtorSignature.c_str(), - static_cast(cppValue.latestValue.Value().authMode), value_latestValue_authMode); + jnivalue_latestValue_authMode, value_latestValue_authMode); jobject value_latestValue_subjects; if (cppValue.latestValue.Value().subjects.IsNull()) { @@ -218,8 +222,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_3; std::string newElement_3ClassName = "java/lang/Long"; std::string newElement_3CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), entry_3, newElement_3); + jlong jninewElement_3 = static_cast(entry_3); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); chip::JniReferences::GetInstance().AddToList(value_latestValue_subjects, newElement_3); } } @@ -246,9 +251,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string newElement_3_clusterClassName = "java/lang/Long"; std::string newElement_3_clusterCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_3_cluster = static_cast(entry_3.cluster.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3_clusterClassName.c_str(), newElement_3_clusterCtorSignature.c_str(), - entry_3.cluster.Value(), newElement_3_cluster); + jninewElement_3_cluster, newElement_3_cluster); } jobject newElement_3_endpoint; if (entry_3.endpoint.IsNull()) @@ -259,9 +265,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string newElement_3_endpointClassName = "java/lang/Integer"; std::string newElement_3_endpointCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_3_endpoint = static_cast(entry_3.endpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3_endpointClassName.c_str(), newElement_3_endpointCtorSignature.c_str(), - entry_3.endpoint.Value(), newElement_3_endpoint); + jninewElement_3_endpoint, newElement_3_endpoint); } jobject newElement_3_deviceType; if (entry_3.deviceType.IsNull()) @@ -272,9 +279,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string newElement_3_deviceTypeClassName = "java/lang/Long"; std::string newElement_3_deviceTypeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_3_deviceType = static_cast(entry_3.deviceType.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3_deviceTypeClassName.c_str(), newElement_3_deviceTypeCtorSignature.c_str(), - entry_3.deviceType.Value(), newElement_3_deviceType); + jninewElement_3_deviceType, newElement_3_deviceType); } jclass accessControlTargetStructStructClass_4; @@ -304,9 +312,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_latestValue_fabricIndex; std::string value_latestValue_fabricIndexClassName = "java/lang/Integer"; std::string value_latestValue_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jnivalue_latestValue_fabricIndex = static_cast(cppValue.latestValue.Value().fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject( value_latestValue_fabricIndexClassName.c_str(), value_latestValue_fabricIndexCtorSignature.c_str(), - cppValue.latestValue.Value().fabricIndex, value_latestValue_fabricIndex); + jnivalue_latestValue_fabricIndex, value_latestValue_fabricIndex); jclass accessControlEntryStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -335,9 +344,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_fabricIndex; std::string value_fabricIndexClassName = "java/lang/Integer"; std::string value_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), - value_fabricIndexCtorSignature.c_str(), - cppValue.fabricIndex, value_fabricIndex); + jint jnivalue_fabricIndex = static_cast(cppValue.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), jnivalue_fabricIndex, + value_fabricIndex); jclass accessControlEntryChangedStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -380,9 +390,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_adminNodeIDClassName = "java/lang/Long"; std::string value_adminNodeIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_adminNodeIDClassName.c_str(), - value_adminNodeIDCtorSignature.c_str(), - cppValue.adminNodeID.Value(), value_adminNodeID); + jlong jnivalue_adminNodeID = static_cast(cppValue.adminNodeID.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_adminNodeIDClassName.c_str(), + value_adminNodeIDCtorSignature.c_str(), + jnivalue_adminNodeID, value_adminNodeID); } jobject value_adminPasscodeID; @@ -394,17 +405,18 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_adminPasscodeIDClassName = "java/lang/Integer"; std::string value_adminPasscodeIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_adminPasscodeIDClassName.c_str(), value_adminPasscodeIDCtorSignature.c_str(), - cppValue.adminPasscodeID.Value(), value_adminPasscodeID); + jint jnivalue_adminPasscodeID = static_cast(cppValue.adminPasscodeID.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_adminPasscodeIDClassName.c_str(), + value_adminPasscodeIDCtorSignature.c_str(), + jnivalue_adminPasscodeID, value_adminPasscodeID); } jobject value_changeType; std::string value_changeTypeClassName = "java/lang/Integer"; std::string value_changeTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_changeTypeClassName.c_str(), value_changeTypeCtorSignature.c_str(), static_cast(cppValue.changeType), - value_changeType); + jint jnivalue_changeType = static_cast(cppValue.changeType); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_changeTypeClassName.c_str(), value_changeTypeCtorSignature.c_str(), jnivalue_changeType, value_changeType); jobject value_latestValue; if (cppValue.latestValue.IsNull()) @@ -423,9 +435,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_latestValue_fabricIndex; std::string value_latestValue_fabricIndexClassName = "java/lang/Integer"; std::string value_latestValue_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jnivalue_latestValue_fabricIndex = static_cast(cppValue.latestValue.Value().fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject( value_latestValue_fabricIndexClassName.c_str(), value_latestValue_fabricIndexCtorSignature.c_str(), - cppValue.latestValue.Value().fabricIndex, value_latestValue_fabricIndex); + jnivalue_latestValue_fabricIndex, value_latestValue_fabricIndex); jclass accessControlExtensionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -452,9 +465,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_fabricIndex; std::string value_fabricIndexClassName = "java/lang/Integer"; std::string value_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), - value_fabricIndexCtorSignature.c_str(), - cppValue.fabricIndex, value_fabricIndex); + jint jnivalue_fabricIndex = static_cast(cppValue.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), jnivalue_fabricIndex, + value_fabricIndex); jclass accessControlExtensionChangedStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -502,21 +516,23 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_actionID; std::string value_actionIDClassName = "java/lang/Integer"; std::string value_actionIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_actionIDClassName.c_str(), value_actionIDCtorSignature.c_str(), cppValue.actionID, value_actionID); + jint jnivalue_actionID = static_cast(cppValue.actionID); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_actionIDClassName.c_str(), value_actionIDCtorSignature.c_str(), jnivalue_actionID, value_actionID); jobject value_invokeID; std::string value_invokeIDClassName = "java/lang/Long"; std::string value_invokeIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_invokeIDClassName.c_str(), value_invokeIDCtorSignature.c_str(), cppValue.invokeID, value_invokeID); + jlong jnivalue_invokeID = static_cast(cppValue.invokeID); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_invokeIDClassName.c_str(), value_invokeIDCtorSignature.c_str(), jnivalue_invokeID, value_invokeID); jobject value_newState; std::string value_newStateClassName = "java/lang/Integer"; std::string value_newStateCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_newStateClassName.c_str(), - value_newStateCtorSignature.c_str(), - static_cast(cppValue.newState), value_newState); + jint jnivalue_newState = static_cast(cppValue.newState); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_newStateClassName.c_str(), value_newStateCtorSignature.c_str(), jnivalue_newState, value_newState); jclass stateChangedStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -549,27 +565,30 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_actionID; std::string value_actionIDClassName = "java/lang/Integer"; std::string value_actionIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_actionIDClassName.c_str(), value_actionIDCtorSignature.c_str(), cppValue.actionID, value_actionID); + jint jnivalue_actionID = static_cast(cppValue.actionID); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_actionIDClassName.c_str(), value_actionIDCtorSignature.c_str(), jnivalue_actionID, value_actionID); jobject value_invokeID; std::string value_invokeIDClassName = "java/lang/Long"; std::string value_invokeIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_invokeIDClassName.c_str(), value_invokeIDCtorSignature.c_str(), cppValue.invokeID, value_invokeID); + jlong jnivalue_invokeID = static_cast(cppValue.invokeID); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_invokeIDClassName.c_str(), value_invokeIDCtorSignature.c_str(), jnivalue_invokeID, value_invokeID); jobject value_newState; std::string value_newStateClassName = "java/lang/Integer"; std::string value_newStateCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_newStateClassName.c_str(), - value_newStateCtorSignature.c_str(), - static_cast(cppValue.newState), value_newState); + jint jnivalue_newState = static_cast(cppValue.newState); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_newStateClassName.c_str(), value_newStateCtorSignature.c_str(), jnivalue_newState, value_newState); jobject value_error; std::string value_errorClassName = "java/lang/Integer"; std::string value_errorCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_errorClassName.c_str(), value_errorCtorSignature.c_str(), static_cast(cppValue.error), value_error); + jint jnivalue_error = static_cast(cppValue.error); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_errorClassName.c_str(), value_errorCtorSignature.c_str(), jnivalue_error, value_error); jclass actionFailedStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -612,9 +631,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_softwareVersion; std::string value_softwareVersionClassName = "java/lang/Long"; std::string value_softwareVersionCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_softwareVersionClassName.c_str(), - value_softwareVersionCtorSignature.c_str(), - cppValue.softwareVersion, value_softwareVersion); + jlong jnivalue_softwareVersion = static_cast(cppValue.softwareVersion); + chip::JniReferences::GetInstance().CreateBoxedObject(value_softwareVersionClassName.c_str(), + value_softwareVersionCtorSignature.c_str(), + jnivalue_softwareVersion, value_softwareVersion); jclass startUpStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -671,9 +691,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_fabricIndex; std::string value_fabricIndexClassName = "java/lang/Integer"; std::string value_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), - value_fabricIndexCtorSignature.c_str(), - cppValue.fabricIndex, value_fabricIndex); + jint jnivalue_fabricIndex = static_cast(cppValue.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), jnivalue_fabricIndex, + value_fabricIndex); jclass leaveStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -704,9 +725,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_reachableNewValue; std::string value_reachableNewValueClassName = "java/lang/Boolean"; std::string value_reachableNewValueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_reachableNewValueClassName.c_str(), - value_reachableNewValueCtorSignature.c_str(), - cppValue.reachableNewValue, value_reachableNewValue); + jboolean jnivalue_reachableNewValue = static_cast(cppValue.reachableNewValue); + chip::JniReferences::GetInstance().CreateBoxedObject(value_reachableNewValueClassName.c_str(), + value_reachableNewValueCtorSignature.c_str(), + jnivalue_reachableNewValue, value_reachableNewValue); jclass reachableChangedStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -759,23 +781,24 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_previousState; std::string value_previousStateClassName = "java/lang/Integer"; std::string value_previousStateCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_previousStateClassName.c_str(), value_previousStateCtorSignature.c_str(), - static_cast(cppValue.previousState), value_previousState); + jint jnivalue_previousState = static_cast(cppValue.previousState); + chip::JniReferences::GetInstance().CreateBoxedObject(value_previousStateClassName.c_str(), + value_previousStateCtorSignature.c_str(), + jnivalue_previousState, value_previousState); jobject value_newState; std::string value_newStateClassName = "java/lang/Integer"; std::string value_newStateCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_newStateClassName.c_str(), - value_newStateCtorSignature.c_str(), - static_cast(cppValue.newState), value_newState); + jint jnivalue_newState = static_cast(cppValue.newState); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_newStateClassName.c_str(), value_newStateCtorSignature.c_str(), jnivalue_newState, value_newState); jobject value_reason; std::string value_reasonClassName = "java/lang/Integer"; std::string value_reasonCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_reasonClassName.c_str(), - value_reasonCtorSignature.c_str(), - static_cast(cppValue.reason), value_reason); + jint jnivalue_reason = static_cast(cppValue.reason); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_reasonClassName.c_str(), value_reasonCtorSignature.c_str(), jnivalue_reason, value_reason); jobject value_targetSoftwareVersion; if (cppValue.targetSoftwareVersion.IsNull()) @@ -786,9 +809,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_targetSoftwareVersionClassName = "java/lang/Long"; std::string value_targetSoftwareVersionCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jnivalue_targetSoftwareVersion = static_cast(cppValue.targetSoftwareVersion.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( value_targetSoftwareVersionClassName.c_str(), value_targetSoftwareVersionCtorSignature.c_str(), - cppValue.targetSoftwareVersion.Value(), value_targetSoftwareVersion); + jnivalue_targetSoftwareVersion, value_targetSoftwareVersion); } jclass stateTransitionStructClass; @@ -825,15 +849,17 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_softwareVersion; std::string value_softwareVersionClassName = "java/lang/Long"; std::string value_softwareVersionCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_softwareVersionClassName.c_str(), - value_softwareVersionCtorSignature.c_str(), - cppValue.softwareVersion, value_softwareVersion); + jlong jnivalue_softwareVersion = static_cast(cppValue.softwareVersion); + chip::JniReferences::GetInstance().CreateBoxedObject(value_softwareVersionClassName.c_str(), + value_softwareVersionCtorSignature.c_str(), + jnivalue_softwareVersion, value_softwareVersion); jobject value_productID; std::string value_productIDClassName = "java/lang/Integer"; std::string value_productIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_productIDClassName.c_str(), value_productIDCtorSignature.c_str(), cppValue.productID, value_productID); + jint jnivalue_productID = static_cast(cppValue.productID); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_productIDClassName.c_str(), value_productIDCtorSignature.c_str(), jnivalue_productID, value_productID); jclass versionAppliedStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -868,16 +894,18 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_softwareVersion; std::string value_softwareVersionClassName = "java/lang/Long"; std::string value_softwareVersionCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_softwareVersionClassName.c_str(), - value_softwareVersionCtorSignature.c_str(), - cppValue.softwareVersion, value_softwareVersion); + jlong jnivalue_softwareVersion = static_cast(cppValue.softwareVersion); + chip::JniReferences::GetInstance().CreateBoxedObject(value_softwareVersionClassName.c_str(), + value_softwareVersionCtorSignature.c_str(), + jnivalue_softwareVersion, value_softwareVersion); jobject value_bytesDownloaded; std::string value_bytesDownloadedClassName = "java/lang/Long"; std::string value_bytesDownloadedCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_bytesDownloadedClassName.c_str(), - value_bytesDownloadedCtorSignature.c_str(), - cppValue.bytesDownloaded, value_bytesDownloaded); + jlong jnivalue_bytesDownloaded = static_cast(cppValue.bytesDownloaded); + chip::JniReferences::GetInstance().CreateBoxedObject(value_bytesDownloadedClassName.c_str(), + value_bytesDownloadedCtorSignature.c_str(), + jnivalue_bytesDownloaded, value_bytesDownloaded); jobject value_progressPercent; if (cppValue.progressPercent.IsNull()) @@ -888,9 +916,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_progressPercentClassName = "java/lang/Integer"; std::string value_progressPercentCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_progressPercentClassName.c_str(), value_progressPercentCtorSignature.c_str(), - cppValue.progressPercent.Value(), value_progressPercent); + jint jnivalue_progressPercent = static_cast(cppValue.progressPercent.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_progressPercentClassName.c_str(), + value_progressPercentCtorSignature.c_str(), + jnivalue_progressPercent, value_progressPercent); } jobject value_platformCode; @@ -902,9 +931,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_platformCodeClassName = "java/lang/Long"; std::string value_platformCodeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_platformCodeClassName.c_str(), - value_platformCodeCtorSignature.c_str(), - cppValue.platformCode.Value(), value_platformCode); + jlong jnivalue_platformCode = static_cast(cppValue.platformCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_platformCodeClassName.c_str(), + value_platformCodeCtorSignature.c_str(), + jnivalue_platformCode, value_platformCode); } jclass downloadErrorStructClass; @@ -997,8 +1027,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value_current, newElement_0); } @@ -1012,8 +1043,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value_previous, newElement_0); } @@ -1054,8 +1086,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value_current, newElement_0); } @@ -1069,8 +1102,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value_previous, newElement_0); } @@ -1111,8 +1145,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value_current, newElement_0); } @@ -1126,8 +1161,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value_previous, newElement_0); } @@ -1210,8 +1246,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value_current, newElement_0); } @@ -1225,8 +1262,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value_previous, newElement_0); } @@ -1269,8 +1307,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value_current, newElement_0); } @@ -1284,8 +1323,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value_previous, newElement_0); } @@ -1327,8 +1367,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value_current, newElement_0); } @@ -1342,8 +1383,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value_previous, newElement_0); } @@ -1379,9 +1421,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_bootReason; std::string value_bootReasonClassName = "java/lang/Integer"; std::string value_bootReasonCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_bootReasonClassName.c_str(), value_bootReasonCtorSignature.c_str(), static_cast(cppValue.bootReason), - value_bootReason); + jint jnivalue_bootReason = static_cast(cppValue.bootReason); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_bootReasonClassName.c_str(), value_bootReasonCtorSignature.c_str(), jnivalue_bootReason, value_bootReason); jclass bootReasonStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -1422,8 +1464,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_id; std::string value_idClassName = "java/lang/Long"; std::string value_idCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_idClassName.c_str(), value_idCtorSignature.c_str(), - cppValue.id, value_id); + jlong jnivalue_id = static_cast(cppValue.id); + chip::JniReferences::GetInstance().CreateBoxedObject(value_idClassName.c_str(), value_idCtorSignature.c_str(), + jnivalue_id, value_id); jobject value_name; if (!cppValue.name.HasValue()) @@ -1497,9 +1540,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_connectionStatus; std::string value_connectionStatusClassName = "java/lang/Integer"; std::string value_connectionStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_connectionStatusClassName.c_str(), value_connectionStatusCtorSignature.c_str(), - static_cast(cppValue.connectionStatus), value_connectionStatus); + jint jnivalue_connectionStatus = static_cast(cppValue.connectionStatus); + chip::JniReferences::GetInstance().CreateBoxedObject(value_connectionStatusClassName.c_str(), + value_connectionStatusCtorSignature.c_str(), + jnivalue_connectionStatus, value_connectionStatus); jclass connectionStatusStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -1540,8 +1584,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value_current, newElement_0); } @@ -1555,8 +1600,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value_previous, newElement_0); } @@ -1603,8 +1649,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_reasonCode; std::string value_reasonCodeClassName = "java/lang/Integer"; std::string value_reasonCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_reasonCodeClassName.c_str(), value_reasonCodeCtorSignature.c_str(), cppValue.reasonCode, value_reasonCode); + jint jnivalue_reasonCode = static_cast(cppValue.reasonCode); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_reasonCodeClassName.c_str(), value_reasonCodeCtorSignature.c_str(), jnivalue_reasonCode, value_reasonCode); jclass disconnectionStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -1636,15 +1683,17 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_associationFailure; std::string value_associationFailureClassName = "java/lang/Integer"; std::string value_associationFailureCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_associationFailureClassName.c_str(), value_associationFailureCtorSignature.c_str(), - static_cast(cppValue.associationFailure), value_associationFailure); + jint jnivalue_associationFailure = static_cast(cppValue.associationFailure); + chip::JniReferences::GetInstance().CreateBoxedObject(value_associationFailureClassName.c_str(), + value_associationFailureCtorSignature.c_str(), + jnivalue_associationFailure, value_associationFailure); jobject value_status; std::string value_statusClassName = "java/lang/Integer"; std::string value_statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_statusClassName.c_str(), value_statusCtorSignature.c_str(), cppValue.status, value_status); + jint jnivalue_status = static_cast(cppValue.status); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_statusClassName.c_str(), value_statusCtorSignature.c_str(), jnivalue_status, value_status); jclass associationFailureStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -1679,9 +1728,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_connectionStatus; std::string value_connectionStatusClassName = "java/lang/Integer"; std::string value_connectionStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_connectionStatusClassName.c_str(), value_connectionStatusCtorSignature.c_str(), - static_cast(cppValue.connectionStatus), value_connectionStatus); + jint jnivalue_connectionStatus = static_cast(cppValue.connectionStatus); + chip::JniReferences::GetInstance().CreateBoxedObject(value_connectionStatusClassName.c_str(), + value_connectionStatusCtorSignature.c_str(), + jnivalue_connectionStatus, value_connectionStatus); jclass connectionStatusStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -1761,9 +1811,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_DSTOffsetActive; std::string value_DSTOffsetActiveClassName = "java/lang/Boolean"; std::string value_DSTOffsetActiveCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_DSTOffsetActiveClassName.c_str(), - value_DSTOffsetActiveCtorSignature.c_str(), - cppValue.DSTOffsetActive, value_DSTOffsetActive); + jboolean jnivalue_DSTOffsetActive = static_cast(cppValue.DSTOffsetActive); + chip::JniReferences::GetInstance().CreateBoxedObject(value_DSTOffsetActiveClassName.c_str(), + value_DSTOffsetActiveCtorSignature.c_str(), + jnivalue_DSTOffsetActive, value_DSTOffsetActive); jclass DSTStatusStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -1794,8 +1845,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_offset; std::string value_offsetClassName = "java/lang/Long"; std::string value_offsetCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_offsetClassName.c_str(), value_offsetCtorSignature.c_str(), cppValue.offset, value_offset); + jlong jnivalue_offset = static_cast(cppValue.offset); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_offsetClassName.c_str(), value_offsetCtorSignature.c_str(), jnivalue_offset, value_offset); jobject value_name; if (!cppValue.name.HasValue()) @@ -1905,9 +1957,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_softwareVersion; std::string value_softwareVersionClassName = "java/lang/Long"; std::string value_softwareVersionCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_softwareVersionClassName.c_str(), - value_softwareVersionCtorSignature.c_str(), - cppValue.softwareVersion, value_softwareVersion); + jlong jnivalue_softwareVersion = static_cast(cppValue.softwareVersion); + chip::JniReferences::GetInstance().CreateBoxedObject(value_softwareVersionClassName.c_str(), + value_softwareVersionCtorSignature.c_str(), + jnivalue_softwareVersion, value_softwareVersion); jclass startUpStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -1991,9 +2044,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_reachableNewValue; std::string value_reachableNewValueClassName = "java/lang/Boolean"; std::string value_reachableNewValueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_reachableNewValueClassName.c_str(), - value_reachableNewValueCtorSignature.c_str(), - cppValue.reachableNewValue, value_reachableNewValue); + jboolean jnivalue_reachableNewValue = static_cast(cppValue.reachableNewValue); + chip::JniReferences::GetInstance().CreateBoxedObject(value_reachableNewValueClassName.c_str(), + value_reachableNewValueCtorSignature.c_str(), + jnivalue_reachableNewValue, value_reachableNewValue); jclass reachableChangedStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2038,9 +2092,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_newPosition; std::string value_newPositionClassName = "java/lang/Integer"; std::string value_newPositionCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_newPositionClassName.c_str(), - value_newPositionCtorSignature.c_str(), - cppValue.newPosition, value_newPosition); + jint jnivalue_newPosition = static_cast(cppValue.newPosition); + chip::JniReferences::GetInstance().CreateBoxedObject(value_newPositionClassName.c_str(), + value_newPositionCtorSignature.c_str(), jnivalue_newPosition, + value_newPosition); jclass switchLatchedStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2071,9 +2126,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_newPosition; std::string value_newPositionClassName = "java/lang/Integer"; std::string value_newPositionCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_newPositionClassName.c_str(), - value_newPositionCtorSignature.c_str(), - cppValue.newPosition, value_newPosition); + jint jnivalue_newPosition = static_cast(cppValue.newPosition); + chip::JniReferences::GetInstance().CreateBoxedObject(value_newPositionClassName.c_str(), + value_newPositionCtorSignature.c_str(), jnivalue_newPosition, + value_newPosition); jclass initialPressStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2104,9 +2160,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_newPosition; std::string value_newPositionClassName = "java/lang/Integer"; std::string value_newPositionCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_newPositionClassName.c_str(), - value_newPositionCtorSignature.c_str(), - cppValue.newPosition, value_newPosition); + jint jnivalue_newPosition = static_cast(cppValue.newPosition); + chip::JniReferences::GetInstance().CreateBoxedObject(value_newPositionClassName.c_str(), + value_newPositionCtorSignature.c_str(), jnivalue_newPosition, + value_newPosition); jclass longPressStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2137,9 +2194,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_previousPosition; std::string value_previousPositionClassName = "java/lang/Integer"; std::string value_previousPositionCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_previousPositionClassName.c_str(), - value_previousPositionCtorSignature.c_str(), - cppValue.previousPosition, value_previousPosition); + jint jnivalue_previousPosition = static_cast(cppValue.previousPosition); + chip::JniReferences::GetInstance().CreateBoxedObject(value_previousPositionClassName.c_str(), + value_previousPositionCtorSignature.c_str(), + jnivalue_previousPosition, value_previousPosition); jclass shortReleaseStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2170,9 +2228,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_previousPosition; std::string value_previousPositionClassName = "java/lang/Integer"; std::string value_previousPositionCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_previousPositionClassName.c_str(), - value_previousPositionCtorSignature.c_str(), - cppValue.previousPosition, value_previousPosition); + jint jnivalue_previousPosition = static_cast(cppValue.previousPosition); + chip::JniReferences::GetInstance().CreateBoxedObject(value_previousPositionClassName.c_str(), + value_previousPositionCtorSignature.c_str(), + jnivalue_previousPosition, value_previousPosition); jclass longReleaseStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2203,16 +2262,18 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_newPosition; std::string value_newPositionClassName = "java/lang/Integer"; std::string value_newPositionCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_newPositionClassName.c_str(), - value_newPositionCtorSignature.c_str(), - cppValue.newPosition, value_newPosition); + jint jnivalue_newPosition = static_cast(cppValue.newPosition); + chip::JniReferences::GetInstance().CreateBoxedObject(value_newPositionClassName.c_str(), + value_newPositionCtorSignature.c_str(), jnivalue_newPosition, + value_newPosition); jobject value_currentNumberOfPressesCounted; std::string value_currentNumberOfPressesCountedClassName = "java/lang/Integer"; std::string value_currentNumberOfPressesCountedCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jnivalue_currentNumberOfPressesCounted = static_cast(cppValue.currentNumberOfPressesCounted); + chip::JniReferences::GetInstance().CreateBoxedObject( value_currentNumberOfPressesCountedClassName.c_str(), value_currentNumberOfPressesCountedCtorSignature.c_str(), - cppValue.currentNumberOfPressesCounted, value_currentNumberOfPressesCounted); + jnivalue_currentNumberOfPressesCounted, value_currentNumberOfPressesCounted); jclass multiPressOngoingStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2245,16 +2306,18 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_previousPosition; std::string value_previousPositionClassName = "java/lang/Integer"; std::string value_previousPositionCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_previousPositionClassName.c_str(), - value_previousPositionCtorSignature.c_str(), - cppValue.previousPosition, value_previousPosition); + jint jnivalue_previousPosition = static_cast(cppValue.previousPosition); + chip::JniReferences::GetInstance().CreateBoxedObject(value_previousPositionClassName.c_str(), + value_previousPositionCtorSignature.c_str(), + jnivalue_previousPosition, value_previousPosition); jobject value_totalNumberOfPressesCounted; std::string value_totalNumberOfPressesCountedClassName = "java/lang/Integer"; std::string value_totalNumberOfPressesCountedCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jnivalue_totalNumberOfPressesCounted = static_cast(cppValue.totalNumberOfPressesCounted); + chip::JniReferences::GetInstance().CreateBoxedObject( value_totalNumberOfPressesCountedClassName.c_str(), value_totalNumberOfPressesCountedCtorSignature.c_str(), - cppValue.totalNumberOfPressesCounted, value_totalNumberOfPressesCounted); + jnivalue_totalNumberOfPressesCounted, value_totalNumberOfPressesCounted); jclass multiPressCompleteStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2377,8 +2440,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_stateValue; std::string value_stateValueClassName = "java/lang/Boolean"; std::string value_stateValueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_stateValueClassName.c_str(), value_stateValueCtorSignature.c_str(), cppValue.stateValue, value_stateValue); + jboolean jnivalue_stateValue = static_cast(cppValue.stateValue); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_stateValueClassName.c_str(), value_stateValueCtorSignature.c_str(), jnivalue_stateValue, value_stateValue); jclass stateChangeStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2499,26 +2563,30 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_active; std::string value_activeClassName = "java/lang/Long"; std::string value_activeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_activeClassName.c_str(), value_activeCtorSignature.c_str(), cppValue.active.Raw(), value_active); + jlong jnivalue_active = static_cast(cppValue.active.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_activeClassName.c_str(), value_activeCtorSignature.c_str(), jnivalue_active, value_active); jobject value_inactive; std::string value_inactiveClassName = "java/lang/Long"; std::string value_inactiveCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_inactiveClassName.c_str(), value_inactiveCtorSignature.c_str(), cppValue.inactive.Raw(), value_inactive); + jlong jnivalue_inactive = static_cast(cppValue.inactive.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_inactiveClassName.c_str(), value_inactiveCtorSignature.c_str(), jnivalue_inactive, value_inactive); jobject value_state; std::string value_stateClassName = "java/lang/Long"; std::string value_stateCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_stateClassName.c_str(), value_stateCtorSignature.c_str(), cppValue.state.Raw(), value_state); + jlong jnivalue_state = static_cast(cppValue.state.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_stateClassName.c_str(), value_stateCtorSignature.c_str(), jnivalue_state, value_state); jobject value_mask; std::string value_maskClassName = "java/lang/Long"; std::string value_maskCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_maskClassName.c_str(), value_maskCtorSignature.c_str(), cppValue.mask.Raw(), value_mask); + jlong jnivalue_mask = static_cast(cppValue.mask.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_maskClassName.c_str(), + value_maskCtorSignature.c_str(), jnivalue_mask, value_mask); jclass notifyStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2581,9 +2649,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_alarmSeverityLevel; std::string value_alarmSeverityLevelClassName = "java/lang/Integer"; std::string value_alarmSeverityLevelCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_alarmSeverityLevelClassName.c_str(), value_alarmSeverityLevelCtorSignature.c_str(), - static_cast(cppValue.alarmSeverityLevel), value_alarmSeverityLevel); + jint jnivalue_alarmSeverityLevel = static_cast(cppValue.alarmSeverityLevel); + chip::JniReferences::GetInstance().CreateBoxedObject(value_alarmSeverityLevelClassName.c_str(), + value_alarmSeverityLevelCtorSignature.c_str(), + jnivalue_alarmSeverityLevel, value_alarmSeverityLevel); jclass smokeAlarmStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2614,9 +2683,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_alarmSeverityLevel; std::string value_alarmSeverityLevelClassName = "java/lang/Integer"; std::string value_alarmSeverityLevelCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_alarmSeverityLevelClassName.c_str(), value_alarmSeverityLevelCtorSignature.c_str(), - static_cast(cppValue.alarmSeverityLevel), value_alarmSeverityLevel); + jint jnivalue_alarmSeverityLevel = static_cast(cppValue.alarmSeverityLevel); + chip::JniReferences::GetInstance().CreateBoxedObject(value_alarmSeverityLevelClassName.c_str(), + value_alarmSeverityLevelCtorSignature.c_str(), + jnivalue_alarmSeverityLevel, value_alarmSeverityLevel); jclass COAlarmStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2647,9 +2717,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_alarmSeverityLevel; std::string value_alarmSeverityLevelClassName = "java/lang/Integer"; std::string value_alarmSeverityLevelCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_alarmSeverityLevelClassName.c_str(), value_alarmSeverityLevelCtorSignature.c_str(), - static_cast(cppValue.alarmSeverityLevel), value_alarmSeverityLevel); + jint jnivalue_alarmSeverityLevel = static_cast(cppValue.alarmSeverityLevel); + chip::JniReferences::GetInstance().CreateBoxedObject(value_alarmSeverityLevelClassName.c_str(), + value_alarmSeverityLevelCtorSignature.c_str(), + jnivalue_alarmSeverityLevel, value_alarmSeverityLevel); jclass lowBatteryStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2811,9 +2882,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_alarmSeverityLevel; std::string value_alarmSeverityLevelClassName = "java/lang/Integer"; std::string value_alarmSeverityLevelCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_alarmSeverityLevelClassName.c_str(), value_alarmSeverityLevelCtorSignature.c_str(), - static_cast(cppValue.alarmSeverityLevel), value_alarmSeverityLevel); + jint jnivalue_alarmSeverityLevel = static_cast(cppValue.alarmSeverityLevel); + chip::JniReferences::GetInstance().CreateBoxedObject(value_alarmSeverityLevelClassName.c_str(), + value_alarmSeverityLevelCtorSignature.c_str(), + jnivalue_alarmSeverityLevel, value_alarmSeverityLevel); jclass interconnectSmokeAlarmStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2847,9 +2919,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_alarmSeverityLevel; std::string value_alarmSeverityLevelClassName = "java/lang/Integer"; std::string value_alarmSeverityLevelCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_alarmSeverityLevelClassName.c_str(), value_alarmSeverityLevelCtorSignature.c_str(), - static_cast(cppValue.alarmSeverityLevel), value_alarmSeverityLevel); + jint jnivalue_alarmSeverityLevel = static_cast(cppValue.alarmSeverityLevel); + chip::JniReferences::GetInstance().CreateBoxedObject(value_alarmSeverityLevelClassName.c_str(), + value_alarmSeverityLevelCtorSignature.c_str(), + jnivalue_alarmSeverityLevel, value_alarmSeverityLevel); jclass interconnectCOAlarmStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2918,26 +2991,30 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_active; std::string value_activeClassName = "java/lang/Long"; std::string value_activeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_activeClassName.c_str(), value_activeCtorSignature.c_str(), cppValue.active.Raw(), value_active); + jlong jnivalue_active = static_cast(cppValue.active.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_activeClassName.c_str(), value_activeCtorSignature.c_str(), jnivalue_active, value_active); jobject value_inactive; std::string value_inactiveClassName = "java/lang/Long"; std::string value_inactiveCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_inactiveClassName.c_str(), value_inactiveCtorSignature.c_str(), cppValue.inactive.Raw(), value_inactive); + jlong jnivalue_inactive = static_cast(cppValue.inactive.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_inactiveClassName.c_str(), value_inactiveCtorSignature.c_str(), jnivalue_inactive, value_inactive); jobject value_state; std::string value_stateClassName = "java/lang/Long"; std::string value_stateCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_stateClassName.c_str(), value_stateCtorSignature.c_str(), cppValue.state.Raw(), value_state); + jlong jnivalue_state = static_cast(cppValue.state.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_stateClassName.c_str(), value_stateCtorSignature.c_str(), jnivalue_state, value_state); jobject value_mask; std::string value_maskClassName = "java/lang/Long"; std::string value_maskCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_maskClassName.c_str(), value_maskCtorSignature.c_str(), cppValue.mask.Raw(), value_mask); + jlong jnivalue_mask = static_cast(cppValue.mask.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_maskClassName.c_str(), + value_maskCtorSignature.c_str(), jnivalue_mask, value_mask); jclass notifyStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2981,9 +3058,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_errorState_errorStateID; std::string value_errorState_errorStateIDClassName = "java/lang/Integer"; std::string value_errorState_errorStateIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jnivalue_errorState_errorStateID = static_cast(cppValue.errorState.errorStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( value_errorState_errorStateIDClassName.c_str(), value_errorState_errorStateIDCtorSignature.c_str(), - cppValue.errorState.errorStateID, value_errorState_errorStateID); + jnivalue_errorState_errorStateID, value_errorState_errorStateID); jobject value_errorState_errorStateLabel; if (!cppValue.errorState.errorStateLabel.HasValue()) { @@ -3063,9 +3141,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_completionErrorCode; std::string value_completionErrorCodeClassName = "java/lang/Integer"; std::string value_completionErrorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_completionErrorCodeClassName.c_str(), - value_completionErrorCodeCtorSignature.c_str(), - cppValue.completionErrorCode, value_completionErrorCode); + jint jnivalue_completionErrorCode = static_cast(cppValue.completionErrorCode); + chip::JniReferences::GetInstance().CreateBoxedObject(value_completionErrorCodeClassName.c_str(), + value_completionErrorCodeCtorSignature.c_str(), + jnivalue_completionErrorCode, value_completionErrorCode); jobject value_totalOperationalTime; if (!cppValue.totalOperationalTime.HasValue()) @@ -3083,10 +3162,12 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_totalOperationalTimeInsideOptionalClassName = "java/lang/Long"; std::string value_totalOperationalTimeInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jnivalue_totalOperationalTimeInsideOptional = + static_cast(cppValue.totalOperationalTime.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( value_totalOperationalTimeInsideOptionalClassName.c_str(), - value_totalOperationalTimeInsideOptionalCtorSignature.c_str(), - cppValue.totalOperationalTime.Value().Value(), value_totalOperationalTimeInsideOptional); + value_totalOperationalTimeInsideOptionalCtorSignature.c_str(), jnivalue_totalOperationalTimeInsideOptional, + value_totalOperationalTimeInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(value_totalOperationalTimeInsideOptional, value_totalOperationalTime); @@ -3108,9 +3189,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_pausedTimeInsideOptionalClassName = "java/lang/Long"; std::string value_pausedTimeInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jnivalue_pausedTimeInsideOptional = static_cast(cppValue.pausedTime.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( value_pausedTimeInsideOptionalClassName.c_str(), value_pausedTimeInsideOptionalCtorSignature.c_str(), - cppValue.pausedTime.Value().Value(), value_pausedTimeInsideOptional); + jnivalue_pausedTimeInsideOptional, value_pausedTimeInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(value_pausedTimeInsideOptional, value_pausedTime); } @@ -3158,9 +3240,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_errorState_errorStateID; std::string value_errorState_errorStateIDClassName = "java/lang/Integer"; std::string value_errorState_errorStateIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jnivalue_errorState_errorStateID = static_cast(cppValue.errorState.errorStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( value_errorState_errorStateIDClassName.c_str(), value_errorState_errorStateIDCtorSignature.c_str(), - cppValue.errorState.errorStateID, value_errorState_errorStateID); + jnivalue_errorState_errorStateID, value_errorState_errorStateID); jobject value_errorState_errorStateLabel; if (!cppValue.errorState.errorStateLabel.HasValue()) { @@ -3240,9 +3323,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_completionErrorCode; std::string value_completionErrorCodeClassName = "java/lang/Integer"; std::string value_completionErrorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_completionErrorCodeClassName.c_str(), - value_completionErrorCodeCtorSignature.c_str(), - cppValue.completionErrorCode, value_completionErrorCode); + jint jnivalue_completionErrorCode = static_cast(cppValue.completionErrorCode); + chip::JniReferences::GetInstance().CreateBoxedObject(value_completionErrorCodeClassName.c_str(), + value_completionErrorCodeCtorSignature.c_str(), + jnivalue_completionErrorCode, value_completionErrorCode); jobject value_totalOperationalTime; if (!cppValue.totalOperationalTime.HasValue()) @@ -3260,10 +3344,12 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_totalOperationalTimeInsideOptionalClassName = "java/lang/Long"; std::string value_totalOperationalTimeInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jnivalue_totalOperationalTimeInsideOptional = + static_cast(cppValue.totalOperationalTime.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( value_totalOperationalTimeInsideOptionalClassName.c_str(), - value_totalOperationalTimeInsideOptionalCtorSignature.c_str(), - cppValue.totalOperationalTime.Value().Value(), value_totalOperationalTimeInsideOptional); + value_totalOperationalTimeInsideOptionalCtorSignature.c_str(), jnivalue_totalOperationalTimeInsideOptional, + value_totalOperationalTimeInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(value_totalOperationalTimeInsideOptional, value_totalOperationalTime); @@ -3285,9 +3371,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_pausedTimeInsideOptionalClassName = "java/lang/Long"; std::string value_pausedTimeInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jnivalue_pausedTimeInsideOptional = static_cast(cppValue.pausedTime.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( value_pausedTimeInsideOptionalClassName.c_str(), value_pausedTimeInsideOptionalCtorSignature.c_str(), - cppValue.pausedTime.Value().Value(), value_pausedTimeInsideOptional); + jnivalue_pausedTimeInsideOptional, value_pausedTimeInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(value_pausedTimeInsideOptional, value_pausedTime); } @@ -3354,9 +3441,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_alarmCode; std::string value_alarmCodeClassName = "java/lang/Integer"; std::string value_alarmCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_alarmCodeClassName.c_str(), value_alarmCodeCtorSignature.c_str(), static_cast(cppValue.alarmCode), - value_alarmCode); + jint jnivalue_alarmCode = static_cast(cppValue.alarmCode); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_alarmCodeClassName.c_str(), value_alarmCodeCtorSignature.c_str(), jnivalue_alarmCode, value_alarmCode); jclass doorLockAlarmStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -3387,9 +3474,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_doorState; std::string value_doorStateClassName = "java/lang/Integer"; std::string value_doorStateCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_doorStateClassName.c_str(), value_doorStateCtorSignature.c_str(), static_cast(cppValue.doorState), - value_doorState); + jint jnivalue_doorState = static_cast(cppValue.doorState); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_doorStateClassName.c_str(), value_doorStateCtorSignature.c_str(), jnivalue_doorState, value_doorState); jclass doorStateChangeStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -3420,16 +3507,18 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_lockOperationType; std::string value_lockOperationTypeClassName = "java/lang/Integer"; std::string value_lockOperationTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_lockOperationTypeClassName.c_str(), value_lockOperationTypeCtorSignature.c_str(), - static_cast(cppValue.lockOperationType), value_lockOperationType); + jint jnivalue_lockOperationType = static_cast(cppValue.lockOperationType); + chip::JniReferences::GetInstance().CreateBoxedObject(value_lockOperationTypeClassName.c_str(), + value_lockOperationTypeCtorSignature.c_str(), + jnivalue_lockOperationType, value_lockOperationType); jobject value_operationSource; std::string value_operationSourceClassName = "java/lang/Integer"; std::string value_operationSourceCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_operationSourceClassName.c_str(), value_operationSourceCtorSignature.c_str(), - static_cast(cppValue.operationSource), value_operationSource); + jint jnivalue_operationSource = static_cast(cppValue.operationSource); + chip::JniReferences::GetInstance().CreateBoxedObject(value_operationSourceClassName.c_str(), + value_operationSourceCtorSignature.c_str(), + jnivalue_operationSource, value_operationSource); jobject value_userIndex; if (cppValue.userIndex.IsNull()) @@ -3440,9 +3529,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_userIndexClassName = "java/lang/Integer"; std::string value_userIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_userIndexClassName.c_str(), - value_userIndexCtorSignature.c_str(), - cppValue.userIndex.Value(), value_userIndex); + jint jnivalue_userIndex = static_cast(cppValue.userIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_userIndexClassName.c_str(), value_userIndexCtorSignature.c_str(), jnivalue_userIndex, value_userIndex); } jobject value_fabricIndex; @@ -3454,9 +3543,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_fabricIndexClassName = "java/lang/Integer"; std::string value_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), - value_fabricIndexCtorSignature.c_str(), - cppValue.fabricIndex.Value(), value_fabricIndex); + jint jnivalue_fabricIndex = static_cast(cppValue.fabricIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), + jnivalue_fabricIndex, value_fabricIndex); } jobject value_sourceNode; @@ -3468,9 +3558,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_sourceNodeClassName = "java/lang/Long"; std::string value_sourceNodeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_sourceNodeClassName.c_str(), - value_sourceNodeCtorSignature.c_str(), - cppValue.sourceNode.Value(), value_sourceNode); + jlong jnivalue_sourceNode = static_cast(cppValue.sourceNode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_sourceNodeClassName.c_str(), + value_sourceNodeCtorSignature.c_str(), + jnivalue_sourceNode, value_sourceNode); } jobject value_credentials; @@ -3497,15 +3588,17 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_2_credentialType; std::string newElement_2_credentialTypeClassName = "java/lang/Integer"; std::string newElement_2_credentialTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_2_credentialType = static_cast(entry_2.credentialType); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_credentialTypeClassName.c_str(), newElement_2_credentialTypeCtorSignature.c_str(), - static_cast(entry_2.credentialType), newElement_2_credentialType); + jninewElement_2_credentialType, newElement_2_credentialType); jobject newElement_2_credentialIndex; std::string newElement_2_credentialIndexClassName = "java/lang/Integer"; std::string newElement_2_credentialIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_2_credentialIndex = static_cast(entry_2.credentialIndex); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_credentialIndexClassName.c_str(), newElement_2_credentialIndexCtorSignature.c_str(), - entry_2.credentialIndex, newElement_2_credentialIndex); + jninewElement_2_credentialIndex, newElement_2_credentialIndex); jclass credentialStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -3565,23 +3658,26 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_lockOperationType; std::string value_lockOperationTypeClassName = "java/lang/Integer"; std::string value_lockOperationTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_lockOperationTypeClassName.c_str(), value_lockOperationTypeCtorSignature.c_str(), - static_cast(cppValue.lockOperationType), value_lockOperationType); + jint jnivalue_lockOperationType = static_cast(cppValue.lockOperationType); + chip::JniReferences::GetInstance().CreateBoxedObject(value_lockOperationTypeClassName.c_str(), + value_lockOperationTypeCtorSignature.c_str(), + jnivalue_lockOperationType, value_lockOperationType); jobject value_operationSource; std::string value_operationSourceClassName = "java/lang/Integer"; std::string value_operationSourceCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_operationSourceClassName.c_str(), value_operationSourceCtorSignature.c_str(), - static_cast(cppValue.operationSource), value_operationSource); + jint jnivalue_operationSource = static_cast(cppValue.operationSource); + chip::JniReferences::GetInstance().CreateBoxedObject(value_operationSourceClassName.c_str(), + value_operationSourceCtorSignature.c_str(), + jnivalue_operationSource, value_operationSource); jobject value_operationError; std::string value_operationErrorClassName = "java/lang/Integer"; std::string value_operationErrorCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_operationErrorClassName.c_str(), value_operationErrorCtorSignature.c_str(), - static_cast(cppValue.operationError), value_operationError); + jint jnivalue_operationError = static_cast(cppValue.operationError); + chip::JniReferences::GetInstance().CreateBoxedObject(value_operationErrorClassName.c_str(), + value_operationErrorCtorSignature.c_str(), + jnivalue_operationError, value_operationError); jobject value_userIndex; if (cppValue.userIndex.IsNull()) @@ -3592,9 +3688,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_userIndexClassName = "java/lang/Integer"; std::string value_userIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_userIndexClassName.c_str(), - value_userIndexCtorSignature.c_str(), - cppValue.userIndex.Value(), value_userIndex); + jint jnivalue_userIndex = static_cast(cppValue.userIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_userIndexClassName.c_str(), value_userIndexCtorSignature.c_str(), jnivalue_userIndex, value_userIndex); } jobject value_fabricIndex; @@ -3606,9 +3702,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_fabricIndexClassName = "java/lang/Integer"; std::string value_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), - value_fabricIndexCtorSignature.c_str(), - cppValue.fabricIndex.Value(), value_fabricIndex); + jint jnivalue_fabricIndex = static_cast(cppValue.fabricIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), + jnivalue_fabricIndex, value_fabricIndex); } jobject value_sourceNode; @@ -3620,9 +3717,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_sourceNodeClassName = "java/lang/Long"; std::string value_sourceNodeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_sourceNodeClassName.c_str(), - value_sourceNodeCtorSignature.c_str(), - cppValue.sourceNode.Value(), value_sourceNode); + jlong jnivalue_sourceNode = static_cast(cppValue.sourceNode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_sourceNodeClassName.c_str(), + value_sourceNodeCtorSignature.c_str(), + jnivalue_sourceNode, value_sourceNode); } jobject value_credentials; @@ -3649,15 +3747,17 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_2_credentialType; std::string newElement_2_credentialTypeClassName = "java/lang/Integer"; std::string newElement_2_credentialTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_2_credentialType = static_cast(entry_2.credentialType); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_credentialTypeClassName.c_str(), newElement_2_credentialTypeCtorSignature.c_str(), - static_cast(entry_2.credentialType), newElement_2_credentialType); + jninewElement_2_credentialType, newElement_2_credentialType); jobject newElement_2_credentialIndex; std::string newElement_2_credentialIndexClassName = "java/lang/Integer"; std::string newElement_2_credentialIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_2_credentialIndex = static_cast(entry_2.credentialIndex); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_credentialIndexClassName.c_str(), newElement_2_credentialIndexCtorSignature.c_str(), - entry_2.credentialIndex, newElement_2_credentialIndex); + jninewElement_2_credentialIndex, newElement_2_credentialIndex); jclass credentialStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -3719,23 +3819,26 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_lockDataType; std::string value_lockDataTypeClassName = "java/lang/Integer"; std::string value_lockDataTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_lockDataTypeClassName.c_str(), value_lockDataTypeCtorSignature.c_str(), - static_cast(cppValue.lockDataType), value_lockDataType); + jint jnivalue_lockDataType = static_cast(cppValue.lockDataType); + chip::JniReferences::GetInstance().CreateBoxedObject(value_lockDataTypeClassName.c_str(), + value_lockDataTypeCtorSignature.c_str(), + jnivalue_lockDataType, value_lockDataType); jobject value_dataOperationType; std::string value_dataOperationTypeClassName = "java/lang/Integer"; std::string value_dataOperationTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_dataOperationTypeClassName.c_str(), value_dataOperationTypeCtorSignature.c_str(), - static_cast(cppValue.dataOperationType), value_dataOperationType); + jint jnivalue_dataOperationType = static_cast(cppValue.dataOperationType); + chip::JniReferences::GetInstance().CreateBoxedObject(value_dataOperationTypeClassName.c_str(), + value_dataOperationTypeCtorSignature.c_str(), + jnivalue_dataOperationType, value_dataOperationType); jobject value_operationSource; std::string value_operationSourceClassName = "java/lang/Integer"; std::string value_operationSourceCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_operationSourceClassName.c_str(), value_operationSourceCtorSignature.c_str(), - static_cast(cppValue.operationSource), value_operationSource); + jint jnivalue_operationSource = static_cast(cppValue.operationSource); + chip::JniReferences::GetInstance().CreateBoxedObject(value_operationSourceClassName.c_str(), + value_operationSourceCtorSignature.c_str(), + jnivalue_operationSource, value_operationSource); jobject value_userIndex; if (cppValue.userIndex.IsNull()) @@ -3746,9 +3849,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_userIndexClassName = "java/lang/Integer"; std::string value_userIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_userIndexClassName.c_str(), - value_userIndexCtorSignature.c_str(), - cppValue.userIndex.Value(), value_userIndex); + jint jnivalue_userIndex = static_cast(cppValue.userIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_userIndexClassName.c_str(), value_userIndexCtorSignature.c_str(), jnivalue_userIndex, value_userIndex); } jobject value_fabricIndex; @@ -3760,9 +3863,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_fabricIndexClassName = "java/lang/Integer"; std::string value_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), - value_fabricIndexCtorSignature.c_str(), - cppValue.fabricIndex.Value(), value_fabricIndex); + jint jnivalue_fabricIndex = static_cast(cppValue.fabricIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), + jnivalue_fabricIndex, value_fabricIndex); } jobject value_sourceNode; @@ -3774,9 +3878,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_sourceNodeClassName = "java/lang/Long"; std::string value_sourceNodeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_sourceNodeClassName.c_str(), - value_sourceNodeCtorSignature.c_str(), - cppValue.sourceNode.Value(), value_sourceNode); + jlong jnivalue_sourceNode = static_cast(cppValue.sourceNode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_sourceNodeClassName.c_str(), + value_sourceNodeCtorSignature.c_str(), + jnivalue_sourceNode, value_sourceNode); } jobject value_dataIndex; @@ -3788,9 +3893,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { std::string value_dataIndexClassName = "java/lang/Integer"; std::string value_dataIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_dataIndexClassName.c_str(), - value_dataIndexCtorSignature.c_str(), - cppValue.dataIndex.Value(), value_dataIndex); + jint jnivalue_dataIndex = static_cast(cppValue.dataIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_dataIndexClassName.c_str(), value_dataIndexCtorSignature.c_str(), jnivalue_dataIndex, value_dataIndex); } jclass lockUserChangeStructClass; @@ -4689,38 +4794,43 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_arg1; std::string value_arg1ClassName = "java/lang/Integer"; std::string value_arg1CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_arg1ClassName.c_str(), value_arg1CtorSignature.c_str(), cppValue.arg1, value_arg1); + jint jnivalue_arg1 = static_cast(cppValue.arg1); + chip::JniReferences::GetInstance().CreateBoxedObject(value_arg1ClassName.c_str(), value_arg1CtorSignature.c_str(), + jnivalue_arg1, value_arg1); jobject value_arg2; std::string value_arg2ClassName = "java/lang/Integer"; std::string value_arg2CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_arg2ClassName.c_str(), value_arg2CtorSignature.c_str(), static_cast(cppValue.arg2), value_arg2); + jint jnivalue_arg2 = static_cast(cppValue.arg2); + chip::JniReferences::GetInstance().CreateBoxedObject(value_arg2ClassName.c_str(), value_arg2CtorSignature.c_str(), + jnivalue_arg2, value_arg2); jobject value_arg3; std::string value_arg3ClassName = "java/lang/Boolean"; std::string value_arg3CtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_arg3ClassName.c_str(), value_arg3CtorSignature.c_str(), - cppValue.arg3, value_arg3); + jboolean jnivalue_arg3 = static_cast(cppValue.arg3); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_arg3ClassName.c_str(), value_arg3CtorSignature.c_str(), jnivalue_arg3, value_arg3); jobject value_arg4; jobject value_arg4_a; std::string value_arg4_aClassName = "java/lang/Integer"; std::string value_arg4_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_arg4_aClassName.c_str(), value_arg4_aCtorSignature.c_str(), cppValue.arg4.a, value_arg4_a); + jint jnivalue_arg4_a = static_cast(cppValue.arg4.a); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_arg4_aClassName.c_str(), value_arg4_aCtorSignature.c_str(), jnivalue_arg4_a, value_arg4_a); jobject value_arg4_b; std::string value_arg4_bClassName = "java/lang/Boolean"; std::string value_arg4_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_arg4_bClassName.c_str(), value_arg4_bCtorSignature.c_str(), cppValue.arg4.b, value_arg4_b); + jboolean jnivalue_arg4_b = static_cast(cppValue.arg4.b); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_arg4_bClassName.c_str(), value_arg4_bCtorSignature.c_str(), jnivalue_arg4_b, value_arg4_b); jobject value_arg4_c; std::string value_arg4_cClassName = "java/lang/Integer"; std::string value_arg4_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_arg4_cClassName.c_str(), - value_arg4_cCtorSignature.c_str(), - static_cast(cppValue.arg4.c), value_arg4_c); + jint jnivalue_arg4_c = static_cast(cppValue.arg4.c); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_arg4_cClassName.c_str(), value_arg4_cCtorSignature.c_str(), jnivalue_arg4_c, value_arg4_c); jobject value_arg4_d; jbyteArray value_arg4_dByteArray = env->NewByteArray(static_cast(cppValue.arg4.d.size())); env->SetByteArrayRegion(value_arg4_dByteArray, 0, static_cast(cppValue.arg4.d.size()), @@ -4731,18 +4841,21 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_arg4_f; std::string value_arg4_fClassName = "java/lang/Integer"; std::string value_arg4_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_arg4_fClassName.c_str(), value_arg4_fCtorSignature.c_str(), cppValue.arg4.f.Raw(), value_arg4_f); + jint jnivalue_arg4_f = static_cast(cppValue.arg4.f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_arg4_fClassName.c_str(), value_arg4_fCtorSignature.c_str(), jnivalue_arg4_f, value_arg4_f); jobject value_arg4_g; std::string value_arg4_gClassName = "java/lang/Float"; std::string value_arg4_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_arg4_gClassName.c_str(), value_arg4_gCtorSignature.c_str(), cppValue.arg4.g, value_arg4_g); + jfloat jnivalue_arg4_g = static_cast(cppValue.arg4.g); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_arg4_gClassName.c_str(), value_arg4_gCtorSignature.c_str(), jnivalue_arg4_g, value_arg4_g); jobject value_arg4_h; std::string value_arg4_hClassName = "java/lang/Double"; std::string value_arg4_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_arg4_hClassName.c_str(), value_arg4_hCtorSignature.c_str(), cppValue.arg4.h, value_arg4_h); + jdouble jnivalue_arg4_h = static_cast(cppValue.arg4.h); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_arg4_hClassName.c_str(), value_arg4_hCtorSignature.c_str(), jnivalue_arg4_h, value_arg4_h); jclass simpleStructStructClass_0; err = chip::JniReferences::GetInstance().GetClassRef( @@ -4776,19 +4889,21 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0_a; std::string newElement_0_aClassName = "java/lang/Integer"; std::string newElement_0_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_aClassName.c_str(), newElement_0_aCtorSignature.c_str(), entry_0.a, newElement_0_a); + jint jninewElement_0_a = static_cast(entry_0.a); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_aClassName.c_str(), newElement_0_aCtorSignature.c_str(), jninewElement_0_a, newElement_0_a); jobject newElement_0_b; std::string newElement_0_bClassName = "java/lang/Boolean"; std::string newElement_0_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_bClassName.c_str(), newElement_0_bCtorSignature.c_str(), entry_0.b, newElement_0_b); + jboolean jninewElement_0_b = static_cast(entry_0.b); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_bClassName.c_str(), newElement_0_bCtorSignature.c_str(), jninewElement_0_b, newElement_0_b); jobject newElement_0_c; std::string newElement_0_cClassName = "java/lang/Integer"; std::string newElement_0_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_cClassName.c_str(), - newElement_0_cCtorSignature.c_str(), - static_cast(entry_0.c), newElement_0_c); + jint jninewElement_0_c = static_cast(entry_0.c); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_cClassName.c_str(), newElement_0_cCtorSignature.c_str(), jninewElement_0_c, newElement_0_c); jobject newElement_0_d; jbyteArray newElement_0_dByteArray = env->NewByteArray(static_cast(entry_0.d.size())); env->SetByteArrayRegion(newElement_0_dByteArray, 0, static_cast(entry_0.d.size()), @@ -4799,18 +4914,21 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0_f; std::string newElement_0_fClassName = "java/lang/Integer"; std::string newElement_0_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_fClassName.c_str(), newElement_0_fCtorSignature.c_str(), entry_0.f.Raw(), newElement_0_f); + jint jninewElement_0_f = static_cast(entry_0.f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_fClassName.c_str(), newElement_0_fCtorSignature.c_str(), jninewElement_0_f, newElement_0_f); jobject newElement_0_g; std::string newElement_0_gClassName = "java/lang/Float"; std::string newElement_0_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_gClassName.c_str(), newElement_0_gCtorSignature.c_str(), entry_0.g, newElement_0_g); + jfloat jninewElement_0_g = static_cast(entry_0.g); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_gClassName.c_str(), newElement_0_gCtorSignature.c_str(), jninewElement_0_g, newElement_0_g); jobject newElement_0_h; std::string newElement_0_hClassName = "java/lang/Double"; std::string newElement_0_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_hClassName.c_str(), newElement_0_hCtorSignature.c_str(), entry_0.h, newElement_0_h); + jdouble jninewElement_0_h = static_cast(entry_0.h); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_hClassName.c_str(), newElement_0_hCtorSignature.c_str(), jninewElement_0_h, newElement_0_h); jclass simpleStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -4846,8 +4964,9 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value_arg6, newElement_0); } @@ -4884,9 +5003,10 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject value_fabricIndex; std::string value_fabricIndexClassName = "java/lang/Integer"; std::string value_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), - value_fabricIndexCtorSignature.c_str(), - cppValue.fabricIndex, value_fabricIndex); + jint jnivalue_fabricIndex = static_cast(cppValue.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), jnivalue_fabricIndex, + value_fabricIndex); jclass testFabricScopedEventStructClass; err = chip::JniReferences::GetInstance().GetClassRef( diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 0a3e7d467a7c3c..8dc941845121a4 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -84,13 +84,15 @@ void CHIPGroupsClusterAddGroupResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject GroupID; std::string GroupIDClassName = "java/lang/Integer"; std::string GroupIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), - dataResponse.groupID, GroupID); + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID); } @@ -149,13 +151,15 @@ void CHIPGroupsClusterViewGroupResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject GroupID; std::string GroupIDClassName = "java/lang/Integer"; std::string GroupIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), - dataResponse.groupID, GroupID); + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); jobject GroupName; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.groupName, GroupName)); @@ -223,8 +227,9 @@ void CHIPGroupsClusterGetGroupMembershipResponseCallback::CallbackFn( { std::string CapacityClassName = "java/lang/Integer"; std::string CapacityCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(CapacityClassName.c_str(), CapacityCtorSignature.c_str(), - dataResponse.capacity.Value(), Capacity); + jint jniCapacity = static_cast(dataResponse.capacity.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(CapacityClassName.c_str(), CapacityCtorSignature.c_str(), + jniCapacity, Capacity); } jobject GroupList; chip::JniReferences::GetInstance().CreateArrayList(GroupList); @@ -236,8 +241,9 @@ void CHIPGroupsClusterGetGroupMembershipResponseCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(GroupList, newElement_0); } @@ -298,13 +304,15 @@ void CHIPGroupsClusterRemoveGroupResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject GroupID; std::string GroupIDClassName = "java/lang/Integer"; std::string GroupIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), - dataResponse.groupID, GroupID); + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID); } @@ -363,18 +371,21 @@ void CHIPScenesClusterAddSceneResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject GroupID; std::string GroupIDClassName = "java/lang/Integer"; std::string GroupIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), - dataResponse.groupID, GroupID); + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); jobject SceneID; std::string SceneIDClassName = "java/lang/Integer"; std::string SceneIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), - dataResponse.sceneID, SceneID); + jint jniSceneID = static_cast(dataResponse.sceneID); + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, + SceneID); env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); } @@ -435,18 +446,21 @@ void CHIPScenesClusterViewSceneResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject GroupID; std::string GroupIDClassName = "java/lang/Integer"; std::string GroupIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), - dataResponse.groupID, GroupID); + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); jobject SceneID; std::string SceneIDClassName = "java/lang/Integer"; std::string SceneIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), - dataResponse.sceneID, SceneID); + jint jniSceneID = static_cast(dataResponse.sceneID); + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, + SceneID); jobject TransitionTime; if (!dataResponse.transitionTime.HasValue()) { @@ -457,9 +471,10 @@ void CHIPScenesClusterViewSceneResponseCallback::CallbackFn( jobject TransitionTimeInsideOptional; std::string TransitionTimeInsideOptionalClassName = "java/lang/Integer"; std::string TransitionTimeInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - TransitionTimeInsideOptionalClassName.c_str(), TransitionTimeInsideOptionalCtorSignature.c_str(), - dataResponse.transitionTime.Value(), TransitionTimeInsideOptional); + jint jniTransitionTimeInsideOptional = static_cast(dataResponse.transitionTime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(TransitionTimeInsideOptionalClassName.c_str(), + TransitionTimeInsideOptionalCtorSignature.c_str(), + jniTransitionTimeInsideOptional, TransitionTimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(TransitionTimeInsideOptional, TransitionTime); } jobject SceneName; @@ -492,9 +507,10 @@ void CHIPScenesClusterViewSceneResponseCallback::CallbackFn( jobject newElement_1_clusterID; std::string newElement_1_clusterIDClassName = "java/lang/Long"; std::string newElement_1_clusterIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_clusterIDClassName.c_str(), - newElement_1_clusterIDCtorSignature.c_str(), - entry_1.clusterID, newElement_1_clusterID); + jlong jninewElement_1_clusterID = static_cast(entry_1.clusterID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_clusterIDClassName.c_str(), + newElement_1_clusterIDCtorSignature.c_str(), + jninewElement_1_clusterID, newElement_1_clusterID); jobject newElement_1_attributeValueList; chip::JniReferences::GetInstance().CreateArrayList(newElement_1_attributeValueList); @@ -506,15 +522,17 @@ void CHIPScenesClusterViewSceneResponseCallback::CallbackFn( jobject newElement_3_attributeID; std::string newElement_3_attributeIDClassName = "java/lang/Long"; std::string newElement_3_attributeIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_attributeIDClassName.c_str(), - newElement_3_attributeIDCtorSignature.c_str(), - entry_3.attributeID, newElement_3_attributeID); + jlong jninewElement_3_attributeID = static_cast(entry_3.attributeID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_attributeIDClassName.c_str(), + newElement_3_attributeIDCtorSignature.c_str(), + jninewElement_3_attributeID, newElement_3_attributeID); jobject newElement_3_attributeValue; std::string newElement_3_attributeValueClassName = "java/lang/Long"; std::string newElement_3_attributeValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_attributeValueClassName.c_str(), - newElement_3_attributeValueCtorSignature.c_str(), - entry_3.attributeValue, newElement_3_attributeValue); + jlong jninewElement_3_attributeValue = static_cast(entry_3.attributeValue); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_3_attributeValueClassName.c_str(), newElement_3_attributeValueCtorSignature.c_str(), + jninewElement_3_attributeValue, newElement_3_attributeValue); jclass attributeValuePairStructClass_4; err = chip::JniReferences::GetInstance().GetClassRef( @@ -617,18 +635,21 @@ void CHIPScenesClusterRemoveSceneResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject GroupID; std::string GroupIDClassName = "java/lang/Integer"; std::string GroupIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), - dataResponse.groupID, GroupID); + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); jobject SceneID; std::string SceneIDClassName = "java/lang/Integer"; std::string SceneIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), - dataResponse.sceneID, SceneID); + jint jniSceneID = static_cast(dataResponse.sceneID); + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, + SceneID); env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); } @@ -687,13 +708,15 @@ void CHIPScenesClusterRemoveAllScenesResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject GroupID; std::string GroupIDClassName = "java/lang/Integer"; std::string GroupIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), - dataResponse.groupID, GroupID); + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID); } @@ -752,18 +775,21 @@ void CHIPScenesClusterStoreSceneResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject GroupID; std::string GroupIDClassName = "java/lang/Integer"; std::string GroupIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), - dataResponse.groupID, GroupID); + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); jobject SceneID; std::string SceneIDClassName = "java/lang/Integer"; std::string SceneIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), - dataResponse.sceneID, SceneID); + jint jniSceneID = static_cast(dataResponse.sceneID); + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, + SceneID); env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); } @@ -824,8 +850,9 @@ void CHIPScenesClusterGetSceneMembershipResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject Capacity; if (dataResponse.capacity.IsNull()) { @@ -835,14 +862,16 @@ void CHIPScenesClusterGetSceneMembershipResponseCallback::CallbackFn( { std::string CapacityClassName = "java/lang/Integer"; std::string CapacityCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(CapacityClassName.c_str(), CapacityCtorSignature.c_str(), - dataResponse.capacity.Value(), Capacity); + jint jniCapacity = static_cast(dataResponse.capacity.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(CapacityClassName.c_str(), CapacityCtorSignature.c_str(), + jniCapacity, Capacity); } jobject GroupID; std::string GroupIDClassName = "java/lang/Integer"; std::string GroupIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), - dataResponse.groupID, GroupID); + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); jobject SceneList; if (!dataResponse.sceneList.HasValue()) { @@ -860,8 +889,9 @@ void CHIPScenesClusterGetSceneMembershipResponseCallback::CallbackFn( jobject newElement_1; std::string newElement_1ClassName = "java/lang/Integer"; std::string newElement_1CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1ClassName.c_str(), - newElement_1CtorSignature.c_str(), entry_1, newElement_1); + jint jninewElement_1 = static_cast(entry_1); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); chip::JniReferences::GetInstance().AddToList(SceneListInsideOptional, newElement_1); } chip::JniReferences::GetInstance().CreateOptional(SceneListInsideOptional, SceneList); @@ -925,18 +955,21 @@ void CHIPScenesClusterEnhancedAddSceneResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject GroupID; std::string GroupIDClassName = "java/lang/Integer"; std::string GroupIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), - dataResponse.groupID, GroupID); + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); jobject SceneID; std::string SceneIDClassName = "java/lang/Integer"; std::string SceneIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), - dataResponse.sceneID, SceneID); + jint jniSceneID = static_cast(dataResponse.sceneID); + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, + SceneID); env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); } @@ -998,18 +1031,21 @@ void CHIPScenesClusterEnhancedViewSceneResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject GroupID; std::string GroupIDClassName = "java/lang/Integer"; std::string GroupIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), - dataResponse.groupID, GroupID); + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); jobject SceneID; std::string SceneIDClassName = "java/lang/Integer"; std::string SceneIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), - dataResponse.sceneID, SceneID); + jint jniSceneID = static_cast(dataResponse.sceneID); + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, + SceneID); jobject TransitionTime; if (!dataResponse.transitionTime.HasValue()) { @@ -1020,9 +1056,10 @@ void CHIPScenesClusterEnhancedViewSceneResponseCallback::CallbackFn( jobject TransitionTimeInsideOptional; std::string TransitionTimeInsideOptionalClassName = "java/lang/Integer"; std::string TransitionTimeInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - TransitionTimeInsideOptionalClassName.c_str(), TransitionTimeInsideOptionalCtorSignature.c_str(), - dataResponse.transitionTime.Value(), TransitionTimeInsideOptional); + jint jniTransitionTimeInsideOptional = static_cast(dataResponse.transitionTime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(TransitionTimeInsideOptionalClassName.c_str(), + TransitionTimeInsideOptionalCtorSignature.c_str(), + jniTransitionTimeInsideOptional, TransitionTimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(TransitionTimeInsideOptional, TransitionTime); } jobject SceneName; @@ -1055,9 +1092,10 @@ void CHIPScenesClusterEnhancedViewSceneResponseCallback::CallbackFn( jobject newElement_1_clusterID; std::string newElement_1_clusterIDClassName = "java/lang/Long"; std::string newElement_1_clusterIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_clusterIDClassName.c_str(), - newElement_1_clusterIDCtorSignature.c_str(), - entry_1.clusterID, newElement_1_clusterID); + jlong jninewElement_1_clusterID = static_cast(entry_1.clusterID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_clusterIDClassName.c_str(), + newElement_1_clusterIDCtorSignature.c_str(), + jninewElement_1_clusterID, newElement_1_clusterID); jobject newElement_1_attributeValueList; chip::JniReferences::GetInstance().CreateArrayList(newElement_1_attributeValueList); @@ -1069,15 +1107,17 @@ void CHIPScenesClusterEnhancedViewSceneResponseCallback::CallbackFn( jobject newElement_3_attributeID; std::string newElement_3_attributeIDClassName = "java/lang/Long"; std::string newElement_3_attributeIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_attributeIDClassName.c_str(), - newElement_3_attributeIDCtorSignature.c_str(), - entry_3.attributeID, newElement_3_attributeID); + jlong jninewElement_3_attributeID = static_cast(entry_3.attributeID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_attributeIDClassName.c_str(), + newElement_3_attributeIDCtorSignature.c_str(), + jninewElement_3_attributeID, newElement_3_attributeID); jobject newElement_3_attributeValue; std::string newElement_3_attributeValueClassName = "java/lang/Long"; std::string newElement_3_attributeValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_attributeValueClassName.c_str(), - newElement_3_attributeValueCtorSignature.c_str(), - entry_3.attributeValue, newElement_3_attributeValue); + jlong jninewElement_3_attributeValue = static_cast(entry_3.attributeValue); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_3_attributeValueClassName.c_str(), newElement_3_attributeValueCtorSignature.c_str(), + jninewElement_3_attributeValue, newElement_3_attributeValue); jclass attributeValuePairStructClass_4; err = chip::JniReferences::GetInstance().GetClassRef( @@ -1180,20 +1220,23 @@ void CHIPScenesClusterCopySceneResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject GroupIdentifierFrom; std::string GroupIdentifierFromClassName = "java/lang/Integer"; std::string GroupIdentifierFromCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIdentifierFromClassName.c_str(), - GroupIdentifierFromCtorSignature.c_str(), - dataResponse.groupIdentifierFrom, GroupIdentifierFrom); + jint jniGroupIdentifierFrom = static_cast(dataResponse.groupIdentifierFrom); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIdentifierFromClassName.c_str(), + GroupIdentifierFromCtorSignature.c_str(), jniGroupIdentifierFrom, + GroupIdentifierFrom); jobject SceneIdentifierFrom; std::string SceneIdentifierFromClassName = "java/lang/Integer"; std::string SceneIdentifierFromCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIdentifierFromClassName.c_str(), - SceneIdentifierFromCtorSignature.c_str(), - dataResponse.sceneIdentifierFrom, SceneIdentifierFrom); + jint jniSceneIdentifierFrom = static_cast(dataResponse.sceneIdentifierFrom); + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIdentifierFromClassName.c_str(), + SceneIdentifierFromCtorSignature.c_str(), jniSceneIdentifierFrom, + SceneIdentifierFrom); env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupIdentifierFrom, SceneIdentifierFrom); } @@ -1258,8 +1301,9 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - static_cast(dataResponse.status), Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject DelayedActionTime; if (!dataResponse.delayedActionTime.HasValue()) { @@ -1270,9 +1314,10 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( jobject DelayedActionTimeInsideOptional; std::string DelayedActionTimeInsideOptionalClassName = "java/lang/Long"; std::string DelayedActionTimeInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jniDelayedActionTimeInsideOptional = static_cast(dataResponse.delayedActionTime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( DelayedActionTimeInsideOptionalClassName.c_str(), DelayedActionTimeInsideOptionalCtorSignature.c_str(), - dataResponse.delayedActionTime.Value(), DelayedActionTimeInsideOptional); + jniDelayedActionTimeInsideOptional, DelayedActionTimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(DelayedActionTimeInsideOptional, DelayedActionTime); } jobject ImageURI; @@ -1297,9 +1342,10 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( jobject SoftwareVersionInsideOptional; std::string SoftwareVersionInsideOptionalClassName = "java/lang/Long"; std::string SoftwareVersionInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jniSoftwareVersionInsideOptional = static_cast(dataResponse.softwareVersion.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( SoftwareVersionInsideOptionalClassName.c_str(), SoftwareVersionInsideOptionalCtorSignature.c_str(), - dataResponse.softwareVersion.Value(), SoftwareVersionInsideOptional); + jniSoftwareVersionInsideOptional, SoftwareVersionInsideOptional); chip::JniReferences::GetInstance().CreateOptional(SoftwareVersionInsideOptional, SoftwareVersion); } jobject SoftwareVersionString; @@ -1339,9 +1385,10 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( jobject UserConsentNeededInsideOptional; std::string UserConsentNeededInsideOptionalClassName = "java/lang/Boolean"; std::string UserConsentNeededInsideOptionalCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jniUserConsentNeededInsideOptional = static_cast(dataResponse.userConsentNeeded.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( UserConsentNeededInsideOptionalClassName.c_str(), UserConsentNeededInsideOptionalCtorSignature.c_str(), - dataResponse.userConsentNeeded.Value(), UserConsentNeededInsideOptional); + jniUserConsentNeededInsideOptional, UserConsentNeededInsideOptional); chip::JniReferences::GetInstance().CreateOptional(UserConsentNeededInsideOptional, UserConsentNeeded); } jobject MetadataForRequestor; @@ -1422,14 +1469,15 @@ void CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::CallbackFn jobject Action; std::string ActionClassName = "java/lang/Integer"; std::string ActionCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(ActionClassName.c_str(), ActionCtorSignature.c_str(), - static_cast(dataResponse.action), Action); + jint jniAction = static_cast(dataResponse.action); + chip::JniReferences::GetInstance().CreateBoxedObject(ActionClassName.c_str(), ActionCtorSignature.c_str(), jniAction, + Action); jobject DelayedActionTime; std::string DelayedActionTimeClassName = "java/lang/Long"; std::string DelayedActionTimeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(DelayedActionTimeClassName.c_str(), - DelayedActionTimeCtorSignature.c_str(), - dataResponse.delayedActionTime, DelayedActionTime); + jlong jniDelayedActionTime = static_cast(dataResponse.delayedActionTime); + chip::JniReferences::GetInstance().CreateBoxedObject( + DelayedActionTimeClassName.c_str(), DelayedActionTimeCtorSignature.c_str(), jniDelayedActionTime, DelayedActionTime); env->CallVoidMethod(javaCallbackRef, javaMethod, Action, DelayedActionTime); } @@ -1490,8 +1538,9 @@ void CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::CallbackFn( jobject ErrorCode; std::string ErrorCodeClassName = "java/lang/Integer"; std::string ErrorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), - static_cast(dataResponse.errorCode), ErrorCode); + jint jniErrorCode = static_cast(dataResponse.errorCode); + chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), + jniErrorCode, ErrorCode); jobject DebugText; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText, DebugText)); @@ -1556,8 +1605,9 @@ void CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback::Callbac jobject ErrorCode; std::string ErrorCodeClassName = "java/lang/Integer"; std::string ErrorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), - static_cast(dataResponse.errorCode), ErrorCode); + jint jniErrorCode = static_cast(dataResponse.errorCode); + chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), + jniErrorCode, ErrorCode); jobject DebugText; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText, DebugText)); @@ -1622,8 +1672,9 @@ void CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback::Callb jobject ErrorCode; std::string ErrorCodeClassName = "java/lang/Integer"; std::string ErrorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), - static_cast(dataResponse.errorCode), ErrorCode); + jint jniErrorCode = static_cast(dataResponse.errorCode); + chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), + jniErrorCode, ErrorCode); jobject DebugText; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText, DebugText)); @@ -1687,9 +1738,9 @@ void CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CallbackFn( jobject NetworkingStatus; std::string NetworkingStatusClassName = "java/lang/Integer"; std::string NetworkingStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), - static_cast(dataResponse.networkingStatus), NetworkingStatus); + jint jniNetworkingStatus = static_cast(dataResponse.networkingStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), jniNetworkingStatus, NetworkingStatus); jobject DebugText; if (!dataResponse.debugText.HasValue()) { @@ -1720,9 +1771,10 @@ void CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CallbackFn( jobject newElement_1_security; std::string newElement_1_securityClassName = "java/lang/Integer"; std::string newElement_1_securityCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_securityClassName.c_str(), - newElement_1_securityCtorSignature.c_str(), - entry_1.security.Raw(), newElement_1_security); + jint jninewElement_1_security = static_cast(entry_1.security.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_securityClassName.c_str(), + newElement_1_securityCtorSignature.c_str(), + jninewElement_1_security, newElement_1_security); jobject newElement_1_ssid; jbyteArray newElement_1_ssidByteArray = env->NewByteArray(static_cast(entry_1.ssid.size())); env->SetByteArrayRegion(newElement_1_ssidByteArray, 0, static_cast(entry_1.ssid.size()), @@ -1736,20 +1788,24 @@ void CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CallbackFn( jobject newElement_1_channel; std::string newElement_1_channelClassName = "java/lang/Integer"; std::string newElement_1_channelCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_channelClassName.c_str(), - newElement_1_channelCtorSignature.c_str(), - entry_1.channel, newElement_1_channel); + jint jninewElement_1_channel = static_cast(entry_1.channel); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_channelClassName.c_str(), + newElement_1_channelCtorSignature.c_str(), + jninewElement_1_channel, newElement_1_channel); jobject newElement_1_wiFiBand; std::string newElement_1_wiFiBandClassName = "java/lang/Integer"; std::string newElement_1_wiFiBandCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_wiFiBandClassName.c_str(), newElement_1_wiFiBandCtorSignature.c_str(), - static_cast(entry_1.wiFiBand), newElement_1_wiFiBand); + jint jninewElement_1_wiFiBand = static_cast(entry_1.wiFiBand); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_wiFiBandClassName.c_str(), + newElement_1_wiFiBandCtorSignature.c_str(), + jninewElement_1_wiFiBand, newElement_1_wiFiBand); jobject newElement_1_rssi; std::string newElement_1_rssiClassName = "java/lang/Integer"; std::string newElement_1_rssiCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_rssiClassName.c_str(), newElement_1_rssiCtorSignature.c_str(), entry_1.rssi, newElement_1_rssi); + jint jninewElement_1_rssi = static_cast(entry_1.rssi); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rssiClassName.c_str(), + newElement_1_rssiCtorSignature.c_str(), jninewElement_1_rssi, + newElement_1_rssi); jclass wiFiInterfaceScanResultStructStructClass_2; err = chip::JniReferences::GetInstance().GetClassRef( @@ -1795,28 +1851,33 @@ void CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CallbackFn( jobject newElement_1_panId; std::string newElement_1_panIdClassName = "java/lang/Integer"; std::string newElement_1_panIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_panIdClassName.c_str(), newElement_1_panIdCtorSignature.c_str(), entry_1.panId, newElement_1_panId); + jint jninewElement_1_panId = static_cast(entry_1.panId); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_panIdClassName.c_str(), + newElement_1_panIdCtorSignature.c_str(), + jninewElement_1_panId, newElement_1_panId); jobject newElement_1_extendedPanId; std::string newElement_1_extendedPanIdClassName = "java/lang/Long"; std::string newElement_1_extendedPanIdCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_extendedPanIdClassName.c_str(), - newElement_1_extendedPanIdCtorSignature.c_str(), - entry_1.extendedPanId, newElement_1_extendedPanId); + jlong jninewElement_1_extendedPanId = static_cast(entry_1.extendedPanId); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_extendedPanIdClassName.c_str(), + newElement_1_extendedPanIdCtorSignature.c_str(), + jninewElement_1_extendedPanId, newElement_1_extendedPanId); jobject newElement_1_networkName; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.networkName, newElement_1_networkName)); jobject newElement_1_channel; std::string newElement_1_channelClassName = "java/lang/Integer"; std::string newElement_1_channelCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_channelClassName.c_str(), - newElement_1_channelCtorSignature.c_str(), - entry_1.channel, newElement_1_channel); + jint jninewElement_1_channel = static_cast(entry_1.channel); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_channelClassName.c_str(), + newElement_1_channelCtorSignature.c_str(), + jninewElement_1_channel, newElement_1_channel); jobject newElement_1_version; std::string newElement_1_versionClassName = "java/lang/Integer"; std::string newElement_1_versionCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_versionClassName.c_str(), - newElement_1_versionCtorSignature.c_str(), - entry_1.version, newElement_1_version); + jint jninewElement_1_version = static_cast(entry_1.version); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_versionClassName.c_str(), + newElement_1_versionCtorSignature.c_str(), + jninewElement_1_version, newElement_1_version); jobject newElement_1_extendedAddress; jbyteArray newElement_1_extendedAddressByteArray = env->NewByteArray(static_cast(entry_1.extendedAddress.size())); @@ -1826,13 +1887,16 @@ void CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CallbackFn( jobject newElement_1_rssi; std::string newElement_1_rssiClassName = "java/lang/Integer"; std::string newElement_1_rssiCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_rssiClassName.c_str(), newElement_1_rssiCtorSignature.c_str(), entry_1.rssi, newElement_1_rssi); + jint jninewElement_1_rssi = static_cast(entry_1.rssi); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rssiClassName.c_str(), + newElement_1_rssiCtorSignature.c_str(), jninewElement_1_rssi, + newElement_1_rssi); jobject newElement_1_lqi; std::string newElement_1_lqiClassName = "java/lang/Integer"; std::string newElement_1_lqiCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_lqiClassName.c_str(), newElement_1_lqiCtorSignature.c_str(), entry_1.lqi, newElement_1_lqi); + jint jninewElement_1_lqi = static_cast(entry_1.lqi); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_lqiClassName.c_str(), newElement_1_lqiCtorSignature.c_str(), jninewElement_1_lqi, newElement_1_lqi); jclass threadInterfaceScanResultStructStructClass_2; err = chip::JniReferences::GetInstance().GetClassRef( @@ -1922,9 +1986,9 @@ void CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::CallbackFn( jobject NetworkingStatus; std::string NetworkingStatusClassName = "java/lang/Integer"; std::string NetworkingStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), - static_cast(dataResponse.networkingStatus), NetworkingStatus); + jint jniNetworkingStatus = static_cast(dataResponse.networkingStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), jniNetworkingStatus, NetworkingStatus); jobject DebugText; if (!dataResponse.debugText.HasValue()) { @@ -1947,9 +2011,10 @@ void CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::CallbackFn( jobject NetworkIndexInsideOptional; std::string NetworkIndexInsideOptionalClassName = "java/lang/Integer"; std::string NetworkIndexInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NetworkIndexInsideOptionalClassName.c_str(), NetworkIndexInsideOptionalCtorSignature.c_str(), - dataResponse.networkIndex.Value(), NetworkIndexInsideOptional); + jint jniNetworkIndexInsideOptional = static_cast(dataResponse.networkIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(NetworkIndexInsideOptionalClassName.c_str(), + NetworkIndexInsideOptionalCtorSignature.c_str(), + jniNetworkIndexInsideOptional, NetworkIndexInsideOptional); chip::JniReferences::GetInstance().CreateOptional(NetworkIndexInsideOptional, NetworkIndex); } @@ -2012,9 +2077,9 @@ void CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::CallbackFn( jobject NetworkingStatus; std::string NetworkingStatusClassName = "java/lang/Integer"; std::string NetworkingStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), - static_cast(dataResponse.networkingStatus), NetworkingStatus); + jint jniNetworkingStatus = static_cast(dataResponse.networkingStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), jniNetworkingStatus, NetworkingStatus); jobject DebugText; if (!dataResponse.debugText.HasValue()) { @@ -2036,8 +2101,9 @@ void CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::CallbackFn( { std::string ErrorValueClassName = "java/lang/Long"; std::string ErrorValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(ErrorValueClassName.c_str(), ErrorValueCtorSignature.c_str(), - dataResponse.errorValue.Value(), ErrorValue); + jlong jniErrorValue = static_cast(dataResponse.errorValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(ErrorValueClassName.c_str(), ErrorValueCtorSignature.c_str(), + jniErrorValue, ErrorValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, NetworkingStatus, DebugText, ErrorValue); @@ -2098,8 +2164,9 @@ void CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - static_cast(dataResponse.status), Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject LogContent; jbyteArray LogContentByteArray = env->NewByteArray(static_cast(dataResponse.logContent.size())); env->SetByteArrayRegion(LogContentByteArray, 0, static_cast(dataResponse.logContent.size()), @@ -2115,9 +2182,10 @@ void CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CallbackFn( jobject UTCTimeStampInsideOptional; std::string UTCTimeStampInsideOptionalClassName = "java/lang/Long"; std::string UTCTimeStampInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - UTCTimeStampInsideOptionalClassName.c_str(), UTCTimeStampInsideOptionalCtorSignature.c_str(), - dataResponse.UTCTimeStamp.Value(), UTCTimeStampInsideOptional); + jlong jniUTCTimeStampInsideOptional = static_cast(dataResponse.UTCTimeStamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(UTCTimeStampInsideOptionalClassName.c_str(), + UTCTimeStampInsideOptionalCtorSignature.c_str(), + jniUTCTimeStampInsideOptional, UTCTimeStampInsideOptional); chip::JniReferences::GetInstance().CreateOptional(UTCTimeStampInsideOptional, UTCTimeStamp); } jobject TimeSinceBoot; @@ -2130,9 +2198,10 @@ void CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CallbackFn( jobject TimeSinceBootInsideOptional; std::string TimeSinceBootInsideOptionalClassName = "java/lang/Long"; std::string TimeSinceBootInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - TimeSinceBootInsideOptionalClassName.c_str(), TimeSinceBootInsideOptionalCtorSignature.c_str(), - dataResponse.timeSinceBoot.Value(), TimeSinceBootInsideOptional); + jlong jniTimeSinceBootInsideOptional = static_cast(dataResponse.timeSinceBoot.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(TimeSinceBootInsideOptionalClassName.c_str(), + TimeSinceBootInsideOptionalCtorSignature.c_str(), + jniTimeSinceBootInsideOptional, TimeSinceBootInsideOptional); chip::JniReferences::GetInstance().CreateOptional(TimeSinceBootInsideOptional, TimeSinceBoot); } @@ -2194,9 +2263,9 @@ void CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::CallbackFn( jobject DSTOffsetRequired; std::string DSTOffsetRequiredClassName = "java/lang/Boolean"; std::string DSTOffsetRequiredCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(DSTOffsetRequiredClassName.c_str(), - DSTOffsetRequiredCtorSignature.c_str(), - dataResponse.DSTOffsetRequired, DSTOffsetRequired); + jboolean jniDSTOffsetRequired = static_cast(dataResponse.DSTOffsetRequired); + chip::JniReferences::GetInstance().CreateBoxedObject( + DSTOffsetRequiredClassName.c_str(), DSTOffsetRequiredCtorSignature.c_str(), jniDSTOffsetRequired, DSTOffsetRequired); env->CallVoidMethod(javaCallbackRef, javaMethod, DSTOffsetRequired); } @@ -2450,8 +2519,9 @@ void CHIPOperationalCredentialsClusterNOCResponseCallback::CallbackFn( jobject StatusCode; std::string StatusCodeClassName = "java/lang/Integer"; std::string StatusCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusCodeClassName.c_str(), StatusCodeCtorSignature.c_str(), - static_cast(dataResponse.statusCode), StatusCode); + jint jniStatusCode = static_cast(dataResponse.statusCode); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusCodeClassName.c_str(), StatusCodeCtorSignature.c_str(), + jniStatusCode, StatusCode); jobject FabricIndex; if (!dataResponse.fabricIndex.HasValue()) { @@ -2462,9 +2532,10 @@ void CHIPOperationalCredentialsClusterNOCResponseCallback::CallbackFn( jobject FabricIndexInsideOptional; std::string FabricIndexInsideOptionalClassName = "java/lang/Integer"; std::string FabricIndexInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(FabricIndexInsideOptionalClassName.c_str(), - FabricIndexInsideOptionalCtorSignature.c_str(), - dataResponse.fabricIndex.Value(), FabricIndexInsideOptional); + jint jniFabricIndexInsideOptional = static_cast(dataResponse.fabricIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(FabricIndexInsideOptionalClassName.c_str(), + FabricIndexInsideOptionalCtorSignature.c_str(), + jniFabricIndexInsideOptional, FabricIndexInsideOptional); chip::JniReferences::GetInstance().CreateOptional(FabricIndexInsideOptional, FabricIndex); } jobject DebugText; @@ -2541,15 +2612,17 @@ void CHIPGroupKeyManagementClusterKeySetReadResponseCallback::CallbackFn( jobject GroupKeySet_groupKeySetID; std::string GroupKeySet_groupKeySetIDClassName = "java/lang/Integer"; std::string GroupKeySet_groupKeySetIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - GroupKeySet_groupKeySetIDClassName.c_str(), GroupKeySet_groupKeySetIDCtorSignature.c_str(), - dataResponse.groupKeySet.groupKeySetID, GroupKeySet_groupKeySetID); + jint jniGroupKeySet_groupKeySetID = static_cast(dataResponse.groupKeySet.groupKeySetID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_groupKeySetIDClassName.c_str(), + GroupKeySet_groupKeySetIDCtorSignature.c_str(), + jniGroupKeySet_groupKeySetID, GroupKeySet_groupKeySetID); jobject GroupKeySet_groupKeySecurityPolicy; std::string GroupKeySet_groupKeySecurityPolicyClassName = "java/lang/Integer"; std::string GroupKeySet_groupKeySecurityPolicyCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jniGroupKeySet_groupKeySecurityPolicy = static_cast(dataResponse.groupKeySet.groupKeySecurityPolicy); + chip::JniReferences::GetInstance().CreateBoxedObject( GroupKeySet_groupKeySecurityPolicyClassName.c_str(), GroupKeySet_groupKeySecurityPolicyCtorSignature.c_str(), - static_cast(dataResponse.groupKeySet.groupKeySecurityPolicy), GroupKeySet_groupKeySecurityPolicy); + jniGroupKeySet_groupKeySecurityPolicy, GroupKeySet_groupKeySecurityPolicy); jobject GroupKeySet_epochKey0; if (dataResponse.groupKeySet.epochKey0.IsNull()) { @@ -2573,9 +2646,10 @@ void CHIPGroupKeyManagementClusterKeySetReadResponseCallback::CallbackFn( { std::string GroupKeySet_epochStartTime0ClassName = "java/lang/Long"; std::string GroupKeySet_epochStartTime0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - GroupKeySet_epochStartTime0ClassName.c_str(), GroupKeySet_epochStartTime0CtorSignature.c_str(), - dataResponse.groupKeySet.epochStartTime0.Value(), GroupKeySet_epochStartTime0); + jlong jniGroupKeySet_epochStartTime0 = static_cast(dataResponse.groupKeySet.epochStartTime0.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_epochStartTime0ClassName.c_str(), + GroupKeySet_epochStartTime0CtorSignature.c_str(), + jniGroupKeySet_epochStartTime0, GroupKeySet_epochStartTime0); } jobject GroupKeySet_epochKey1; if (dataResponse.groupKeySet.epochKey1.IsNull()) @@ -2600,9 +2674,10 @@ void CHIPGroupKeyManagementClusterKeySetReadResponseCallback::CallbackFn( { std::string GroupKeySet_epochStartTime1ClassName = "java/lang/Long"; std::string GroupKeySet_epochStartTime1CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - GroupKeySet_epochStartTime1ClassName.c_str(), GroupKeySet_epochStartTime1CtorSignature.c_str(), - dataResponse.groupKeySet.epochStartTime1.Value(), GroupKeySet_epochStartTime1); + jlong jniGroupKeySet_epochStartTime1 = static_cast(dataResponse.groupKeySet.epochStartTime1.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_epochStartTime1ClassName.c_str(), + GroupKeySet_epochStartTime1CtorSignature.c_str(), + jniGroupKeySet_epochStartTime1, GroupKeySet_epochStartTime1); } jobject GroupKeySet_epochKey2; if (dataResponse.groupKeySet.epochKey2.IsNull()) @@ -2627,9 +2702,10 @@ void CHIPGroupKeyManagementClusterKeySetReadResponseCallback::CallbackFn( { std::string GroupKeySet_epochStartTime2ClassName = "java/lang/Long"; std::string GroupKeySet_epochStartTime2CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - GroupKeySet_epochStartTime2ClassName.c_str(), GroupKeySet_epochStartTime2CtorSignature.c_str(), - dataResponse.groupKeySet.epochStartTime2.Value(), GroupKeySet_epochStartTime2); + jlong jniGroupKeySet_epochStartTime2 = static_cast(dataResponse.groupKeySet.epochStartTime2.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_epochStartTime2ClassName.c_str(), + GroupKeySet_epochStartTime2CtorSignature.c_str(), + jniGroupKeySet_epochStartTime2, GroupKeySet_epochStartTime2); } jclass groupKeySetStructStructClass_0; @@ -2721,8 +2797,9 @@ void CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback::Callback jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(GroupKeySetIDs, newElement_0); } @@ -2784,8 +2861,9 @@ void CHIPIcdManagementClusterRegisterClientResponseCallback::CallbackFn( jobject ICDCounter; std::string ICDCounterClassName = "java/lang/Long"; std::string ICDCounterCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(ICDCounterClassName.c_str(), ICDCounterCtorSignature.c_str(), - dataResponse.ICDCounter, ICDCounter); + jlong jniICDCounter = static_cast(dataResponse.ICDCounter); + chip::JniReferences::GetInstance().CreateBoxedObject(ICDCounterClassName.c_str(), ICDCounterCtorSignature.c_str(), + jniICDCounter, ICDCounter); env->CallVoidMethod(javaCallbackRef, javaMethod, ICDCounter); } @@ -2846,8 +2924,9 @@ void CHIPLaundryWasherModeClusterChangeToModeResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject StatusText; if (!dataResponse.statusText.HasValue()) { @@ -2924,8 +3003,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeRespo jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject StatusText; if (!dataResponse.statusText.HasValue()) { @@ -2997,8 +3077,9 @@ void CHIPRvcRunModeClusterChangeToModeResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject StatusText; if (!dataResponse.statusText.HasValue()) { @@ -3070,8 +3151,9 @@ void CHIPRvcCleanModeClusterChangeToModeResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject StatusText; if (!dataResponse.statusText.HasValue()) { @@ -3143,8 +3225,9 @@ void CHIPDishwasherModeClusterChangeToModeResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - dataResponse.status, Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject StatusText; if (!dataResponse.statusText.HasValue()) { @@ -3219,9 +3302,10 @@ void CHIPOperationalStateClusterOperationalCommandResponseCallback::CallbackFn( jobject CommandResponseState_errorStateID; std::string CommandResponseState_errorStateIDClassName = "java/lang/Integer"; std::string CommandResponseState_errorStateIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jniCommandResponseState_errorStateID = static_cast(dataResponse.commandResponseState.errorStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( CommandResponseState_errorStateIDClassName.c_str(), CommandResponseState_errorStateIDCtorSignature.c_str(), - dataResponse.commandResponseState.errorStateID, CommandResponseState_errorStateID); + jniCommandResponseState_errorStateID, CommandResponseState_errorStateID); jobject CommandResponseState_errorStateLabel; if (!dataResponse.commandResponseState.errorStateLabel.HasValue()) { @@ -3332,9 +3416,10 @@ void CHIPRvcOperationalStateClusterOperationalCommandResponseCallback::CallbackF jobject CommandResponseState_errorStateID; std::string CommandResponseState_errorStateIDClassName = "java/lang/Integer"; std::string CommandResponseState_errorStateIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jniCommandResponseState_errorStateID = static_cast(dataResponse.commandResponseState.errorStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( CommandResponseState_errorStateIDClassName.c_str(), CommandResponseState_errorStateIDCtorSignature.c_str(), - dataResponse.commandResponseState.errorStateID, CommandResponseState_errorStateID); + jniCommandResponseState_errorStateID, CommandResponseState_errorStateID); jobject CommandResponseState_errorStateLabel; if (!dataResponse.commandResponseState.errorStateLabel.HasValue()) { @@ -3443,18 +3528,21 @@ void CHIPDoorLockClusterGetWeekDayScheduleResponseCallback::CallbackFn( jobject WeekDayIndex; std::string WeekDayIndexClassName = "java/lang/Integer"; std::string WeekDayIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(WeekDayIndexClassName.c_str(), WeekDayIndexCtorSignature.c_str(), - dataResponse.weekDayIndex, WeekDayIndex); + jint jniWeekDayIndex = static_cast(dataResponse.weekDayIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(WeekDayIndexClassName.c_str(), WeekDayIndexCtorSignature.c_str(), + jniWeekDayIndex, WeekDayIndex); jobject UserIndex; std::string UserIndexClassName = "java/lang/Integer"; std::string UserIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), - dataResponse.userIndex, UserIndex); + jint jniUserIndex = static_cast(dataResponse.userIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), + jniUserIndex, UserIndex); jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - static_cast(dataResponse.status), Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject DaysMask; if (!dataResponse.daysMask.HasValue()) { @@ -3465,9 +3553,10 @@ void CHIPDoorLockClusterGetWeekDayScheduleResponseCallback::CallbackFn( jobject DaysMaskInsideOptional; std::string DaysMaskInsideOptionalClassName = "java/lang/Integer"; std::string DaysMaskInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(DaysMaskInsideOptionalClassName.c_str(), - DaysMaskInsideOptionalCtorSignature.c_str(), - dataResponse.daysMask.Value().Raw(), DaysMaskInsideOptional); + jint jniDaysMaskInsideOptional = static_cast(dataResponse.daysMask.Value().Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(DaysMaskInsideOptionalClassName.c_str(), + DaysMaskInsideOptionalCtorSignature.c_str(), + jniDaysMaskInsideOptional, DaysMaskInsideOptional); chip::JniReferences::GetInstance().CreateOptional(DaysMaskInsideOptional, DaysMask); } jobject StartHour; @@ -3480,9 +3569,10 @@ void CHIPDoorLockClusterGetWeekDayScheduleResponseCallback::CallbackFn( jobject StartHourInsideOptional; std::string StartHourInsideOptionalClassName = "java/lang/Integer"; std::string StartHourInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StartHourInsideOptionalClassName.c_str(), - StartHourInsideOptionalCtorSignature.c_str(), - dataResponse.startHour.Value(), StartHourInsideOptional); + jint jniStartHourInsideOptional = static_cast(dataResponse.startHour.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(StartHourInsideOptionalClassName.c_str(), + StartHourInsideOptionalCtorSignature.c_str(), + jniStartHourInsideOptional, StartHourInsideOptional); chip::JniReferences::GetInstance().CreateOptional(StartHourInsideOptional, StartHour); } jobject StartMinute; @@ -3495,9 +3585,10 @@ void CHIPDoorLockClusterGetWeekDayScheduleResponseCallback::CallbackFn( jobject StartMinuteInsideOptional; std::string StartMinuteInsideOptionalClassName = "java/lang/Integer"; std::string StartMinuteInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StartMinuteInsideOptionalClassName.c_str(), - StartMinuteInsideOptionalCtorSignature.c_str(), - dataResponse.startMinute.Value(), StartMinuteInsideOptional); + jint jniStartMinuteInsideOptional = static_cast(dataResponse.startMinute.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(StartMinuteInsideOptionalClassName.c_str(), + StartMinuteInsideOptionalCtorSignature.c_str(), + jniStartMinuteInsideOptional, StartMinuteInsideOptional); chip::JniReferences::GetInstance().CreateOptional(StartMinuteInsideOptional, StartMinute); } jobject EndHour; @@ -3510,9 +3601,10 @@ void CHIPDoorLockClusterGetWeekDayScheduleResponseCallback::CallbackFn( jobject EndHourInsideOptional; std::string EndHourInsideOptionalClassName = "java/lang/Integer"; std::string EndHourInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(EndHourInsideOptionalClassName.c_str(), - EndHourInsideOptionalCtorSignature.c_str(), - dataResponse.endHour.Value(), EndHourInsideOptional); + jint jniEndHourInsideOptional = static_cast(dataResponse.endHour.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(EndHourInsideOptionalClassName.c_str(), + EndHourInsideOptionalCtorSignature.c_str(), + jniEndHourInsideOptional, EndHourInsideOptional); chip::JniReferences::GetInstance().CreateOptional(EndHourInsideOptional, EndHour); } jobject EndMinute; @@ -3525,9 +3617,10 @@ void CHIPDoorLockClusterGetWeekDayScheduleResponseCallback::CallbackFn( jobject EndMinuteInsideOptional; std::string EndMinuteInsideOptionalClassName = "java/lang/Integer"; std::string EndMinuteInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(EndMinuteInsideOptionalClassName.c_str(), - EndMinuteInsideOptionalCtorSignature.c_str(), - dataResponse.endMinute.Value(), EndMinuteInsideOptional); + jint jniEndMinuteInsideOptional = static_cast(dataResponse.endMinute.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(EndMinuteInsideOptionalClassName.c_str(), + EndMinuteInsideOptionalCtorSignature.c_str(), + jniEndMinuteInsideOptional, EndMinuteInsideOptional); chip::JniReferences::GetInstance().CreateOptional(EndMinuteInsideOptional, EndMinute); } @@ -3591,18 +3684,21 @@ void CHIPDoorLockClusterGetYearDayScheduleResponseCallback::CallbackFn( jobject YearDayIndex; std::string YearDayIndexClassName = "java/lang/Integer"; std::string YearDayIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(YearDayIndexClassName.c_str(), YearDayIndexCtorSignature.c_str(), - dataResponse.yearDayIndex, YearDayIndex); + jint jniYearDayIndex = static_cast(dataResponse.yearDayIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(YearDayIndexClassName.c_str(), YearDayIndexCtorSignature.c_str(), + jniYearDayIndex, YearDayIndex); jobject UserIndex; std::string UserIndexClassName = "java/lang/Integer"; std::string UserIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), - dataResponse.userIndex, UserIndex); + jint jniUserIndex = static_cast(dataResponse.userIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), + jniUserIndex, UserIndex); jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - static_cast(dataResponse.status), Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject LocalStartTime; if (!dataResponse.localStartTime.HasValue()) { @@ -3613,9 +3709,10 @@ void CHIPDoorLockClusterGetYearDayScheduleResponseCallback::CallbackFn( jobject LocalStartTimeInsideOptional; std::string LocalStartTimeInsideOptionalClassName = "java/lang/Long"; std::string LocalStartTimeInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - LocalStartTimeInsideOptionalClassName.c_str(), LocalStartTimeInsideOptionalCtorSignature.c_str(), - dataResponse.localStartTime.Value(), LocalStartTimeInsideOptional); + jlong jniLocalStartTimeInsideOptional = static_cast(dataResponse.localStartTime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(LocalStartTimeInsideOptionalClassName.c_str(), + LocalStartTimeInsideOptionalCtorSignature.c_str(), + jniLocalStartTimeInsideOptional, LocalStartTimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(LocalStartTimeInsideOptional, LocalStartTime); } jobject LocalEndTime; @@ -3628,9 +3725,10 @@ void CHIPDoorLockClusterGetYearDayScheduleResponseCallback::CallbackFn( jobject LocalEndTimeInsideOptional; std::string LocalEndTimeInsideOptionalClassName = "java/lang/Long"; std::string LocalEndTimeInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - LocalEndTimeInsideOptionalClassName.c_str(), LocalEndTimeInsideOptionalCtorSignature.c_str(), - dataResponse.localEndTime.Value(), LocalEndTimeInsideOptional); + jlong jniLocalEndTimeInsideOptional = static_cast(dataResponse.localEndTime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(LocalEndTimeInsideOptionalClassName.c_str(), + LocalEndTimeInsideOptionalCtorSignature.c_str(), + jniLocalEndTimeInsideOptional, LocalEndTimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(LocalEndTimeInsideOptional, LocalEndTime); } @@ -3693,13 +3791,15 @@ void CHIPDoorLockClusterGetHolidayScheduleResponseCallback::CallbackFn( jobject HolidayIndex; std::string HolidayIndexClassName = "java/lang/Integer"; std::string HolidayIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(HolidayIndexClassName.c_str(), HolidayIndexCtorSignature.c_str(), - dataResponse.holidayIndex, HolidayIndex); + jint jniHolidayIndex = static_cast(dataResponse.holidayIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(HolidayIndexClassName.c_str(), HolidayIndexCtorSignature.c_str(), + jniHolidayIndex, HolidayIndex); jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - static_cast(dataResponse.status), Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject LocalStartTime; if (!dataResponse.localStartTime.HasValue()) { @@ -3710,9 +3810,10 @@ void CHIPDoorLockClusterGetHolidayScheduleResponseCallback::CallbackFn( jobject LocalStartTimeInsideOptional; std::string LocalStartTimeInsideOptionalClassName = "java/lang/Long"; std::string LocalStartTimeInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - LocalStartTimeInsideOptionalClassName.c_str(), LocalStartTimeInsideOptionalCtorSignature.c_str(), - dataResponse.localStartTime.Value(), LocalStartTimeInsideOptional); + jlong jniLocalStartTimeInsideOptional = static_cast(dataResponse.localStartTime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(LocalStartTimeInsideOptionalClassName.c_str(), + LocalStartTimeInsideOptionalCtorSignature.c_str(), + jniLocalStartTimeInsideOptional, LocalStartTimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(LocalStartTimeInsideOptional, LocalStartTime); } jobject LocalEndTime; @@ -3725,9 +3826,10 @@ void CHIPDoorLockClusterGetHolidayScheduleResponseCallback::CallbackFn( jobject LocalEndTimeInsideOptional; std::string LocalEndTimeInsideOptionalClassName = "java/lang/Long"; std::string LocalEndTimeInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - LocalEndTimeInsideOptionalClassName.c_str(), LocalEndTimeInsideOptionalCtorSignature.c_str(), - dataResponse.localEndTime.Value(), LocalEndTimeInsideOptional); + jlong jniLocalEndTimeInsideOptional = static_cast(dataResponse.localEndTime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(LocalEndTimeInsideOptionalClassName.c_str(), + LocalEndTimeInsideOptionalCtorSignature.c_str(), + jniLocalEndTimeInsideOptional, LocalEndTimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(LocalEndTimeInsideOptional, LocalEndTime); } jobject OperatingMode; @@ -3740,9 +3842,10 @@ void CHIPDoorLockClusterGetHolidayScheduleResponseCallback::CallbackFn( jobject OperatingModeInsideOptional; std::string OperatingModeInsideOptionalClassName = "java/lang/Integer"; std::string OperatingModeInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - OperatingModeInsideOptionalClassName.c_str(), OperatingModeInsideOptionalCtorSignature.c_str(), - static_cast(dataResponse.operatingMode.Value()), OperatingModeInsideOptional); + jint jniOperatingModeInsideOptional = static_cast(dataResponse.operatingMode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(OperatingModeInsideOptionalClassName.c_str(), + OperatingModeInsideOptionalCtorSignature.c_str(), + jniOperatingModeInsideOptional, OperatingModeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(OperatingModeInsideOptional, OperatingMode); } @@ -3806,8 +3909,9 @@ void CHIPDoorLockClusterGetUserResponseCallback::CallbackFn( jobject UserIndex; std::string UserIndexClassName = "java/lang/Integer"; std::string UserIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), - dataResponse.userIndex, UserIndex); + jint jniUserIndex = static_cast(dataResponse.userIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), + jniUserIndex, UserIndex); jobject UserName; if (dataResponse.userName.IsNull()) { @@ -3826,8 +3930,9 @@ void CHIPDoorLockClusterGetUserResponseCallback::CallbackFn( { std::string UserUniqueIDClassName = "java/lang/Long"; std::string UserUniqueIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - UserUniqueIDClassName.c_str(), UserUniqueIDCtorSignature.c_str(), dataResponse.userUniqueID.Value(), UserUniqueID); + jlong jniUserUniqueID = static_cast(dataResponse.userUniqueID.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + UserUniqueIDClassName.c_str(), UserUniqueIDCtorSignature.c_str(), jniUserUniqueID, UserUniqueID); } jobject UserStatus; if (dataResponse.userStatus.IsNull()) @@ -3838,9 +3943,9 @@ void CHIPDoorLockClusterGetUserResponseCallback::CallbackFn( { std::string UserStatusClassName = "java/lang/Integer"; std::string UserStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(UserStatusClassName.c_str(), UserStatusCtorSignature.c_str(), - static_cast(dataResponse.userStatus.Value()), - UserStatus); + jint jniUserStatus = static_cast(dataResponse.userStatus.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(UserStatusClassName.c_str(), UserStatusCtorSignature.c_str(), + jniUserStatus, UserStatus); } jobject UserType; if (dataResponse.userType.IsNull()) @@ -3851,9 +3956,9 @@ void CHIPDoorLockClusterGetUserResponseCallback::CallbackFn( { std::string UserTypeClassName = "java/lang/Integer"; std::string UserTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(UserTypeClassName.c_str(), UserTypeCtorSignature.c_str(), - static_cast(dataResponse.userType.Value()), - UserType); + jint jniUserType = static_cast(dataResponse.userType.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(UserTypeClassName.c_str(), UserTypeCtorSignature.c_str(), + jniUserType, UserType); } jobject CredentialRule; if (dataResponse.credentialRule.IsNull()) @@ -3864,9 +3969,9 @@ void CHIPDoorLockClusterGetUserResponseCallback::CallbackFn( { std::string CredentialRuleClassName = "java/lang/Integer"; std::string CredentialRuleCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - CredentialRuleClassName.c_str(), CredentialRuleCtorSignature.c_str(), - static_cast(dataResponse.credentialRule.Value()), CredentialRule); + jint jniCredentialRule = static_cast(dataResponse.credentialRule.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + CredentialRuleClassName.c_str(), CredentialRuleCtorSignature.c_str(), jniCredentialRule, CredentialRule); } jobject Credentials; if (dataResponse.credentials.IsNull()) @@ -3885,15 +3990,17 @@ void CHIPDoorLockClusterGetUserResponseCallback::CallbackFn( jobject newElement_1_credentialType; std::string newElement_1_credentialTypeClassName = "java/lang/Integer"; std::string newElement_1_credentialTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_credentialTypeClassName.c_str(), newElement_1_credentialTypeCtorSignature.c_str(), - static_cast(entry_1.credentialType), newElement_1_credentialType); + jint jninewElement_1_credentialType = static_cast(entry_1.credentialType); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_credentialTypeClassName.c_str(), + newElement_1_credentialTypeCtorSignature.c_str(), + jninewElement_1_credentialType, newElement_1_credentialType); jobject newElement_1_credentialIndex; std::string newElement_1_credentialIndexClassName = "java/lang/Integer"; std::string newElement_1_credentialIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_credentialIndexClassName.c_str(), - newElement_1_credentialIndexCtorSignature.c_str(), - entry_1.credentialIndex, newElement_1_credentialIndex); + jint jninewElement_1_credentialIndex = static_cast(entry_1.credentialIndex); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_credentialIndexClassName.c_str(), newElement_1_credentialIndexCtorSignature.c_str(), + jninewElement_1_credentialIndex, newElement_1_credentialIndex); jclass credentialStructStructClass_2; err = chip::JniReferences::GetInstance().GetClassRef( @@ -3925,9 +4032,10 @@ void CHIPDoorLockClusterGetUserResponseCallback::CallbackFn( { std::string CreatorFabricIndexClassName = "java/lang/Integer"; std::string CreatorFabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(CreatorFabricIndexClassName.c_str(), - CreatorFabricIndexCtorSignature.c_str(), - dataResponse.creatorFabricIndex.Value(), CreatorFabricIndex); + jint jniCreatorFabricIndex = static_cast(dataResponse.creatorFabricIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(CreatorFabricIndexClassName.c_str(), + CreatorFabricIndexCtorSignature.c_str(), jniCreatorFabricIndex, + CreatorFabricIndex); } jobject LastModifiedFabricIndex; if (dataResponse.lastModifiedFabricIndex.IsNull()) @@ -3938,9 +4046,10 @@ void CHIPDoorLockClusterGetUserResponseCallback::CallbackFn( { std::string LastModifiedFabricIndexClassName = "java/lang/Integer"; std::string LastModifiedFabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - LastModifiedFabricIndexClassName.c_str(), LastModifiedFabricIndexCtorSignature.c_str(), - dataResponse.lastModifiedFabricIndex.Value(), LastModifiedFabricIndex); + jint jniLastModifiedFabricIndex = static_cast(dataResponse.lastModifiedFabricIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(LastModifiedFabricIndexClassName.c_str(), + LastModifiedFabricIndexCtorSignature.c_str(), + jniLastModifiedFabricIndex, LastModifiedFabricIndex); } jobject NextUserIndex; if (dataResponse.nextUserIndex.IsNull()) @@ -3951,8 +4060,9 @@ void CHIPDoorLockClusterGetUserResponseCallback::CallbackFn( { std::string NextUserIndexClassName = "java/lang/Integer"; std::string NextUserIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NextUserIndexClassName.c_str(), NextUserIndexCtorSignature.c_str(), dataResponse.nextUserIndex.Value(), NextUserIndex); + jint jniNextUserIndex = static_cast(dataResponse.nextUserIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + NextUserIndexClassName.c_str(), NextUserIndexCtorSignature.c_str(), jniNextUserIndex, NextUserIndex); } env->CallVoidMethod(javaCallbackRef, javaMethod, UserIndex, UserName, UserUniqueID, UserStatus, UserType, CredentialRule, @@ -4013,8 +4123,9 @@ void CHIPDoorLockClusterSetCredentialResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - static_cast(dataResponse.status), Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject UserIndex; if (dataResponse.userIndex.IsNull()) { @@ -4024,8 +4135,9 @@ void CHIPDoorLockClusterSetCredentialResponseCallback::CallbackFn( { std::string UserIndexClassName = "java/lang/Integer"; std::string UserIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), - dataResponse.userIndex.Value(), UserIndex); + jint jniUserIndex = static_cast(dataResponse.userIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), + jniUserIndex, UserIndex); } jobject NextCredentialIndex; if (dataResponse.nextCredentialIndex.IsNull()) @@ -4036,9 +4148,10 @@ void CHIPDoorLockClusterSetCredentialResponseCallback::CallbackFn( { std::string NextCredentialIndexClassName = "java/lang/Integer"; std::string NextCredentialIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NextCredentialIndexClassName.c_str(), NextCredentialIndexCtorSignature.c_str(), - dataResponse.nextCredentialIndex.Value(), NextCredentialIndex); + jint jniNextCredentialIndex = static_cast(dataResponse.nextCredentialIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(NextCredentialIndexClassName.c_str(), + NextCredentialIndexCtorSignature.c_str(), jniNextCredentialIndex, + NextCredentialIndex); } env->CallVoidMethod(javaCallbackRef, javaMethod, Status, UserIndex, NextCredentialIndex); @@ -4101,8 +4214,9 @@ void CHIPDoorLockClusterGetCredentialStatusResponseCallback::CallbackFn( jobject CredentialExists; std::string CredentialExistsClassName = "java/lang/Boolean"; std::string CredentialExistsCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - CredentialExistsClassName.c_str(), CredentialExistsCtorSignature.c_str(), dataResponse.credentialExists, CredentialExists); + jboolean jniCredentialExists = static_cast(dataResponse.credentialExists); + chip::JniReferences::GetInstance().CreateBoxedObject( + CredentialExistsClassName.c_str(), CredentialExistsCtorSignature.c_str(), jniCredentialExists, CredentialExists); jobject UserIndex; if (dataResponse.userIndex.IsNull()) { @@ -4112,8 +4226,9 @@ void CHIPDoorLockClusterGetCredentialStatusResponseCallback::CallbackFn( { std::string UserIndexClassName = "java/lang/Integer"; std::string UserIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), - dataResponse.userIndex.Value(), UserIndex); + jint jniUserIndex = static_cast(dataResponse.userIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), + jniUserIndex, UserIndex); } jobject CreatorFabricIndex; if (dataResponse.creatorFabricIndex.IsNull()) @@ -4124,9 +4239,10 @@ void CHIPDoorLockClusterGetCredentialStatusResponseCallback::CallbackFn( { std::string CreatorFabricIndexClassName = "java/lang/Integer"; std::string CreatorFabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(CreatorFabricIndexClassName.c_str(), - CreatorFabricIndexCtorSignature.c_str(), - dataResponse.creatorFabricIndex.Value(), CreatorFabricIndex); + jint jniCreatorFabricIndex = static_cast(dataResponse.creatorFabricIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(CreatorFabricIndexClassName.c_str(), + CreatorFabricIndexCtorSignature.c_str(), jniCreatorFabricIndex, + CreatorFabricIndex); } jobject LastModifiedFabricIndex; if (dataResponse.lastModifiedFabricIndex.IsNull()) @@ -4137,9 +4253,10 @@ void CHIPDoorLockClusterGetCredentialStatusResponseCallback::CallbackFn( { std::string LastModifiedFabricIndexClassName = "java/lang/Integer"; std::string LastModifiedFabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - LastModifiedFabricIndexClassName.c_str(), LastModifiedFabricIndexCtorSignature.c_str(), - dataResponse.lastModifiedFabricIndex.Value(), LastModifiedFabricIndex); + jint jniLastModifiedFabricIndex = static_cast(dataResponse.lastModifiedFabricIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(LastModifiedFabricIndexClassName.c_str(), + LastModifiedFabricIndexCtorSignature.c_str(), + jniLastModifiedFabricIndex, LastModifiedFabricIndex); } jobject NextCredentialIndex; if (dataResponse.nextCredentialIndex.IsNull()) @@ -4150,9 +4267,10 @@ void CHIPDoorLockClusterGetCredentialStatusResponseCallback::CallbackFn( { std::string NextCredentialIndexClassName = "java/lang/Integer"; std::string NextCredentialIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NextCredentialIndexClassName.c_str(), NextCredentialIndexCtorSignature.c_str(), - dataResponse.nextCredentialIndex.Value(), NextCredentialIndex); + jint jniNextCredentialIndex = static_cast(dataResponse.nextCredentialIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(NextCredentialIndexClassName.c_str(), + NextCredentialIndexCtorSignature.c_str(), jniNextCredentialIndex, + NextCredentialIndex); } env->CallVoidMethod(javaCallbackRef, javaMethod, CredentialExists, UserIndex, CreatorFabricIndex, LastModifiedFabricIndex, @@ -4216,21 +4334,23 @@ void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( jobject NumberOfTransitionsForSequence; std::string NumberOfTransitionsForSequenceClassName = "java/lang/Integer"; std::string NumberOfTransitionsForSequenceCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NumberOfTransitionsForSequenceClassName.c_str(), NumberOfTransitionsForSequenceCtorSignature.c_str(), - dataResponse.numberOfTransitionsForSequence, NumberOfTransitionsForSequence); + jint jniNumberOfTransitionsForSequence = static_cast(dataResponse.numberOfTransitionsForSequence); + chip::JniReferences::GetInstance().CreateBoxedObject(NumberOfTransitionsForSequenceClassName.c_str(), + NumberOfTransitionsForSequenceCtorSignature.c_str(), + jniNumberOfTransitionsForSequence, NumberOfTransitionsForSequence); jobject DayOfWeekForSequence; std::string DayOfWeekForSequenceClassName = "java/lang/Integer"; std::string DayOfWeekForSequenceCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(DayOfWeekForSequenceClassName.c_str(), - DayOfWeekForSequenceCtorSignature.c_str(), - dataResponse.dayOfWeekForSequence.Raw(), DayOfWeekForSequence); + jint jniDayOfWeekForSequence = static_cast(dataResponse.dayOfWeekForSequence.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(DayOfWeekForSequenceClassName.c_str(), + DayOfWeekForSequenceCtorSignature.c_str(), jniDayOfWeekForSequence, + DayOfWeekForSequence); jobject ModeForSequence; std::string ModeForSequenceClassName = "java/lang/Integer"; std::string ModeForSequenceCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(ModeForSequenceClassName.c_str(), - ModeForSequenceCtorSignature.c_str(), - dataResponse.modeForSequence.Raw(), ModeForSequence); + jint jniModeForSequence = static_cast(dataResponse.modeForSequence.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + ModeForSequenceClassName.c_str(), ModeForSequenceCtorSignature.c_str(), jniModeForSequence, ModeForSequence); jobject Transitions; chip::JniReferences::GetInstance().CreateArrayList(Transitions); @@ -4242,9 +4362,10 @@ void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( jobject newElement_0_transitionTime; std::string newElement_0_transitionTimeClassName = "java/lang/Integer"; std::string newElement_0_transitionTimeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_transitionTimeClassName.c_str(), - newElement_0_transitionTimeCtorSignature.c_str(), - entry_0.transitionTime, newElement_0_transitionTime); + jint jninewElement_0_transitionTime = static_cast(entry_0.transitionTime); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_transitionTimeClassName.c_str(), + newElement_0_transitionTimeCtorSignature.c_str(), + jninewElement_0_transitionTime, newElement_0_transitionTime); jobject newElement_0_heatSetpoint; if (entry_0.heatSetpoint.IsNull()) { @@ -4254,9 +4375,10 @@ void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( { std::string newElement_0_heatSetpointClassName = "java/lang/Integer"; std::string newElement_0_heatSetpointCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_heatSetpointClassName.c_str(), - newElement_0_heatSetpointCtorSignature.c_str(), - entry_0.heatSetpoint.Value(), newElement_0_heatSetpoint); + jint jninewElement_0_heatSetpoint = static_cast(entry_0.heatSetpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_heatSetpointClassName.c_str(), + newElement_0_heatSetpointCtorSignature.c_str(), + jninewElement_0_heatSetpoint, newElement_0_heatSetpoint); } jobject newElement_0_coolSetpoint; if (entry_0.coolSetpoint.IsNull()) @@ -4267,9 +4389,10 @@ void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( { std::string newElement_0_coolSetpointClassName = "java/lang/Integer"; std::string newElement_0_coolSetpointCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_coolSetpointClassName.c_str(), - newElement_0_coolSetpointCtorSignature.c_str(), - entry_0.coolSetpoint.Value(), newElement_0_coolSetpoint); + jint jninewElement_0_coolSetpoint = static_cast(entry_0.coolSetpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_coolSetpointClassName.c_str(), + newElement_0_coolSetpointCtorSignature.c_str(), + jninewElement_0_coolSetpoint, newElement_0_coolSetpoint); } jclass thermostatScheduleTransitionStructClass_1; @@ -4352,8 +4475,9 @@ void CHIPChannelClusterChangeChannelResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - static_cast(dataResponse.status), Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject Data; if (!dataResponse.data.HasValue()) { @@ -4425,8 +4549,9 @@ void CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - static_cast(dataResponse.status), Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject Data; if (!dataResponse.data.HasValue()) { @@ -4496,8 +4621,9 @@ void CHIPMediaPlaybackClusterPlaybackResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - static_cast(dataResponse.status), Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject Data; if (!dataResponse.data.HasValue()) { @@ -4566,8 +4692,9 @@ void CHIPKeypadInputClusterSendKeyResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - static_cast(dataResponse.status), Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); env->CallVoidMethod(javaCallbackRef, javaMethod, Status); } @@ -4627,8 +4754,9 @@ void CHIPContentLauncherClusterLauncherResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - static_cast(dataResponse.status), Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject Data; if (!dataResponse.data.HasValue()) { @@ -4700,8 +4828,9 @@ void CHIPApplicationLauncherClusterLauncherResponseCallback::CallbackFn( jobject Status; std::string StatusClassName = "java/lang/Integer"; std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - static_cast(dataResponse.status), Status); + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); jobject Data; if (!dataResponse.data.HasValue()) { @@ -4836,20 +4965,23 @@ void CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback::Call jobject profileCount; std::string profileCountClassName = "java/lang/Integer"; std::string profileCountCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(profileCountClassName.c_str(), profileCountCtorSignature.c_str(), - dataResponse.profileCount, profileCount); + jint jniprofileCount = static_cast(dataResponse.profileCount); + chip::JniReferences::GetInstance().CreateBoxedObject(profileCountClassName.c_str(), profileCountCtorSignature.c_str(), + jniprofileCount, profileCount); jobject profileIntervalPeriod; std::string profileIntervalPeriodClassName = "java/lang/Integer"; std::string profileIntervalPeriodCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(profileIntervalPeriodClassName.c_str(), - profileIntervalPeriodCtorSignature.c_str(), - dataResponse.profileIntervalPeriod, profileIntervalPeriod); + jint jniprofileIntervalPeriod = static_cast(dataResponse.profileIntervalPeriod); + chip::JniReferences::GetInstance().CreateBoxedObject(profileIntervalPeriodClassName.c_str(), + profileIntervalPeriodCtorSignature.c_str(), jniprofileIntervalPeriod, + profileIntervalPeriod); jobject maxNumberOfIntervals; std::string maxNumberOfIntervalsClassName = "java/lang/Integer"; std::string maxNumberOfIntervalsCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(maxNumberOfIntervalsClassName.c_str(), - maxNumberOfIntervalsCtorSignature.c_str(), - dataResponse.maxNumberOfIntervals, maxNumberOfIntervals); + jint jnimaxNumberOfIntervals = static_cast(dataResponse.maxNumberOfIntervals); + chip::JniReferences::GetInstance().CreateBoxedObject(maxNumberOfIntervalsClassName.c_str(), + maxNumberOfIntervalsCtorSignature.c_str(), jnimaxNumberOfIntervals, + maxNumberOfIntervals); jobject listOfAttributes; chip::JniReferences::GetInstance().CreateArrayList(listOfAttributes); @@ -4860,8 +4992,9 @@ void CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback::Call jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(listOfAttributes, newElement_0); } @@ -4928,30 +5061,35 @@ void CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallbac jobject startTime; std::string startTimeClassName = "java/lang/Long"; std::string startTimeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(startTimeClassName.c_str(), startTimeCtorSignature.c_str(), - dataResponse.startTime, startTime); + jlong jnistartTime = static_cast(dataResponse.startTime); + chip::JniReferences::GetInstance().CreateBoxedObject(startTimeClassName.c_str(), startTimeCtorSignature.c_str(), + jnistartTime, startTime); jobject status; std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); + jint jnistatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), jnistatus, + status); jobject profileIntervalPeriod; std::string profileIntervalPeriodClassName = "java/lang/Integer"; std::string profileIntervalPeriodCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(profileIntervalPeriodClassName.c_str(), - profileIntervalPeriodCtorSignature.c_str(), - dataResponse.profileIntervalPeriod, profileIntervalPeriod); + jint jniprofileIntervalPeriod = static_cast(dataResponse.profileIntervalPeriod); + chip::JniReferences::GetInstance().CreateBoxedObject(profileIntervalPeriodClassName.c_str(), + profileIntervalPeriodCtorSignature.c_str(), jniprofileIntervalPeriod, + profileIntervalPeriod); jobject numberOfIntervalsDelivered; std::string numberOfIntervalsDeliveredClassName = "java/lang/Integer"; std::string numberOfIntervalsDeliveredCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - numberOfIntervalsDeliveredClassName.c_str(), numberOfIntervalsDeliveredCtorSignature.c_str(), - dataResponse.numberOfIntervalsDelivered, numberOfIntervalsDelivered); + jint jninumberOfIntervalsDelivered = static_cast(dataResponse.numberOfIntervalsDelivered); + chip::JniReferences::GetInstance().CreateBoxedObject(numberOfIntervalsDeliveredClassName.c_str(), + numberOfIntervalsDeliveredCtorSignature.c_str(), + jninumberOfIntervalsDelivered, numberOfIntervalsDelivered); jobject attributeId; std::string attributeIdClassName = "java/lang/Integer"; std::string attributeIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(attributeIdClassName.c_str(), attributeIdCtorSignature.c_str(), - dataResponse.attributeId, attributeId); + jint jniattributeId = static_cast(dataResponse.attributeId); + chip::JniReferences::GetInstance().CreateBoxedObject(attributeIdClassName.c_str(), attributeIdCtorSignature.c_str(), + jniattributeId, attributeId); jobject intervals; chip::JniReferences::GetInstance().CreateArrayList(intervals); @@ -4962,8 +5100,9 @@ void CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallbac jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(intervals, newElement_0); } @@ -5025,8 +5164,9 @@ void CHIPUnitTestingClusterTestSpecificResponseCallback::CallbackFn( jobject returnValue; std::string returnValueClassName = "java/lang/Integer"; std::string returnValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), - dataResponse.returnValue, returnValue); + jint jnireturnValue = static_cast(dataResponse.returnValue); + chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), + jnireturnValue, returnValue); env->CallVoidMethod(javaCallbackRef, javaMethod, returnValue); } @@ -5086,8 +5226,9 @@ void CHIPUnitTestingClusterTestAddArgumentsResponseCallback::CallbackFn( jobject returnValue; std::string returnValueClassName = "java/lang/Integer"; std::string returnValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), - dataResponse.returnValue, returnValue); + jint jnireturnValue = static_cast(dataResponse.returnValue); + chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), + jnireturnValue, returnValue); env->CallVoidMethod(javaCallbackRef, javaMethod, returnValue); } @@ -5147,8 +5288,9 @@ void CHIPUnitTestingClusterTestSimpleArgumentResponseCallback::CallbackFn( jobject returnValue; std::string returnValueClassName = "java/lang/Boolean"; std::string returnValueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), - dataResponse.returnValue, returnValue); + jboolean jnireturnValue = static_cast(dataResponse.returnValue); + chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), + jnireturnValue, returnValue); env->CallVoidMethod(javaCallbackRef, javaMethod, returnValue); } @@ -5219,30 +5361,34 @@ void CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::CallbackFn( jobject newElement_0_a; std::string newElement_0_aClassName = "java/lang/Integer"; std::string newElement_0_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_aClassName.c_str(), newElement_0_aCtorSignature.c_str(), entry_0.a, newElement_0_a); + jint jninewElement_0_a = static_cast(entry_0.a); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_aClassName.c_str(), newElement_0_aCtorSignature.c_str(), jninewElement_0_a, newElement_0_a); jobject newElement_0_b; std::string newElement_0_bClassName = "java/lang/Boolean"; std::string newElement_0_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_bClassName.c_str(), - newElement_0_bCtorSignature.c_str(), entry_0.b, newElement_0_b); + jboolean jninewElement_0_b = static_cast(entry_0.b); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_bClassName.c_str(), newElement_0_bCtorSignature.c_str(), jninewElement_0_b, newElement_0_b); jobject newElement_0_c; jobject newElement_0_c_a; std::string newElement_0_c_aClassName = "java/lang/Integer"; std::string newElement_0_c_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_c_aClassName.c_str(), newElement_0_c_aCtorSignature.c_str(), entry_0.c.a, newElement_0_c_a); + jint jninewElement_0_c_a = static_cast(entry_0.c.a); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_c_aClassName.c_str(), newElement_0_c_aCtorSignature.c_str(), jninewElement_0_c_a, newElement_0_c_a); jobject newElement_0_c_b; std::string newElement_0_c_bClassName = "java/lang/Boolean"; std::string newElement_0_c_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_c_bClassName.c_str(), newElement_0_c_bCtorSignature.c_str(), entry_0.c.b, newElement_0_c_b); + jboolean jninewElement_0_c_b = static_cast(entry_0.c.b); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_c_bClassName.c_str(), newElement_0_c_bCtorSignature.c_str(), jninewElement_0_c_b, newElement_0_c_b); jobject newElement_0_c_c; std::string newElement_0_c_cClassName = "java/lang/Integer"; std::string newElement_0_c_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_c_cClassName.c_str(), - newElement_0_c_cCtorSignature.c_str(), - static_cast(entry_0.c.c), newElement_0_c_c); + jint jninewElement_0_c_c = static_cast(entry_0.c.c); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_c_cClassName.c_str(), newElement_0_c_cCtorSignature.c_str(), jninewElement_0_c_c, newElement_0_c_c); jobject newElement_0_c_d; jbyteArray newElement_0_c_dByteArray = env->NewByteArray(static_cast(entry_0.c.d.size())); env->SetByteArrayRegion(newElement_0_c_dByteArray, 0, static_cast(entry_0.c.d.size()), @@ -5253,18 +5399,21 @@ void CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::CallbackFn( jobject newElement_0_c_f; std::string newElement_0_c_fClassName = "java/lang/Integer"; std::string newElement_0_c_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_c_fClassName.c_str(), newElement_0_c_fCtorSignature.c_str(), entry_0.c.f.Raw(), newElement_0_c_f); + jint jninewElement_0_c_f = static_cast(entry_0.c.f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_c_fClassName.c_str(), newElement_0_c_fCtorSignature.c_str(), jninewElement_0_c_f, newElement_0_c_f); jobject newElement_0_c_g; std::string newElement_0_c_gClassName = "java/lang/Float"; std::string newElement_0_c_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_c_gClassName.c_str(), newElement_0_c_gCtorSignature.c_str(), entry_0.c.g, newElement_0_c_g); + jfloat jninewElement_0_c_g = static_cast(entry_0.c.g); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_c_gClassName.c_str(), newElement_0_c_gCtorSignature.c_str(), jninewElement_0_c_g, newElement_0_c_g); jobject newElement_0_c_h; std::string newElement_0_c_hClassName = "java/lang/Double"; std::string newElement_0_c_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_c_hClassName.c_str(), newElement_0_c_hCtorSignature.c_str(), entry_0.c.h, newElement_0_c_h); + jdouble jninewElement_0_c_h = static_cast(entry_0.c.h); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_c_hClassName.c_str(), newElement_0_c_hCtorSignature.c_str(), jninewElement_0_c_h, newElement_0_c_h); jclass simpleStructStructClass_2; err = chip::JniReferences::GetInstance().GetClassRef( @@ -5298,19 +5447,21 @@ void CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::CallbackFn( jobject newElement_2_a; std::string newElement_2_aClassName = "java/lang/Integer"; std::string newElement_2_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_aClassName.c_str(), newElement_2_aCtorSignature.c_str(), entry_2.a, newElement_2_a); + jint jninewElement_2_a = static_cast(entry_2.a); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_aClassName.c_str(), newElement_2_aCtorSignature.c_str(), jninewElement_2_a, newElement_2_a); jobject newElement_2_b; std::string newElement_2_bClassName = "java/lang/Boolean"; std::string newElement_2_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_bClassName.c_str(), newElement_2_bCtorSignature.c_str(), entry_2.b, newElement_2_b); + jboolean jninewElement_2_b = static_cast(entry_2.b); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_bClassName.c_str(), newElement_2_bCtorSignature.c_str(), jninewElement_2_b, newElement_2_b); jobject newElement_2_c; std::string newElement_2_cClassName = "java/lang/Integer"; std::string newElement_2_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_cClassName.c_str(), - newElement_2_cCtorSignature.c_str(), - static_cast(entry_2.c), newElement_2_c); + jint jninewElement_2_c = static_cast(entry_2.c); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_cClassName.c_str(), newElement_2_cCtorSignature.c_str(), jninewElement_2_c, newElement_2_c); jobject newElement_2_d; jbyteArray newElement_2_dByteArray = env->NewByteArray(static_cast(entry_2.d.size())); env->SetByteArrayRegion(newElement_2_dByteArray, 0, static_cast(entry_2.d.size()), @@ -5321,18 +5472,21 @@ void CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::CallbackFn( jobject newElement_2_f; std::string newElement_2_fClassName = "java/lang/Integer"; std::string newElement_2_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_fClassName.c_str(), newElement_2_fCtorSignature.c_str(), entry_2.f.Raw(), newElement_2_f); + jint jninewElement_2_f = static_cast(entry_2.f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_fClassName.c_str(), newElement_2_fCtorSignature.c_str(), jninewElement_2_f, newElement_2_f); jobject newElement_2_g; std::string newElement_2_gClassName = "java/lang/Float"; std::string newElement_2_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_gClassName.c_str(), newElement_2_gCtorSignature.c_str(), entry_2.g, newElement_2_g); + jfloat jninewElement_2_g = static_cast(entry_2.g); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_gClassName.c_str(), newElement_2_gCtorSignature.c_str(), jninewElement_2_g, newElement_2_g); jobject newElement_2_h; std::string newElement_2_hClassName = "java/lang/Double"; std::string newElement_2_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_hClassName.c_str(), newElement_2_hCtorSignature.c_str(), entry_2.h, newElement_2_h); + jdouble jninewElement_2_h = static_cast(entry_2.h); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_hClassName.c_str(), newElement_2_hCtorSignature.c_str(), jninewElement_2_h, newElement_2_h); jclass simpleStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -5367,8 +5521,9 @@ void CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::CallbackFn( jobject newElement_2; std::string newElement_2ClassName = "java/lang/Long"; std::string newElement_2CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), entry_2, newElement_2); + jlong jninewElement_2 = static_cast(entry_2); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); chip::JniReferences::GetInstance().AddToList(newElement_0_e, newElement_2); } jobject newElement_0_f; @@ -5395,8 +5550,9 @@ void CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::CallbackFn( jobject newElement_2; std::string newElement_2ClassName = "java/lang/Integer"; std::string newElement_2CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2ClassName.c_str(), - newElement_2CtorSignature.c_str(), entry_2, newElement_2); + jint jninewElement_2 = static_cast(entry_2); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); chip::JniReferences::GetInstance().AddToList(newElement_0_g, newElement_2); } @@ -5433,18 +5589,21 @@ void CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::CallbackFn( jobject newElement_0_a; std::string newElement_0_aClassName = "java/lang/Integer"; std::string newElement_0_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_aClassName.c_str(), newElement_0_aCtorSignature.c_str(), entry_0.a, newElement_0_a); + jint jninewElement_0_a = static_cast(entry_0.a); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_aClassName.c_str(), newElement_0_aCtorSignature.c_str(), jninewElement_0_a, newElement_0_a); jobject newElement_0_b; std::string newElement_0_bClassName = "java/lang/Boolean"; std::string newElement_0_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_bClassName.c_str(), - newElement_0_bCtorSignature.c_str(), entry_0.b, newElement_0_b); + jboolean jninewElement_0_b = static_cast(entry_0.b); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_bClassName.c_str(), newElement_0_bCtorSignature.c_str(), jninewElement_0_b, newElement_0_b); jobject newElement_0_c; std::string newElement_0_cClassName = "java/lang/Integer"; std::string newElement_0_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_cClassName.c_str(), newElement_0_cCtorSignature.c_str(), static_cast(entry_0.c), newElement_0_c); + jint jninewElement_0_c = static_cast(entry_0.c); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_cClassName.c_str(), newElement_0_cCtorSignature.c_str(), jninewElement_0_c, newElement_0_c); jobject newElement_0_d; jbyteArray newElement_0_dByteArray = env->NewByteArray(static_cast(entry_0.d.size())); env->SetByteArrayRegion(newElement_0_dByteArray, 0, static_cast(entry_0.d.size()), @@ -5455,18 +5614,21 @@ void CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::CallbackFn( jobject newElement_0_f; std::string newElement_0_fClassName = "java/lang/Integer"; std::string newElement_0_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_fClassName.c_str(), newElement_0_fCtorSignature.c_str(), entry_0.f.Raw(), newElement_0_f); + jint jninewElement_0_f = static_cast(entry_0.f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_fClassName.c_str(), newElement_0_fCtorSignature.c_str(), jninewElement_0_f, newElement_0_f); jobject newElement_0_g; std::string newElement_0_gClassName = "java/lang/Float"; std::string newElement_0_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_gClassName.c_str(), - newElement_0_gCtorSignature.c_str(), entry_0.g, newElement_0_g); + jfloat jninewElement_0_g = static_cast(entry_0.g); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_gClassName.c_str(), newElement_0_gCtorSignature.c_str(), jninewElement_0_g, newElement_0_g); jobject newElement_0_h; std::string newElement_0_hClassName = "java/lang/Double"; std::string newElement_0_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_hClassName.c_str(), newElement_0_hCtorSignature.c_str(), entry_0.h, newElement_0_h); + jdouble jninewElement_0_h = static_cast(entry_0.h); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_hClassName.c_str(), newElement_0_hCtorSignature.c_str(), jninewElement_0_h, newElement_0_h); jclass simpleStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -5501,8 +5663,9 @@ void CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arg3, newElement_0); } jobject arg4; @@ -5515,20 +5678,21 @@ void CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Boolean"; std::string newElement_0CtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - entry_0, newElement_0); + jboolean jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arg4, newElement_0); } jobject arg5; std::string arg5ClassName = "java/lang/Integer"; std::string arg5CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(arg5ClassName.c_str(), arg5CtorSignature.c_str(), - static_cast(dataResponse.arg5), arg5); + jint jniarg5 = static_cast(dataResponse.arg5); + chip::JniReferences::GetInstance().CreateBoxedObject(arg5ClassName.c_str(), arg5CtorSignature.c_str(), jniarg5, arg5); jobject arg6; std::string arg6ClassName = "java/lang/Boolean"; std::string arg6CtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(arg6ClassName.c_str(), arg6CtorSignature.c_str(), dataResponse.arg6, - arg6); + jboolean jniarg6 = static_cast(dataResponse.arg6); + chip::JniReferences::GetInstance().CreateBoxedObject(arg6ClassName.c_str(), arg6CtorSignature.c_str(), jniarg6, arg6); env->CallVoidMethod(javaCallbackRef, javaMethod, arg1, arg2, arg3, arg4, arg5, arg6); } @@ -5595,8 +5759,9 @@ void CHIPUnitTestingClusterTestListInt8UReverseResponseCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arg1, newElement_0); } @@ -5657,13 +5822,13 @@ void CHIPUnitTestingClusterTestEnumsResponseCallback::CallbackFn( jobject arg1; std::string arg1ClassName = "java/lang/Integer"; std::string arg1CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(arg1ClassName.c_str(), arg1CtorSignature.c_str(), - static_cast(dataResponse.arg1), arg1); + jint jniarg1 = static_cast(dataResponse.arg1); + chip::JniReferences::GetInstance().CreateBoxedObject(arg1ClassName.c_str(), arg1CtorSignature.c_str(), jniarg1, arg1); jobject arg2; std::string arg2ClassName = "java/lang/Integer"; std::string arg2CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(arg2ClassName.c_str(), arg2CtorSignature.c_str(), - static_cast(dataResponse.arg2), arg2); + jint jniarg2 = static_cast(dataResponse.arg2); + chip::JniReferences::GetInstance().CreateBoxedObject(arg2ClassName.c_str(), arg2CtorSignature.c_str(), jniarg2, arg2); env->CallVoidMethod(javaCallbackRef, javaMethod, arg1, arg2); } @@ -5725,8 +5890,9 @@ void CHIPUnitTestingClusterTestNullableOptionalResponseCallback::CallbackFn( jobject wasPresent; std::string wasPresentClassName = "java/lang/Boolean"; std::string wasPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(wasPresentClassName.c_str(), wasPresentCtorSignature.c_str(), - dataResponse.wasPresent, wasPresent); + jboolean jniwasPresent = static_cast(dataResponse.wasPresent); + chip::JniReferences::GetInstance().CreateBoxedObject(wasPresentClassName.c_str(), wasPresentCtorSignature.c_str(), + jniwasPresent, wasPresent); jobject wasNull; if (!dataResponse.wasNull.HasValue()) { @@ -5737,9 +5903,10 @@ void CHIPUnitTestingClusterTestNullableOptionalResponseCallback::CallbackFn( jobject wasNullInsideOptional; std::string wasNullInsideOptionalClassName = "java/lang/Boolean"; std::string wasNullInsideOptionalCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(wasNullInsideOptionalClassName.c_str(), - wasNullInsideOptionalCtorSignature.c_str(), - dataResponse.wasNull.Value(), wasNullInsideOptional); + jboolean jniwasNullInsideOptional = static_cast(dataResponse.wasNull.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(wasNullInsideOptionalClassName.c_str(), + wasNullInsideOptionalCtorSignature.c_str(), + jniwasNullInsideOptional, wasNullInsideOptional); chip::JniReferences::GetInstance().CreateOptional(wasNullInsideOptional, wasNull); } jobject value; @@ -5752,9 +5919,10 @@ void CHIPUnitTestingClusterTestNullableOptionalResponseCallback::CallbackFn( jobject valueInsideOptional; std::string valueInsideOptionalClassName = "java/lang/Integer"; std::string valueInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueInsideOptionalClassName.c_str(), - valueInsideOptionalCtorSignature.c_str(), - dataResponse.value.Value(), valueInsideOptional); + jint jnivalueInsideOptional = static_cast(dataResponse.value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueInsideOptionalClassName.c_str(), + valueInsideOptionalCtorSignature.c_str(), jnivalueInsideOptional, + valueInsideOptional); chip::JniReferences::GetInstance().CreateOptional(valueInsideOptional, value); } jobject originalValue; @@ -5773,9 +5941,10 @@ void CHIPUnitTestingClusterTestNullableOptionalResponseCallback::CallbackFn( { std::string originalValueInsideOptionalClassName = "java/lang/Integer"; std::string originalValueInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - originalValueInsideOptionalClassName.c_str(), originalValueInsideOptionalCtorSignature.c_str(), - dataResponse.originalValue.Value().Value(), originalValueInsideOptional); + jint jnioriginalValueInsideOptional = static_cast(dataResponse.originalValue.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(originalValueInsideOptionalClassName.c_str(), + originalValueInsideOptionalCtorSignature.c_str(), + jnioriginalValueInsideOptional, originalValueInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(originalValueInsideOptional, originalValue); } @@ -5847,9 +6016,9 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableIntWasNull; std::string NullableIntWasNullClassName = "java/lang/Boolean"; std::string NullableIntWasNullCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(NullableIntWasNullClassName.c_str(), - NullableIntWasNullCtorSignature.c_str(), - dataResponse.nullableIntWasNull, NullableIntWasNull); + jboolean jniNullableIntWasNull = static_cast(dataResponse.nullableIntWasNull); + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableIntWasNullClassName.c_str(), NullableIntWasNullCtorSignature.c_str(), jniNullableIntWasNull, NullableIntWasNull); jobject NullableIntValue; if (!dataResponse.nullableIntValue.HasValue()) { @@ -5860,17 +6029,19 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableIntValueInsideOptional; std::string NullableIntValueInsideOptionalClassName = "java/lang/Integer"; std::string NullableIntValueInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jniNullableIntValueInsideOptional = static_cast(dataResponse.nullableIntValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( NullableIntValueInsideOptionalClassName.c_str(), NullableIntValueInsideOptionalCtorSignature.c_str(), - dataResponse.nullableIntValue.Value(), NullableIntValueInsideOptional); + jniNullableIntValueInsideOptional, NullableIntValueInsideOptional); chip::JniReferences::GetInstance().CreateOptional(NullableIntValueInsideOptional, NullableIntValue); } jobject OptionalIntWasPresent; std::string OptionalIntWasPresentClassName = "java/lang/Boolean"; std::string OptionalIntWasPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(OptionalIntWasPresentClassName.c_str(), - OptionalIntWasPresentCtorSignature.c_str(), - dataResponse.optionalIntWasPresent, OptionalIntWasPresent); + jboolean jniOptionalIntWasPresent = static_cast(dataResponse.optionalIntWasPresent); + chip::JniReferences::GetInstance().CreateBoxedObject(OptionalIntWasPresentClassName.c_str(), + OptionalIntWasPresentCtorSignature.c_str(), + jniOptionalIntWasPresent, OptionalIntWasPresent); jobject OptionalIntValue; if (!dataResponse.optionalIntValue.HasValue()) { @@ -5881,17 +6052,19 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject OptionalIntValueInsideOptional; std::string OptionalIntValueInsideOptionalClassName = "java/lang/Integer"; std::string OptionalIntValueInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jniOptionalIntValueInsideOptional = static_cast(dataResponse.optionalIntValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( OptionalIntValueInsideOptionalClassName.c_str(), OptionalIntValueInsideOptionalCtorSignature.c_str(), - dataResponse.optionalIntValue.Value(), OptionalIntValueInsideOptional); + jniOptionalIntValueInsideOptional, OptionalIntValueInsideOptional); chip::JniReferences::GetInstance().CreateOptional(OptionalIntValueInsideOptional, OptionalIntValue); } jobject NullableOptionalIntWasPresent; std::string NullableOptionalIntWasPresentClassName = "java/lang/Boolean"; std::string NullableOptionalIntWasPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableOptionalIntWasPresentClassName.c_str(), NullableOptionalIntWasPresentCtorSignature.c_str(), - dataResponse.nullableOptionalIntWasPresent, NullableOptionalIntWasPresent); + jboolean jniNullableOptionalIntWasPresent = static_cast(dataResponse.nullableOptionalIntWasPresent); + chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalIntWasPresentClassName.c_str(), + NullableOptionalIntWasPresentCtorSignature.c_str(), + jniNullableOptionalIntWasPresent, NullableOptionalIntWasPresent); jobject NullableOptionalIntWasNull; if (!dataResponse.nullableOptionalIntWasNull.HasValue()) { @@ -5902,10 +6075,12 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableOptionalIntWasNullInsideOptional; std::string NullableOptionalIntWasNullInsideOptionalClassName = "java/lang/Boolean"; std::string NullableOptionalIntWasNullInsideOptionalCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalIntWasNullInsideOptionalClassName.c_str(), - NullableOptionalIntWasNullInsideOptionalCtorSignature.c_str(), - dataResponse.nullableOptionalIntWasNull.Value(), - NullableOptionalIntWasNullInsideOptional); + jboolean jniNullableOptionalIntWasNullInsideOptional = + static_cast(dataResponse.nullableOptionalIntWasNull.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableOptionalIntWasNullInsideOptionalClassName.c_str(), + NullableOptionalIntWasNullInsideOptionalCtorSignature.c_str(), jniNullableOptionalIntWasNullInsideOptional, + NullableOptionalIntWasNullInsideOptional); chip::JniReferences::GetInstance().CreateOptional(NullableOptionalIntWasNullInsideOptional, NullableOptionalIntWasNull); } jobject NullableOptionalIntValue; @@ -5918,17 +6093,19 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableOptionalIntValueInsideOptional; std::string NullableOptionalIntValueInsideOptionalClassName = "java/lang/Integer"; std::string NullableOptionalIntValueInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jniNullableOptionalIntValueInsideOptional = static_cast(dataResponse.nullableOptionalIntValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( NullableOptionalIntValueInsideOptionalClassName.c_str(), NullableOptionalIntValueInsideOptionalCtorSignature.c_str(), - dataResponse.nullableOptionalIntValue.Value(), NullableOptionalIntValueInsideOptional); + jniNullableOptionalIntValueInsideOptional, NullableOptionalIntValueInsideOptional); chip::JniReferences::GetInstance().CreateOptional(NullableOptionalIntValueInsideOptional, NullableOptionalIntValue); } jobject NullableStringWasNull; std::string NullableStringWasNullClassName = "java/lang/Boolean"; std::string NullableStringWasNullCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(NullableStringWasNullClassName.c_str(), - NullableStringWasNullCtorSignature.c_str(), - dataResponse.nullableStringWasNull, NullableStringWasNull); + jboolean jniNullableStringWasNull = static_cast(dataResponse.nullableStringWasNull); + chip::JniReferences::GetInstance().CreateBoxedObject(NullableStringWasNullClassName.c_str(), + NullableStringWasNullCtorSignature.c_str(), + jniNullableStringWasNull, NullableStringWasNull); jobject NullableStringValue; if (!dataResponse.nullableStringValue.HasValue()) { @@ -5944,9 +6121,10 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject OptionalStringWasPresent; std::string OptionalStringWasPresentClassName = "java/lang/Boolean"; std::string OptionalStringWasPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(OptionalStringWasPresentClassName.c_str(), - OptionalStringWasPresentCtorSignature.c_str(), - dataResponse.optionalStringWasPresent, OptionalStringWasPresent); + jboolean jniOptionalStringWasPresent = static_cast(dataResponse.optionalStringWasPresent); + chip::JniReferences::GetInstance().CreateBoxedObject(OptionalStringWasPresentClassName.c_str(), + OptionalStringWasPresentCtorSignature.c_str(), + jniOptionalStringWasPresent, OptionalStringWasPresent); jobject OptionalStringValue; if (!dataResponse.optionalStringValue.HasValue()) { @@ -5962,9 +6140,10 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableOptionalStringWasPresent; std::string NullableOptionalStringWasPresentClassName = "java/lang/Boolean"; std::string NullableOptionalStringWasPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jniNullableOptionalStringWasPresent = static_cast(dataResponse.nullableOptionalStringWasPresent); + chip::JniReferences::GetInstance().CreateBoxedObject( NullableOptionalStringWasPresentClassName.c_str(), NullableOptionalStringWasPresentCtorSignature.c_str(), - dataResponse.nullableOptionalStringWasPresent, NullableOptionalStringWasPresent); + jniNullableOptionalStringWasPresent, NullableOptionalStringWasPresent); jobject NullableOptionalStringWasNull; if (!dataResponse.nullableOptionalStringWasNull.HasValue()) { @@ -5975,10 +6154,12 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableOptionalStringWasNullInsideOptional; std::string NullableOptionalStringWasNullInsideOptionalClassName = "java/lang/Boolean"; std::string NullableOptionalStringWasNullInsideOptionalCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalStringWasNullInsideOptionalClassName.c_str(), - NullableOptionalStringWasNullInsideOptionalCtorSignature.c_str(), - dataResponse.nullableOptionalStringWasNull.Value(), - NullableOptionalStringWasNullInsideOptional); + jboolean jniNullableOptionalStringWasNullInsideOptional = + static_cast(dataResponse.nullableOptionalStringWasNull.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableOptionalStringWasNullInsideOptionalClassName.c_str(), + NullableOptionalStringWasNullInsideOptionalCtorSignature.c_str(), jniNullableOptionalStringWasNullInsideOptional, + NullableOptionalStringWasNullInsideOptional); chip::JniReferences::GetInstance().CreateOptional(NullableOptionalStringWasNullInsideOptional, NullableOptionalStringWasNull); } @@ -5997,9 +6178,10 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableStructWasNull; std::string NullableStructWasNullClassName = "java/lang/Boolean"; std::string NullableStructWasNullCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(NullableStructWasNullClassName.c_str(), - NullableStructWasNullCtorSignature.c_str(), - dataResponse.nullableStructWasNull, NullableStructWasNull); + jboolean jniNullableStructWasNull = static_cast(dataResponse.nullableStructWasNull); + chip::JniReferences::GetInstance().CreateBoxedObject(NullableStructWasNullClassName.c_str(), + NullableStructWasNullCtorSignature.c_str(), + jniNullableStructWasNull, NullableStructWasNull); jobject NullableStructValue; if (!dataResponse.nullableStructValue.HasValue()) { @@ -6011,21 +6193,24 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableStructValueInsideOptional_a; std::string NullableStructValueInsideOptional_aClassName = "java/lang/Integer"; std::string NullableStructValueInsideOptional_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jniNullableStructValueInsideOptional_a = static_cast(dataResponse.nullableStructValue.Value().a); + chip::JniReferences::GetInstance().CreateBoxedObject( NullableStructValueInsideOptional_aClassName.c_str(), NullableStructValueInsideOptional_aCtorSignature.c_str(), - dataResponse.nullableStructValue.Value().a, NullableStructValueInsideOptional_a); + jniNullableStructValueInsideOptional_a, NullableStructValueInsideOptional_a); jobject NullableStructValueInsideOptional_b; std::string NullableStructValueInsideOptional_bClassName = "java/lang/Boolean"; std::string NullableStructValueInsideOptional_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jniNullableStructValueInsideOptional_b = static_cast(dataResponse.nullableStructValue.Value().b); + chip::JniReferences::GetInstance().CreateBoxedObject( NullableStructValueInsideOptional_bClassName.c_str(), NullableStructValueInsideOptional_bCtorSignature.c_str(), - dataResponse.nullableStructValue.Value().b, NullableStructValueInsideOptional_b); + jniNullableStructValueInsideOptional_b, NullableStructValueInsideOptional_b); jobject NullableStructValueInsideOptional_c; std::string NullableStructValueInsideOptional_cClassName = "java/lang/Integer"; std::string NullableStructValueInsideOptional_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jniNullableStructValueInsideOptional_c = static_cast(dataResponse.nullableStructValue.Value().c); + chip::JniReferences::GetInstance().CreateBoxedObject( NullableStructValueInsideOptional_cClassName.c_str(), NullableStructValueInsideOptional_cCtorSignature.c_str(), - static_cast(dataResponse.nullableStructValue.Value().c), NullableStructValueInsideOptional_c); + jniNullableStructValueInsideOptional_c, NullableStructValueInsideOptional_c); jobject NullableStructValueInsideOptional_d; jbyteArray NullableStructValueInsideOptional_dByteArray = env->NewByteArray(static_cast(dataResponse.nullableStructValue.Value().d.size())); @@ -6039,21 +6224,24 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableStructValueInsideOptional_f; std::string NullableStructValueInsideOptional_fClassName = "java/lang/Integer"; std::string NullableStructValueInsideOptional_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jniNullableStructValueInsideOptional_f = static_cast(dataResponse.nullableStructValue.Value().f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( NullableStructValueInsideOptional_fClassName.c_str(), NullableStructValueInsideOptional_fCtorSignature.c_str(), - dataResponse.nullableStructValue.Value().f.Raw(), NullableStructValueInsideOptional_f); + jniNullableStructValueInsideOptional_f, NullableStructValueInsideOptional_f); jobject NullableStructValueInsideOptional_g; std::string NullableStructValueInsideOptional_gClassName = "java/lang/Float"; std::string NullableStructValueInsideOptional_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jfloat jniNullableStructValueInsideOptional_g = static_cast(dataResponse.nullableStructValue.Value().g); + chip::JniReferences::GetInstance().CreateBoxedObject( NullableStructValueInsideOptional_gClassName.c_str(), NullableStructValueInsideOptional_gCtorSignature.c_str(), - dataResponse.nullableStructValue.Value().g, NullableStructValueInsideOptional_g); + jniNullableStructValueInsideOptional_g, NullableStructValueInsideOptional_g); jobject NullableStructValueInsideOptional_h; std::string NullableStructValueInsideOptional_hClassName = "java/lang/Double"; std::string NullableStructValueInsideOptional_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jdouble jniNullableStructValueInsideOptional_h = static_cast(dataResponse.nullableStructValue.Value().h); + chip::JniReferences::GetInstance().CreateBoxedObject( NullableStructValueInsideOptional_hClassName.c_str(), NullableStructValueInsideOptional_hCtorSignature.c_str(), - dataResponse.nullableStructValue.Value().h, NullableStructValueInsideOptional_h); + jniNullableStructValueInsideOptional_h, NullableStructValueInsideOptional_h); jclass simpleStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -6083,9 +6271,10 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject OptionalStructWasPresent; std::string OptionalStructWasPresentClassName = "java/lang/Boolean"; std::string OptionalStructWasPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(OptionalStructWasPresentClassName.c_str(), - OptionalStructWasPresentCtorSignature.c_str(), - dataResponse.optionalStructWasPresent, OptionalStructWasPresent); + jboolean jniOptionalStructWasPresent = static_cast(dataResponse.optionalStructWasPresent); + chip::JniReferences::GetInstance().CreateBoxedObject(OptionalStructWasPresentClassName.c_str(), + OptionalStructWasPresentCtorSignature.c_str(), + jniOptionalStructWasPresent, OptionalStructWasPresent); jobject OptionalStructValue; if (!dataResponse.optionalStructValue.HasValue()) { @@ -6097,21 +6286,24 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject OptionalStructValueInsideOptional_a; std::string OptionalStructValueInsideOptional_aClassName = "java/lang/Integer"; std::string OptionalStructValueInsideOptional_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jniOptionalStructValueInsideOptional_a = static_cast(dataResponse.optionalStructValue.Value().a); + chip::JniReferences::GetInstance().CreateBoxedObject( OptionalStructValueInsideOptional_aClassName.c_str(), OptionalStructValueInsideOptional_aCtorSignature.c_str(), - dataResponse.optionalStructValue.Value().a, OptionalStructValueInsideOptional_a); + jniOptionalStructValueInsideOptional_a, OptionalStructValueInsideOptional_a); jobject OptionalStructValueInsideOptional_b; std::string OptionalStructValueInsideOptional_bClassName = "java/lang/Boolean"; std::string OptionalStructValueInsideOptional_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jniOptionalStructValueInsideOptional_b = static_cast(dataResponse.optionalStructValue.Value().b); + chip::JniReferences::GetInstance().CreateBoxedObject( OptionalStructValueInsideOptional_bClassName.c_str(), OptionalStructValueInsideOptional_bCtorSignature.c_str(), - dataResponse.optionalStructValue.Value().b, OptionalStructValueInsideOptional_b); + jniOptionalStructValueInsideOptional_b, OptionalStructValueInsideOptional_b); jobject OptionalStructValueInsideOptional_c; std::string OptionalStructValueInsideOptional_cClassName = "java/lang/Integer"; std::string OptionalStructValueInsideOptional_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jniOptionalStructValueInsideOptional_c = static_cast(dataResponse.optionalStructValue.Value().c); + chip::JniReferences::GetInstance().CreateBoxedObject( OptionalStructValueInsideOptional_cClassName.c_str(), OptionalStructValueInsideOptional_cCtorSignature.c_str(), - static_cast(dataResponse.optionalStructValue.Value().c), OptionalStructValueInsideOptional_c); + jniOptionalStructValueInsideOptional_c, OptionalStructValueInsideOptional_c); jobject OptionalStructValueInsideOptional_d; jbyteArray OptionalStructValueInsideOptional_dByteArray = env->NewByteArray(static_cast(dataResponse.optionalStructValue.Value().d.size())); @@ -6125,21 +6317,24 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject OptionalStructValueInsideOptional_f; std::string OptionalStructValueInsideOptional_fClassName = "java/lang/Integer"; std::string OptionalStructValueInsideOptional_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jniOptionalStructValueInsideOptional_f = static_cast(dataResponse.optionalStructValue.Value().f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( OptionalStructValueInsideOptional_fClassName.c_str(), OptionalStructValueInsideOptional_fCtorSignature.c_str(), - dataResponse.optionalStructValue.Value().f.Raw(), OptionalStructValueInsideOptional_f); + jniOptionalStructValueInsideOptional_f, OptionalStructValueInsideOptional_f); jobject OptionalStructValueInsideOptional_g; std::string OptionalStructValueInsideOptional_gClassName = "java/lang/Float"; std::string OptionalStructValueInsideOptional_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jfloat jniOptionalStructValueInsideOptional_g = static_cast(dataResponse.optionalStructValue.Value().g); + chip::JniReferences::GetInstance().CreateBoxedObject( OptionalStructValueInsideOptional_gClassName.c_str(), OptionalStructValueInsideOptional_gCtorSignature.c_str(), - dataResponse.optionalStructValue.Value().g, OptionalStructValueInsideOptional_g); + jniOptionalStructValueInsideOptional_g, OptionalStructValueInsideOptional_g); jobject OptionalStructValueInsideOptional_h; std::string OptionalStructValueInsideOptional_hClassName = "java/lang/Double"; std::string OptionalStructValueInsideOptional_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jdouble jniOptionalStructValueInsideOptional_h = static_cast(dataResponse.optionalStructValue.Value().h); + chip::JniReferences::GetInstance().CreateBoxedObject( OptionalStructValueInsideOptional_hClassName.c_str(), OptionalStructValueInsideOptional_hCtorSignature.c_str(), - dataResponse.optionalStructValue.Value().h, OptionalStructValueInsideOptional_h); + jniOptionalStructValueInsideOptional_h, OptionalStructValueInsideOptional_h); jclass simpleStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -6169,9 +6364,10 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableOptionalStructWasPresent; std::string NullableOptionalStructWasPresentClassName = "java/lang/Boolean"; std::string NullableOptionalStructWasPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jniNullableOptionalStructWasPresent = static_cast(dataResponse.nullableOptionalStructWasPresent); + chip::JniReferences::GetInstance().CreateBoxedObject( NullableOptionalStructWasPresentClassName.c_str(), NullableOptionalStructWasPresentCtorSignature.c_str(), - dataResponse.nullableOptionalStructWasPresent, NullableOptionalStructWasPresent); + jniNullableOptionalStructWasPresent, NullableOptionalStructWasPresent); jobject NullableOptionalStructWasNull; if (!dataResponse.nullableOptionalStructWasNull.HasValue()) { @@ -6182,10 +6378,12 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableOptionalStructWasNullInsideOptional; std::string NullableOptionalStructWasNullInsideOptionalClassName = "java/lang/Boolean"; std::string NullableOptionalStructWasNullInsideOptionalCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalStructWasNullInsideOptionalClassName.c_str(), - NullableOptionalStructWasNullInsideOptionalCtorSignature.c_str(), - dataResponse.nullableOptionalStructWasNull.Value(), - NullableOptionalStructWasNullInsideOptional); + jboolean jniNullableOptionalStructWasNullInsideOptional = + static_cast(dataResponse.nullableOptionalStructWasNull.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableOptionalStructWasNullInsideOptionalClassName.c_str(), + NullableOptionalStructWasNullInsideOptionalCtorSignature.c_str(), jniNullableOptionalStructWasNullInsideOptional, + NullableOptionalStructWasNullInsideOptional); chip::JniReferences::GetInstance().CreateOptional(NullableOptionalStructWasNullInsideOptional, NullableOptionalStructWasNull); } @@ -6200,24 +6398,28 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableOptionalStructValueInsideOptional_a; std::string NullableOptionalStructValueInsideOptional_aClassName = "java/lang/Integer"; std::string NullableOptionalStructValueInsideOptional_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableOptionalStructValueInsideOptional_aClassName.c_str(), - NullableOptionalStructValueInsideOptional_aCtorSignature.c_str(), dataResponse.nullableOptionalStructValue.Value().a, - NullableOptionalStructValueInsideOptional_a); + jint jniNullableOptionalStructValueInsideOptional_a = static_cast(dataResponse.nullableOptionalStructValue.Value().a); + chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalStructValueInsideOptional_aClassName.c_str(), + NullableOptionalStructValueInsideOptional_aCtorSignature.c_str(), + jniNullableOptionalStructValueInsideOptional_a, + NullableOptionalStructValueInsideOptional_a); jobject NullableOptionalStructValueInsideOptional_b; std::string NullableOptionalStructValueInsideOptional_bClassName = "java/lang/Boolean"; std::string NullableOptionalStructValueInsideOptional_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalStructValueInsideOptional_bClassName.c_str(), - NullableOptionalStructValueInsideOptional_bCtorSignature.c_str(), - dataResponse.nullableOptionalStructValue.Value().b, - NullableOptionalStructValueInsideOptional_b); + jboolean jniNullableOptionalStructValueInsideOptional_b = + static_cast(dataResponse.nullableOptionalStructValue.Value().b); + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableOptionalStructValueInsideOptional_bClassName.c_str(), + NullableOptionalStructValueInsideOptional_bCtorSignature.c_str(), jniNullableOptionalStructValueInsideOptional_b, + NullableOptionalStructValueInsideOptional_b); jobject NullableOptionalStructValueInsideOptional_c; std::string NullableOptionalStructValueInsideOptional_cClassName = "java/lang/Integer"; std::string NullableOptionalStructValueInsideOptional_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableOptionalStructValueInsideOptional_cClassName.c_str(), - NullableOptionalStructValueInsideOptional_cCtorSignature.c_str(), - static_cast(dataResponse.nullableOptionalStructValue.Value().c), NullableOptionalStructValueInsideOptional_c); + jint jniNullableOptionalStructValueInsideOptional_c = static_cast(dataResponse.nullableOptionalStructValue.Value().c); + chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalStructValueInsideOptional_cClassName.c_str(), + NullableOptionalStructValueInsideOptional_cCtorSignature.c_str(), + jniNullableOptionalStructValueInsideOptional_c, + NullableOptionalStructValueInsideOptional_c); jobject NullableOptionalStructValueInsideOptional_d; jbyteArray NullableOptionalStructValueInsideOptional_dByteArray = env->NewByteArray(static_cast(dataResponse.nullableOptionalStructValue.Value().d.size())); @@ -6231,23 +6433,29 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableOptionalStructValueInsideOptional_f; std::string NullableOptionalStructValueInsideOptional_fClassName = "java/lang/Integer"; std::string NullableOptionalStructValueInsideOptional_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NullableOptionalStructValueInsideOptional_fClassName.c_str(), - NullableOptionalStructValueInsideOptional_fCtorSignature.c_str(), - dataResponse.nullableOptionalStructValue.Value().f.Raw(), NullableOptionalStructValueInsideOptional_f); + jint jniNullableOptionalStructValueInsideOptional_f = + static_cast(dataResponse.nullableOptionalStructValue.Value().f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalStructValueInsideOptional_fClassName.c_str(), + NullableOptionalStructValueInsideOptional_fCtorSignature.c_str(), + jniNullableOptionalStructValueInsideOptional_f, + NullableOptionalStructValueInsideOptional_f); jobject NullableOptionalStructValueInsideOptional_g; std::string NullableOptionalStructValueInsideOptional_gClassName = "java/lang/Float"; std::string NullableOptionalStructValueInsideOptional_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jfloat jniNullableOptionalStructValueInsideOptional_g = + static_cast(dataResponse.nullableOptionalStructValue.Value().g); + chip::JniReferences::GetInstance().CreateBoxedObject( NullableOptionalStructValueInsideOptional_gClassName.c_str(), - NullableOptionalStructValueInsideOptional_gCtorSignature.c_str(), dataResponse.nullableOptionalStructValue.Value().g, + NullableOptionalStructValueInsideOptional_gCtorSignature.c_str(), jniNullableOptionalStructValueInsideOptional_g, NullableOptionalStructValueInsideOptional_g); jobject NullableOptionalStructValueInsideOptional_h; std::string NullableOptionalStructValueInsideOptional_hClassName = "java/lang/Double"; std::string NullableOptionalStructValueInsideOptional_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jdouble jniNullableOptionalStructValueInsideOptional_h = + static_cast(dataResponse.nullableOptionalStructValue.Value().h); + chip::JniReferences::GetInstance().CreateBoxedObject( NullableOptionalStructValueInsideOptional_hClassName.c_str(), - NullableOptionalStructValueInsideOptional_hCtorSignature.c_str(), dataResponse.nullableOptionalStructValue.Value().h, + NullableOptionalStructValueInsideOptional_hCtorSignature.c_str(), jniNullableOptionalStructValueInsideOptional_h, NullableOptionalStructValueInsideOptional_h); jclass simpleStructStructClass_1; @@ -6279,9 +6487,10 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableListWasNull; std::string NullableListWasNullClassName = "java/lang/Boolean"; std::string NullableListWasNullCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(NullableListWasNullClassName.c_str(), - NullableListWasNullCtorSignature.c_str(), - dataResponse.nullableListWasNull, NullableListWasNull); + jboolean jniNullableListWasNull = static_cast(dataResponse.nullableListWasNull); + chip::JniReferences::GetInstance().CreateBoxedObject(NullableListWasNullClassName.c_str(), + NullableListWasNullCtorSignature.c_str(), jniNullableListWasNull, + NullableListWasNull); jobject NullableListValue; if (!dataResponse.nullableListValue.HasValue()) { @@ -6299,8 +6508,9 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject newElement_1; std::string newElement_1ClassName = "java/lang/Integer"; std::string newElement_1CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), static_cast(entry_1), newElement_1); + jint jninewElement_1 = static_cast(entry_1); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); chip::JniReferences::GetInstance().AddToList(NullableListValueInsideOptional, newElement_1); } chip::JniReferences::GetInstance().CreateOptional(NullableListValueInsideOptional, NullableListValue); @@ -6308,9 +6518,10 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject OptionalListWasPresent; std::string OptionalListWasPresentClassName = "java/lang/Boolean"; std::string OptionalListWasPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(OptionalListWasPresentClassName.c_str(), - OptionalListWasPresentCtorSignature.c_str(), - dataResponse.optionalListWasPresent, OptionalListWasPresent); + jboolean jniOptionalListWasPresent = static_cast(dataResponse.optionalListWasPresent); + chip::JniReferences::GetInstance().CreateBoxedObject(OptionalListWasPresentClassName.c_str(), + OptionalListWasPresentCtorSignature.c_str(), + jniOptionalListWasPresent, OptionalListWasPresent); jobject OptionalListValue; if (!dataResponse.optionalListValue.HasValue()) { @@ -6328,8 +6539,9 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject newElement_1; std::string newElement_1ClassName = "java/lang/Integer"; std::string newElement_1CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), static_cast(entry_1), newElement_1); + jint jninewElement_1 = static_cast(entry_1); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); chip::JniReferences::GetInstance().AddToList(OptionalListValueInsideOptional, newElement_1); } chip::JniReferences::GetInstance().CreateOptional(OptionalListValueInsideOptional, OptionalListValue); @@ -6337,9 +6549,10 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableOptionalListWasPresent; std::string NullableOptionalListWasPresentClassName = "java/lang/Boolean"; std::string NullableOptionalListWasPresentCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jniNullableOptionalListWasPresent = static_cast(dataResponse.nullableOptionalListWasPresent); + chip::JniReferences::GetInstance().CreateBoxedObject( NullableOptionalListWasPresentClassName.c_str(), NullableOptionalListWasPresentCtorSignature.c_str(), - dataResponse.nullableOptionalListWasPresent, NullableOptionalListWasPresent); + jniNullableOptionalListWasPresent, NullableOptionalListWasPresent); jobject NullableOptionalListWasNull; if (!dataResponse.nullableOptionalListWasNull.HasValue()) { @@ -6350,10 +6563,12 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject NullableOptionalListWasNullInsideOptional; std::string NullableOptionalListWasNullInsideOptionalClassName = "java/lang/Boolean"; std::string NullableOptionalListWasNullInsideOptionalCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalListWasNullInsideOptionalClassName.c_str(), - NullableOptionalListWasNullInsideOptionalCtorSignature.c_str(), - dataResponse.nullableOptionalListWasNull.Value(), - NullableOptionalListWasNullInsideOptional); + jboolean jniNullableOptionalListWasNullInsideOptional = + static_cast(dataResponse.nullableOptionalListWasNull.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableOptionalListWasNullInsideOptionalClassName.c_str(), + NullableOptionalListWasNullInsideOptionalCtorSignature.c_str(), jniNullableOptionalListWasNullInsideOptional, + NullableOptionalListWasNullInsideOptional); chip::JniReferences::GetInstance().CreateOptional(NullableOptionalListWasNullInsideOptional, NullableOptionalListWasNull); } jobject NullableOptionalListValue; @@ -6373,8 +6588,9 @@ void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::Callback jobject newElement_1; std::string newElement_1ClassName = "java/lang/Integer"; std::string newElement_1CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), static_cast(entry_1), newElement_1); + jint jninewElement_1 = static_cast(entry_1); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); chip::JniReferences::GetInstance().AddToList(NullableOptionalListValueInsideOptional, newElement_1); } chip::JniReferences::GetInstance().CreateOptional(NullableOptionalListValueInsideOptional, NullableOptionalListValue); @@ -6443,8 +6659,9 @@ void CHIPUnitTestingClusterBooleanResponseCallback::CallbackFn( jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - dataResponse.value, value); + jboolean jnivalue = static_cast(dataResponse.value); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); env->CallVoidMethod(javaCallbackRef, javaMethod, value); } @@ -6505,18 +6722,21 @@ void CHIPUnitTestingClusterSimpleStructResponseCallback::CallbackFn( jobject arg1_a; std::string arg1_aClassName = "java/lang/Integer"; std::string arg1_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(arg1_aClassName.c_str(), arg1_aCtorSignature.c_str(), - dataResponse.arg1.a, arg1_a); + jint jniarg1_a = static_cast(dataResponse.arg1.a); + chip::JniReferences::GetInstance().CreateBoxedObject(arg1_aClassName.c_str(), arg1_aCtorSignature.c_str(), jniarg1_a, + arg1_a); jobject arg1_b; std::string arg1_bClassName = "java/lang/Boolean"; std::string arg1_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(arg1_bClassName.c_str(), arg1_bCtorSignature.c_str(), - dataResponse.arg1.b, arg1_b); + jboolean jniarg1_b = static_cast(dataResponse.arg1.b); + chip::JniReferences::GetInstance().CreateBoxedObject(arg1_bClassName.c_str(), arg1_bCtorSignature.c_str(), jniarg1_b, + arg1_b); jobject arg1_c; std::string arg1_cClassName = "java/lang/Integer"; std::string arg1_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(arg1_cClassName.c_str(), arg1_cCtorSignature.c_str(), - static_cast(dataResponse.arg1.c), arg1_c); + jint jniarg1_c = static_cast(dataResponse.arg1.c); + chip::JniReferences::GetInstance().CreateBoxedObject(arg1_cClassName.c_str(), arg1_cCtorSignature.c_str(), jniarg1_c, + arg1_c); jobject arg1_d; jbyteArray arg1_dByteArray = env->NewByteArray(static_cast(dataResponse.arg1.d.size())); env->SetByteArrayRegion(arg1_dByteArray, 0, static_cast(dataResponse.arg1.d.size()), @@ -6527,18 +6747,21 @@ void CHIPUnitTestingClusterSimpleStructResponseCallback::CallbackFn( jobject arg1_f; std::string arg1_fClassName = "java/lang/Integer"; std::string arg1_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(arg1_fClassName.c_str(), arg1_fCtorSignature.c_str(), - dataResponse.arg1.f.Raw(), arg1_f); + jint jniarg1_f = static_cast(dataResponse.arg1.f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(arg1_fClassName.c_str(), arg1_fCtorSignature.c_str(), jniarg1_f, + arg1_f); jobject arg1_g; std::string arg1_gClassName = "java/lang/Float"; std::string arg1_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(arg1_gClassName.c_str(), arg1_gCtorSignature.c_str(), - dataResponse.arg1.g, arg1_g); + jfloat jniarg1_g = static_cast(dataResponse.arg1.g); + chip::JniReferences::GetInstance().CreateBoxedObject(arg1_gClassName.c_str(), arg1_gCtorSignature.c_str(), jniarg1_g, + arg1_g); jobject arg1_h; std::string arg1_hClassName = "java/lang/Double"; std::string arg1_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(arg1_hClassName.c_str(), arg1_hCtorSignature.c_str(), - dataResponse.arg1.h, arg1_h); + jdouble jniarg1_h = static_cast(dataResponse.arg1.h); + chip::JniReferences::GetInstance().CreateBoxedObject(arg1_hClassName.c_str(), arg1_hCtorSignature.c_str(), jniarg1_h, + arg1_h); jclass simpleStructStructClass_0; err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", @@ -6618,8 +6841,9 @@ void CHIPUnitTestingClusterTestEmitTestEventResponseCallback::CallbackFn( jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - dataResponse.value, value); + jlong jnivalue = static_cast(dataResponse.value); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); env->CallVoidMethod(javaCallbackRef, javaMethod, value); } @@ -6681,8 +6905,9 @@ void CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback::Callba jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - dataResponse.value, value); + jlong jnivalue = static_cast(dataResponse.value); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); env->CallVoidMethod(javaCallbackRef, javaMethod, value); } diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 7091c9ab3a7ef5..3903a402f42ebc 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -89,8 +89,9 @@ void CHIPIdentifyGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -160,8 +161,9 @@ void CHIPIdentifyAcceptedCommandListAttributeCallback::CallbackFn(void * context jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -229,8 +231,9 @@ void CHIPIdentifyEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -298,8 +301,9 @@ void CHIPIdentifyAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -369,8 +373,9 @@ void CHIPGroupsGeneratedCommandListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -440,8 +445,9 @@ void CHIPGroupsAcceptedCommandListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -509,8 +515,9 @@ void CHIPGroupsEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -578,8 +585,9 @@ void CHIPGroupsAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -645,8 +653,9 @@ void CHIPScenesLastConfiguredByAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -714,8 +723,9 @@ void CHIPScenesGeneratedCommandListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -785,8 +795,9 @@ void CHIPScenesAcceptedCommandListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -854,8 +865,9 @@ void CHIPScenesEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -923,8 +935,9 @@ void CHIPScenesAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -990,8 +1003,9 @@ void CHIPOnOffStartUpOnOffAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - static_cast(value.Value()), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -1059,8 +1073,9 @@ void CHIPOnOffGeneratedCommandListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -1128,8 +1143,9 @@ void CHIPOnOffAcceptedCommandListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -1197,8 +1213,9 @@ void CHIPOnOffEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -1266,8 +1283,9 @@ void CHIPOnOffAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -1338,8 +1356,9 @@ void CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback::Callback jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -1410,8 +1429,9 @@ void CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback::CallbackF jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -1481,8 +1501,9 @@ void CHIPOnOffSwitchConfigurationEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -1552,8 +1573,9 @@ void CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -1619,8 +1641,9 @@ void CHIPLevelControlCurrentLevelAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -1683,8 +1706,9 @@ void CHIPLevelControlOnLevelAttributeCallback::CallbackFn(void * context, const { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -1750,8 +1774,9 @@ void CHIPLevelControlOnTransitionTimeAttributeCallback::CallbackFn(void * contex { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -1817,8 +1842,9 @@ void CHIPLevelControlOffTransitionTimeAttributeCallback::CallbackFn(void * conte { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -1884,8 +1910,9 @@ void CHIPLevelControlDefaultMoveRateAttributeCallback::CallbackFn(void * context { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -1951,8 +1978,9 @@ void CHIPLevelControlStartUpCurrentLevelAttributeCallback::CallbackFn(void * con { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -2020,8 +2048,9 @@ void CHIPLevelControlGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -2091,8 +2120,9 @@ void CHIPLevelControlAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -2160,8 +2190,9 @@ void CHIPLevelControlEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -2231,8 +2262,9 @@ void CHIPLevelControlAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -2302,8 +2334,9 @@ void CHIPBinaryInputBasicGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -2373,8 +2406,9 @@ void CHIPBinaryInputBasicAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -2444,8 +2478,9 @@ void CHIPBinaryInputBasicEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -2515,8 +2550,9 @@ void CHIPBinaryInputBasicAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -2586,8 +2622,9 @@ void CHIPPulseWidthModulationGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -2657,8 +2694,9 @@ void CHIPPulseWidthModulationAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -2728,8 +2766,9 @@ void CHIPPulseWidthModulationEventListAttributeCallback::CallbackFn(void * conte jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -2799,8 +2838,9 @@ void CHIPPulseWidthModulationAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -2870,15 +2910,17 @@ void CHIPDescriptorDeviceTypeListAttributeCallback::CallbackFn( jobject newElement_0_deviceType; std::string newElement_0_deviceTypeClassName = "java/lang/Long"; std::string newElement_0_deviceTypeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceTypeClassName.c_str(), - newElement_0_deviceTypeCtorSignature.c_str(), - entry_0.deviceType, newElement_0_deviceType); + jlong jninewElement_0_deviceType = static_cast(entry_0.deviceType); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceTypeClassName.c_str(), + newElement_0_deviceTypeCtorSignature.c_str(), + jninewElement_0_deviceType, newElement_0_deviceType); jobject newElement_0_revision; std::string newElement_0_revisionClassName = "java/lang/Integer"; std::string newElement_0_revisionCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_revisionClassName.c_str(), - newElement_0_revisionCtorSignature.c_str(), entry_0.revision, - newElement_0_revision); + jint jninewElement_0_revision = static_cast(entry_0.revision); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_revisionClassName.c_str(), + newElement_0_revisionCtorSignature.c_str(), + jninewElement_0_revision, newElement_0_revision); jclass deviceTypeStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2965,8 +3007,9 @@ void CHIPDescriptorServerListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3034,8 +3077,9 @@ void CHIPDescriptorClientListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3103,8 +3147,9 @@ void CHIPDescriptorPartsListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3180,21 +3225,24 @@ void CHIPDescriptorTagListAttributeCallback::CallbackFn( { std::string newElement_0_mfgCodeClassName = "java/lang/Integer"; std::string newElement_0_mfgCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_mfgCodeClassName.c_str(), newElement_0_mfgCodeCtorSignature.c_str(), - static_cast(entry_0.mfgCode.Value()), newElement_0_mfgCode); + jint jninewElement_0_mfgCode = static_cast(entry_0.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_mfgCodeClassName.c_str(), + newElement_0_mfgCodeCtorSignature.c_str(), + jninewElement_0_mfgCode, newElement_0_mfgCode); } jobject newElement_0_namespaceID; std::string newElement_0_namespaceIDClassName = "java/lang/Integer"; std::string newElement_0_namespaceIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_namespaceIDClassName.c_str(), - newElement_0_namespaceIDCtorSignature.c_str(), - entry_0.namespaceID, newElement_0_namespaceID); + jint jninewElement_0_namespaceID = static_cast(entry_0.namespaceID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_namespaceIDClassName.c_str(), + newElement_0_namespaceIDCtorSignature.c_str(), + jninewElement_0_namespaceID, newElement_0_namespaceID); jobject newElement_0_tag; std::string newElement_0_tagClassName = "java/lang/Integer"; std::string newElement_0_tagCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_tagClassName.c_str(), newElement_0_tagCtorSignature.c_str(), entry_0.tag, newElement_0_tag); + jint jninewElement_0_tag = static_cast(entry_0.tag); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_tagClassName.c_str(), newElement_0_tagCtorSignature.c_str(), jninewElement_0_tag, newElement_0_tag); jobject newElement_0_label; if (!entry_0.label.HasValue()) { @@ -3303,8 +3351,9 @@ void CHIPDescriptorGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3374,8 +3423,9 @@ void CHIPDescriptorAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3443,8 +3493,9 @@ void CHIPDescriptorEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3512,8 +3563,9 @@ void CHIPDescriptorAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3590,9 +3642,10 @@ void CHIPBindingBindingAttributeCallback::CallbackFn( jobject newElement_0_nodeInsideOptional; std::string newElement_0_nodeInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_nodeInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nodeInsideOptionalClassName.c_str(), - newElement_0_nodeInsideOptionalCtorSignature.c_str(), - entry_0.node.Value(), newElement_0_nodeInsideOptional); + jlong jninewElement_0_nodeInsideOptional = static_cast(entry_0.node.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nodeInsideOptionalClassName.c_str(), newElement_0_nodeInsideOptionalCtorSignature.c_str(), + jninewElement_0_nodeInsideOptional, newElement_0_nodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_nodeInsideOptional, newElement_0_node); } jobject newElement_0_group; @@ -3605,9 +3658,10 @@ void CHIPBindingBindingAttributeCallback::CallbackFn( jobject newElement_0_groupInsideOptional; std::string newElement_0_groupInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_groupInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupInsideOptionalClassName.c_str(), - newElement_0_groupInsideOptionalCtorSignature.c_str(), - entry_0.group.Value(), newElement_0_groupInsideOptional); + jint jninewElement_0_groupInsideOptional = static_cast(entry_0.group.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_groupInsideOptionalClassName.c_str(), newElement_0_groupInsideOptionalCtorSignature.c_str(), + jninewElement_0_groupInsideOptional, newElement_0_groupInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_groupInsideOptional, newElement_0_group); } jobject newElement_0_endpoint; @@ -3620,9 +3674,10 @@ void CHIPBindingBindingAttributeCallback::CallbackFn( jobject newElement_0_endpointInsideOptional; std::string newElement_0_endpointInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_endpointInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_endpointInsideOptional = static_cast(entry_0.endpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_endpointInsideOptionalClassName.c_str(), newElement_0_endpointInsideOptionalCtorSignature.c_str(), - entry_0.endpoint.Value(), newElement_0_endpointInsideOptional); + jninewElement_0_endpointInsideOptional, newElement_0_endpointInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_endpointInsideOptional, newElement_0_endpoint); } jobject newElement_0_cluster; @@ -3635,17 +3690,19 @@ void CHIPBindingBindingAttributeCallback::CallbackFn( jobject newElement_0_clusterInsideOptional; std::string newElement_0_clusterInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_clusterInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_0_clusterInsideOptional = static_cast(entry_0.cluster.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_clusterInsideOptionalClassName.c_str(), newElement_0_clusterInsideOptionalCtorSignature.c_str(), - entry_0.cluster.Value(), newElement_0_clusterInsideOptional); + jninewElement_0_clusterInsideOptional, newElement_0_clusterInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_clusterInsideOptional, newElement_0_cluster); } jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass targetStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$BindingClusterTargetStruct", @@ -3735,8 +3792,9 @@ void CHIPBindingGeneratedCommandListAttributeCallback::CallbackFn(void * context jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3806,8 +3864,9 @@ void CHIPBindingAcceptedCommandListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3875,8 +3934,9 @@ void CHIPBindingEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3944,8 +4004,9 @@ void CHIPBindingAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -4016,15 +4077,17 @@ void CHIPAccessControlAclAttributeCallback::CallbackFn( jobject newElement_0_privilege; std::string newElement_0_privilegeClassName = "java/lang/Integer"; std::string newElement_0_privilegeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_privilegeClassName.c_str(), newElement_0_privilegeCtorSignature.c_str(), - static_cast(entry_0.privilege), newElement_0_privilege); + jint jninewElement_0_privilege = static_cast(entry_0.privilege); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_privilegeClassName.c_str(), + newElement_0_privilegeCtorSignature.c_str(), + jninewElement_0_privilege, newElement_0_privilege); jobject newElement_0_authMode; std::string newElement_0_authModeClassName = "java/lang/Integer"; std::string newElement_0_authModeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_authModeClassName.c_str(), newElement_0_authModeCtorSignature.c_str(), - static_cast(entry_0.authMode), newElement_0_authMode); + jint jninewElement_0_authMode = static_cast(entry_0.authMode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_authModeClassName.c_str(), + newElement_0_authModeCtorSignature.c_str(), + jninewElement_0_authMode, newElement_0_authMode); jobject newElement_0_subjects; if (entry_0.subjects.IsNull()) { @@ -4041,8 +4104,9 @@ void CHIPAccessControlAclAttributeCallback::CallbackFn( jobject newElement_3; std::string newElement_3ClassName = "java/lang/Long"; std::string newElement_3CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), entry_3, newElement_3); + jlong jninewElement_3 = static_cast(entry_3); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); chip::JniReferences::GetInstance().AddToList(newElement_0_subjects, newElement_3); } } @@ -4069,9 +4133,10 @@ void CHIPAccessControlAclAttributeCallback::CallbackFn( { std::string newElement_3_clusterClassName = "java/lang/Long"; std::string newElement_3_clusterCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_clusterClassName.c_str(), - newElement_3_clusterCtorSignature.c_str(), - entry_3.cluster.Value(), newElement_3_cluster); + jlong jninewElement_3_cluster = static_cast(entry_3.cluster.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_clusterClassName.c_str(), + newElement_3_clusterCtorSignature.c_str(), + jninewElement_3_cluster, newElement_3_cluster); } jobject newElement_3_endpoint; if (entry_3.endpoint.IsNull()) @@ -4082,9 +4147,10 @@ void CHIPAccessControlAclAttributeCallback::CallbackFn( { std::string newElement_3_endpointClassName = "java/lang/Integer"; std::string newElement_3_endpointCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_endpointClassName.c_str(), - newElement_3_endpointCtorSignature.c_str(), - entry_3.endpoint.Value(), newElement_3_endpoint); + jint jninewElement_3_endpoint = static_cast(entry_3.endpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_endpointClassName.c_str(), + newElement_3_endpointCtorSignature.c_str(), + jninewElement_3_endpoint, newElement_3_endpoint); } jobject newElement_3_deviceType; if (entry_3.deviceType.IsNull()) @@ -4095,9 +4161,10 @@ void CHIPAccessControlAclAttributeCallback::CallbackFn( { std::string newElement_3_deviceTypeClassName = "java/lang/Long"; std::string newElement_3_deviceTypeCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_3_deviceType = static_cast(entry_3.deviceType.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3_deviceTypeClassName.c_str(), newElement_3_deviceTypeCtorSignature.c_str(), - entry_3.deviceType.Value(), newElement_3_deviceType); + jninewElement_3_deviceType, newElement_3_deviceType); } jclass accessControlTargetStructStructClass_4; @@ -4125,9 +4192,10 @@ void CHIPAccessControlAclAttributeCallback::CallbackFn( jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass accessControlEntryStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -4225,9 +4293,10 @@ void CHIPAccessControlExtensionAttributeCallback::CallbackFn( jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass accessControlExtensionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -4317,8 +4386,9 @@ void CHIPAccessControlGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -4388,8 +4458,9 @@ void CHIPAccessControlAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -4457,8 +4528,9 @@ void CHIPAccessControlEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -4528,8 +4600,9 @@ void CHIPAccessControlAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -4599,35 +4672,39 @@ void CHIPActionsActionListAttributeCallback::CallbackFn( jobject newElement_0_actionID; std::string newElement_0_actionIDClassName = "java/lang/Integer"; std::string newElement_0_actionIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_actionIDClassName.c_str(), - newElement_0_actionIDCtorSignature.c_str(), entry_0.actionID, - newElement_0_actionID); + jint jninewElement_0_actionID = static_cast(entry_0.actionID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_actionIDClassName.c_str(), + newElement_0_actionIDCtorSignature.c_str(), + jninewElement_0_actionID, newElement_0_actionID); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); jobject newElement_0_type; std::string newElement_0_typeClassName = "java/lang/Integer"; std::string newElement_0_typeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_typeClassName.c_str(), - newElement_0_typeCtorSignature.c_str(), - static_cast(entry_0.type), newElement_0_type); + jint jninewElement_0_type = static_cast(entry_0.type); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); jobject newElement_0_endpointListID; std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; std::string newElement_0_endpointListIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointListIDClassName.c_str(), - newElement_0_endpointListIDCtorSignature.c_str(), - entry_0.endpointListID, newElement_0_endpointListID); + jint jninewElement_0_endpointListID = static_cast(entry_0.endpointListID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointListIDClassName.c_str(), + newElement_0_endpointListIDCtorSignature.c_str(), + jninewElement_0_endpointListID, newElement_0_endpointListID); jobject newElement_0_supportedCommands; std::string newElement_0_supportedCommandsClassName = "java/lang/Integer"; std::string newElement_0_supportedCommandsCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_supportedCommands = static_cast(entry_0.supportedCommands.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_supportedCommandsClassName.c_str(), newElement_0_supportedCommandsCtorSignature.c_str(), - entry_0.supportedCommands.Raw(), newElement_0_supportedCommands); + jninewElement_0_supportedCommands, newElement_0_supportedCommands); jobject newElement_0_state; std::string newElement_0_stateClassName = "java/lang/Integer"; std::string newElement_0_stateCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_stateClassName.c_str(), - newElement_0_stateCtorSignature.c_str(), - static_cast(entry_0.state), newElement_0_state); + jint jninewElement_0_state = static_cast(entry_0.state); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_stateClassName.c_str(), + newElement_0_stateCtorSignature.c_str(), jninewElement_0_state, + newElement_0_state); jclass actionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ActionsClusterActionStruct", @@ -4718,17 +4795,18 @@ void CHIPActionsEndpointListsAttributeCallback::CallbackFn( jobject newElement_0_endpointListID; std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; std::string newElement_0_endpointListIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointListIDClassName.c_str(), - newElement_0_endpointListIDCtorSignature.c_str(), - entry_0.endpointListID, newElement_0_endpointListID); + jint jninewElement_0_endpointListID = static_cast(entry_0.endpointListID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointListIDClassName.c_str(), + newElement_0_endpointListIDCtorSignature.c_str(), + jninewElement_0_endpointListID, newElement_0_endpointListID); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); jobject newElement_0_type; std::string newElement_0_typeClassName = "java/lang/Integer"; std::string newElement_0_typeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_typeClassName.c_str(), - newElement_0_typeCtorSignature.c_str(), - static_cast(entry_0.type), newElement_0_type); + jint jninewElement_0_type = static_cast(entry_0.type); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); jobject newElement_0_endpoints; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); @@ -4739,8 +4817,9 @@ void CHIPActionsEndpointListsAttributeCallback::CallbackFn( jobject newElement_2; std::string newElement_2ClassName = "java/lang/Integer"; std::string newElement_2CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), entry_2, newElement_2); + jint jninewElement_2 = static_cast(entry_2); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); } @@ -4832,8 +4911,9 @@ void CHIPActionsGeneratedCommandListAttributeCallback::CallbackFn(void * context jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -4903,8 +4983,9 @@ void CHIPActionsAcceptedCommandListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -4972,8 +5053,9 @@ void CHIPActionsEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -5041,8 +5123,9 @@ void CHIPActionsAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -5112,8 +5195,9 @@ void CHIPBasicInformationGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -5183,8 +5267,9 @@ void CHIPBasicInformationAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -5254,8 +5339,9 @@ void CHIPBasicInformationEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -5325,8 +5411,9 @@ void CHIPBasicInformationAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -5397,8 +5484,9 @@ void CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback::Callbac jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -5469,8 +5557,9 @@ void CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback::Callback jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -5540,8 +5629,9 @@ void CHIPOtaSoftwareUpdateProviderEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -5611,8 +5701,9 @@ void CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -5686,21 +5777,24 @@ void CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback::Callbac jobject newElement_0_providerNodeID; std::string newElement_0_providerNodeIDClassName = "java/lang/Long"; std::string newElement_0_providerNodeIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_providerNodeIDClassName.c_str(), - newElement_0_providerNodeIDCtorSignature.c_str(), - entry_0.providerNodeID, newElement_0_providerNodeID); + jlong jninewElement_0_providerNodeID = static_cast(entry_0.providerNodeID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_providerNodeIDClassName.c_str(), + newElement_0_providerNodeIDCtorSignature.c_str(), + jninewElement_0_providerNodeID, newElement_0_providerNodeID); jobject newElement_0_endpoint; std::string newElement_0_endpointClassName = "java/lang/Integer"; std::string newElement_0_endpointCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointClassName.c_str(), - newElement_0_endpointCtorSignature.c_str(), entry_0.endpoint, - newElement_0_endpoint); + jint jninewElement_0_endpoint = static_cast(entry_0.endpoint); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointClassName.c_str(), + newElement_0_endpointCtorSignature.c_str(), + jninewElement_0_endpoint, newElement_0_endpoint); jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass providerLocationStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -5789,8 +5883,9 @@ void CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback::Callbac { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -5859,8 +5954,9 @@ void CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback::Callba jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -5931,8 +6027,9 @@ void CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback::Callbac jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6002,8 +6099,9 @@ void CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6073,8 +6171,9 @@ void CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6213,8 +6312,9 @@ void CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback::Callbac jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6285,8 +6385,9 @@ void CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback::Callback jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6356,8 +6457,9 @@ void CHIPLocalizationConfigurationEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6427,8 +6529,9 @@ void CHIPLocalizationConfigurationAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6499,8 +6602,9 @@ void CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback::Callback jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6570,8 +6674,9 @@ void CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback::CallbackFn jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6641,8 +6746,9 @@ void CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6712,8 +6818,9 @@ void CHIPTimeFormatLocalizationEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6783,8 +6890,9 @@ void CHIPTimeFormatLocalizationAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6854,8 +6962,9 @@ void CHIPUnitLocalizationGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6925,8 +7034,9 @@ void CHIPUnitLocalizationAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6996,8 +7106,9 @@ void CHIPUnitLocalizationEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -7067,8 +7178,9 @@ void CHIPUnitLocalizationAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -7138,8 +7250,9 @@ void CHIPPowerSourceConfigurationSourcesAttributeCallback::CallbackFn(void * con jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -7210,8 +7323,9 @@ void CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback::Callback jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -7282,8 +7396,9 @@ void CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback::CallbackF jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -7353,8 +7468,9 @@ void CHIPPowerSourceConfigurationEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -7424,8 +7540,9 @@ void CHIPPowerSourceConfigurationAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -7493,8 +7610,9 @@ void CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback::CallbackFn(void { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -7560,8 +7678,9 @@ void CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback::CallbackFn(voi { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -7627,8 +7746,9 @@ void CHIPPowerSourceWiredAssessedCurrentAttributeCallback::CallbackFn(void * con { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -7696,8 +7816,9 @@ void CHIPPowerSourceActiveWiredFaultsAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -7762,8 +7883,9 @@ void CHIPPowerSourceBatVoltageAttributeCallback::CallbackFn(void * context, cons { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -7829,8 +7951,9 @@ void CHIPPowerSourceBatPercentRemainingAttributeCallback::CallbackFn(void * cont { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -7896,8 +8019,9 @@ void CHIPPowerSourceBatTimeRemainingAttributeCallback::CallbackFn(void * context { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -7965,8 +8089,9 @@ void CHIPPowerSourceActiveBatFaultsAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -8034,8 +8159,9 @@ void CHIPPowerSourceBatTimeToFullChargeAttributeCallback::CallbackFn(void * cont { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -8101,8 +8227,9 @@ void CHIPPowerSourceBatChargingCurrentAttributeCallback::CallbackFn(void * conte { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -8170,8 +8297,9 @@ void CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -8239,8 +8367,9 @@ void CHIPPowerSourceEndpointListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -8310,8 +8439,9 @@ void CHIPPowerSourceGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -8381,8 +8511,9 @@ void CHIPPowerSourceAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -8450,8 +8581,9 @@ void CHIPPowerSourceEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -8519,8 +8651,9 @@ void CHIPPowerSourceAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -8590,8 +8723,9 @@ void CHIPGeneralCommissioningGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -8661,8 +8795,9 @@ void CHIPGeneralCommissioningAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -8732,8 +8867,9 @@ void CHIPGeneralCommissioningEventListAttributeCallback::CallbackFn(void * conte jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -8803,8 +8939,9 @@ void CHIPGeneralCommissioningAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -8882,9 +9019,10 @@ void CHIPNetworkCommissioningNetworksAttributeCallback::CallbackFn( jobject newElement_0_connected; std::string newElement_0_connectedClassName = "java/lang/Boolean"; std::string newElement_0_connectedCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_connectedClassName.c_str(), - newElement_0_connectedCtorSignature.c_str(), entry_0.connected, - newElement_0_connected); + jboolean jninewElement_0_connected = static_cast(entry_0.connected); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_connectedClassName.c_str(), + newElement_0_connectedCtorSignature.c_str(), + jninewElement_0_connected, newElement_0_connected); jclass networkInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -8972,8 +9110,9 @@ void CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - static_cast(value.Value()), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -9106,8 +9245,9 @@ void CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -9175,8 +9315,9 @@ void CHIPNetworkCommissioningGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -9246,8 +9387,9 @@ void CHIPNetworkCommissioningAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -9317,8 +9459,9 @@ void CHIPNetworkCommissioningEventListAttributeCallback::CallbackFn(void * conte jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -9388,8 +9531,9 @@ void CHIPNetworkCommissioningAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -9459,8 +9603,9 @@ void CHIPDiagnosticLogsGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -9530,8 +9675,9 @@ void CHIPDiagnosticLogsAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -9599,8 +9745,9 @@ void CHIPDiagnosticLogsEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -9670,8 +9817,9 @@ void CHIPDiagnosticLogsAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -9746,9 +9894,10 @@ void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( jobject newElement_0_isOperational; std::string newElement_0_isOperationalClassName = "java/lang/Boolean"; std::string newElement_0_isOperationalCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_isOperationalClassName.c_str(), - newElement_0_isOperationalCtorSignature.c_str(), - entry_0.isOperational, newElement_0_isOperational); + jboolean jninewElement_0_isOperational = static_cast(entry_0.isOperational); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_isOperationalClassName.c_str(), + newElement_0_isOperationalCtorSignature.c_str(), + jninewElement_0_isOperational, newElement_0_isOperational); jobject newElement_0_offPremiseServicesReachableIPv4; if (entry_0.offPremiseServicesReachableIPv4.IsNull()) { @@ -9758,9 +9907,11 @@ void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( { std::string newElement_0_offPremiseServicesReachableIPv4ClassName = "java/lang/Boolean"; std::string newElement_0_offPremiseServicesReachableIPv4CtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jninewElement_0_offPremiseServicesReachableIPv4 = + static_cast(entry_0.offPremiseServicesReachableIPv4.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_offPremiseServicesReachableIPv4ClassName.c_str(), - newElement_0_offPremiseServicesReachableIPv4CtorSignature.c_str(), entry_0.offPremiseServicesReachableIPv4.Value(), + newElement_0_offPremiseServicesReachableIPv4CtorSignature.c_str(), jninewElement_0_offPremiseServicesReachableIPv4, newElement_0_offPremiseServicesReachableIPv4); } jobject newElement_0_offPremiseServicesReachableIPv6; @@ -9772,9 +9923,11 @@ void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( { std::string newElement_0_offPremiseServicesReachableIPv6ClassName = "java/lang/Boolean"; std::string newElement_0_offPremiseServicesReachableIPv6CtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jninewElement_0_offPremiseServicesReachableIPv6 = + static_cast(entry_0.offPremiseServicesReachableIPv6.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_offPremiseServicesReachableIPv6ClassName.c_str(), - newElement_0_offPremiseServicesReachableIPv6CtorSignature.c_str(), entry_0.offPremiseServicesReachableIPv6.Value(), + newElement_0_offPremiseServicesReachableIPv6CtorSignature.c_str(), jninewElement_0_offPremiseServicesReachableIPv6, newElement_0_offPremiseServicesReachableIPv6); } jobject newElement_0_hardwareAddress; @@ -9813,9 +9966,9 @@ void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( jobject newElement_0_type; std::string newElement_0_typeClassName = "java/lang/Integer"; std::string newElement_0_typeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_typeClassName.c_str(), - newElement_0_typeCtorSignature.c_str(), - static_cast(entry_0.type), newElement_0_type); + jint jninewElement_0_type = static_cast(entry_0.type); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); jclass networkInterfaceStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -9908,8 +10061,9 @@ void CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -9979,8 +10133,9 @@ void CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -10050,8 +10205,9 @@ void CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -10121,8 +10277,9 @@ void CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -10192,8 +10349,9 @@ void CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -10263,8 +10421,9 @@ void CHIPGeneralDiagnosticsEventListAttributeCallback::CallbackFn(void * context jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -10334,8 +10493,9 @@ void CHIPGeneralDiagnosticsAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -10408,8 +10568,9 @@ void CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CallbackFn( jobject newElement_0_id; std::string newElement_0_idClassName = "java/lang/Long"; std::string newElement_0_idCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_idClassName.c_str(), newElement_0_idCtorSignature.c_str(), entry_0.id, newElement_0_id); + jlong jninewElement_0_id = static_cast(entry_0.id); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_idClassName.c_str(), newElement_0_idCtorSignature.c_str(), jninewElement_0_id, newElement_0_id); jobject newElement_0_name; if (!entry_0.name.HasValue()) { @@ -10432,9 +10593,10 @@ void CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CallbackFn( jobject newElement_0_stackFreeCurrentInsideOptional; std::string newElement_0_stackFreeCurrentInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_stackFreeCurrentInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_0_stackFreeCurrentInsideOptional = static_cast(entry_0.stackFreeCurrent.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_stackFreeCurrentInsideOptionalClassName.c_str(), - newElement_0_stackFreeCurrentInsideOptionalCtorSignature.c_str(), entry_0.stackFreeCurrent.Value(), + newElement_0_stackFreeCurrentInsideOptionalCtorSignature.c_str(), jninewElement_0_stackFreeCurrentInsideOptional, newElement_0_stackFreeCurrentInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackFreeCurrentInsideOptional, newElement_0_stackFreeCurrent); @@ -10449,9 +10611,10 @@ void CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CallbackFn( jobject newElement_0_stackFreeMinimumInsideOptional; std::string newElement_0_stackFreeMinimumInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_stackFreeMinimumInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_0_stackFreeMinimumInsideOptional = static_cast(entry_0.stackFreeMinimum.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_stackFreeMinimumInsideOptionalClassName.c_str(), - newElement_0_stackFreeMinimumInsideOptionalCtorSignature.c_str(), entry_0.stackFreeMinimum.Value(), + newElement_0_stackFreeMinimumInsideOptionalCtorSignature.c_str(), jninewElement_0_stackFreeMinimumInsideOptional, newElement_0_stackFreeMinimumInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackFreeMinimumInsideOptional, newElement_0_stackFreeMinimum); @@ -10466,9 +10629,10 @@ void CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CallbackFn( jobject newElement_0_stackSizeInsideOptional; std::string newElement_0_stackSizeInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_stackSizeInsideOptionalCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jlong jninewElement_0_stackSizeInsideOptional = static_cast(entry_0.stackSize.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_stackSizeInsideOptionalClassName.c_str(), newElement_0_stackSizeInsideOptionalCtorSignature.c_str(), - entry_0.stackSize.Value(), newElement_0_stackSizeInsideOptional); + jninewElement_0_stackSizeInsideOptional, newElement_0_stackSizeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackSizeInsideOptional, newElement_0_stackSize); } @@ -10562,8 +10726,9 @@ void CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -10633,8 +10798,9 @@ void CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -10704,8 +10870,9 @@ void CHIPSoftwareDiagnosticsEventListAttributeCallback::CallbackFn(void * contex jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -10775,8 +10942,9 @@ void CHIPSoftwareDiagnosticsAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -10844,8 +11012,9 @@ void CHIPThreadNetworkDiagnosticsChannelAttributeCallback::CallbackFn(void * con { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -10911,8 +11080,9 @@ void CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - static_cast(value.Value()), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -11042,8 +11212,9 @@ void CHIPThreadNetworkDiagnosticsPanIdAttributeCallback::CallbackFn(void * conte { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -11109,8 +11280,9 @@ void CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback::CallbackFn(void { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -11248,36 +11420,43 @@ void CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback::CallbackFn( jobject newElement_0_extAddress; std::string newElement_0_extAddressClassName = "java/lang/Long"; std::string newElement_0_extAddressCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), - newElement_0_extAddressCtorSignature.c_str(), - entry_0.extAddress, newElement_0_extAddress); + jlong jninewElement_0_extAddress = static_cast(entry_0.extAddress); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), + newElement_0_extAddressCtorSignature.c_str(), + jninewElement_0_extAddress, newElement_0_extAddress); jobject newElement_0_age; std::string newElement_0_ageClassName = "java/lang/Long"; std::string newElement_0_ageCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), entry_0.age, newElement_0_age); + jlong jninewElement_0_age = static_cast(entry_0.age); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), jninewElement_0_age, newElement_0_age); jobject newElement_0_rloc16; std::string newElement_0_rloc16ClassName = "java/lang/Integer"; std::string newElement_0_rloc16CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_rloc16ClassName.c_str(), newElement_0_rloc16CtorSignature.c_str(), entry_0.rloc16, newElement_0_rloc16); + jint jninewElement_0_rloc16 = static_cast(entry_0.rloc16); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rloc16ClassName.c_str(), + newElement_0_rloc16CtorSignature.c_str(), jninewElement_0_rloc16, + newElement_0_rloc16); jobject newElement_0_linkFrameCounter; std::string newElement_0_linkFrameCounterClassName = "java/lang/Long"; std::string newElement_0_linkFrameCounterCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_linkFrameCounterClassName.c_str(), - newElement_0_linkFrameCounterCtorSignature.c_str(), - entry_0.linkFrameCounter, newElement_0_linkFrameCounter); + jlong jninewElement_0_linkFrameCounter = static_cast(entry_0.linkFrameCounter); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_linkFrameCounterClassName.c_str(), newElement_0_linkFrameCounterCtorSignature.c_str(), + jninewElement_0_linkFrameCounter, newElement_0_linkFrameCounter); jobject newElement_0_mleFrameCounter; std::string newElement_0_mleFrameCounterClassName = "java/lang/Long"; std::string newElement_0_mleFrameCounterCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_mleFrameCounterClassName.c_str(), - newElement_0_mleFrameCounterCtorSignature.c_str(), - entry_0.mleFrameCounter, newElement_0_mleFrameCounter); + jlong jninewElement_0_mleFrameCounter = static_cast(entry_0.mleFrameCounter); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_mleFrameCounterClassName.c_str(), + newElement_0_mleFrameCounterCtorSignature.c_str(), + jninewElement_0_mleFrameCounter, newElement_0_mleFrameCounter); jobject newElement_0_lqi; std::string newElement_0_lqiClassName = "java/lang/Integer"; std::string newElement_0_lqiCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_lqiClassName.c_str(), newElement_0_lqiCtorSignature.c_str(), entry_0.lqi, newElement_0_lqi); + jint jninewElement_0_lqi = static_cast(entry_0.lqi); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_lqiClassName.c_str(), newElement_0_lqiCtorSignature.c_str(), jninewElement_0_lqi, newElement_0_lqi); jobject newElement_0_averageRssi; if (entry_0.averageRssi.IsNull()) { @@ -11287,9 +11466,10 @@ void CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback::CallbackFn( { std::string newElement_0_averageRssiClassName = "java/lang/Integer"; std::string newElement_0_averageRssiCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_averageRssiClassName.c_str(), - newElement_0_averageRssiCtorSignature.c_str(), - entry_0.averageRssi.Value(), newElement_0_averageRssi); + jint jninewElement_0_averageRssi = static_cast(entry_0.averageRssi.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_averageRssiClassName.c_str(), + newElement_0_averageRssiCtorSignature.c_str(), + jninewElement_0_averageRssi, newElement_0_averageRssi); } jobject newElement_0_lastRssi; if (entry_0.lastRssi.IsNull()) @@ -11300,46 +11480,53 @@ void CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback::CallbackFn( { std::string newElement_0_lastRssiClassName = "java/lang/Integer"; std::string newElement_0_lastRssiCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_lastRssiClassName.c_str(), - newElement_0_lastRssiCtorSignature.c_str(), - entry_0.lastRssi.Value(), newElement_0_lastRssi); + jint jninewElement_0_lastRssi = static_cast(entry_0.lastRssi.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_lastRssiClassName.c_str(), + newElement_0_lastRssiCtorSignature.c_str(), + jninewElement_0_lastRssi, newElement_0_lastRssi); } jobject newElement_0_frameErrorRate; std::string newElement_0_frameErrorRateClassName = "java/lang/Integer"; std::string newElement_0_frameErrorRateCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_frameErrorRateClassName.c_str(), - newElement_0_frameErrorRateCtorSignature.c_str(), - entry_0.frameErrorRate, newElement_0_frameErrorRate); + jint jninewElement_0_frameErrorRate = static_cast(entry_0.frameErrorRate); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_frameErrorRateClassName.c_str(), + newElement_0_frameErrorRateCtorSignature.c_str(), + jninewElement_0_frameErrorRate, newElement_0_frameErrorRate); jobject newElement_0_messageErrorRate; std::string newElement_0_messageErrorRateClassName = "java/lang/Integer"; std::string newElement_0_messageErrorRateCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_messageErrorRateClassName.c_str(), - newElement_0_messageErrorRateCtorSignature.c_str(), - entry_0.messageErrorRate, newElement_0_messageErrorRate); + jint jninewElement_0_messageErrorRate = static_cast(entry_0.messageErrorRate); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_messageErrorRateClassName.c_str(), + newElement_0_messageErrorRateCtorSignature.c_str(), + jninewElement_0_messageErrorRate, newElement_0_messageErrorRate); jobject newElement_0_rxOnWhenIdle; std::string newElement_0_rxOnWhenIdleClassName = "java/lang/Boolean"; std::string newElement_0_rxOnWhenIdleCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rxOnWhenIdleClassName.c_str(), - newElement_0_rxOnWhenIdleCtorSignature.c_str(), - entry_0.rxOnWhenIdle, newElement_0_rxOnWhenIdle); + jboolean jninewElement_0_rxOnWhenIdle = static_cast(entry_0.rxOnWhenIdle); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rxOnWhenIdleClassName.c_str(), + newElement_0_rxOnWhenIdleCtorSignature.c_str(), + jninewElement_0_rxOnWhenIdle, newElement_0_rxOnWhenIdle); jobject newElement_0_fullThreadDevice; std::string newElement_0_fullThreadDeviceClassName = "java/lang/Boolean"; std::string newElement_0_fullThreadDeviceCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fullThreadDeviceClassName.c_str(), - newElement_0_fullThreadDeviceCtorSignature.c_str(), - entry_0.fullThreadDevice, newElement_0_fullThreadDevice); + jboolean jninewElement_0_fullThreadDevice = static_cast(entry_0.fullThreadDevice); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_fullThreadDeviceClassName.c_str(), newElement_0_fullThreadDeviceCtorSignature.c_str(), + jninewElement_0_fullThreadDevice, newElement_0_fullThreadDevice); jobject newElement_0_fullNetworkData; std::string newElement_0_fullNetworkDataClassName = "java/lang/Boolean"; std::string newElement_0_fullNetworkDataCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fullNetworkDataClassName.c_str(), - newElement_0_fullNetworkDataCtorSignature.c_str(), - entry_0.fullNetworkData, newElement_0_fullNetworkData); + jboolean jninewElement_0_fullNetworkData = static_cast(entry_0.fullNetworkData); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_fullNetworkDataClassName.c_str(), newElement_0_fullNetworkDataCtorSignature.c_str(), + jninewElement_0_fullNetworkData, newElement_0_fullNetworkData); jobject newElement_0_isChild; std::string newElement_0_isChildClassName = "java/lang/Boolean"; std::string newElement_0_isChildCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_isChildClassName.c_str(), - newElement_0_isChildCtorSignature.c_str(), entry_0.isChild, - newElement_0_isChild); + jboolean jninewElement_0_isChild = static_cast(entry_0.isChild); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_isChildClassName.c_str(), + newElement_0_isChildCtorSignature.c_str(), + jninewElement_0_isChild, newElement_0_isChild); jclass neighborTableStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -11438,59 +11625,72 @@ void CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback::CallbackFn( jobject newElement_0_extAddress; std::string newElement_0_extAddressClassName = "java/lang/Long"; std::string newElement_0_extAddressCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), - newElement_0_extAddressCtorSignature.c_str(), - entry_0.extAddress, newElement_0_extAddress); + jlong jninewElement_0_extAddress = static_cast(entry_0.extAddress); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), + newElement_0_extAddressCtorSignature.c_str(), + jninewElement_0_extAddress, newElement_0_extAddress); jobject newElement_0_rloc16; std::string newElement_0_rloc16ClassName = "java/lang/Integer"; std::string newElement_0_rloc16CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_rloc16ClassName.c_str(), newElement_0_rloc16CtorSignature.c_str(), entry_0.rloc16, newElement_0_rloc16); + jint jninewElement_0_rloc16 = static_cast(entry_0.rloc16); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rloc16ClassName.c_str(), + newElement_0_rloc16CtorSignature.c_str(), jninewElement_0_rloc16, + newElement_0_rloc16); jobject newElement_0_routerId; std::string newElement_0_routerIdClassName = "java/lang/Integer"; std::string newElement_0_routerIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_routerIdClassName.c_str(), - newElement_0_routerIdCtorSignature.c_str(), entry_0.routerId, - newElement_0_routerId); + jint jninewElement_0_routerId = static_cast(entry_0.routerId); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_routerIdClassName.c_str(), + newElement_0_routerIdCtorSignature.c_str(), + jninewElement_0_routerId, newElement_0_routerId); jobject newElement_0_nextHop; std::string newElement_0_nextHopClassName = "java/lang/Integer"; std::string newElement_0_nextHopCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nextHopClassName.c_str(), - newElement_0_nextHopCtorSignature.c_str(), entry_0.nextHop, - newElement_0_nextHop); + jint jninewElement_0_nextHop = static_cast(entry_0.nextHop); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nextHopClassName.c_str(), + newElement_0_nextHopCtorSignature.c_str(), + jninewElement_0_nextHop, newElement_0_nextHop); jobject newElement_0_pathCost; std::string newElement_0_pathCostClassName = "java/lang/Integer"; std::string newElement_0_pathCostCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_pathCostClassName.c_str(), - newElement_0_pathCostCtorSignature.c_str(), entry_0.pathCost, - newElement_0_pathCost); + jint jninewElement_0_pathCost = static_cast(entry_0.pathCost); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_pathCostClassName.c_str(), + newElement_0_pathCostCtorSignature.c_str(), + jninewElement_0_pathCost, newElement_0_pathCost); jobject newElement_0_LQIIn; std::string newElement_0_LQIInClassName = "java/lang/Integer"; std::string newElement_0_LQIInCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_LQIInClassName.c_str(), newElement_0_LQIInCtorSignature.c_str(), entry_0.LQIIn, newElement_0_LQIIn); + jint jninewElement_0_LQIIn = static_cast(entry_0.LQIIn); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_LQIInClassName.c_str(), + newElement_0_LQIInCtorSignature.c_str(), jninewElement_0_LQIIn, + newElement_0_LQIIn); jobject newElement_0_LQIOut; std::string newElement_0_LQIOutClassName = "java/lang/Integer"; std::string newElement_0_LQIOutCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_LQIOutClassName.c_str(), newElement_0_LQIOutCtorSignature.c_str(), entry_0.LQIOut, newElement_0_LQIOut); + jint jninewElement_0_LQIOut = static_cast(entry_0.LQIOut); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_LQIOutClassName.c_str(), + newElement_0_LQIOutCtorSignature.c_str(), jninewElement_0_LQIOut, + newElement_0_LQIOut); jobject newElement_0_age; std::string newElement_0_ageClassName = "java/lang/Integer"; std::string newElement_0_ageCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), entry_0.age, newElement_0_age); + jint jninewElement_0_age = static_cast(entry_0.age); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), jninewElement_0_age, newElement_0_age); jobject newElement_0_allocated; std::string newElement_0_allocatedClassName = "java/lang/Boolean"; std::string newElement_0_allocatedCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_allocatedClassName.c_str(), - newElement_0_allocatedCtorSignature.c_str(), entry_0.allocated, - newElement_0_allocated); + jboolean jninewElement_0_allocated = static_cast(entry_0.allocated); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_allocatedClassName.c_str(), + newElement_0_allocatedCtorSignature.c_str(), + jninewElement_0_allocated, newElement_0_allocated); jobject newElement_0_linkEstablished; std::string newElement_0_linkEstablishedClassName = "java/lang/Boolean"; std::string newElement_0_linkEstablishedCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_linkEstablishedClassName.c_str(), - newElement_0_linkEstablishedCtorSignature.c_str(), - entry_0.linkEstablished, newElement_0_linkEstablished); + jboolean jninewElement_0_linkEstablished = static_cast(entry_0.linkEstablished); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_linkEstablishedClassName.c_str(), newElement_0_linkEstablishedCtorSignature.c_str(), + jninewElement_0_linkEstablished, newElement_0_linkEstablished); jclass routeTableStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -11582,8 +11782,9 @@ void CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback::CallbackFn(void * { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -11649,8 +11850,9 @@ void CHIPThreadNetworkDiagnosticsWeightingAttributeCallback::CallbackFn(void * c { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -11716,8 +11918,9 @@ void CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback::CallbackFn(void * { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -11783,8 +11986,9 @@ void CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -11850,8 +12054,9 @@ void CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback::CallbackFn(voi { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -11917,8 +12122,9 @@ void CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -11984,8 +12190,9 @@ void CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -12051,8 +12258,9 @@ void CHIPThreadNetworkDiagnosticsDelayAttributeCallback::CallbackFn(void * conte { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -12189,8 +12397,9 @@ void CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback::Callb jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -12261,8 +12470,9 @@ void CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback::Callback jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -12333,8 +12543,9 @@ void CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback::CallbackF jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -12404,8 +12615,9 @@ void CHIPThreadNetworkDiagnosticsEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -12475,8 +12687,9 @@ void CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -12611,8 +12824,9 @@ void CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - static_cast(value.Value()), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -12678,8 +12892,9 @@ void CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - static_cast(value.Value()), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -12745,8 +12960,9 @@ void CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback::CallbackFn(void * { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -12812,8 +13028,9 @@ void CHIPWiFiNetworkDiagnosticsRssiAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -12879,8 +13096,9 @@ void CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback::CallbackFn(void { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -12946,8 +13164,9 @@ void CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback::CallbackFn(void * { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -13014,8 +13233,9 @@ void CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback::Callback { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -13082,8 +13302,9 @@ void CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback::Callback { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -13149,8 +13370,9 @@ void CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback::CallbackFn { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -13216,8 +13438,9 @@ void CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback::CallbackFn { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -13283,8 +13506,9 @@ void CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback::CallbackFn(void { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -13350,8 +13574,9 @@ void CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback::CallbackFn(void * { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -13419,8 +13644,9 @@ void CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -13490,8 +13716,9 @@ void CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -13561,8 +13788,9 @@ void CHIPWiFiNetworkDiagnosticsEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -13632,8 +13860,9 @@ void CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -13701,8 +13930,9 @@ void CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - static_cast(value.Value()), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -13768,8 +13998,9 @@ void CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::CallbackFn(void { std::string javaValueClassName = "java/lang/Boolean"; std::string javaValueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jboolean jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -13835,8 +14066,9 @@ void CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::CallbackFn(vo { std::string javaValueClassName = "java/lang/Boolean"; std::string javaValueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jboolean jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -13905,8 +14137,9 @@ void CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback::Callba jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -13977,8 +14210,9 @@ void CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback::Callbac jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -14048,8 +14282,9 @@ void CHIPEthernetNetworkDiagnosticsEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -14119,8 +14354,9 @@ void CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -14188,8 +14424,9 @@ void CHIPTimeSynchronizationUTCTimeAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -14324,14 +14561,17 @@ void CHIPTimeSynchronizationTimeZoneAttributeCallback::CallbackFn( jobject newElement_0_offset; std::string newElement_0_offsetClassName = "java/lang/Long"; std::string newElement_0_offsetCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_offsetClassName.c_str(), newElement_0_offsetCtorSignature.c_str(), entry_0.offset, newElement_0_offset); + jlong jninewElement_0_offset = static_cast(entry_0.offset); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), + newElement_0_offsetCtorSignature.c_str(), + jninewElement_0_offset, newElement_0_offset); jobject newElement_0_validAt; std::string newElement_0_validAtClassName = "java/lang/Long"; std::string newElement_0_validAtCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validAtClassName.c_str(), - newElement_0_validAtCtorSignature.c_str(), entry_0.validAt, - newElement_0_validAt); + jlong jninewElement_0_validAt = static_cast(entry_0.validAt); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validAtClassName.c_str(), + newElement_0_validAtCtorSignature.c_str(), + jninewElement_0_validAt, newElement_0_validAt); jobject newElement_0_name; if (!entry_0.name.HasValue()) { @@ -14435,14 +14675,17 @@ void CHIPTimeSynchronizationDSTOffsetAttributeCallback::CallbackFn( jobject newElement_0_offset; std::string newElement_0_offsetClassName = "java/lang/Long"; std::string newElement_0_offsetCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_offsetClassName.c_str(), newElement_0_offsetCtorSignature.c_str(), entry_0.offset, newElement_0_offset); + jlong jninewElement_0_offset = static_cast(entry_0.offset); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), + newElement_0_offsetCtorSignature.c_str(), + jninewElement_0_offset, newElement_0_offset); jobject newElement_0_validStarting; std::string newElement_0_validStartingClassName = "java/lang/Long"; std::string newElement_0_validStartingCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validStartingClassName.c_str(), - newElement_0_validStartingCtorSignature.c_str(), - entry_0.validStarting, newElement_0_validStarting); + jlong jninewElement_0_validStarting = static_cast(entry_0.validStarting); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validStartingClassName.c_str(), + newElement_0_validStartingCtorSignature.c_str(), + jninewElement_0_validStarting, newElement_0_validStarting); jobject newElement_0_validUntil; if (entry_0.validUntil.IsNull()) { @@ -14452,9 +14695,10 @@ void CHIPTimeSynchronizationDSTOffsetAttributeCallback::CallbackFn( { std::string newElement_0_validUntilClassName = "java/lang/Long"; std::string newElement_0_validUntilCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validUntilClassName.c_str(), - newElement_0_validUntilCtorSignature.c_str(), - entry_0.validUntil.Value(), newElement_0_validUntil); + jlong jninewElement_0_validUntil = static_cast(entry_0.validUntil.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validUntilClassName.c_str(), + newElement_0_validUntilCtorSignature.c_str(), + jninewElement_0_validUntil, newElement_0_validUntil); } jclass DSTOffsetStructStructClass_1; @@ -14542,8 +14786,9 @@ void CHIPTimeSynchronizationLocalTimeAttributeCallback::CallbackFn(void * contex { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -14611,8 +14856,9 @@ void CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -14682,8 +14928,9 @@ void CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -14753,8 +15000,9 @@ void CHIPTimeSynchronizationEventListAttributeCallback::CallbackFn(void * contex jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -14824,8 +15072,9 @@ void CHIPTimeSynchronizationAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -14896,8 +15145,9 @@ void CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback::Cal jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -14968,8 +15218,9 @@ void CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback::Call jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -15039,8 +15290,9 @@ void CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -15110,8 +15362,9 @@ void CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CallbackFn jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -15181,8 +15434,9 @@ void CHIPSwitchGeneratedCommandListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -15252,8 +15506,9 @@ void CHIPSwitchAcceptedCommandListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -15321,8 +15576,9 @@ void CHIPSwitchEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -15390,8 +15646,9 @@ void CHIPSwitchAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -15459,8 +15716,9 @@ void CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CallbackFn { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -15526,8 +15784,9 @@ void CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -15596,8 +15855,9 @@ void CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback::Callba jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -15668,8 +15928,9 @@ void CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback::Callbac jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -15739,8 +16000,9 @@ void CHIPAdministratorCommissioningEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -15810,8 +16072,9 @@ void CHIPAdministratorCommissioningAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -15901,9 +16164,10 @@ void CHIPOperationalCredentialsNOCsAttributeCallback::CallbackFn( jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass NOCStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -15999,28 +16263,33 @@ void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( jobject newElement_0_vendorID; std::string newElement_0_vendorIDClassName = "java/lang/Integer"; std::string newElement_0_vendorIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_vendorIDClassName.c_str(), newElement_0_vendorIDCtorSignature.c_str(), - static_cast(entry_0.vendorID), newElement_0_vendorID); + jint jninewElement_0_vendorID = static_cast(entry_0.vendorID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_vendorIDClassName.c_str(), + newElement_0_vendorIDCtorSignature.c_str(), + jninewElement_0_vendorID, newElement_0_vendorID); jobject newElement_0_fabricID; std::string newElement_0_fabricIDClassName = "java/lang/Long"; std::string newElement_0_fabricIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIDClassName.c_str(), - newElement_0_fabricIDCtorSignature.c_str(), entry_0.fabricID, - newElement_0_fabricID); + jlong jninewElement_0_fabricID = static_cast(entry_0.fabricID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIDClassName.c_str(), + newElement_0_fabricIDCtorSignature.c_str(), + jninewElement_0_fabricID, newElement_0_fabricID); jobject newElement_0_nodeID; std::string newElement_0_nodeIDClassName = "java/lang/Long"; std::string newElement_0_nodeIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nodeIDClassName.c_str(), newElement_0_nodeIDCtorSignature.c_str(), entry_0.nodeID, newElement_0_nodeID); + jlong jninewElement_0_nodeID = static_cast(entry_0.nodeID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nodeIDClassName.c_str(), + newElement_0_nodeIDCtorSignature.c_str(), + jninewElement_0_nodeID, newElement_0_nodeID); jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass fabricDescriptorStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -16184,8 +16453,9 @@ void CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CallbackFn jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16255,8 +16525,9 @@ void CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16326,8 +16597,9 @@ void CHIPOperationalCredentialsEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16397,8 +16669,9 @@ void CHIPOperationalCredentialsAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16471,21 +16744,24 @@ void CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CallbackFn( jobject newElement_0_groupId; std::string newElement_0_groupIdClassName = "java/lang/Integer"; std::string newElement_0_groupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), - newElement_0_groupIdCtorSignature.c_str(), entry_0.groupId, - newElement_0_groupId); + jint jninewElement_0_groupId = static_cast(entry_0.groupId); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), + newElement_0_groupIdCtorSignature.c_str(), + jninewElement_0_groupId, newElement_0_groupId); jobject newElement_0_groupKeySetID; std::string newElement_0_groupKeySetIDClassName = "java/lang/Integer"; std::string newElement_0_groupKeySetIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupKeySetIDClassName.c_str(), - newElement_0_groupKeySetIDCtorSignature.c_str(), - entry_0.groupKeySetID, newElement_0_groupKeySetID); + jint jninewElement_0_groupKeySetID = static_cast(entry_0.groupKeySetID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupKeySetIDClassName.c_str(), + newElement_0_groupKeySetIDCtorSignature.c_str(), + jninewElement_0_groupKeySetID, newElement_0_groupKeySetID); jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass groupKeyMapStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -16577,9 +16853,10 @@ void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( jobject newElement_0_groupId; std::string newElement_0_groupIdClassName = "java/lang/Integer"; std::string newElement_0_groupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), - newElement_0_groupIdCtorSignature.c_str(), entry_0.groupId, - newElement_0_groupId); + jint jninewElement_0_groupId = static_cast(entry_0.groupId); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), + newElement_0_groupIdCtorSignature.c_str(), + jninewElement_0_groupId, newElement_0_groupId); jobject newElement_0_endpoints; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); @@ -16590,8 +16867,9 @@ void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( jobject newElement_2; std::string newElement_2ClassName = "java/lang/Integer"; std::string newElement_2CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), entry_2, newElement_2); + jint jninewElement_2 = static_cast(entry_2); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); } jobject newElement_0_groupName; @@ -16609,9 +16887,10 @@ void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass groupInfoMapStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -16701,8 +16980,9 @@ void CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16772,8 +17052,9 @@ void CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16843,8 +17124,9 @@ void CHIPGroupKeyManagementEventListAttributeCallback::CallbackFn(void * context jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16914,8 +17196,9 @@ void CHIPGroupKeyManagementAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17073,8 +17356,9 @@ void CHIPFixedLabelGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17144,8 +17428,9 @@ void CHIPFixedLabelAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17213,8 +17498,9 @@ void CHIPFixedLabelEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17282,8 +17568,9 @@ void CHIPFixedLabelAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17441,8 +17728,9 @@ void CHIPUserLabelGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17512,8 +17800,9 @@ void CHIPUserLabelAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17581,8 +17870,9 @@ void CHIPUserLabelEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17650,8 +17940,9 @@ void CHIPUserLabelAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17721,8 +18012,9 @@ void CHIPProxyConfigurationGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17792,8 +18084,9 @@ void CHIPProxyConfigurationAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17863,8 +18156,9 @@ void CHIPProxyConfigurationEventListAttributeCallback::CallbackFn(void * context jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17934,8 +18228,9 @@ void CHIPProxyConfigurationAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -18005,8 +18300,9 @@ void CHIPProxyDiscoveryGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -18076,8 +18372,9 @@ void CHIPProxyDiscoveryAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -18145,8 +18442,9 @@ void CHIPProxyDiscoveryEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -18216,8 +18514,9 @@ void CHIPProxyDiscoveryAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -18287,8 +18586,9 @@ void CHIPProxyValidGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -18358,8 +18658,9 @@ void CHIPProxyValidAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -18427,8 +18728,9 @@ void CHIPProxyValidEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -18496,8 +18798,9 @@ void CHIPProxyValidAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -18567,8 +18870,9 @@ void CHIPBooleanStateGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -18638,8 +18942,9 @@ void CHIPBooleanStateAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -18707,8 +19012,9 @@ void CHIPBooleanStateEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -18778,8 +19084,9 @@ void CHIPBooleanStateAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -18852,15 +19159,17 @@ void CHIPIcdManagementRegisteredClientsAttributeCallback::CallbackFn( jobject newElement_0_checkInNodeID; std::string newElement_0_checkInNodeIDClassName = "java/lang/Long"; std::string newElement_0_checkInNodeIDCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_checkInNodeIDClassName.c_str(), - newElement_0_checkInNodeIDCtorSignature.c_str(), - entry_0.checkInNodeID, newElement_0_checkInNodeID); + jlong jninewElement_0_checkInNodeID = static_cast(entry_0.checkInNodeID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_checkInNodeIDClassName.c_str(), + newElement_0_checkInNodeIDCtorSignature.c_str(), + jninewElement_0_checkInNodeID, newElement_0_checkInNodeID); jobject newElement_0_monitoredSubject; std::string newElement_0_monitoredSubjectClassName = "java/lang/Long"; std::string newElement_0_monitoredSubjectCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_monitoredSubjectClassName.c_str(), - newElement_0_monitoredSubjectCtorSignature.c_str(), - entry_0.monitoredSubject, newElement_0_monitoredSubject); + jlong jninewElement_0_monitoredSubject = static_cast(entry_0.monitoredSubject); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_monitoredSubjectClassName.c_str(), newElement_0_monitoredSubjectCtorSignature.c_str(), + jninewElement_0_monitoredSubject, newElement_0_monitoredSubject); jobject newElement_0_key; jbyteArray newElement_0_keyByteArray = env->NewByteArray(static_cast(entry_0.key.size())); env->SetByteArrayRegion(newElement_0_keyByteArray, 0, static_cast(entry_0.key.size()), @@ -18869,9 +19178,10 @@ void CHIPIcdManagementRegisteredClientsAttributeCallback::CallbackFn( jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass monitoringRegistrationStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -18962,8 +19272,9 @@ void CHIPIcdManagementGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -19033,8 +19344,9 @@ void CHIPIcdManagementAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -19102,8 +19414,9 @@ void CHIPIcdManagementEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -19173,8 +19486,9 @@ void CHIPIcdManagementAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -19242,8 +19556,9 @@ void CHIPModeSelectStandardNamespaceAttributeCallback::CallbackFn(void * context { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -19313,8 +19628,9 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_semanticTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); @@ -19326,14 +19642,17 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( jobject newElement_2_mfgCode; std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeClassName.c_str(), newElement_2_mfgCodeCtorSignature.c_str(), - static_cast(entry_2.mfgCode), newElement_2_mfgCode); + jint jninewElement_2_mfgCode = static_cast(entry_2.mfgCode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_mfgCodeClassName.c_str(), + newElement_2_mfgCodeCtorSignature.c_str(), + jninewElement_2_mfgCode, newElement_2_mfgCode); jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), entry_2.value, newElement_2_value); + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); jclass semanticTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -19438,8 +19757,9 @@ void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, cons { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -19502,8 +19822,9 @@ void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chi { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -19571,8 +19892,9 @@ void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -19642,8 +19964,9 @@ void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -19711,8 +20034,9 @@ void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -19780,8 +20104,9 @@ void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -19856,8 +20181,9 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); @@ -19876,16 +20202,19 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - static_cast(entry_2.mfgCode.Value()), newElement_2_mfgCodeInsideOptional); + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), entry_2.value, newElement_2_value); + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -19993,8 +20322,9 @@ void CHIPLaundryWasherModeStartUpModeAttributeCallback::CallbackFn(void * contex { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -20057,8 +20387,9 @@ void CHIPLaundryWasherModeOnModeAttributeCallback::CallbackFn(void * context, co { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -20126,8 +20457,9 @@ void CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -20197,8 +20529,9 @@ void CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -20268,8 +20601,9 @@ void CHIPLaundryWasherModeEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -20339,8 +20673,9 @@ void CHIPLaundryWasherModeAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -20418,8 +20753,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeC jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); @@ -20438,16 +20774,19 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeC jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - static_cast(entry_2.mfgCode.Value()), newElement_2_mfgCodeInsideOptional); + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), entry_2.value, newElement_2_value); + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -20566,8 +20905,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCall { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -20636,8 +20976,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback: { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -20710,8 +21051,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttr jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -20786,8 +21128,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttri jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -20860,8 +21203,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallba jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -20934,8 +21278,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCa jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -21071,8 +21416,9 @@ void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -21141,8 +21487,9 @@ void CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -21212,8 +21559,9 @@ void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -21283,8 +21631,9 @@ void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -21354,8 +21703,9 @@ void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -21425,8 +21775,9 @@ void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -21498,8 +21849,9 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); @@ -21518,16 +21870,19 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - static_cast(entry_2.mfgCode.Value()), newElement_2_mfgCodeInsideOptional); + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), entry_2.value, newElement_2_value); + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -21632,8 +21987,9 @@ void CHIPRvcRunModeStartUpModeAttributeCallback::CallbackFn(void * context, cons { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -21696,8 +22052,9 @@ void CHIPRvcRunModeOnModeAttributeCallback::CallbackFn(void * context, const chi { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -21765,8 +22122,9 @@ void CHIPRvcRunModeGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -21836,8 +22194,9 @@ void CHIPRvcRunModeAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -21905,8 +22264,9 @@ void CHIPRvcRunModeEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -21974,8 +22334,9 @@ void CHIPRvcRunModeAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -22049,8 +22410,9 @@ void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); @@ -22069,16 +22431,19 @@ void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - static_cast(entry_2.mfgCode.Value()), newElement_2_mfgCodeInsideOptional); + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), entry_2.value, newElement_2_value); + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -22183,8 +22548,9 @@ void CHIPRvcCleanModeStartUpModeAttributeCallback::CallbackFn(void * context, co { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -22247,8 +22613,9 @@ void CHIPRvcCleanModeOnModeAttributeCallback::CallbackFn(void * context, const c { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -22316,8 +22683,9 @@ void CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -22387,8 +22755,9 @@ void CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -22456,8 +22825,9 @@ void CHIPRvcCleanModeEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -22527,8 +22897,9 @@ void CHIPRvcCleanModeAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -22667,8 +23038,9 @@ void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -22738,8 +23110,9 @@ void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -22809,8 +23182,9 @@ void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -22880,8 +23254,9 @@ void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -22951,8 +23326,9 @@ void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23022,8 +23398,9 @@ void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23093,8 +23470,9 @@ void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23164,8 +23542,9 @@ void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23239,8 +23618,9 @@ void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); @@ -23259,16 +23639,19 @@ void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - static_cast(entry_2.mfgCode.Value()), newElement_2_mfgCodeInsideOptional); + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), entry_2.value, newElement_2_value); + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -23376,8 +23759,9 @@ void CHIPDishwasherModeStartUpModeAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -23440,8 +23824,9 @@ void CHIPDishwasherModeOnModeAttributeCallback::CallbackFn(void * context, const { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -23509,8 +23894,9 @@ void CHIPDishwasherModeGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23580,8 +23966,9 @@ void CHIPDishwasherModeAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23649,8 +24036,9 @@ void CHIPDishwasherModeEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23720,8 +24108,9 @@ void CHIPDishwasherModeAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23791,8 +24180,9 @@ void CHIPAirQualityGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23862,8 +24252,9 @@ void CHIPAirQualityAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23931,8 +24322,9 @@ void CHIPAirQualityEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -24000,8 +24392,9 @@ void CHIPAirQualityAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -24071,8 +24464,9 @@ void CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -24142,8 +24536,9 @@ void CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -24211,8 +24606,9 @@ void CHIPSmokeCoAlarmEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -24282,8 +24678,9 @@ void CHIPSmokeCoAlarmAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -24353,8 +24750,9 @@ void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -24424,8 +24822,9 @@ void CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -24493,8 +24892,9 @@ void CHIPDishwasherAlarmEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -24564,8 +24964,9 @@ void CHIPDishwasherAlarmAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -24708,8 +25109,9 @@ void CHIPOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * contex { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -24775,8 +25177,9 @@ void CHIPOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * conte { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -24847,9 +25250,10 @@ void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( jobject newElement_0_operationalStateID; std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_operationalStateIDClassName.c_str(), - newElement_0_operationalStateIDCtorSignature.c_str(), - entry_0.operationalStateID, newElement_0_operationalStateID); + jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), + jninewElement_0_operationalStateID, newElement_0_operationalStateID); jobject newElement_0_operationalStateLabel; if (!entry_0.operationalStateLabel.HasValue()) { @@ -24952,8 +25356,9 @@ void CHIPOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -25023,8 +25428,9 @@ void CHIPOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -25094,8 +25500,9 @@ void CHIPOperationalStateEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -25165,8 +25572,9 @@ void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -25309,8 +25717,9 @@ void CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * con { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -25376,8 +25785,9 @@ void CHIPRvcOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * co { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -25448,9 +25858,10 @@ void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( jobject newElement_0_operationalStateID; std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_operationalStateIDClassName.c_str(), - newElement_0_operationalStateIDCtorSignature.c_str(), - entry_0.operationalStateID, newElement_0_operationalStateID); + jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), + jninewElement_0_operationalStateID, newElement_0_operationalStateID); jobject newElement_0_operationalStateLabel; if (!entry_0.operationalStateLabel.HasValue()) { @@ -25553,8 +25964,9 @@ void CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -25624,8 +26036,9 @@ void CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -25695,8 +26108,9 @@ void CHIPRvcOperationalStateEventListAttributeCallback::CallbackFn(void * contex jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -25766,8 +26180,9 @@ void CHIPRvcOperationalStateAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -25835,8 +26250,9 @@ void CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn(void * { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -25907,9 +26323,10 @@ void CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CallbackFn jobject newElement_0_productIdentifierType; std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), - static_cast(entry_0.productIdentifierType), newElement_0_productIdentifierType); + jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); jobject newElement_0_productIdentifierValue; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, newElement_0_productIdentifierValue)); @@ -26002,8 +26419,9 @@ void CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -26073,8 +26491,9 @@ void CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -26144,8 +26563,9 @@ void CHIPHepaFilterMonitoringEventListAttributeCallback::CallbackFn(void * conte jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -26215,8 +26635,9 @@ void CHIPHepaFilterMonitoringAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -26285,8 +26706,9 @@ void CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::Callba { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -26360,9 +26782,10 @@ void CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback: jobject newElement_0_productIdentifierType; std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), - static_cast(entry_0.productIdentifierType), newElement_0_productIdentifierType); + jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); jobject newElement_0_productIdentifierValue; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, newElement_0_productIdentifierValue)); @@ -26457,8 +26880,9 @@ void CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::C jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -26529,8 +26953,9 @@ void CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::Ca jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -26600,8 +27025,9 @@ void CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -26672,8 +27098,9 @@ void CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback::Callback jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -26739,8 +27166,9 @@ void CHIPDoorLockLockStateAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - static_cast(value.Value()), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -26804,8 +27232,9 @@ void CHIPDoorLockDoorStateAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - static_cast(value.Value()), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -26873,8 +27302,9 @@ void CHIPDoorLockGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -26944,8 +27374,9 @@ void CHIPDoorLockAcceptedCommandListAttributeCallback::CallbackFn(void * context jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -27013,8 +27444,9 @@ void CHIPDoorLockEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -27082,8 +27514,9 @@ void CHIPDoorLockAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -27151,8 +27584,9 @@ void CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CallbackFn(void * c { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -27218,8 +27652,9 @@ void CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CallbackFn(void * c { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -27286,8 +27721,9 @@ void CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CallbackF { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -27354,8 +27790,9 @@ void CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CallbackF { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -27422,8 +27859,9 @@ void CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback::Callbac { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -27490,8 +27928,9 @@ void CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback::Callbac { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -27558,8 +27997,9 @@ void CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::Callba { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -27626,8 +28066,9 @@ void CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback::Callba { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -27695,8 +28136,9 @@ void CHIPWindowCoveringGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -27766,8 +28208,9 @@ void CHIPWindowCoveringAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -27835,8 +28278,9 @@ void CHIPWindowCoveringEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -27906,8 +28350,9 @@ void CHIPWindowCoveringAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -27977,8 +28422,9 @@ void CHIPBarrierControlGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -28048,8 +28494,9 @@ void CHIPBarrierControlAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -28117,8 +28564,9 @@ void CHIPBarrierControlEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -28188,8 +28636,9 @@ void CHIPBarrierControlAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -28257,8 +28706,9 @@ void CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CallbackFn(voi { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -28324,8 +28774,9 @@ void CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CallbackFn(void * { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -28391,8 +28842,9 @@ void CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CallbackFn(void * { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -28459,8 +28911,9 @@ void CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CallbackF { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -28527,8 +28980,9 @@ void CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CallbackF { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -28594,8 +29048,9 @@ void CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CallbackFn { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -28661,8 +29116,9 @@ void CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CallbackFn { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -28728,8 +29184,9 @@ void CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -28795,8 +29252,9 @@ void CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -28862,8 +29320,9 @@ void CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -28929,8 +29388,9 @@ void CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -28996,8 +29456,9 @@ void CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CallbackFn(vo { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -29063,8 +29524,9 @@ void CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CallbackFn(vo { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -29130,8 +29592,9 @@ void CHIPPumpConfigurationAndControlCapacityAttributeCallback::CallbackFn(void * { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -29197,8 +29660,9 @@ void CHIPPumpConfigurationAndControlSpeedAttributeCallback::CallbackFn(void * co { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -29265,8 +29729,9 @@ void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::Callb { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -29332,8 +29797,9 @@ void CHIPPumpConfigurationAndControlPowerAttributeCallback::CallbackFn(void * co { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -29400,8 +29866,9 @@ void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::Cal { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -29470,8 +29937,9 @@ void CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback::Callb jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -29542,8 +30010,9 @@ void CHIPPumpConfigurationAndControlAcceptedCommandListAttributeCallback::Callba jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -29613,8 +30082,9 @@ void CHIPPumpConfigurationAndControlEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -29684,8 +30154,9 @@ void CHIPPumpConfigurationAndControlAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -29753,8 +30224,9 @@ void CHIPThermostatLocalTemperatureAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -29820,8 +30292,9 @@ void CHIPThermostatOutdoorTemperatureAttributeCallback::CallbackFn(void * contex { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -29887,8 +30360,9 @@ void CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -29954,8 +30428,9 @@ void CHIPThermostatSetpointChangeAmountAttributeCallback::CallbackFn(void * cont { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -30021,8 +30496,9 @@ void CHIPThermostatOccupiedSetbackAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -30088,8 +30564,9 @@ void CHIPThermostatOccupiedSetbackMinAttributeCallback::CallbackFn(void * contex { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -30155,8 +30632,9 @@ void CHIPThermostatOccupiedSetbackMaxAttributeCallback::CallbackFn(void * contex { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -30222,8 +30700,9 @@ void CHIPThermostatUnoccupiedSetbackAttributeCallback::CallbackFn(void * context { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -30289,8 +30768,9 @@ void CHIPThermostatUnoccupiedSetbackMinAttributeCallback::CallbackFn(void * cont { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -30356,8 +30836,9 @@ void CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::CallbackFn(void * cont { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -30423,8 +30904,9 @@ void CHIPThermostatACCoilTemperatureAttributeCallback::CallbackFn(void * context { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -30492,8 +30974,9 @@ void CHIPThermostatGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -30563,8 +31046,9 @@ void CHIPThermostatAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -30632,8 +31116,9 @@ void CHIPThermostatEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -30701,8 +31186,9 @@ void CHIPThermostatAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -30768,8 +31254,9 @@ void CHIPFanControlPercentSettingAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -30832,8 +31319,9 @@ void CHIPFanControlSpeedSettingAttributeCallback::CallbackFn(void * context, con { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -30901,8 +31389,9 @@ void CHIPFanControlGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -30972,8 +31461,9 @@ void CHIPFanControlAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -31041,8 +31531,9 @@ void CHIPFanControlEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -31110,8 +31601,9 @@ void CHIPFanControlAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -31184,8 +31676,9 @@ void CHIPThermostatUserInterfaceConfigurationGeneratedCommandListAttributeCallba jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -31258,8 +31751,9 @@ void CHIPThermostatUserInterfaceConfigurationAcceptedCommandListAttributeCallbac jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -31330,8 +31824,9 @@ void CHIPThermostatUserInterfaceConfigurationEventListAttributeCallback::Callbac jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -31402,8 +31897,9 @@ void CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback::Cal jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -31471,8 +31967,9 @@ void CHIPColorControlNumberOfPrimariesAttributeCallback::CallbackFn(void * conte { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -31538,8 +32035,9 @@ void CHIPColorControlPrimary1IntensityAttributeCallback::CallbackFn(void * conte { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -31605,8 +32103,9 @@ void CHIPColorControlPrimary2IntensityAttributeCallback::CallbackFn(void * conte { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -31672,8 +32171,9 @@ void CHIPColorControlPrimary3IntensityAttributeCallback::CallbackFn(void * conte { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -31739,8 +32239,9 @@ void CHIPColorControlPrimary4IntensityAttributeCallback::CallbackFn(void * conte { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -31806,8 +32307,9 @@ void CHIPColorControlPrimary5IntensityAttributeCallback::CallbackFn(void * conte { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -31873,8 +32375,9 @@ void CHIPColorControlPrimary6IntensityAttributeCallback::CallbackFn(void * conte { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -31940,8 +32443,9 @@ void CHIPColorControlColorPointRIntensityAttributeCallback::CallbackFn(void * co { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -32007,8 +32511,9 @@ void CHIPColorControlColorPointGIntensityAttributeCallback::CallbackFn(void * co { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -32074,8 +32579,9 @@ void CHIPColorControlColorPointBIntensityAttributeCallback::CallbackFn(void * co { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -32141,8 +32647,9 @@ void CHIPColorControlStartUpColorTemperatureMiredsAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -32210,8 +32717,9 @@ void CHIPColorControlGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -32281,8 +32789,9 @@ void CHIPColorControlAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -32350,8 +32859,9 @@ void CHIPColorControlEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -32421,8 +32931,9 @@ void CHIPColorControlAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -32490,8 +33001,9 @@ void CHIPBallastConfigurationIntrinsicBallastFactorAttributeCallback::CallbackFn { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -32558,8 +33070,9 @@ void CHIPBallastConfigurationBallastFactorAdjustmentAttributeCallback::CallbackF { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -32625,8 +33138,9 @@ void CHIPBallastConfigurationLampRatedHoursAttributeCallback::CallbackFn(void * { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -32692,8 +33206,9 @@ void CHIPBallastConfigurationLampBurnHoursAttributeCallback::CallbackFn(void * c { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -32759,8 +33274,9 @@ void CHIPBallastConfigurationLampBurnHoursTripPointAttributeCallback::CallbackFn { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -32828,8 +33344,9 @@ void CHIPBallastConfigurationGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -32899,8 +33416,9 @@ void CHIPBallastConfigurationAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -32970,8 +33488,9 @@ void CHIPBallastConfigurationEventListAttributeCallback::CallbackFn(void * conte jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -33041,8 +33560,9 @@ void CHIPBallastConfigurationAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -33110,8 +33630,9 @@ void CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CallbackFn(void * { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -33177,8 +33698,9 @@ void CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CallbackFn(voi { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -33244,8 +33766,9 @@ void CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(voi { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -33311,8 +33834,9 @@ void CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - static_cast(value.Value()), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -33380,8 +33904,9 @@ void CHIPIlluminanceMeasurementGeneratedCommandListAttributeCallback::CallbackFn jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -33451,8 +33976,9 @@ void CHIPIlluminanceMeasurementAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -33522,8 +34048,9 @@ void CHIPIlluminanceMeasurementEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -33593,8 +34120,9 @@ void CHIPIlluminanceMeasurementAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -33662,8 +34190,9 @@ void CHIPTemperatureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -33729,8 +34258,9 @@ void CHIPTemperatureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(voi { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -33796,8 +34326,9 @@ void CHIPTemperatureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(voi { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -33865,8 +34396,9 @@ void CHIPTemperatureMeasurementGeneratedCommandListAttributeCallback::CallbackFn jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -33936,8 +34468,9 @@ void CHIPTemperatureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -34007,8 +34540,9 @@ void CHIPTemperatureMeasurementEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -34078,8 +34612,9 @@ void CHIPTemperatureMeasurementAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -34147,8 +34682,9 @@ void CHIPPressureMeasurementMeasuredValueAttributeCallback::CallbackFn(void * co { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -34214,8 +34750,9 @@ void CHIPPressureMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -34281,8 +34818,9 @@ void CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -34348,8 +34886,9 @@ void CHIPPressureMeasurementScaledValueAttributeCallback::CallbackFn(void * cont { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -34415,8 +34954,9 @@ void CHIPPressureMeasurementMinScaledValueAttributeCallback::CallbackFn(void * c { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -34482,8 +35022,9 @@ void CHIPPressureMeasurementMaxScaledValueAttributeCallback::CallbackFn(void * c { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -34551,8 +35092,9 @@ void CHIPPressureMeasurementGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -34622,8 +35164,9 @@ void CHIPPressureMeasurementAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -34693,8 +35236,9 @@ void CHIPPressureMeasurementEventListAttributeCallback::CallbackFn(void * contex jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -34764,8 +35308,9 @@ void CHIPPressureMeasurementAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -34833,8 +35378,9 @@ void CHIPFlowMeasurementMeasuredValueAttributeCallback::CallbackFn(void * contex { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -34900,8 +35446,9 @@ void CHIPFlowMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * con { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -34967,8 +35514,9 @@ void CHIPFlowMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * con { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -35036,8 +35584,9 @@ void CHIPFlowMeasurementGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -35107,8 +35656,9 @@ void CHIPFlowMeasurementAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -35176,8 +35726,9 @@ void CHIPFlowMeasurementEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -35247,8 +35798,9 @@ void CHIPFlowMeasurementAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -35316,8 +35868,9 @@ void CHIPRelativeHumidityMeasurementMeasuredValueAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -35384,8 +35937,9 @@ void CHIPRelativeHumidityMeasurementMinMeasuredValueAttributeCallback::CallbackF { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -35452,8 +36006,9 @@ void CHIPRelativeHumidityMeasurementMaxMeasuredValueAttributeCallback::CallbackF { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -35522,8 +36077,9 @@ void CHIPRelativeHumidityMeasurementGeneratedCommandListAttributeCallback::Callb jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -35594,8 +36150,9 @@ void CHIPRelativeHumidityMeasurementAcceptedCommandListAttributeCallback::Callba jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -35665,8 +36222,9 @@ void CHIPRelativeHumidityMeasurementEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -35736,8 +36294,9 @@ void CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -35807,8 +36366,9 @@ void CHIPOccupancySensingGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -35878,8 +36438,9 @@ void CHIPOccupancySensingAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -35949,8 +36510,9 @@ void CHIPOccupancySensingEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -36020,8 +36582,9 @@ void CHIPOccupancySensingAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -36090,8 +36653,9 @@ void CHIPCarbonMonoxideConcentrationMeasurementMeasuredValueAttributeCallback::C { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -36160,8 +36724,9 @@ void CHIPCarbonMonoxideConcentrationMeasurementMinMeasuredValueAttributeCallback { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -36230,8 +36795,9 @@ void CHIPCarbonMonoxideConcentrationMeasurementMaxMeasuredValueAttributeCallback { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -36300,8 +36866,9 @@ void CHIPCarbonMonoxideConcentrationMeasurementPeakMeasuredValueAttributeCallbac { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -36370,8 +36937,9 @@ void CHIPCarbonMonoxideConcentrationMeasurementAverageMeasuredValueAttributeCall { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -36442,8 +37010,9 @@ void CHIPCarbonMonoxideConcentrationMeasurementGeneratedCommandListAttributeCall jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -36516,8 +37085,9 @@ void CHIPCarbonMonoxideConcentrationMeasurementAcceptedCommandListAttributeCallb jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -36588,8 +37158,9 @@ void CHIPCarbonMonoxideConcentrationMeasurementEventListAttributeCallback::Callb jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -36660,8 +37231,9 @@ void CHIPCarbonMonoxideConcentrationMeasurementAttributeListAttributeCallback::C jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -36730,8 +37302,9 @@ void CHIPCarbonDioxideConcentrationMeasurementMeasuredValueAttributeCallback::Ca { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -36800,8 +37373,9 @@ void CHIPCarbonDioxideConcentrationMeasurementMinMeasuredValueAttributeCallback: { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -36870,8 +37444,9 @@ void CHIPCarbonDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallback: { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -36940,8 +37515,9 @@ void CHIPCarbonDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallback { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -37010,8 +37586,9 @@ void CHIPCarbonDioxideConcentrationMeasurementAverageMeasuredValueAttributeCallb { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -37082,8 +37659,9 @@ void CHIPCarbonDioxideConcentrationMeasurementGeneratedCommandListAttributeCallb jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -37156,8 +37734,9 @@ void CHIPCarbonDioxideConcentrationMeasurementAcceptedCommandListAttributeCallba jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -37228,8 +37807,9 @@ void CHIPCarbonDioxideConcentrationMeasurementEventListAttributeCallback::Callba jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -37300,8 +37880,9 @@ void CHIPCarbonDioxideConcentrationMeasurementAttributeListAttributeCallback::Ca jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -37371,8 +37952,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementMeasuredValueAttributeCallback:: { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -37441,8 +38023,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementMinMeasuredValueAttributeCallbac { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -37511,8 +38094,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementMaxMeasuredValueAttributeCallbac { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -37581,8 +38165,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementPeakMeasuredValueAttributeCallba { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -37651,8 +38236,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementAverageMeasuredValueAttributeCal { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -37723,8 +38309,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementGeneratedCommandListAttributeCal jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -37797,8 +38384,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementAcceptedCommandListAttributeCall jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -37869,8 +38457,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementEventListAttributeCallback::Call jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -37942,8 +38531,9 @@ void CHIPNitrogenDioxideConcentrationMeasurementAttributeListAttributeCallback:: jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -38011,8 +38601,9 @@ void CHIPOzoneConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -38079,8 +38670,9 @@ void CHIPOzoneConcentrationMeasurementMinMeasuredValueAttributeCallback::Callbac { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -38147,8 +38739,9 @@ void CHIPOzoneConcentrationMeasurementMaxMeasuredValueAttributeCallback::Callbac { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -38215,8 +38808,9 @@ void CHIPOzoneConcentrationMeasurementPeakMeasuredValueAttributeCallback::Callba { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -38283,8 +38877,9 @@ void CHIPOzoneConcentrationMeasurementAverageMeasuredValueAttributeCallback::Cal { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -38353,8 +38948,9 @@ void CHIPOzoneConcentrationMeasurementGeneratedCommandListAttributeCallback::Cal jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -38425,8 +39021,9 @@ void CHIPOzoneConcentrationMeasurementAcceptedCommandListAttributeCallback::Call jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -38496,8 +39093,9 @@ void CHIPOzoneConcentrationMeasurementEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -38567,8 +39165,9 @@ void CHIPOzoneConcentrationMeasurementAttributeListAttributeCallback::CallbackFn jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -38636,8 +39235,9 @@ void CHIPPm25ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -38704,8 +39304,9 @@ void CHIPPm25ConcentrationMeasurementMinMeasuredValueAttributeCallback::Callback { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -38772,8 +39373,9 @@ void CHIPPm25ConcentrationMeasurementMaxMeasuredValueAttributeCallback::Callback { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -38840,8 +39442,9 @@ void CHIPPm25ConcentrationMeasurementPeakMeasuredValueAttributeCallback::Callbac { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -38908,8 +39511,9 @@ void CHIPPm25ConcentrationMeasurementAverageMeasuredValueAttributeCallback::Call { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -38978,8 +39582,9 @@ void CHIPPm25ConcentrationMeasurementGeneratedCommandListAttributeCallback::Call jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -39050,8 +39655,9 @@ void CHIPPm25ConcentrationMeasurementAcceptedCommandListAttributeCallback::Callb jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -39121,8 +39727,9 @@ void CHIPPm25ConcentrationMeasurementEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -39192,8 +39799,9 @@ void CHIPPm25ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -39262,8 +39870,9 @@ void CHIPFormaldehydeConcentrationMeasurementMeasuredValueAttributeCallback::Cal { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -39331,8 +39940,9 @@ void CHIPFormaldehydeConcentrationMeasurementMinMeasuredValueAttributeCallback:: { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -39400,8 +40010,9 @@ void CHIPFormaldehydeConcentrationMeasurementMaxMeasuredValueAttributeCallback:: { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -39470,8 +40081,9 @@ void CHIPFormaldehydeConcentrationMeasurementPeakMeasuredValueAttributeCallback: { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -39540,8 +40152,9 @@ void CHIPFormaldehydeConcentrationMeasurementAverageMeasuredValueAttributeCallba { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -39612,8 +40225,9 @@ void CHIPFormaldehydeConcentrationMeasurementGeneratedCommandListAttributeCallba jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -39686,8 +40300,9 @@ void CHIPFormaldehydeConcentrationMeasurementAcceptedCommandListAttributeCallbac jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -39758,8 +40373,9 @@ void CHIPFormaldehydeConcentrationMeasurementEventListAttributeCallback::Callbac jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -39830,8 +40446,9 @@ void CHIPFormaldehydeConcentrationMeasurementAttributeListAttributeCallback::Cal jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -39899,8 +40516,9 @@ void CHIPPm1ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn(v { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -39967,8 +40585,9 @@ void CHIPPm1ConcentrationMeasurementMinMeasuredValueAttributeCallback::CallbackF { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -40035,8 +40654,9 @@ void CHIPPm1ConcentrationMeasurementMaxMeasuredValueAttributeCallback::CallbackF { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -40103,8 +40723,9 @@ void CHIPPm1ConcentrationMeasurementPeakMeasuredValueAttributeCallback::Callback { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -40171,8 +40792,9 @@ void CHIPPm1ConcentrationMeasurementAverageMeasuredValueAttributeCallback::Callb { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -40241,8 +40863,9 @@ void CHIPPm1ConcentrationMeasurementGeneratedCommandListAttributeCallback::Callb jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -40313,8 +40936,9 @@ void CHIPPm1ConcentrationMeasurementAcceptedCommandListAttributeCallback::Callba jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -40384,8 +41008,9 @@ void CHIPPm1ConcentrationMeasurementEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -40455,8 +41080,9 @@ void CHIPPm1ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -40524,8 +41150,9 @@ void CHIPPm10ConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -40592,8 +41219,9 @@ void CHIPPm10ConcentrationMeasurementMinMeasuredValueAttributeCallback::Callback { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -40660,8 +41288,9 @@ void CHIPPm10ConcentrationMeasurementMaxMeasuredValueAttributeCallback::Callback { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -40728,8 +41357,9 @@ void CHIPPm10ConcentrationMeasurementPeakMeasuredValueAttributeCallback::Callbac { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -40796,8 +41426,9 @@ void CHIPPm10ConcentrationMeasurementAverageMeasuredValueAttributeCallback::Call { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -40866,8 +41497,9 @@ void CHIPPm10ConcentrationMeasurementGeneratedCommandListAttributeCallback::Call jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -40938,8 +41570,9 @@ void CHIPPm10ConcentrationMeasurementAcceptedCommandListAttributeCallback::Callb jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -41009,8 +41642,9 @@ void CHIPPm10ConcentrationMeasurementEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -41080,8 +41714,9 @@ void CHIPPm10ConcentrationMeasurementAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -41154,8 +41789,9 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValueAttri { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -41227,8 +41863,9 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValueAt { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -41300,8 +41937,9 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValueAt { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -41373,8 +42011,9 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueA { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -41448,8 +42087,9 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredVal { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -41525,8 +42165,9 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandLi jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -41603,8 +42244,9 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandLis jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -41678,8 +42320,9 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementEventListAttribute jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -41754,8 +42397,9 @@ void CHIPTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListAttri jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -41823,8 +42467,9 @@ void CHIPRadonConcentrationMeasurementMeasuredValueAttributeCallback::CallbackFn { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -41891,8 +42536,9 @@ void CHIPRadonConcentrationMeasurementMinMeasuredValueAttributeCallback::Callbac { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -41959,8 +42605,9 @@ void CHIPRadonConcentrationMeasurementMaxMeasuredValueAttributeCallback::Callbac { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -42027,8 +42674,9 @@ void CHIPRadonConcentrationMeasurementPeakMeasuredValueAttributeCallback::Callba { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -42095,8 +42743,9 @@ void CHIPRadonConcentrationMeasurementAverageMeasuredValueAttributeCallback::Cal { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -42165,8 +42814,9 @@ void CHIPRadonConcentrationMeasurementGeneratedCommandListAttributeCallback::Cal jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -42237,8 +42887,9 @@ void CHIPRadonConcentrationMeasurementAcceptedCommandListAttributeCallback::Call jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -42308,8 +42959,9 @@ void CHIPRadonConcentrationMeasurementEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -42379,8 +43031,9 @@ void CHIPRadonConcentrationMeasurementAttributeListAttributeCallback::CallbackFn jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -42450,8 +43103,9 @@ void CHIPWakeOnLanGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -42521,8 +43175,9 @@ void CHIPWakeOnLanAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -42590,8 +43245,9 @@ void CHIPWakeOnLanEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -42659,8 +43315,9 @@ void CHIPWakeOnLanAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -42730,15 +43387,17 @@ void CHIPChannelChannelListAttributeCallback::CallbackFn( jobject newElement_0_majorNumber; std::string newElement_0_majorNumberClassName = "java/lang/Integer"; std::string newElement_0_majorNumberCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_majorNumberClassName.c_str(), - newElement_0_majorNumberCtorSignature.c_str(), - entry_0.majorNumber, newElement_0_majorNumber); + jint jninewElement_0_majorNumber = static_cast(entry_0.majorNumber); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_majorNumberClassName.c_str(), + newElement_0_majorNumberCtorSignature.c_str(), + jninewElement_0_majorNumber, newElement_0_majorNumber); jobject newElement_0_minorNumber; std::string newElement_0_minorNumberClassName = "java/lang/Integer"; std::string newElement_0_minorNumberCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minorNumberClassName.c_str(), - newElement_0_minorNumberCtorSignature.c_str(), - entry_0.minorNumber, newElement_0_minorNumber); + jint jninewElement_0_minorNumber = static_cast(entry_0.minorNumber); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minorNumberClassName.c_str(), + newElement_0_minorNumberCtorSignature.c_str(), + jninewElement_0_minorNumber, newElement_0_minorNumber); jobject newElement_0_name; if (!entry_0.name.HasValue()) { @@ -42866,8 +43525,9 @@ void CHIPChannelGeneratedCommandListAttributeCallback::CallbackFn(void * context jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -42937,8 +43597,9 @@ void CHIPChannelAcceptedCommandListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -43006,8 +43667,9 @@ void CHIPChannelEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -43075,8 +43737,9 @@ void CHIPChannelAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -43149,9 +43812,10 @@ void CHIPTargetNavigatorTargetListAttributeCallback::CallbackFn( jobject newElement_0_identifier; std::string newElement_0_identifierClassName = "java/lang/Integer"; std::string newElement_0_identifierCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_identifierClassName.c_str(), - newElement_0_identifierCtorSignature.c_str(), - entry_0.identifier, newElement_0_identifier); + jint jninewElement_0_identifier = static_cast(entry_0.identifier); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_identifierClassName.c_str(), + newElement_0_identifierCtorSignature.c_str(), + jninewElement_0_identifier, newElement_0_identifier); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); @@ -43242,8 +43906,9 @@ void CHIPTargetNavigatorGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -43313,8 +43978,9 @@ void CHIPTargetNavigatorAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -43382,8 +44048,9 @@ void CHIPTargetNavigatorEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -43453,8 +44120,9 @@ void CHIPTargetNavigatorAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -43519,8 +44187,9 @@ void CHIPMediaPlaybackStartTimeAttributeCallback::CallbackFn(void * context, con { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -43583,8 +44252,9 @@ void CHIPMediaPlaybackDurationAttributeCallback::CallbackFn(void * context, cons { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -43650,8 +44320,9 @@ void CHIPMediaPlaybackSeekRangeEndAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -43717,8 +44388,9 @@ void CHIPMediaPlaybackSeekRangeStartAttributeCallback::CallbackFn(void * context { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -43786,8 +44458,9 @@ void CHIPMediaPlaybackGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -43857,8 +44530,9 @@ void CHIPMediaPlaybackAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -43926,8 +44600,9 @@ void CHIPMediaPlaybackEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -43997,8 +44672,9 @@ void CHIPMediaPlaybackAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -44068,14 +44744,17 @@ void CHIPMediaInputInputListAttributeCallback::CallbackFn( jobject newElement_0_index; std::string newElement_0_indexClassName = "java/lang/Integer"; std::string newElement_0_indexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_indexClassName.c_str(), newElement_0_indexCtorSignature.c_str(), entry_0.index, newElement_0_index); + jint jninewElement_0_index = static_cast(entry_0.index); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), + newElement_0_indexCtorSignature.c_str(), jninewElement_0_index, + newElement_0_index); jobject newElement_0_inputType; std::string newElement_0_inputTypeClassName = "java/lang/Integer"; std::string newElement_0_inputTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_inputTypeClassName.c_str(), newElement_0_inputTypeCtorSignature.c_str(), - static_cast(entry_0.inputType), newElement_0_inputType); + jint jninewElement_0_inputType = static_cast(entry_0.inputType); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_inputTypeClassName.c_str(), + newElement_0_inputTypeCtorSignature.c_str(), + jninewElement_0_inputType, newElement_0_inputType); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); jobject newElement_0_description; @@ -44169,8 +44848,9 @@ void CHIPMediaInputGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -44240,8 +44920,9 @@ void CHIPMediaInputAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -44309,8 +44990,9 @@ void CHIPMediaInputEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -44378,8 +45060,9 @@ void CHIPMediaInputAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -44449,8 +45132,9 @@ void CHIPLowPowerGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -44520,8 +45204,9 @@ void CHIPLowPowerAcceptedCommandListAttributeCallback::CallbackFn(void * context jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -44589,8 +45274,9 @@ void CHIPLowPowerEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -44658,8 +45344,9 @@ void CHIPLowPowerAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -44729,8 +45416,9 @@ void CHIPKeypadInputGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -44800,8 +45488,9 @@ void CHIPKeypadInputAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -44869,8 +45558,9 @@ void CHIPKeypadInputEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -44938,8 +45628,9 @@ void CHIPKeypadInputAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -45077,8 +45768,9 @@ void CHIPContentLauncherGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -45148,8 +45840,9 @@ void CHIPContentLauncherAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -45217,8 +45910,9 @@ void CHIPContentLauncherEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -45288,8 +45982,9 @@ void CHIPContentLauncherAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -45359,14 +46054,17 @@ void CHIPAudioOutputOutputListAttributeCallback::CallbackFn( jobject newElement_0_index; std::string newElement_0_indexClassName = "java/lang/Integer"; std::string newElement_0_indexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_indexClassName.c_str(), newElement_0_indexCtorSignature.c_str(), entry_0.index, newElement_0_index); + jint jninewElement_0_index = static_cast(entry_0.index); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), + newElement_0_indexCtorSignature.c_str(), jninewElement_0_index, + newElement_0_index); jobject newElement_0_outputType; std::string newElement_0_outputTypeClassName = "java/lang/Integer"; std::string newElement_0_outputTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_outputTypeClassName.c_str(), newElement_0_outputTypeCtorSignature.c_str(), - static_cast(entry_0.outputType), newElement_0_outputType); + jint jninewElement_0_outputType = static_cast(entry_0.outputType); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_outputTypeClassName.c_str(), + newElement_0_outputTypeCtorSignature.c_str(), + jninewElement_0_outputType, newElement_0_outputType); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); @@ -45457,8 +46155,9 @@ void CHIPAudioOutputGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -45528,8 +46227,9 @@ void CHIPAudioOutputAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -45597,8 +46297,9 @@ void CHIPAudioOutputEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -45666,8 +46367,9 @@ void CHIPAudioOutputAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -45737,8 +46439,9 @@ void CHIPApplicationLauncherCatalogListAttributeCallback::CallbackFn(void * cont jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -45808,8 +46511,9 @@ void CHIPApplicationLauncherGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -45879,8 +46583,9 @@ void CHIPApplicationLauncherAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -45950,8 +46655,9 @@ void CHIPApplicationLauncherEventListAttributeCallback::CallbackFn(void * contex jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46021,8 +46727,9 @@ void CHIPApplicationLauncherAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46092,8 +46799,9 @@ void CHIPApplicationBasicAllowedVendorListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46163,8 +46871,9 @@ void CHIPApplicationBasicGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46234,8 +46943,9 @@ void CHIPApplicationBasicAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46305,8 +47015,9 @@ void CHIPApplicationBasicEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46376,8 +47087,9 @@ void CHIPApplicationBasicAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46447,8 +47159,9 @@ void CHIPAccountLoginGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46518,8 +47231,9 @@ void CHIPAccountLoginAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46587,8 +47301,9 @@ void CHIPAccountLoginEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46658,8 +47373,9 @@ void CHIPAccountLoginAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46729,8 +47445,9 @@ void CHIPElectricalMeasurementGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46800,8 +47517,9 @@ void CHIPElectricalMeasurementAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46871,8 +47589,9 @@ void CHIPElectricalMeasurementEventListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -46942,8 +47661,9 @@ void CHIPElectricalMeasurementAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -47011,8 +47731,9 @@ void CHIPUnitTestingListInt8uAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -47155,9 +47876,10 @@ void CHIPUnitTestingListStructOctetStringAttributeCallback::CallbackFn( jobject newElement_0_member1; std::string newElement_0_member1ClassName = "java/lang/Long"; std::string newElement_0_member1CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_member1ClassName.c_str(), - newElement_0_member1CtorSignature.c_str(), entry_0.member1, - newElement_0_member1); + jlong jninewElement_0_member1 = static_cast(entry_0.member1); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_member1ClassName.c_str(), + newElement_0_member1CtorSignature.c_str(), + jninewElement_0_member1, newElement_0_member1); jobject newElement_0_member2; jbyteArray newElement_0_member2ByteArray = env->NewByteArray(static_cast(entry_0.member2.size())); env->SetByteArrayRegion(newElement_0_member2ByteArray, 0, static_cast(entry_0.member2.size()), @@ -47260,9 +47982,10 @@ void CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CallbackFn { std::string newElement_0_nullableIntClassName = "java/lang/Integer"; std::string newElement_0_nullableIntCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nullableIntClassName.c_str(), - newElement_0_nullableIntCtorSignature.c_str(), - entry_0.nullableInt.Value(), newElement_0_nullableInt); + jint jninewElement_0_nullableInt = static_cast(entry_0.nullableInt.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nullableIntClassName.c_str(), + newElement_0_nullableIntCtorSignature.c_str(), + jninewElement_0_nullableInt, newElement_0_nullableInt); } jobject newElement_0_optionalInt; if (!entry_0.optionalInt.HasValue()) @@ -47274,10 +47997,11 @@ void CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CallbackFn jobject newElement_0_optionalIntInsideOptional; std::string newElement_0_optionalIntInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_optionalIntInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_optionalIntInsideOptionalClassName.c_str(), - newElement_0_optionalIntInsideOptionalCtorSignature.c_str(), entry_0.optionalInt.Value(), - newElement_0_optionalIntInsideOptional); + jint jninewElement_0_optionalIntInsideOptional = static_cast(entry_0.optionalInt.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_optionalIntInsideOptionalClassName.c_str(), + newElement_0_optionalIntInsideOptionalCtorSignature.c_str(), + jninewElement_0_optionalIntInsideOptional, + newElement_0_optionalIntInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalIntInsideOptional, newElement_0_optionalInt); } jobject newElement_0_nullableOptionalInt; @@ -47296,10 +48020,12 @@ void CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CallbackFn { std::string newElement_0_nullableOptionalIntInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalIntInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableOptionalIntInsideOptional = + static_cast(entry_0.nullableOptionalInt.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalIntInsideOptionalClassName.c_str(), newElement_0_nullableOptionalIntInsideOptionalCtorSignature.c_str(), - entry_0.nullableOptionalInt.Value().Value(), newElement_0_nullableOptionalIntInsideOptional); + jninewElement_0_nullableOptionalIntInsideOptional, newElement_0_nullableOptionalIntInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalIntInsideOptional, newElement_0_nullableOptionalInt); @@ -47357,21 +48083,24 @@ void CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CallbackFn jobject newElement_0_nullableStruct_a; std::string newElement_0_nullableStruct_aClassName = "java/lang/Integer"; std::string newElement_0_nullableStruct_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableStruct_a = static_cast(entry_0.nullableStruct.Value().a); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_aClassName.c_str(), newElement_0_nullableStruct_aCtorSignature.c_str(), - entry_0.nullableStruct.Value().a, newElement_0_nullableStruct_a); + jninewElement_0_nullableStruct_a, newElement_0_nullableStruct_a); jobject newElement_0_nullableStruct_b; std::string newElement_0_nullableStruct_bClassName = "java/lang/Boolean"; std::string newElement_0_nullableStruct_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jninewElement_0_nullableStruct_b = static_cast(entry_0.nullableStruct.Value().b); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_bClassName.c_str(), newElement_0_nullableStruct_bCtorSignature.c_str(), - entry_0.nullableStruct.Value().b, newElement_0_nullableStruct_b); + jninewElement_0_nullableStruct_b, newElement_0_nullableStruct_b); jobject newElement_0_nullableStruct_c; std::string newElement_0_nullableStruct_cClassName = "java/lang/Integer"; std::string newElement_0_nullableStruct_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableStruct_c = static_cast(entry_0.nullableStruct.Value().c); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_cClassName.c_str(), newElement_0_nullableStruct_cCtorSignature.c_str(), - static_cast(entry_0.nullableStruct.Value().c), newElement_0_nullableStruct_c); + jninewElement_0_nullableStruct_c, newElement_0_nullableStruct_c); jobject newElement_0_nullableStruct_d; jbyteArray newElement_0_nullableStruct_dByteArray = env->NewByteArray(static_cast(entry_0.nullableStruct.Value().d.size())); @@ -47385,21 +48114,24 @@ void CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CallbackFn jobject newElement_0_nullableStruct_f; std::string newElement_0_nullableStruct_fClassName = "java/lang/Integer"; std::string newElement_0_nullableStruct_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableStruct_f = static_cast(entry_0.nullableStruct.Value().f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_fClassName.c_str(), newElement_0_nullableStruct_fCtorSignature.c_str(), - entry_0.nullableStruct.Value().f.Raw(), newElement_0_nullableStruct_f); + jninewElement_0_nullableStruct_f, newElement_0_nullableStruct_f); jobject newElement_0_nullableStruct_g; std::string newElement_0_nullableStruct_gClassName = "java/lang/Float"; std::string newElement_0_nullableStruct_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jfloat jninewElement_0_nullableStruct_g = static_cast(entry_0.nullableStruct.Value().g); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_gClassName.c_str(), newElement_0_nullableStruct_gCtorSignature.c_str(), - entry_0.nullableStruct.Value().g, newElement_0_nullableStruct_g); + jninewElement_0_nullableStruct_g, newElement_0_nullableStruct_g); jobject newElement_0_nullableStruct_h; std::string newElement_0_nullableStruct_hClassName = "java/lang/Double"; std::string newElement_0_nullableStruct_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jdouble jninewElement_0_nullableStruct_h = static_cast(entry_0.nullableStruct.Value().h); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_hClassName.c_str(), newElement_0_nullableStruct_hCtorSignature.c_str(), - entry_0.nullableStruct.Value().h, newElement_0_nullableStruct_h); + jninewElement_0_nullableStruct_h, newElement_0_nullableStruct_h); jclass simpleStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( @@ -47435,24 +48167,27 @@ void CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CallbackFn jobject newElement_0_optionalStructInsideOptional_a; std::string newElement_0_optionalStructInsideOptional_aClassName = "java/lang/Integer"; std::string newElement_0_optionalStructInsideOptional_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_optionalStructInsideOptional_a = static_cast(entry_0.optionalStruct.Value().a); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_aClassName.c_str(), - newElement_0_optionalStructInsideOptional_aCtorSignature.c_str(), entry_0.optionalStruct.Value().a, + newElement_0_optionalStructInsideOptional_aCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_a, newElement_0_optionalStructInsideOptional_a); jobject newElement_0_optionalStructInsideOptional_b; std::string newElement_0_optionalStructInsideOptional_bClassName = "java/lang/Boolean"; std::string newElement_0_optionalStructInsideOptional_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jninewElement_0_optionalStructInsideOptional_b = static_cast(entry_0.optionalStruct.Value().b); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_bClassName.c_str(), - newElement_0_optionalStructInsideOptional_bCtorSignature.c_str(), entry_0.optionalStruct.Value().b, + newElement_0_optionalStructInsideOptional_bCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_b, newElement_0_optionalStructInsideOptional_b); jobject newElement_0_optionalStructInsideOptional_c; std::string newElement_0_optionalStructInsideOptional_cClassName = "java/lang/Integer"; std::string newElement_0_optionalStructInsideOptional_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_optionalStructInsideOptional_c = static_cast(entry_0.optionalStruct.Value().c); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_cClassName.c_str(), - newElement_0_optionalStructInsideOptional_cCtorSignature.c_str(), - static_cast(entry_0.optionalStruct.Value().c), newElement_0_optionalStructInsideOptional_c); + newElement_0_optionalStructInsideOptional_cCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_c, + newElement_0_optionalStructInsideOptional_c); jobject newElement_0_optionalStructInsideOptional_d; jbyteArray newElement_0_optionalStructInsideOptional_dByteArray = env->NewByteArray(static_cast(entry_0.optionalStruct.Value().d.size())); @@ -47466,23 +48201,26 @@ void CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CallbackFn jobject newElement_0_optionalStructInsideOptional_f; std::string newElement_0_optionalStructInsideOptional_fClassName = "java/lang/Integer"; std::string newElement_0_optionalStructInsideOptional_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_optionalStructInsideOptional_f = static_cast(entry_0.optionalStruct.Value().f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_fClassName.c_str(), - newElement_0_optionalStructInsideOptional_fCtorSignature.c_str(), entry_0.optionalStruct.Value().f.Raw(), + newElement_0_optionalStructInsideOptional_fCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_f, newElement_0_optionalStructInsideOptional_f); jobject newElement_0_optionalStructInsideOptional_g; std::string newElement_0_optionalStructInsideOptional_gClassName = "java/lang/Float"; std::string newElement_0_optionalStructInsideOptional_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jfloat jninewElement_0_optionalStructInsideOptional_g = static_cast(entry_0.optionalStruct.Value().g); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_gClassName.c_str(), - newElement_0_optionalStructInsideOptional_gCtorSignature.c_str(), entry_0.optionalStruct.Value().g, + newElement_0_optionalStructInsideOptional_gCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_g, newElement_0_optionalStructInsideOptional_g); jobject newElement_0_optionalStructInsideOptional_h; std::string newElement_0_optionalStructInsideOptional_hClassName = "java/lang/Double"; std::string newElement_0_optionalStructInsideOptional_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jdouble jninewElement_0_optionalStructInsideOptional_h = static_cast(entry_0.optionalStruct.Value().h); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_hClassName.c_str(), - newElement_0_optionalStructInsideOptional_hCtorSignature.c_str(), entry_0.optionalStruct.Value().h, + newElement_0_optionalStructInsideOptional_hCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_h, newElement_0_optionalStructInsideOptional_h); jclass simpleStructStructClass_3; @@ -47529,25 +48267,30 @@ void CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CallbackFn jobject newElement_0_nullableOptionalStructInsideOptional_a; std::string newElement_0_nullableOptionalStructInsideOptional_aClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalStructInsideOptional_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableOptionalStructInsideOptional_a = + static_cast(entry_0.nullableOptionalStruct.Value().Value().a); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_aClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_aCtorSignature.c_str(), - entry_0.nullableOptionalStruct.Value().Value().a, newElement_0_nullableOptionalStructInsideOptional_a); + jninewElement_0_nullableOptionalStructInsideOptional_a, newElement_0_nullableOptionalStructInsideOptional_a); jobject newElement_0_nullableOptionalStructInsideOptional_b; std::string newElement_0_nullableOptionalStructInsideOptional_bClassName = "java/lang/Boolean"; std::string newElement_0_nullableOptionalStructInsideOptional_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jninewElement_0_nullableOptionalStructInsideOptional_b = + static_cast(entry_0.nullableOptionalStruct.Value().Value().b); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_bClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_bCtorSignature.c_str(), - entry_0.nullableOptionalStruct.Value().Value().b, newElement_0_nullableOptionalStructInsideOptional_b); + jninewElement_0_nullableOptionalStructInsideOptional_b, newElement_0_nullableOptionalStructInsideOptional_b); jobject newElement_0_nullableOptionalStructInsideOptional_c; std::string newElement_0_nullableOptionalStructInsideOptional_cClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalStructInsideOptional_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableOptionalStructInsideOptional_c = + static_cast(entry_0.nullableOptionalStruct.Value().Value().c); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_cClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_cCtorSignature.c_str(), - static_cast(entry_0.nullableOptionalStruct.Value().Value().c), - newElement_0_nullableOptionalStructInsideOptional_c); + jninewElement_0_nullableOptionalStructInsideOptional_c, newElement_0_nullableOptionalStructInsideOptional_c); jobject newElement_0_nullableOptionalStructInsideOptional_d; jbyteArray newElement_0_nullableOptionalStructInsideOptional_dByteArray = env->NewByteArray(static_cast(entry_0.nullableOptionalStruct.Value().Value().d.size())); @@ -47561,24 +48304,30 @@ void CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CallbackFn jobject newElement_0_nullableOptionalStructInsideOptional_f; std::string newElement_0_nullableOptionalStructInsideOptional_fClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalStructInsideOptional_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableOptionalStructInsideOptional_f = + static_cast(entry_0.nullableOptionalStruct.Value().Value().f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_fClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_fCtorSignature.c_str(), - entry_0.nullableOptionalStruct.Value().Value().f.Raw(), newElement_0_nullableOptionalStructInsideOptional_f); + jninewElement_0_nullableOptionalStructInsideOptional_f, newElement_0_nullableOptionalStructInsideOptional_f); jobject newElement_0_nullableOptionalStructInsideOptional_g; std::string newElement_0_nullableOptionalStructInsideOptional_gClassName = "java/lang/Float"; std::string newElement_0_nullableOptionalStructInsideOptional_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jfloat jninewElement_0_nullableOptionalStructInsideOptional_g = + static_cast(entry_0.nullableOptionalStruct.Value().Value().g); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_gClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_gCtorSignature.c_str(), - entry_0.nullableOptionalStruct.Value().Value().g, newElement_0_nullableOptionalStructInsideOptional_g); + jninewElement_0_nullableOptionalStructInsideOptional_g, newElement_0_nullableOptionalStructInsideOptional_g); jobject newElement_0_nullableOptionalStructInsideOptional_h; std::string newElement_0_nullableOptionalStructInsideOptional_hClassName = "java/lang/Double"; std::string newElement_0_nullableOptionalStructInsideOptional_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jdouble jninewElement_0_nullableOptionalStructInsideOptional_h = + static_cast(entry_0.nullableOptionalStruct.Value().Value().h); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_hClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_hCtorSignature.c_str(), - entry_0.nullableOptionalStruct.Value().Value().h, newElement_0_nullableOptionalStructInsideOptional_h); + jninewElement_0_nullableOptionalStructInsideOptional_h, newElement_0_nullableOptionalStructInsideOptional_h); jclass simpleStructStructClass_4; err = chip::JniReferences::GetInstance().GetClassRef( @@ -47624,8 +48373,9 @@ void CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CallbackFn jobject newElement_3; std::string newElement_3ClassName = "java/lang/Integer"; std::string newElement_3CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), static_cast(entry_3), newElement_3); + jint jninewElement_3 = static_cast(entry_3); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); chip::JniReferences::GetInstance().AddToList(newElement_0_nullableList, newElement_3); } } @@ -47646,8 +48396,9 @@ void CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CallbackFn jobject newElement_3; std::string newElement_3ClassName = "java/lang/Integer"; std::string newElement_3CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), static_cast(entry_3), newElement_3); + jint jninewElement_3 = static_cast(entry_3); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); chip::JniReferences::GetInstance().AddToList(newElement_0_optionalListInsideOptional, newElement_3); } chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalListInsideOptional, newElement_0_optionalList); @@ -47675,9 +48426,9 @@ void CHIPUnitTestingListNullablesAndOptionalsStructAttributeCallback::CallbackFn jobject newElement_4; std::string newElement_4ClassName = "java/lang/Integer"; std::string newElement_4CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_4ClassName.c_str(), - newElement_4CtorSignature.c_str(), - static_cast(entry_4), newElement_4); + jint jninewElement_4 = static_cast(entry_4); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_4ClassName.c_str(), newElement_4CtorSignature.c_str(), jninewElement_4, newElement_4); chip::JniReferences::GetInstance().AddToList(newElement_0_nullableOptionalListInsideOptional, newElement_4); } } @@ -47852,9 +48603,10 @@ void CHIPUnitTestingListFabricScopedAttributeCallback::CallbackFn( jobject newElement_0_fabricSensitiveInt8u; std::string newElement_0_fabricSensitiveInt8uClassName = "java/lang/Integer"; std::string newElement_0_fabricSensitiveInt8uCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_fabricSensitiveInt8u = static_cast(entry_0.fabricSensitiveInt8u); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveInt8uClassName.c_str(), newElement_0_fabricSensitiveInt8uCtorSignature.c_str(), - entry_0.fabricSensitiveInt8u, newElement_0_fabricSensitiveInt8u); + jninewElement_0_fabricSensitiveInt8u, newElement_0_fabricSensitiveInt8u); jobject newElement_0_optionalFabricSensitiveInt8u; if (!entry_0.optionalFabricSensitiveInt8u.HasValue()) { @@ -47865,10 +48617,13 @@ void CHIPUnitTestingListFabricScopedAttributeCallback::CallbackFn( jobject newElement_0_optionalFabricSensitiveInt8uInsideOptional; std::string newElement_0_optionalFabricSensitiveInt8uInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_optionalFabricSensitiveInt8uInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_optionalFabricSensitiveInt8uInsideOptional = + static_cast(entry_0.optionalFabricSensitiveInt8u.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalFabricSensitiveInt8uInsideOptionalClassName.c_str(), newElement_0_optionalFabricSensitiveInt8uInsideOptionalCtorSignature.c_str(), - entry_0.optionalFabricSensitiveInt8u.Value(), newElement_0_optionalFabricSensitiveInt8uInsideOptional); + jninewElement_0_optionalFabricSensitiveInt8uInsideOptional, + newElement_0_optionalFabricSensitiveInt8uInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalFabricSensitiveInt8uInsideOptional, newElement_0_optionalFabricSensitiveInt8u); } @@ -47881,9 +48636,10 @@ void CHIPUnitTestingListFabricScopedAttributeCallback::CallbackFn( { std::string newElement_0_nullableFabricSensitiveInt8uClassName = "java/lang/Integer"; std::string newElement_0_nullableFabricSensitiveInt8uCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableFabricSensitiveInt8u = static_cast(entry_0.nullableFabricSensitiveInt8u.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableFabricSensitiveInt8uClassName.c_str(), - newElement_0_nullableFabricSensitiveInt8uCtorSignature.c_str(), entry_0.nullableFabricSensitiveInt8u.Value(), + newElement_0_nullableFabricSensitiveInt8uCtorSignature.c_str(), jninewElement_0_nullableFabricSensitiveInt8u, newElement_0_nullableFabricSensitiveInt8u); } jobject newElement_0_nullableOptionalFabricSensitiveInt8u; @@ -47902,10 +48658,12 @@ void CHIPUnitTestingListFabricScopedAttributeCallback::CallbackFn( { std::string newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional = + static_cast(entry_0.nullableOptionalFabricSensitiveInt8u.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalClassName.c_str(), newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalCtorSignature.c_str(), - entry_0.nullableOptionalFabricSensitiveInt8u.Value().Value(), + jninewElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional, newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional, @@ -47918,21 +48676,24 @@ void CHIPUnitTestingListFabricScopedAttributeCallback::CallbackFn( jobject newElement_0_fabricSensitiveStruct_a; std::string newElement_0_fabricSensitiveStruct_aClassName = "java/lang/Integer"; std::string newElement_0_fabricSensitiveStruct_aCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_fabricSensitiveStruct_a = static_cast(entry_0.fabricSensitiveStruct.a); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_aClassName.c_str(), newElement_0_fabricSensitiveStruct_aCtorSignature.c_str(), - entry_0.fabricSensitiveStruct.a, newElement_0_fabricSensitiveStruct_a); + jninewElement_0_fabricSensitiveStruct_a, newElement_0_fabricSensitiveStruct_a); jobject newElement_0_fabricSensitiveStruct_b; std::string newElement_0_fabricSensitiveStruct_bClassName = "java/lang/Boolean"; std::string newElement_0_fabricSensitiveStruct_bCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jboolean jninewElement_0_fabricSensitiveStruct_b = static_cast(entry_0.fabricSensitiveStruct.b); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_bClassName.c_str(), newElement_0_fabricSensitiveStruct_bCtorSignature.c_str(), - entry_0.fabricSensitiveStruct.b, newElement_0_fabricSensitiveStruct_b); + jninewElement_0_fabricSensitiveStruct_b, newElement_0_fabricSensitiveStruct_b); jobject newElement_0_fabricSensitiveStruct_c; std::string newElement_0_fabricSensitiveStruct_cClassName = "java/lang/Integer"; std::string newElement_0_fabricSensitiveStruct_cCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_fabricSensitiveStruct_c = static_cast(entry_0.fabricSensitiveStruct.c); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_cClassName.c_str(), newElement_0_fabricSensitiveStruct_cCtorSignature.c_str(), - static_cast(entry_0.fabricSensitiveStruct.c), newElement_0_fabricSensitiveStruct_c); + jninewElement_0_fabricSensitiveStruct_c, newElement_0_fabricSensitiveStruct_c); jobject newElement_0_fabricSensitiveStruct_d; jbyteArray newElement_0_fabricSensitiveStruct_dByteArray = env->NewByteArray(static_cast(entry_0.fabricSensitiveStruct.d.size())); @@ -47946,21 +48707,24 @@ void CHIPUnitTestingListFabricScopedAttributeCallback::CallbackFn( jobject newElement_0_fabricSensitiveStruct_f; std::string newElement_0_fabricSensitiveStruct_fClassName = "java/lang/Integer"; std::string newElement_0_fabricSensitiveStruct_fCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jint jninewElement_0_fabricSensitiveStruct_f = static_cast(entry_0.fabricSensitiveStruct.f.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_fClassName.c_str(), newElement_0_fabricSensitiveStruct_fCtorSignature.c_str(), - entry_0.fabricSensitiveStruct.f.Raw(), newElement_0_fabricSensitiveStruct_f); + jninewElement_0_fabricSensitiveStruct_f, newElement_0_fabricSensitiveStruct_f); jobject newElement_0_fabricSensitiveStruct_g; std::string newElement_0_fabricSensitiveStruct_gClassName = "java/lang/Float"; std::string newElement_0_fabricSensitiveStruct_gCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jfloat jninewElement_0_fabricSensitiveStruct_g = static_cast(entry_0.fabricSensitiveStruct.g); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_gClassName.c_str(), newElement_0_fabricSensitiveStruct_gCtorSignature.c_str(), - entry_0.fabricSensitiveStruct.g, newElement_0_fabricSensitiveStruct_g); + jninewElement_0_fabricSensitiveStruct_g, newElement_0_fabricSensitiveStruct_g); jobject newElement_0_fabricSensitiveStruct_h; std::string newElement_0_fabricSensitiveStruct_hClassName = "java/lang/Double"; std::string newElement_0_fabricSensitiveStruct_hCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( + jdouble jninewElement_0_fabricSensitiveStruct_h = static_cast(entry_0.fabricSensitiveStruct.h); + chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_hClassName.c_str(), newElement_0_fabricSensitiveStruct_hCtorSignature.c_str(), - entry_0.fabricSensitiveStruct.h, newElement_0_fabricSensitiveStruct_h); + jninewElement_0_fabricSensitiveStruct_h, newElement_0_fabricSensitiveStruct_h); jclass simpleStructStructClass_2; err = chip::JniReferences::GetInstance().GetClassRef( @@ -47995,16 +48759,18 @@ void CHIPUnitTestingListFabricScopedAttributeCallback::CallbackFn( jobject newElement_2; std::string newElement_2ClassName = "java/lang/Integer"; std::string newElement_2CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2ClassName.c_str(), - newElement_2CtorSignature.c_str(), entry_2, newElement_2); + jint jninewElement_2 = static_cast(entry_2); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); chip::JniReferences::GetInstance().AddToList(newElement_0_fabricSensitiveInt8uList, newElement_2); } jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - entry_0.fabricIndex, newElement_0_fabricIndex); + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); jclass testFabricScopedStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -48095,8 +48861,9 @@ void CHIPUnitTestingNullableBooleanAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Boolean"; std::string javaValueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jboolean jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -48162,8 +48929,9 @@ void CHIPUnitTestingNullableBitmap8AttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value().Raw(), javaValue); + jint jnijavaValue = static_cast(value.Value().Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -48229,8 +48997,9 @@ void CHIPUnitTestingNullableBitmap16AttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value().Raw(), javaValue); + jint jnijavaValue = static_cast(value.Value().Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -48296,8 +49065,9 @@ void CHIPUnitTestingNullableBitmap32AttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value().Raw(), javaValue); + jlong jnijavaValue = static_cast(value.Value().Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -48363,8 +49133,9 @@ void CHIPUnitTestingNullableBitmap64AttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value().Raw(), javaValue); + jlong jnijavaValue = static_cast(value.Value().Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -48428,8 +49199,9 @@ void CHIPUnitTestingNullableInt8uAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -48495,8 +49267,9 @@ void CHIPUnitTestingNullableInt16uAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -48562,8 +49335,9 @@ void CHIPUnitTestingNullableInt24uAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -48629,8 +49403,9 @@ void CHIPUnitTestingNullableInt32uAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -48696,8 +49471,9 @@ void CHIPUnitTestingNullableInt40uAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -48763,8 +49539,9 @@ void CHIPUnitTestingNullableInt48uAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -48830,8 +49607,9 @@ void CHIPUnitTestingNullableInt56uAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -48897,8 +49675,9 @@ void CHIPUnitTestingNullableInt64uAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -48961,8 +49740,9 @@ void CHIPUnitTestingNullableInt8sAttributeCallback::CallbackFn(void * context, c { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -49028,8 +49808,9 @@ void CHIPUnitTestingNullableInt16sAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -49095,8 +49876,9 @@ void CHIPUnitTestingNullableInt24sAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -49162,8 +49944,9 @@ void CHIPUnitTestingNullableInt32sAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -49229,8 +50012,9 @@ void CHIPUnitTestingNullableInt40sAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -49296,8 +50080,9 @@ void CHIPUnitTestingNullableInt48sAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -49363,8 +50148,9 @@ void CHIPUnitTestingNullableInt56sAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -49430,8 +50216,9 @@ void CHIPUnitTestingNullableInt64sAttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -49495,8 +50282,9 @@ void CHIPUnitTestingNullableEnum8AttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -49562,8 +50350,9 @@ void CHIPUnitTestingNullableEnum16AttributeCallback::CallbackFn(void * context, { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -49629,8 +50418,9 @@ void CHIPUnitTestingNullableFloatSingleAttributeCallback::CallbackFn(void * cont { std::string javaValueClassName = "java/lang/Float"; std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jfloat jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -49696,8 +50486,9 @@ void CHIPUnitTestingNullableFloatDoubleAttributeCallback::CallbackFn(void * cont { std::string javaValueClassName = "java/lang/Double"; std::string javaValueCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jdouble jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -49894,8 +50685,9 @@ void CHIPUnitTestingNullableEnumAttrAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - static_cast(value.Value()), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -49961,8 +50753,9 @@ void CHIPUnitTestingNullableRangeRestrictedInt8uAttributeCallback::CallbackFn(vo { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -50028,8 +50821,9 @@ void CHIPUnitTestingNullableRangeRestrictedInt8sAttributeCallback::CallbackFn(vo { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -50095,8 +50889,9 @@ void CHIPUnitTestingNullableRangeRestrictedInt16uAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -50162,8 +50957,9 @@ void CHIPUnitTestingNullableRangeRestrictedInt16sAttributeCallback::CallbackFn( { std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -50231,8 +51027,9 @@ void CHIPUnitTestingGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -50302,8 +51099,9 @@ void CHIPUnitTestingAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -50371,8 +51169,9 @@ void CHIPUnitTestingEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -50440,8 +51239,9 @@ void CHIPUnitTestingAttributeListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -50511,8 +51311,9 @@ void CHIPFaultInjectionGeneratedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -50582,8 +51383,9 @@ void CHIPFaultInjectionAcceptedCommandListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -50651,8 +51453,9 @@ void CHIPFaultInjectionEventListAttributeCallback::CallbackFn(void * context, jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -50722,8 +51525,9 @@ void CHIPFaultInjectionAttributeListAttributeCallback::CallbackFn( jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), - newElement_0CtorSignature.c_str(), entry_0, newElement_0); + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } From 1914ddbff69ae37bb9c969dd69a673ce8741dcdd Mon Sep 17 00:00:00 2001 From: Andrii Bilynskyi Date: Mon, 7 Aug 2023 18:45:11 +0300 Subject: [PATCH 29/74] [Telink] Factory reset using power on sequence (#28519) --- config/telink/chip-module/Kconfig | 8 +++ .../lighting-app/telink/include/AppTask.h | 9 +++ examples/lighting-app/telink/src/AppTask.cpp | 51 +++++++++++++++ .../telink/common/include/AppTaskCommon.h | 3 + .../telink/common/src/AppTaskCommon.cpp | 8 +++ .../platform/telink/common/src/mainCommon.cpp | 63 ++++++++++++++++++- 6 files changed, 141 insertions(+), 1 deletion(-) diff --git a/config/telink/chip-module/Kconfig b/config/telink/chip-module/Kconfig index 97f42e01932c5d..fcd205102f22aa 100644 --- a/config/telink/chip-module/Kconfig +++ b/config/telink/chip-module/Kconfig @@ -207,3 +207,11 @@ config CHIP_MAX_PREFERRED_SUBSCRIPTION_REPORT_INTERVAL the initiator device to detect the publisher absence reasonably fast due to not sending the reports too rarely. The current algorithm is to select bigger value from the one requested by the initiator and the one preferred by the publisher. + +config CHIP_ENABLE_POWER_ON_FACTORY_RESET + bool "Enable power on factory reset sequence" + default n + help + Enable power on factory reset sequence. If device power triggered off during + first 5 seconds after power on and this sequence repeated 5 times - factory + reset will be involved. diff --git a/examples/lighting-app/telink/include/AppTask.h b/examples/lighting-app/telink/include/AppTask.h index f1085763e74086..a9d9ab3712ef94 100644 --- a/examples/lighting-app/telink/include/AppTask.h +++ b/examples/lighting-app/telink/include/AppTask.h @@ -23,6 +23,9 @@ class AppTask : public AppTaskCommon { public: +#ifdef CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET + void PowerOnFactoryReset(void); +#endif /* CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET */ void SetInitiateAction(PWMDevice::Action_t aAction, int32_t aActor, uint8_t * value); void UpdateClusterState(void); PWMDevice & GetPWMDevice(void) { return mPwmRgbBlueLed; } @@ -37,7 +40,13 @@ class AppTask : public AppTaskCommon static void ActionCompleted(PWMDevice::Action_t aAction, int32_t aActor); static void LightingActionEventHandler(AppEvent * aEvent); +#ifdef CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET + static void PowerOnFactoryResetEventHandler(AppEvent * aEvent); + static void PowerOnFactoryResetTimerEvent(struct k_timer * dummy); + static unsigned int sPowerOnFactoryResetTimerCnt; + static k_timer sPowerOnFactoryResetTimer; +#endif /* CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET */ PWMDevice mPwmRgbBlueLed; #if USE_RGB_PWM PWMDevice mPwmRgbGreenLed; diff --git a/examples/lighting-app/telink/src/AppTask.cpp b/examples/lighting-app/telink/src/AppTask.cpp index f875086b9d59c7..1d1f3b748a97fb 100644 --- a/examples/lighting-app/telink/src/AppTask.cpp +++ b/examples/lighting-app/telink/src/AppTask.cpp @@ -17,6 +17,7 @@ */ #include "AppTask.h" +#include #include "ColorFormat.h" #include "PWMDevice.h" @@ -41,6 +42,17 @@ CtColor_t sCT; AppTask AppTask::sAppTask; +#ifdef CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET +void AppTask::PowerOnFactoryReset(void) +{ + LOG_INF("Lighting App Power On Factory Reset"); + AppEvent event; + event.Type = AppEvent::kEventType_Lighting; + event.Handler = PowerOnFactoryResetEventHandler; + GetAppTask().PostEvent(&event); +} +#endif /* CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET */ + CHIP_ERROR AppTask::Init(void) { // Init lighting manager @@ -284,3 +296,42 @@ void AppTask::SetInitiateAction(PWMDevice::Action_t aAction, int32_t aActor, uin } #endif } + +#ifdef CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET +static constexpr uint32_t kPowerOnFactoryResetIndicationMax = 4; +static constexpr uint32_t kPowerOnFactoryResetIndicationTimeMs = 1000; + +unsigned int AppTask::sPowerOnFactoryResetTimerCnt; +k_timer AppTask::sPowerOnFactoryResetTimer; + +void AppTask::PowerOnFactoryResetEventHandler(AppEvent * aEvent) +{ + LOG_INF("Lighting App Power On Factory Reset Handler"); + sPowerOnFactoryResetTimerCnt = 1; + sAppTask.mPwmRgbBlueLed.Set(sPowerOnFactoryResetTimerCnt % 2); +#if USE_RGB_PWM + sAppTask.mPwmRgbRedLed.Set(sPowerOnFactoryResetTimerCnt % 2); + sAppTask.mPwmRgbGreenLed.Set(sPowerOnFactoryResetTimerCnt % 2); +#endif + k_timer_init(&sPowerOnFactoryResetTimer, PowerOnFactoryResetTimerEvent, nullptr); + k_timer_start(&sPowerOnFactoryResetTimer, K_MSEC(kPowerOnFactoryResetIndicationTimeMs), + K_MSEC(kPowerOnFactoryResetIndicationTimeMs)); +} + +void AppTask::PowerOnFactoryResetTimerEvent(struct k_timer * timer) +{ + sPowerOnFactoryResetTimerCnt++; + LOG_INF("Lighting App Power On Factory Reset Handler %u", sPowerOnFactoryResetTimerCnt); + sAppTask.mPwmRgbBlueLed.Set(sPowerOnFactoryResetTimerCnt % 2); +#if USE_RGB_PWM + sAppTask.mPwmRgbRedLed.Set(sPowerOnFactoryResetTimerCnt % 2); + sAppTask.mPwmRgbGreenLed.Set(sPowerOnFactoryResetTimerCnt % 2); +#endif + if (sPowerOnFactoryResetTimerCnt > kPowerOnFactoryResetIndicationMax) + { + k_timer_stop(timer); + LOG_INF("schedule factory reset"); + chip::Server::GetInstance().ScheduleFactoryReset(); + } +} +#endif /* CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET */ diff --git a/examples/platform/telink/common/include/AppTaskCommon.h b/examples/platform/telink/common/include/AppTaskCommon.h index fe1c400b22c448..74f1f879056ba5 100644 --- a/examples/platform/telink/common/include/AppTaskCommon.h +++ b/examples/platform/telink/common/include/AppTaskCommon.h @@ -63,6 +63,9 @@ constexpr uint8_t kButtonReleaseEvent = 0; class AppTaskCommon { public: +#ifdef CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET + void PowerOnFactoryReset(void); +#endif /* CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET */ CHIP_ERROR StartApp(); void PostEvent(AppEvent * event); diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index a13e84ca527cad..41d3a0c3e3fec5 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -222,6 +222,14 @@ SHELL_STATIC_SUBCMD_SET_CREATE(sub_telink, SHELL_CMD(reboot, NULL, "Reboot board SHELL_CMD_REGISTER(telink, &sub_telink, "Telink commands", NULL); #endif // CONFIG_CHIP_LIB_SHELL +#ifdef CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET +void AppTaskCommon::PowerOnFactoryReset(void) +{ + LOG_INF("schedule factory reset"); + chip::Server::GetInstance().ScheduleFactoryReset(); +} +#endif /* CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET */ + CHIP_ERROR AppTaskCommon::StartApp(void) { CHIP_ERROR err = GetAppTask().Init(); diff --git a/examples/platform/telink/common/src/mainCommon.cpp b/examples/platform/telink/common/src/mainCommon.cpp index 12abb1de76ec74..63c41b3a211982 100644 --- a/examples/platform/telink/common/src/mainCommon.cpp +++ b/examples/platform/telink/common/src/mainCommon.cpp @@ -33,6 +33,65 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::DeviceLayer; +#ifdef CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET +static constexpr uint32_t kFactoryResetOnBootMaxCnt = 5; +static constexpr const char * kFactoryResetOnBootStoreKey = "TelinkFactoryResetOnBootCnt"; +static constexpr uint32_t kFactoryResetUsualBootTimeoutMs = 5000; + +static k_timer FactoryResetUsualBootTimer; + +static void FactoryResetUsualBoot(struct k_timer * dummy) +{ + (void) dummy; + (void) chip::DeviceLayer::PersistedStorage::KeyValueStoreMgr().Delete(kFactoryResetOnBootStoreKey); + LOG_INF("Schedule factory counter deleted"); +} + +static void FactoryResetOnBoot(void) +{ + uint32_t FactoryResetOnBootCnt; + CHIP_ERROR FactoryResetOnBootErr = chip::DeviceLayer::PersistedStorage::KeyValueStoreMgr().Get( + kFactoryResetOnBootStoreKey, &FactoryResetOnBootCnt, sizeof(FactoryResetOnBootCnt)); + + if (FactoryResetOnBootErr == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND) + { + FactoryResetOnBootCnt = 1; + if (chip::DeviceLayer::PersistedStorage::KeyValueStoreMgr().Put(kFactoryResetOnBootStoreKey, &FactoryResetOnBootCnt, + sizeof(FactoryResetOnBootCnt)) != CHIP_NO_ERROR) + { + LOG_ERR("FactoryResetOnBootCnt write fail"); + } + else + { + LOG_INF("Schedule factory counter %u", FactoryResetOnBootCnt); + } + } + else if (FactoryResetOnBootErr == CHIP_NO_ERROR) + { + FactoryResetOnBootCnt++; + if (chip::DeviceLayer::PersistedStorage::KeyValueStoreMgr().Put(kFactoryResetOnBootStoreKey, &FactoryResetOnBootCnt, + sizeof(FactoryResetOnBootCnt)) != CHIP_NO_ERROR) + { + LOG_ERR("FactoryResetOnBootCnt write fail"); + } + else + { + LOG_INF("Schedule factory counter %u", FactoryResetOnBootCnt); + if (FactoryResetOnBootCnt >= kFactoryResetOnBootMaxCnt) + { + GetAppTask().PowerOnFactoryReset(); + } + } + } + else + { + LOG_ERR("FactoryResetOnBootCnt read fail"); + } + k_timer_init(&FactoryResetUsualBootTimer, FactoryResetUsualBoot, nullptr); + k_timer_start(&FactoryResetUsualBootTimer, K_MSEC(kFactoryResetUsualBootTimeoutMs), K_NO_WAIT); +} +#endif /* CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET */ + int main(void) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -61,7 +120,9 @@ int main(void) LOG_ERR("StartEventLoopTask fail"); goto exit; } - +#ifdef CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET + FactoryResetOnBoot(); +#endif /* CONFIG_CHIP_ENABLE_POWER_ON_FACTORY_RESET */ err = ThreadStackMgr().InitThreadStack(); if (err != CHIP_NO_ERROR) { From 9a7d6957007938425e3cdc7f587d18a67498d2b1 Mon Sep 17 00:00:00 2001 From: duyen-tran <129869207+duyen-tran@users.noreply.github.com> Date: Mon, 7 Aug 2023 11:53:48 -0400 Subject: [PATCH 30/74] fix pics (#28561) --- .../suites/certification/Test_TC_RVCOPSTATE_1_1.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml index 51b71ed89b691e..d0091a46667466 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml @@ -100,7 +100,7 @@ tests: contains: [0x01] - label: "Step 6a: Read the optional command(Start) in AcceptedCommandList" - PICS: RVCOPSTATE.S.C02 && RVCOPSTATE.S.Afff9 + PICS: RVCOPSTATE.S.C02.Rsp && RVCOPSTATE.S.Afff9 command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -109,7 +109,7 @@ tests: contains: [1, 2] - label: "Step 6b: Read the optional command(Stop) in AcceptedCommandList" - PICS: RVCOPSTATE.S.C01 && RVCOPSTATE.S.Afff9 + PICS: RVCOPSTATE.S.C01.Rsp && RVCOPSTATE.S.Afff9 command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -118,7 +118,7 @@ tests: contains: [1] - label: "Step 6c: Read the optional command(Pause) in AcceptedCommandList" - PICS: RVCOPSTATE.S.C00 && RVCOPSTATE.S.Afff9 + PICS: RVCOPSTATE.S.C00.Rsp && RVCOPSTATE.S.Afff9 command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -127,7 +127,7 @@ tests: contains: [0, 3] - label: "Step 6d: Read the optional command(Resume) in AcceptedCommandList" - PICS: RVCOPSTATE.S.C03 && RVCOPSTATE.S.Afff9 + PICS: RVCOPSTATE.S.C03.Rsp && RVCOPSTATE.S.Afff9 command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -137,8 +137,8 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" PICS: - RVCOPSTATE.S.Afff8 && (RVCOPSTATE.S.C00 || RVCOPSTATE.S.C01 || - RVCOPSTATE.S.C02 || RVCOPSTATE.S.C03) + RVCOPSTATE.S.Afff8 && (RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C01.Rsp || + RVCOPSTATE.S.C02.Rsp || RVCOPSTATE.S.C03.Rsp) command: "readAttribute" attribute: "GeneratedCommandList" response: From 9237688602061480d022dcc9f24a7b5c533f7721 Mon Sep 17 00:00:00 2001 From: chulspro Date: Tue, 8 Aug 2023 02:13:23 +0900 Subject: [PATCH 31/74] [Android] virtual-device-app: Add On/Off Switch feature in App (#28550) * virtual-device-app: Update chip device config Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Add java files about chip stack id information Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Add initialize api for OnOffManager Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Update parameter types about chip stack id Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Add setCallback api Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Use ExampleDACProvider Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Add core:ui module Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Add MatterModule for provide DeviceApp library Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Add OnOffManager stub Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Implement chip stack initialize code Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Add device event callback Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Add permissions about stack related Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Implement service managing code Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Add SharedPreferences feature for managing commissioning state Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Add OnOffManager repository Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Update matter repository for device event callback Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Implement sharedpreferences usecase Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Implement matter usecase Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Add ignore batter optimization feature Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Add SharedViewModel for managing reset popup Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Implement main view scenario - go to commissioned device view - reset abnormal state - start commissioning Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Implement qrcode view scenario - start MatterAppService - monitoring establishment started event Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Implement loading view scenario - monitoring commissioning complete event Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Implement base fragment/viewmodel for device detail view - fabric removed event - common reset menu/popup - abstract setup functions Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Implement common layout - on/off button layout - radio button layout - common space Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Implement onoff switch scenario - set onoff attribute - show onoff status Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Apply feature:control navGraph Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Add permissions about stack related Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * Restyled by google-java-format Signed-off-by: Charles Kim --------- Signed-off-by: Jaehoon You Signed-off-by: Charles Kim Co-authored-by: Jaehoon You Co-authored-by: Restyled.io --- .../android/App/app/build.gradle.kts | 2 + .../App/app/src/main/AndroidManifest.xml | 15 ++ .../matter/virtual/device/app/MainActivity.kt | 78 +++++++++- .../app/src/main/res/navigation/nav_graph.xml | 1 + .../android/App/core/common/build.gradle.kts | 1 + .../device/app/core/common/DeepLink.kt | 14 ++ .../virtual/device/app/core/common/Event.kt | 25 +++ .../device/app/core/common/MatterConstants.kt | 9 +- .../sharedpreferences/SharedPreferencesKey.kt | 7 + .../SharedPreferencesManager.kt | 59 ++++++++ .../common/src/main/res/values/dimens.xml | 4 - .../android/App/core/data/build.gradle.kts | 8 + .../device/app/core/data/di/DataModule.kt | 17 ++- .../core/data/repository/MatterRepository.kt | 13 ++ .../data/repository/MatterRepositoryImpl.kt | 143 +++++++++++++++++- .../repository/SharedPreferencesRepository.kt | 19 +++ .../SharedPreferencesRepositoryImpl.kt | 40 +++++ .../cluster/OnOffManagerRepository.kt | 9 ++ .../cluster/OnOffManagerRepositoryImpl.kt | 21 +++ .../android/App/core/domain/build.gradle.kts | 1 + .../matter/IsCommissioningCompletedUseCase.kt | 28 ++++ ...ommissioningSessionEstablishmentStarted.kt | 19 +++ .../usecase/matter/IsFabricRemovedUseCase.kt | 19 +++ .../usecase/matter/ResetMatterAppUseCase.kt | 25 +++ .../matter/StartMatterAppServiceUseCase.kt | 20 +++ .../matter/cluster/GetOnOffFlowUseCase.kt | 11 ++ .../usecase/matter/cluster/SetOnOffUseCase.kt | 19 +++ .../GetCommissionedDeviceUseCase.kt | 20 +++ .../IsCommissioningDeviceCompletedUseCase.kt | 19 +++ .../IsCommissioningSequenceUseCase.kt | 19 +++ .../SetCommissionedDeviceUseCase.kt | 20 +++ .../SetCommissioningDeviceCompletedUseCase.kt | 19 +++ .../SetCommissioningSequenceFlagUseCase.kt | 19 +++ .../android/App/core/matter/build.gradle.kts | 2 + .../core/matter/src/main/AndroidManifest.xml | 3 +- .../device/app/core/matter/MatterApp.kt | 116 +++++++++++++- .../app/core/matter/MatterAppService.kt | 30 +++- .../core/matter/MatterDeviceEventCallback.kt | 15 ++ .../device/app/core/matter/di/MatterModule.kt | 15 ++ .../core/matter/manager/OnOffManagerStub.kt | 34 +++++ .../android/App/core/model/build.gradle.kts | 3 + .../app/core/model/databinding/ButtonData.kt | 10 ++ .../android/App/core/ui/.gitignore | 0 .../android/App/core/ui/build.gradle.kts | 67 ++++++++ .../android/App/core/ui/proguard-rules.pro | 21 +++ .../app/core/ui/ExampleInstrumentedTest.kt | 22 +++ .../App/core/ui/src/main/AndroidManifest.xml | 4 + .../device/app/core/ui/BaseFragment.kt | 130 ++++++++++++++++ .../device/app/core/ui/BaseViewModel.kt | 37 +++++ .../core}/ui/DisableAppBarLayoutBehavior.kt | 2 +- .../device/app/core/ui/SharedViewModel.kt | 52 +++++++ .../res/drawable/device_title_icon_bg.xml | 10 ++ .../main/res/drawable/menu_popup_round.xml | 10 ++ .../main/res/drawable/round_more_vert_24.xml | 5 + .../main/res/drawable/round_toggle_off_24.xml | 5 + .../main/res/drawable/round_toggle_on_24.xml | 5 + .../ui/src/main/res/layout/layout_appbar.xml | 79 ++++++++++ .../layout_item_value_on_off_button.xml | 45 ++++++ .../layout/layout_item_value_radio_button.xml | 36 +++++ .../main/res/layout/layout_space_bottom.xml | 4 + .../src/main/res/layout/layout_space_top.xml | 4 + .../ui/src/main/res/layout/layout_title.xml | 39 +++++ .../App/core/ui/src/main/res/menu/more.xml | 6 + .../ui/src/main/res/values-night/colors.xml | 5 + .../core/ui/src/main/res/values/colors.xml | 5 + .../core/ui/src/main/res/values/dimens.xml | 28 ++++ .../core/ui/src/main/res/values/strings.xml | 12 ++ .../core/ui/src/main/res/values/themes.xml | 6 + .../device/app/core/ui/ExampleUnitTest.kt | 16 ++ .../App/feature/control/build.gradle.kts | 9 ++ .../feature/control/OnOffSwitchFragment.kt | 56 ++++--- .../feature/control/OnOffSwitchViewModel.kt | 65 ++++++++ .../res/layout/fragment_on_off_switch.xml | 47 +++++- .../android/App/feature/main/build.gradle.kts | 1 + .../app/feature/main/LoadingFragment.kt | 48 +++++- .../app/feature/main/LoadingViewModel.kt | 70 +++++++++ .../device/app/feature/main/MainFragment.kt | 98 ++++++++---- .../device/app/feature/main/MainViewModel.kt | 78 ++++++++++ .../src/main/res/layout/fragment_loading.xml | 2 +- .../main/src/main/res/values/strings.xml | 3 + .../App/feature/qrcode/build.gradle.kts | 1 + .../app/feature/qrcode/QrcodeFragment.kt | 128 +++++++++------- .../app/feature/qrcode/QrcodeViewModel.kt | 23 ++- .../src/main/res/layout/fragment_qrcode.xml | 2 +- .../android/App/settings.gradle.kts | 1 + examples/virtual-device-app/android/BUILD.gn | 2 + .../android/java/DeviceApp-JNI.cpp | 12 +- .../android/java/OnOffManager.cpp | 4 +- .../matter/virtual/device/app/Clusters.java | 138 +++++++++++++++++ .../matter/virtual/device/app/DeviceApp.java | 13 +- .../virtual/device/app/DeviceAppCallback.java | 4 +- .../virtual/device/app/DeviceEventType.java | 49 ++++++ .../virtual/device/app/OnOffManager.java | 10 +- .../include/CHIPProjectAppConfig.h | 3 +- 94 files changed, 2342 insertions(+), 151 deletions(-) create mode 100644 examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/Event.kt create mode 100644 examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/sharedpreferences/SharedPreferencesKey.kt create mode 100644 examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/sharedpreferences/SharedPreferencesManager.kt create mode 100644 examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/SharedPreferencesRepository.kt create mode 100644 examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/SharedPreferencesRepositoryImpl.kt create mode 100644 examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/OnOffManagerRepository.kt create mode 100644 examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/OnOffManagerRepositoryImpl.kt create mode 100644 examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/IsCommissioningCompletedUseCase.kt create mode 100644 examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/IsCommissioningSessionEstablishmentStarted.kt create mode 100644 examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/IsFabricRemovedUseCase.kt create mode 100644 examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/ResetMatterAppUseCase.kt create mode 100644 examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/StartMatterAppServiceUseCase.kt create mode 100644 examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/cluster/GetOnOffFlowUseCase.kt create mode 100644 examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/cluster/SetOnOffUseCase.kt create mode 100644 examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/GetCommissionedDeviceUseCase.kt create mode 100644 examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/IsCommissioningDeviceCompletedUseCase.kt create mode 100644 examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/IsCommissioningSequenceUseCase.kt create mode 100644 examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/SetCommissionedDeviceUseCase.kt create mode 100644 examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/SetCommissioningDeviceCompletedUseCase.kt create mode 100644 examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/SetCommissioningSequenceFlagUseCase.kt create mode 100644 examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterDeviceEventCallback.kt create mode 100644 examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/di/MatterModule.kt create mode 100644 examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/manager/OnOffManagerStub.kt create mode 100644 examples/virtual-device-app/android/App/core/model/src/main/java/com/matter/virtual/device/app/core/model/databinding/ButtonData.kt create mode 100644 examples/virtual-device-app/android/App/core/ui/.gitignore create mode 100644 examples/virtual-device-app/android/App/core/ui/build.gradle.kts create mode 100644 examples/virtual-device-app/android/App/core/ui/proguard-rules.pro create mode 100644 examples/virtual-device-app/android/App/core/ui/src/androidTest/java/com/matter/virtual/device/app/core/ui/ExampleInstrumentedTest.kt create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/AndroidManifest.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/java/com/matter/virtual/device/app/core/ui/BaseFragment.kt create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/java/com/matter/virtual/device/app/core/ui/BaseViewModel.kt rename examples/virtual-device-app/android/App/core/{common/src/main/java/com/matter/virtual/device/app/core/common => ui/src/main/java/com/matter/virtual/device/app/core}/ui/DisableAppBarLayoutBehavior.kt (93%) create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/java/com/matter/virtual/device/app/core/ui/SharedViewModel.kt create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/device_title_icon_bg.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/menu_popup_round.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/round_more_vert_24.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/round_toggle_off_24.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/round_toggle_on_24.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_appbar.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_item_value_on_off_button.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_item_value_radio_button.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_space_bottom.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_space_top.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_title.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/menu/more.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/values-night/colors.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/values/colors.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/values/dimens.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/values/strings.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/main/res/values/themes.xml create mode 100644 examples/virtual-device-app/android/App/core/ui/src/test/java/com/matter/virtual/device/app/core/ui/ExampleUnitTest.kt create mode 100644 examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchViewModel.kt create mode 100644 examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingViewModel.kt create mode 100644 examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainViewModel.kt create mode 100644 examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/Clusters.java create mode 100644 examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceEventType.java diff --git a/examples/virtual-device-app/android/App/app/build.gradle.kts b/examples/virtual-device-app/android/App/app/build.gradle.kts index 3b139f2b61b6ad..e5998ddc554d6d 100644 --- a/examples/virtual-device-app/android/App/app/build.gradle.kts +++ b/examples/virtual-device-app/android/App/app/build.gradle.kts @@ -76,6 +76,8 @@ dependencies { implementation(project(":core:data")) implementation(project(":core:domain")) implementation(project(":core:model")) + implementation(project(":core:ui")) + implementation(project(":feature:control")) implementation(project(":feature:main")) implementation(project(":feature:qrcode")) implementation(project(":feature:setup")) diff --git a/examples/virtual-device-app/android/App/app/src/main/AndroidManifest.xml b/examples/virtual-device-app/android/App/app/src/main/AndroidManifest.xml index b971d9fb375a99..b80ba26d85db89 100644 --- a/examples/virtual-device-app/android/App/app/src/main/AndroidManifest.xml +++ b/examples/virtual-device-app/android/App/app/src/main/AndroidManifest.xml @@ -1,11 +1,26 @@ + + + + + + + + + + + () - private val permissions = arrayOf(Manifest.permission.ACCESS_FINE_LOCATION) + private val permissions = + arrayOf( + Manifest.permission.BLUETOOTH_SCAN, + Manifest.permission.BLUETOOTH_ADVERTISE, + Manifest.permission.BLUETOOTH_CONNECT, + Manifest.permission.ACCESS_FINE_LOCATION + ) private val requestMultiplePermissions = registerForActivityResult(ActivityResultContracts.RequestMultiplePermissions()) { permissions -> permissions.entries.forEach { Timber.d("${it.key}:${it.value}") } } + @SuppressLint("BatteryLife") override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) Timber.d("onCreate()") @@ -36,8 +56,40 @@ class MainActivity : AppCompatActivity() { requestMultiplePermissions.launch(permissions) } + val powerManager = applicationContext.getSystemService(POWER_SERVICE) as PowerManager? + powerManager?.let { manager -> + if (!manager.isIgnoringBatteryOptimizations(packageName)) { + Timber.d("not in battery optimization whitelist") + val intent = + Intent().apply { + action = Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS + data = Uri.parse("package:$packageName") + } + startActivity(intent) + } + } + binding = ActivityMainBinding.inflate(layoutInflater) setContentView(binding.root) + + viewModel.uiState.observe( + this, + EventObserver { uiState -> + when (uiState) { + UiState.Waiting -> { + binding.progress.visibility = View.VISIBLE + } + UiState.Exit -> { + binding.progress.visibility = View.GONE + finishAffinity() + } + is UiState.Reset -> { + showFactoryResetPopup(getString(uiState.messageResId), uiState.isCancelable) + } + else -> {} + } + } + ) } override fun onDestroy() { @@ -64,4 +116,28 @@ class MainActivity : AppCompatActivity() { Timber.d("RequestCode:$requestCode") super.onRequestPermissionsResult(requestCode, permissions, grantResults) } + + private fun showFactoryResetPopup(message: String, isCancelable: Boolean) { + val builder = + AlertDialog.Builder(this) + .setTitle("Factory Reset") + .setMessage(message) + .setPositiveButton("Ok") { dialog, _ -> + Timber.d("Ok") + dialog.dismiss() + viewModel.resetMatterAppServer() + } + .setCancelable(false) + + if (isCancelable) { + builder.setNegativeButton("Cancel") { dialog, _ -> + Timber.d("Cancel") + dialog.dismiss() + } + } + + val dialog = builder.create() + dialog.window?.setGravity(Gravity.BOTTOM) + dialog.show() + } } diff --git a/examples/virtual-device-app/android/App/app/src/main/res/navigation/nav_graph.xml b/examples/virtual-device-app/android/App/app/src/main/res/navigation/nav_graph.xml index da2e60563663e2..a5e06ead94b64c 100644 --- a/examples/virtual-device-app/android/App/app/src/main/res/navigation/nav_graph.xml +++ b/examples/virtual-device-app/android/App/app/src/main/res/navigation/nav_graph.xml @@ -7,4 +7,5 @@ + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/common/build.gradle.kts b/examples/virtual-device-app/android/App/core/common/build.gradle.kts index d424108ab919de..949269ded960ed 100644 --- a/examples/virtual-device-app/android/App/core/common/build.gradle.kts +++ b/examples/virtual-device-app/android/App/core/common/build.gradle.kts @@ -52,6 +52,7 @@ dependencies { implementation(Deps.Navigation.fragment) implementation(Deps.Navigation.ui) + implementation(Deps.timber) implementation(Deps.zxing) testImplementation(Deps.Test.junit) diff --git a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt index 78e6649de44b43..2e24a9246888b5 100644 --- a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt +++ b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt @@ -2,6 +2,7 @@ package com.matter.virtual.device.app.core.common import androidx.core.net.toUri import androidx.navigation.NavDeepLinkRequest +import timber.log.Timber object DeepLink { fun getDeepLinkRequestForQrcodeFragment(setting: String): NavDeepLinkRequest { @@ -26,4 +27,17 @@ object DeepLink { ) .build() } + + fun getDeepLinkRequestFromDevice(device: Device, setting: String): NavDeepLinkRequest { + Timber.d("setting:$setting") + val uri = + when (device) { + Device.OnOffSwitch -> + "android-app://com.matter.virtual.device.app.feature.control/onOffSwitchFragment/${setting}" + .toUri() + Device.Unknown -> throw UnsupportedOperationException("Unsupported device") + } + + return NavDeepLinkRequest.Builder.fromUri(uri).build() + } } diff --git a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/Event.kt b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/Event.kt new file mode 100644 index 00000000000000..f9eb734468292a --- /dev/null +++ b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/Event.kt @@ -0,0 +1,25 @@ +package com.matter.virtual.device.app.core.common + +import androidx.lifecycle.Observer + +open class Event(private val content: T) { + var hasBeenHandled = false + private set + + fun getContentIfNotHandled(): T? { + return if (hasBeenHandled) { + null + } else { + hasBeenHandled = true + content + } + } + + fun peekContent(): T = content +} + +class EventObserver(private val onEventUnHandledContent: (T) -> Unit) : Observer> { + override fun onChanged(event: Event?) { + event?.getContentIfNotHandled()?.let { value -> onEventUnHandledContent(value) } + } +} diff --git a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/MatterConstants.kt b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/MatterConstants.kt index 84f26bfca81b68..931bcdab72d84a 100644 --- a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/MatterConstants.kt +++ b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/MatterConstants.kt @@ -3,9 +3,16 @@ package com.matter.virtual.device.app.core.common object MatterConstants { const val DEFAULT_VERSION = 0 const val DEFAULT_VENDOR_ID = 0xFFF1 - const val DEFAULT_PRODUCT_ID = 0x8001 + const val DEFAULT_PRODUCT_ID = 0x8003 const val DEFAULT_COMMISSIONING_FLOW = 0 const val DEFAULT_SETUP_PINCODE = 20202021L const val DEFAULT_DISCRIMINATOR = 3840 const val DEFAULT_DEVICE_NAME = "Matter Device" + const val DEFAULT_ENDPOINT = 1 + + const val TEST_SPAKE2P_VERIFIER = + "uWFwqugDNGiEck/po7KHwwMwwqZgN10XuyBajPGuyzUEV/iree4lOrao5GuwnlQ65CJzbeUB49s31EH+NEkg0JVI5MGCQGMMT/SRPFNRODm3wH/MBiehuFc6FJ/NH6Rmzw==" + const val TEST_SPAKE2P_SALT = "U1BBS0UyUCBLZXkgU2FsdA==" + const val TEST_SPAKE2P_ITERATION_COUNT = 1000 + const val TEST_SETUP_PASSCODE: Long = 20202021 } diff --git a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/sharedpreferences/SharedPreferencesKey.kt b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/sharedpreferences/SharedPreferencesKey.kt new file mode 100644 index 00000000000000..a417aee68a784d --- /dev/null +++ b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/sharedpreferences/SharedPreferencesKey.kt @@ -0,0 +1,7 @@ +package com.matter.virtual.device.app.core.common.sharedpreferences + +object SharedPreferencesKey { + const val COMMISSIONING_DEVICE_COMPLETED = "commissioningDeviceCompleted" + const val COMMISSIONED_DEVICE = "commissionedDevice" + const val COMMISSIONING_SEQUENCE = "commissioningSequence" +} diff --git a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/sharedpreferences/SharedPreferencesManager.kt b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/sharedpreferences/SharedPreferencesManager.kt new file mode 100644 index 00000000000000..2748748c152e86 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/sharedpreferences/SharedPreferencesManager.kt @@ -0,0 +1,59 @@ +package com.matter.virtual.device.app.core.common.sharedpreferences + +import android.content.Context +import android.content.SharedPreferences +import dagger.hilt.android.qualifiers.ApplicationContext +import javax.inject.Inject +import javax.inject.Singleton +import timber.log.Timber + +@Singleton +class SharedPreferencesManager +@Inject +constructor(@ApplicationContext private val context: Context) { + + private val sharedPreferences: SharedPreferences by lazy { + context.getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE) + } + + fun getString(key: String): String { + val value = sharedPreferences.getString(key, DEFAULT_VALUE_STRING) + return value ?: "" + } + + fun setString(key: String, value: String) { + val editor = sharedPreferences.edit() + editor.putString(key, value) + editor.apply() + } + + fun getBoolean(key: String): Boolean { + return sharedPreferences.getBoolean(key, DEFAULT_VALUE_BOOLEAN) + } + + fun setBoolean(key: String, value: Boolean) { + val editor = sharedPreferences.edit() + editor.putBoolean(key, value) + editor.apply() + } + + fun deleteMatterSharedPreferences() { + Timber.d("deleteMatterSharedPreferences()") + if (!context.deleteSharedPreferences(PREFERENCES_NAME_MATTER_KEY_VALUE_STORE)) { + Timber.e("delete failure($PREFERENCES_NAME_MATTER_KEY_VALUE_STORE)") + } + + if (!context.deleteSharedPreferences(PREFERENCES_NAME_MATTER_CONFIGURATION_MANAGER)) { + Timber.e("delete failure($PREFERENCES_NAME_MATTER_CONFIGURATION_MANAGER)") + } + } + + companion object { + private const val PREFERENCES_NAME = "virtualdeviceapp" + private const val PREFERENCES_NAME_MATTER_KEY_VALUE_STORE = "chip.platform.KeyValueStore" + private const val PREFERENCES_NAME_MATTER_CONFIGURATION_MANAGER = + "chip.platform.ConfigurationManager" + private const val DEFAULT_VALUE_STRING = "" + private const val DEFAULT_VALUE_BOOLEAN = false + } +} diff --git a/examples/virtual-device-app/android/App/core/common/src/main/res/values/dimens.xml b/examples/virtual-device-app/android/App/core/common/src/main/res/values/dimens.xml index 755c53609e9b3f..f39212668f9003 100644 --- a/examples/virtual-device-app/android/App/core/common/src/main/res/values/dimens.xml +++ b/examples/virtual-device-app/android/App/core/common/src/main/res/values/dimens.xml @@ -1,9 +1,5 @@ - 350dp - 25sp - 17sp - 10dp 48dp 48dp diff --git a/examples/virtual-device-app/android/App/core/data/build.gradle.kts b/examples/virtual-device-app/android/App/core/data/build.gradle.kts index 43027424737f65..5d724f34d3cca7 100644 --- a/examples/virtual-device-app/android/App/core/data/build.gradle.kts +++ b/examples/virtual-device-app/android/App/core/data/build.gradle.kts @@ -36,14 +36,22 @@ android { kotlinOptions { jvmTarget = "1.8" } + sourceSets { + getByName("main") { + jniLibs.setSrcDirs(listOf("../../app/libs/jniLibs")) + } + } } dependencies { + implementation(fileTree(mapOf("dir" to "../../app/libs", "include" to listOf("*.jar")))) implementation(project(":core:common")) implementation(project(":core:matter")) implementation(project(":core:model")) + implementation(Deps.Kotlin.serialization) + implementation(Deps.Dagger.hiltAndroid) kapt(Deps.Dagger.hiltAndroidCompiler) diff --git a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/di/DataModule.kt b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/di/DataModule.kt index c0352d531da3b5..8168f632c10275 100644 --- a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/di/DataModule.kt +++ b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/di/DataModule.kt @@ -1,9 +1,8 @@ package com.matter.virtual.device.app.core.data.di -import com.matter.virtual.device.app.core.data.repository.MatterRepository -import com.matter.virtual.device.app.core.data.repository.MatterRepositoryImpl -import com.matter.virtual.device.app.core.data.repository.NetworkRepository -import com.matter.virtual.device.app.core.data.repository.NetworkRepositoryImpl +import com.matter.virtual.device.app.core.data.repository.* +import com.matter.virtual.device.app.core.data.repository.cluster.OnOffManagerRepository +import com.matter.virtual.device.app.core.data.repository.cluster.OnOffManagerRepositoryImpl import dagger.Binds import dagger.Module import dagger.hilt.InstallIn @@ -13,7 +12,17 @@ import dagger.hilt.components.SingletonComponent @Module internal abstract class DataModule { + @Binds + abstract fun bindOnOffManagerRepository( + repository: OnOffManagerRepositoryImpl + ): OnOffManagerRepository + @Binds abstract fun bindMatterRepository(repository: MatterRepositoryImpl): MatterRepository @Binds abstract fun bindNetworkRepository(repository: NetworkRepositoryImpl): NetworkRepository + + @Binds + abstract fun bindSharedPreferencesRepository( + repository: SharedPreferencesRepositoryImpl + ): SharedPreferencesRepository } diff --git a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/MatterRepository.kt b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/MatterRepository.kt index 7e436f8208276d..cefb125c066269 100644 --- a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/MatterRepository.kt +++ b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/MatterRepository.kt @@ -1,9 +1,22 @@ package com.matter.virtual.device.app.core.data.repository +import com.matter.virtual.device.app.core.common.MatterSettings import com.matter.virtual.device.app.core.model.Payload interface MatterRepository { fun getQrcodeString(payload: Payload): String fun getManualPairingCodeString(payload: Payload): String + + suspend fun startMatterAppService(matterSettings: MatterSettings) + + suspend fun stopMatterAppService() + + fun reset() + + suspend fun isCommissioningCompleted(): Boolean + + suspend fun isCommissioningSessionEstablishmentStarted(): Boolean + + suspend fun isFabricRemoved(): Boolean } diff --git a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/MatterRepositoryImpl.kt b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/MatterRepositoryImpl.kt index dc6d1cfd73174a..04911eb0758229 100644 --- a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/MatterRepositoryImpl.kt +++ b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/MatterRepositoryImpl.kt @@ -1,11 +1,29 @@ package com.matter.virtual.device.app.core.data.repository -import com.matter.virtual.device.app.core.matter.MatterApi +import android.app.ActivityManager +import android.content.Context +import android.content.Intent +import android.os.Build +import com.matter.virtual.device.app.core.common.MatterSettings +import com.matter.virtual.device.app.core.matter.* import com.matter.virtual.device.app.core.model.Payload +import dagger.hilt.android.qualifiers.ApplicationContext import javax.inject.Inject +import kotlin.coroutines.resume +import kotlinx.coroutines.suspendCancellableCoroutine +import kotlinx.coroutines.withTimeout +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.encodeToString +import kotlinx.serialization.json.Json +import timber.log.Timber -internal class MatterRepositoryImpl @Inject constructor(private val matterApi: MatterApi) : - MatterRepository { +internal class MatterRepositoryImpl +@Inject +constructor( + @ApplicationContext private val context: Context, + private val matterApi: MatterApi, + private val matterApp: MatterApp +) : MatterRepository { override fun getQrcodeString(payload: Payload): String { return matterApi.getQrcodeString(payload) @@ -14,4 +32,123 @@ internal class MatterRepositoryImpl @Inject constructor(private val matterApi: M override fun getManualPairingCodeString(payload: Payload): String { return matterApi.getManualPairingCodeString(payload) } + + @OptIn(ExperimentalSerializationApi::class) + override suspend fun startMatterAppService(matterSettings: MatterSettings) { + Timber.d("startMatterAppService():$matterSettings") + + if (!isMatterAppServiceRunning()) { + val intent = + Intent(context, MatterAppService::class.java).apply { + this.action = MatterAppServiceConstants.ACTION_START_MATTER_APP_SERVICE + val jsonSettings = Json.encodeToString(matterSettings) + this.putExtra("setting", jsonSettings) + } + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + context.startForegroundService(intent) + } else { + context.startService(intent) + } + } + } + + override suspend fun stopMatterAppService() { + Timber.d("stopMatterAppService()") + + if (isMatterAppServiceRunning()) { + val intent = + Intent(context, MatterAppService::class.java).apply { + this.action = MatterAppServiceConstants.ACTION_STOP_MATTER_APP_SERVICE + } + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + context.startForegroundService(intent) + } else { + context.startService(intent) + } + } + } + + override fun reset() { + Timber.d("reset()") + matterApp.reset() + } + + override suspend fun isCommissioningCompleted() = + withTimeout(300000) { + suspendCancellableCoroutine { cancellableContinuation -> + Timber.d("isCommissioningCompleted()") + val deviceEventCallback = + object : MatterDeviceEventCallback { + override fun onCommissioningCompleted() { + Timber.d("onCommissioningCompleted()") + if (cancellableContinuation.isActive) { + cancellableContinuation.resume(true) + } + } + } + + matterApp.addDeviceEventCallback(deviceEventCallback) + + cancellableContinuation.invokeOnCancellation { + matterApp.removeDeviceEventCallback(deviceEventCallback) + } + } + } + + override suspend fun isCommissioningSessionEstablishmentStarted() = + suspendCancellableCoroutine { cancellableContinuation -> + Timber.d("isCommissioningSessionEstablishmentStarted()") + val deviceEventCallback = + object : MatterDeviceEventCallback { + override fun onCommissioningSessionEstablishmentStarted() { + Timber.d("onCommissioningSessionEstablishmentStarted()") + if (cancellableContinuation.isActive) { + cancellableContinuation.resume(true) + } + } + } + + matterApp.addDeviceEventCallback(deviceEventCallback) + + cancellableContinuation.invokeOnCancellation { + matterApp.removeDeviceEventCallback(deviceEventCallback) + } + } + + override suspend fun isFabricRemoved() = suspendCancellableCoroutine { cancellableContinuation -> + Timber.d("isFabricRemoved()") + val deviceEventCallback = + object : MatterDeviceEventCallback { + override fun onFabricRemoved() { + Timber.d("onFabricRemoved()") + if (cancellableContinuation.isActive) { + cancellableContinuation.resume(true) + } + } + } + + matterApp.addDeviceEventCallback(deviceEventCallback) + + cancellableContinuation.invokeOnCancellation { + matterApp.removeDeviceEventCallback(deviceEventCallback) + } + } + + private fun isMatterAppServiceRunning(): Boolean { + val activityManager = context.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager? + activityManager?.let { + it.getRunningServices(Integer.MAX_VALUE).forEach { serviceInfo -> + Timber.d("${serviceInfo.service.className}:${MatterAppService::class.java.name}") + if (serviceInfo.service.className == MatterAppService::class.java.name) { + Timber.d("true") + return true + } + } + } + + Timber.d("false") + return false + } } diff --git a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/SharedPreferencesRepository.kt b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/SharedPreferencesRepository.kt new file mode 100644 index 00000000000000..20451881821664 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/SharedPreferencesRepository.kt @@ -0,0 +1,19 @@ +package com.matter.virtual.device.app.core.data.repository + +import com.matter.virtual.device.app.core.common.Device + +interface SharedPreferencesRepository { + suspend fun isCommissioningDeviceCompleted(): Boolean + + suspend fun setCommissioningDeviceCompleted(value: Boolean) + + suspend fun getCommissionedDevice(): Device + + suspend fun setCommissionedDevice(device: Device) + + suspend fun deleteMatterSharedPreferences() + + suspend fun setCommissioningSequence(value: Boolean) + + suspend fun isCommissioningSequence(): Boolean +} diff --git a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/SharedPreferencesRepositoryImpl.kt b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/SharedPreferencesRepositoryImpl.kt new file mode 100644 index 00000000000000..9da11f0d23bf98 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/SharedPreferencesRepositoryImpl.kt @@ -0,0 +1,40 @@ +package com.matter.virtual.device.app.core.data.repository + +import com.matter.virtual.device.app.core.common.Device +import com.matter.virtual.device.app.core.common.sharedpreferences.SharedPreferencesKey +import com.matter.virtual.device.app.core.common.sharedpreferences.SharedPreferencesManager +import javax.inject.Inject + +internal class SharedPreferencesRepositoryImpl +@Inject +constructor(private val sharedPreferencesManager: SharedPreferencesManager) : + SharedPreferencesRepository { + + override suspend fun isCommissioningDeviceCompleted(): Boolean { + return sharedPreferencesManager.getBoolean(SharedPreferencesKey.COMMISSIONING_DEVICE_COMPLETED) + } + + override suspend fun setCommissioningDeviceCompleted(value: Boolean) { + sharedPreferencesManager.setBoolean(SharedPreferencesKey.COMMISSIONING_DEVICE_COMPLETED, value) + } + + override suspend fun getCommissionedDevice(): Device { + return Device.map(sharedPreferencesManager.getString(SharedPreferencesKey.COMMISSIONED_DEVICE)) + } + + override suspend fun setCommissionedDevice(device: Device) { + sharedPreferencesManager.setString(SharedPreferencesKey.COMMISSIONED_DEVICE, device.title) + } + + override suspend fun deleteMatterSharedPreferences() { + sharedPreferencesManager.deleteMatterSharedPreferences() + } + + override suspend fun setCommissioningSequence(value: Boolean) { + sharedPreferencesManager.setBoolean(SharedPreferencesKey.COMMISSIONING_SEQUENCE, value) + } + + override suspend fun isCommissioningSequence(): Boolean { + return sharedPreferencesManager.getBoolean(SharedPreferencesKey.COMMISSIONING_SEQUENCE) + } +} diff --git a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/OnOffManagerRepository.kt b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/OnOffManagerRepository.kt new file mode 100644 index 00000000000000..5b168469bbea53 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/OnOffManagerRepository.kt @@ -0,0 +1,9 @@ +package com.matter.virtual.device.app.core.data.repository.cluster + +import kotlinx.coroutines.flow.StateFlow + +interface OnOffManagerRepository { + fun getOnOffFlow(): StateFlow + + suspend fun setOnOff(value: Boolean) +} diff --git a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/OnOffManagerRepositoryImpl.kt b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/OnOffManagerRepositoryImpl.kt new file mode 100644 index 00000000000000..33f9113c00778e --- /dev/null +++ b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/OnOffManagerRepositoryImpl.kt @@ -0,0 +1,21 @@ +package com.matter.virtual.device.app.core.data.repository.cluster + +import com.matter.virtual.device.app.core.matter.manager.OnOffManagerStub +import javax.inject.Inject +import kotlinx.coroutines.flow.StateFlow +import timber.log.Timber + +internal class OnOffManagerRepositoryImpl +@Inject +constructor(private val onOffManagerStub: OnOffManagerStub) : OnOffManagerRepository { + + override fun getOnOffFlow(): StateFlow { + Timber.d("Hit") + return onOffManagerStub.onOff + } + + override suspend fun setOnOff(value: Boolean) { + Timber.d("value:$value") + onOffManagerStub.setOnOff(value) + } +} diff --git a/examples/virtual-device-app/android/App/core/domain/build.gradle.kts b/examples/virtual-device-app/android/App/core/domain/build.gradle.kts index 6cc2a239897333..ef6313020146c0 100644 --- a/examples/virtual-device-app/android/App/core/domain/build.gradle.kts +++ b/examples/virtual-device-app/android/App/core/domain/build.gradle.kts @@ -45,6 +45,7 @@ dependencies { implementation(Deps.Kotlin.coroutinesCore) implementation(Deps.inject) + implementation(Deps.timber) testImplementation(Deps.Test.junit) androidTestImplementation(Deps.Test.junitExt) diff --git a/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/IsCommissioningCompletedUseCase.kt b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/IsCommissioningCompletedUseCase.kt new file mode 100644 index 00000000000000..d7cfb92c85d6cb --- /dev/null +++ b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/IsCommissioningCompletedUseCase.kt @@ -0,0 +1,28 @@ +package com.matter.virtual.device.app.core.domain.usecase.matter + +import com.matter.virtual.device.app.core.common.di.IoDispatcher +import com.matter.virtual.device.app.core.data.repository.MatterRepository +import com.matter.virtual.device.app.core.domain.NonParamCoroutineUseCase +import javax.inject.Inject +import kotlinx.coroutines.CoroutineDispatcher +import timber.log.Timber + +class IsCommissioningCompletedUseCase +@Inject +constructor( + private val matterRepository: MatterRepository, + @IoDispatcher dispatcher: CoroutineDispatcher +) : NonParamCoroutineUseCase(dispatcher) { + + override suspend fun execute(): Boolean { + var result = false + + runCatching { result = matterRepository.isCommissioningCompleted() } + .onFailure { + Timber.e(it, "error") + result = false + } + + return result + } +} diff --git a/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/IsCommissioningSessionEstablishmentStarted.kt b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/IsCommissioningSessionEstablishmentStarted.kt new file mode 100644 index 00000000000000..ad666f1a9d23c5 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/IsCommissioningSessionEstablishmentStarted.kt @@ -0,0 +1,19 @@ +package com.matter.virtual.device.app.core.domain.usecase.matter + +import com.matter.virtual.device.app.core.common.di.IoDispatcher +import com.matter.virtual.device.app.core.data.repository.MatterRepository +import com.matter.virtual.device.app.core.domain.NonParamCoroutineUseCase +import javax.inject.Inject +import kotlinx.coroutines.CoroutineDispatcher + +class IsCommissioningSessionEstablishmentStarted +@Inject +constructor( + private val matterRepository: MatterRepository, + @IoDispatcher dispatcher: CoroutineDispatcher +) : NonParamCoroutineUseCase(dispatcher) { + + override suspend fun execute(): Boolean { + return matterRepository.isCommissioningSessionEstablishmentStarted() + } +} diff --git a/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/IsFabricRemovedUseCase.kt b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/IsFabricRemovedUseCase.kt new file mode 100644 index 00000000000000..0bf063b4205ecb --- /dev/null +++ b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/IsFabricRemovedUseCase.kt @@ -0,0 +1,19 @@ +package com.matter.virtual.device.app.core.domain.usecase.matter + +import com.matter.virtual.device.app.core.common.di.IoDispatcher +import com.matter.virtual.device.app.core.data.repository.MatterRepository +import com.matter.virtual.device.app.core.domain.NonParamCoroutineUseCase +import javax.inject.Inject +import kotlinx.coroutines.CoroutineDispatcher + +class IsFabricRemovedUseCase +@Inject +constructor( + private val matterRepository: MatterRepository, + @IoDispatcher dispatcher: CoroutineDispatcher +) : NonParamCoroutineUseCase(dispatcher) { + + override suspend fun execute(): Boolean { + return matterRepository.isFabricRemoved() + } +} diff --git a/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/ResetMatterAppUseCase.kt b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/ResetMatterAppUseCase.kt new file mode 100644 index 00000000000000..1275a33a182380 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/ResetMatterAppUseCase.kt @@ -0,0 +1,25 @@ +package com.matter.virtual.device.app.core.domain.usecase.matter + +import com.matter.virtual.device.app.core.common.di.IoDispatcher +import com.matter.virtual.device.app.core.data.repository.MatterRepository +import com.matter.virtual.device.app.core.data.repository.SharedPreferencesRepository +import com.matter.virtual.device.app.core.domain.NonParamCoroutineUseCase +import javax.inject.Inject +import kotlinx.coroutines.CoroutineDispatcher + +class ResetMatterAppUseCase +@Inject +constructor( + private val matterRepository: MatterRepository, + private val sharedPreferencesRepository: SharedPreferencesRepository, + @IoDispatcher dispatcher: CoroutineDispatcher +) : NonParamCoroutineUseCase(dispatcher) { + + override suspend fun execute() { + matterRepository.reset() + matterRepository.stopMatterAppService() + sharedPreferencesRepository.deleteMatterSharedPreferences() + sharedPreferencesRepository.setCommissioningDeviceCompleted(false) + sharedPreferencesRepository.setCommissioningSequence(false) + } +} diff --git a/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/StartMatterAppServiceUseCase.kt b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/StartMatterAppServiceUseCase.kt new file mode 100644 index 00000000000000..9f8bfb24368cca --- /dev/null +++ b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/StartMatterAppServiceUseCase.kt @@ -0,0 +1,20 @@ +package com.matter.virtual.device.app.core.domain.usecase.matter + +import com.matter.virtual.device.app.core.common.MatterSettings +import com.matter.virtual.device.app.core.common.di.IoDispatcher +import com.matter.virtual.device.app.core.data.repository.MatterRepository +import com.matter.virtual.device.app.core.domain.CoroutineUseCase +import javax.inject.Inject +import kotlinx.coroutines.CoroutineDispatcher + +class StartMatterAppServiceUseCase +@Inject +constructor( + private val matterRepository: MatterRepository, + @IoDispatcher dispatcher: CoroutineDispatcher +) : CoroutineUseCase(dispatcher) { + + override suspend fun execute(param: MatterSettings) { + matterRepository.startMatterAppService(param) + } +} diff --git a/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/cluster/GetOnOffFlowUseCase.kt b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/cluster/GetOnOffFlowUseCase.kt new file mode 100644 index 00000000000000..02685602405674 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/cluster/GetOnOffFlowUseCase.kt @@ -0,0 +1,11 @@ +package com.matter.virtual.device.app.core.domain.usecase.matter.cluster + +import com.matter.virtual.device.app.core.data.repository.cluster.OnOffManagerRepository +import javax.inject.Inject +import kotlinx.coroutines.flow.StateFlow + +class GetOnOffFlowUseCase +@Inject +constructor(private val onOffManagerRepository: OnOffManagerRepository) { + operator fun invoke(): StateFlow = onOffManagerRepository.getOnOffFlow() +} diff --git a/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/cluster/SetOnOffUseCase.kt b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/cluster/SetOnOffUseCase.kt new file mode 100644 index 00000000000000..3a147fa5e897d3 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/matter/cluster/SetOnOffUseCase.kt @@ -0,0 +1,19 @@ +package com.matter.virtual.device.app.core.domain.usecase.matter.cluster + +import com.matter.virtual.device.app.core.common.di.IoDispatcher +import com.matter.virtual.device.app.core.data.repository.cluster.OnOffManagerRepository +import com.matter.virtual.device.app.core.domain.CoroutineUseCase +import javax.inject.Inject +import kotlinx.coroutines.CoroutineDispatcher + +class SetOnOffUseCase +@Inject +constructor( + private val onOffManagerRepository: OnOffManagerRepository, + @IoDispatcher dispatcher: CoroutineDispatcher +) : CoroutineUseCase(dispatcher) { + + override suspend fun execute(param: Boolean) { + onOffManagerRepository.setOnOff(param) + } +} diff --git a/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/GetCommissionedDeviceUseCase.kt b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/GetCommissionedDeviceUseCase.kt new file mode 100644 index 00000000000000..6ae545ac51b6b1 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/GetCommissionedDeviceUseCase.kt @@ -0,0 +1,20 @@ +package com.matter.virtual.device.app.core.domain.usecase.sharedpreferences + +import com.matter.virtual.device.app.core.common.Device +import com.matter.virtual.device.app.core.common.di.IoDispatcher +import com.matter.virtual.device.app.core.data.repository.SharedPreferencesRepository +import com.matter.virtual.device.app.core.domain.NonParamCoroutineUseCase +import javax.inject.Inject +import kotlinx.coroutines.CoroutineDispatcher + +class GetCommissionedDeviceUseCase +@Inject +constructor( + private val sharedPreferencesRepository: SharedPreferencesRepository, + @IoDispatcher dispatcher: CoroutineDispatcher +) : NonParamCoroutineUseCase(dispatcher) { + + override suspend fun execute(): Device { + return sharedPreferencesRepository.getCommissionedDevice() + } +} diff --git a/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/IsCommissioningDeviceCompletedUseCase.kt b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/IsCommissioningDeviceCompletedUseCase.kt new file mode 100644 index 00000000000000..7aa55f6f635d10 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/IsCommissioningDeviceCompletedUseCase.kt @@ -0,0 +1,19 @@ +package com.matter.virtual.device.app.core.domain.usecase.sharedpreferences + +import com.matter.virtual.device.app.core.common.di.IoDispatcher +import com.matter.virtual.device.app.core.data.repository.SharedPreferencesRepository +import com.matter.virtual.device.app.core.domain.NonParamCoroutineUseCase +import javax.inject.Inject +import kotlinx.coroutines.CoroutineDispatcher + +class IsCommissioningDeviceCompletedUseCase +@Inject +constructor( + private val sharedPreferencesRepository: SharedPreferencesRepository, + @IoDispatcher dispatcher: CoroutineDispatcher +) : NonParamCoroutineUseCase(dispatcher) { + + override suspend fun execute(): Boolean { + return sharedPreferencesRepository.isCommissioningDeviceCompleted() + } +} diff --git a/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/IsCommissioningSequenceUseCase.kt b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/IsCommissioningSequenceUseCase.kt new file mode 100644 index 00000000000000..ae8dff2ff9b7ce --- /dev/null +++ b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/IsCommissioningSequenceUseCase.kt @@ -0,0 +1,19 @@ +package com.matter.virtual.device.app.core.domain.usecase.sharedpreferences + +import com.matter.virtual.device.app.core.common.di.IoDispatcher +import com.matter.virtual.device.app.core.data.repository.SharedPreferencesRepository +import com.matter.virtual.device.app.core.domain.NonParamCoroutineUseCase +import javax.inject.Inject +import kotlinx.coroutines.CoroutineDispatcher + +class IsCommissioningSequenceUseCase +@Inject +constructor( + private val sharedPreferencesRepository: SharedPreferencesRepository, + @IoDispatcher dispatcher: CoroutineDispatcher +) : NonParamCoroutineUseCase(dispatcher) { + + override suspend fun execute(): Boolean { + return sharedPreferencesRepository.isCommissioningSequence() + } +} diff --git a/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/SetCommissionedDeviceUseCase.kt b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/SetCommissionedDeviceUseCase.kt new file mode 100644 index 00000000000000..223c5824f62f55 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/SetCommissionedDeviceUseCase.kt @@ -0,0 +1,20 @@ +package com.matter.virtual.device.app.core.domain.usecase.sharedpreferences + +import com.matter.virtual.device.app.core.common.Device +import com.matter.virtual.device.app.core.common.di.MainImmediateDispatcher +import com.matter.virtual.device.app.core.data.repository.SharedPreferencesRepository +import com.matter.virtual.device.app.core.domain.CoroutineUseCase +import javax.inject.Inject +import kotlinx.coroutines.CoroutineDispatcher + +class SetCommissionedDeviceUseCase +@Inject +constructor( + private val sharedPreferencesRepository: SharedPreferencesRepository, + @MainImmediateDispatcher dispatcher: CoroutineDispatcher +) : CoroutineUseCase(dispatcher) { + + override suspend fun execute(param: Device) { + sharedPreferencesRepository.setCommissionedDevice(param) + } +} diff --git a/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/SetCommissioningDeviceCompletedUseCase.kt b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/SetCommissioningDeviceCompletedUseCase.kt new file mode 100644 index 00000000000000..c6d4bcd484dbea --- /dev/null +++ b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/SetCommissioningDeviceCompletedUseCase.kt @@ -0,0 +1,19 @@ +package com.matter.virtual.device.app.core.domain.usecase.sharedpreferences + +import com.matter.virtual.device.app.core.common.di.MainImmediateDispatcher +import com.matter.virtual.device.app.core.data.repository.SharedPreferencesRepository +import com.matter.virtual.device.app.core.domain.CoroutineUseCase +import javax.inject.Inject +import kotlinx.coroutines.CoroutineDispatcher + +class SetCommissioningDeviceCompletedUseCase +@Inject +constructor( + private val sharedPreferencesRepository: SharedPreferencesRepository, + @MainImmediateDispatcher dispatcher: CoroutineDispatcher +) : CoroutineUseCase(dispatcher) { + + override suspend fun execute(param: Boolean) { + sharedPreferencesRepository.setCommissioningDeviceCompleted(param) + } +} diff --git a/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/SetCommissioningSequenceFlagUseCase.kt b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/SetCommissioningSequenceFlagUseCase.kt new file mode 100644 index 00000000000000..e748dba04fdcf1 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/domain/src/main/java/com/matter/virtual/device/app/core/domain/usecase/sharedpreferences/SetCommissioningSequenceFlagUseCase.kt @@ -0,0 +1,19 @@ +package com.matter.virtual.device.app.core.domain.usecase.sharedpreferences + +import com.matter.virtual.device.app.core.common.di.MainImmediateDispatcher +import com.matter.virtual.device.app.core.data.repository.SharedPreferencesRepository +import com.matter.virtual.device.app.core.domain.CoroutineUseCase +import javax.inject.Inject +import kotlinx.coroutines.CoroutineDispatcher + +class SetCommissioningSequenceFlagUseCase +@Inject +constructor( + private val sharedPreferencesRepository: SharedPreferencesRepository, + @MainImmediateDispatcher dispatcher: CoroutineDispatcher +) : CoroutineUseCase(dispatcher) { + + override suspend fun execute(param: Boolean) { + sharedPreferencesRepository.setCommissioningSequence(param) + } +} diff --git a/examples/virtual-device-app/android/App/core/matter/build.gradle.kts b/examples/virtual-device-app/android/App/core/matter/build.gradle.kts index 9f94201ac02cf8..c96acdae05c95c 100644 --- a/examples/virtual-device-app/android/App/core/matter/build.gradle.kts +++ b/examples/virtual-device-app/android/App/core/matter/build.gradle.kts @@ -49,6 +49,8 @@ dependencies { implementation(project(":core:common")) implementation(project(":core:model")) + implementation(Deps.Kotlin.serialization) + implementation(Deps.Dagger.hiltAndroid) kapt(Deps.Dagger.hiltAndroidCompiler) diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/AndroidManifest.xml b/examples/virtual-device-app/android/App/core/matter/src/main/AndroidManifest.xml index a5918e68abcdde..64ad6960a62c3f 100644 --- a/examples/virtual-device-app/android/App/core/matter/src/main/AndroidManifest.xml +++ b/examples/virtual-device-app/android/App/core/matter/src/main/AndroidManifest.xml @@ -1,4 +1,5 @@ - + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt index 3b38261bf85496..d48b44cbc64dd5 100644 --- a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt @@ -1,22 +1,113 @@ package com.matter.virtual.device.app.core.matter +import android.content.Context import chip.appserver.ChipAppServer import chip.appserver.ChipAppServerDelegate +import chip.platform.* +import com.matter.virtual.device.app.Clusters +import com.matter.virtual.device.app.DeviceApp +import com.matter.virtual.device.app.DeviceAppCallback +import com.matter.virtual.device.app.DeviceEventType +import com.matter.virtual.device.app.core.common.MatterConstants +import com.matter.virtual.device.app.core.common.MatterSettings +import com.matter.virtual.device.app.core.matter.manager.OnOffManagerStub +import dagger.hilt.android.qualifiers.ApplicationContext import javax.inject.Inject import javax.inject.Singleton import timber.log.Timber @Singleton -class MatterApp @Inject constructor() { +class MatterApp +@Inject +constructor( + @ApplicationContext private val context: Context, + private val deviceApp: DeviceApp, + private val onOffManagerStub: OnOffManagerStub +) { + private var androidChipPlatform: AndroidChipPlatform? = null private var chipAppServer: ChipAppServer? = null + private val deviceEventCallbackList = ArrayList() + + fun start(matterSettings: MatterSettings) { + Timber.d("start():$matterSettings") + + deviceApp.setCallback( + object : DeviceAppCallback { + override fun onClusterInit(app: DeviceApp, clusterId: Long, endpoint: Int) { + Timber.d("onClusterInit():clusterId:$clusterId,endpoint:$endpoint") + when (clusterId) { + Clusters.ClusterId_OnOff -> { + app.setOnOffManager(endpoint, onOffManagerStub) + onOffManagerStub.initAttributeValue() + } + } + } + + override fun onEvent(event: Long) { + Timber.d("onEvent():event:$event") + + when (event) { + DeviceEventType.EventId_DnssdInitialized -> { + Timber.d("DNS-SD Platform Initialized") + } + DeviceEventType.EventId_CHIPoBLEConnectionEstablished -> { + Timber.d("BLE Connection Established") + } + DeviceEventType.EventId_CommissioningComplete -> { + Timber.d("Commissioning Complete") + deviceEventCallbackList.forEach { callback -> callback.onCommissioningCompleted() } + } + DeviceEventType.EventId_FabricRemoved -> { + Timber.d("Fabric Removed") + deviceEventCallbackList.forEach { callback -> callback.onFabricRemoved() } + } + } + } + } + ) + + val preferencesConfigurationManager = PreferencesConfigurationManager(context) + // Write discriminator + try { + preferencesConfigurationManager.writeConfigValueLong( + ConfigurationManager.kConfigNamespace_ChipFactory, + ConfigurationManager.kConfigKey_SetupDiscriminator, + matterSettings.discriminator.toLong() + ) + } catch (e: AndroidChipPlatformException) { + e.printStackTrace() + } + + androidChipPlatform = + AndroidChipPlatform( + AndroidBleManager(), + PreferencesKeyValueStoreManager(context), + preferencesConfigurationManager, + NsdManagerServiceResolver(context), + NsdManagerServiceBrowser(context), + ChipMdnsCallbackImpl(), + DiagnosticDataProviderImpl(context) + ) + + androidChipPlatform?.updateCommissionableDataProviderData( + MatterConstants.TEST_SPAKE2P_VERIFIER, + MatterConstants.TEST_SPAKE2P_SALT, + MatterConstants.TEST_SPAKE2P_ITERATION_COUNT, + MatterConstants.TEST_SETUP_PASSCODE, + matterSettings.discriminator + ) + + deviceApp.preServerInit() - fun start() { chipAppServer = ChipAppServer() chipAppServer?.startAppWithDelegate( object : ChipAppServerDelegate { override fun onCommissioningSessionEstablishmentStarted() { Timber.d("onCommissioningSessionEstablishmentStarted()") + deviceEventCallbackList.forEach { callback -> + callback.onCommissioningSessionEstablishmentStarted() + } } override fun onCommissioningSessionStarted() { @@ -25,6 +116,9 @@ class MatterApp @Inject constructor() { override fun onCommissioningSessionEstablishmentError(errorCode: Int) { Timber.d("onCommissioningSessionEstablishmentError():$errorCode") + deviceEventCallbackList.forEach { callback -> + callback.onCommissioningSessionEstablishmentError(errorCode) + } } override fun onCommissioningSessionStopped() { @@ -40,6 +134,8 @@ class MatterApp @Inject constructor() { } } ) + + deviceApp.postServerInit(matterSettings.device.deviceTypeId.toInt()) } fun stop() { @@ -49,4 +145,20 @@ class MatterApp @Inject constructor() { fun reset() { chipAppServer?.resetApp() } + + fun addDeviceEventCallback(deviceEventCallback: MatterDeviceEventCallback) { + Timber.d("Hit") + if (!this.deviceEventCallbackList.contains(deviceEventCallback)) { + Timber.d("Add") + this.deviceEventCallbackList.add(deviceEventCallback) + } + } + + fun removeDeviceEventCallback(deviceEventCallback: MatterDeviceEventCallback) { + Timber.d("Hit") + if (this.deviceEventCallbackList.contains(deviceEventCallback)) { + Timber.d("Remove") + this.deviceEventCallbackList.remove(deviceEventCallback) + } + } } diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppService.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppService.kt index 0bcbee73e5fcd2..cf78e9f36046bc 100644 --- a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppService.kt +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppService.kt @@ -8,12 +8,19 @@ import android.content.Intent import android.os.Build import android.os.IBinder import androidx.core.app.NotificationCompat +import com.matter.virtual.device.app.core.common.MatterSettings import dagger.hilt.android.AndroidEntryPoint +import javax.inject.Inject +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.decodeFromString +import kotlinx.serialization.json.Json import timber.log.Timber @AndroidEntryPoint class MatterAppService : Service() { + @Inject lateinit var matterApp: MatterApp + override fun onCreate() { super.onCreate() Timber.d("onCreate()") @@ -29,17 +36,24 @@ class MatterAppService : Service() { return null } + @OptIn(ExperimentalSerializationApi::class) override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { - Timber.d("Hit") + Timber.d("onStartCommand()") intent?.let { when (it.action) { MatterAppServiceConstants.ACTION_START_MATTER_APP_SERVICE -> { Timber.i("Start matter app service") startService() + val jsonSetting = it.getStringExtra("setting") + jsonSetting?.let { + val matterSettings = Json.decodeFromString(jsonSetting) + startApp(matterSettings) + } } MatterAppServiceConstants.ACTION_STOP_MATTER_APP_SERVICE -> { Timber.i("Stop matter app service") + stopApp() stopService() } else -> {} @@ -69,7 +83,7 @@ class MatterAppService : Service() { } private fun startService() { - Timber.d("Hit") + Timber.d("startService()") createNotificationChannel() @@ -84,9 +98,19 @@ class MatterAppService : Service() { } private fun stopService() { - Timber.d("Hit") + Timber.d("stopService()") cancelNotificationChannel() stopForeground(true) stopSelf() } + + private fun startApp(matterSettings: MatterSettings) { + Timber.d("startApp()") + matterApp.start(matterSettings) + } + + private fun stopApp() { + Timber.d("stopApp()") + matterApp.stop() + } } diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterDeviceEventCallback.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterDeviceEventCallback.kt new file mode 100644 index 00000000000000..abf3d8d7230243 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterDeviceEventCallback.kt @@ -0,0 +1,15 @@ +package com.matter.virtual.device.app.core.matter + +import timber.log.Timber + +interface MatterDeviceEventCallback { + fun onCommissioningCompleted() = Timber.d("onCommissioningCompleted") + + fun onCommissioningSessionEstablishmentStarted() = + Timber.d("onCommissioningSessionEstablishmentStarted") + + fun onCommissioningSessionEstablishmentError(errorCode: Int) = + Timber.e("onCommissioningSessionEstablishmentError:$errorCode") + + fun onFabricRemoved() = Timber.d("onFabricRemoved") +} diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/di/MatterModule.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/di/MatterModule.kt new file mode 100644 index 00000000000000..027530830db428 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/di/MatterModule.kt @@ -0,0 +1,15 @@ +package com.matter.virtual.device.app.core.matter.di + +import com.matter.virtual.device.app.DeviceApp +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@InstallIn(SingletonComponent::class) +@Module +internal object MatterModule { + + @Provides @Singleton fun provideDeviceApp(): DeviceApp = DeviceApp() +} diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/manager/OnOffManagerStub.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/manager/OnOffManagerStub.kt new file mode 100644 index 00000000000000..267c9537b7492b --- /dev/null +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/manager/OnOffManagerStub.kt @@ -0,0 +1,34 @@ +package com.matter.virtual.device.app.core.matter.manager + +import com.matter.virtual.device.app.DeviceApp +import com.matter.virtual.device.app.OnOffManager +import com.matter.virtual.device.app.core.common.MatterConstants +import javax.inject.Inject +import javax.inject.Singleton +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import timber.log.Timber + +@Singleton +class OnOffManagerStub @Inject constructor(private val deviceApp: DeviceApp) : OnOffManager { + + private val _onOff = MutableStateFlow(false) + val onOff: StateFlow + get() = _onOff + + override fun initAttributeValue() { + Timber.d("initAttributeValue()") + deviceApp.setOnOff(MatterConstants.DEFAULT_ENDPOINT, onOff.value) + } + + override fun handleOnOffChanged(value: Boolean) { + Timber.d("value:$value") + _onOff.value = value + } + + fun setOnOff(value: Boolean) { + Timber.d("value:$value") + _onOff.value = value + deviceApp.setOnOff(MatterConstants.DEFAULT_ENDPOINT, value) + } +} diff --git a/examples/virtual-device-app/android/App/core/model/build.gradle.kts b/examples/virtual-device-app/android/App/core/model/build.gradle.kts index d51ec3d4154ea2..73ee82705c56a4 100644 --- a/examples/virtual-device-app/android/App/core/model/build.gradle.kts +++ b/examples/virtual-device-app/android/App/core/model/build.gradle.kts @@ -38,6 +38,9 @@ android { dependencies { + implementation(Deps.AndroidX.core) + implementation(Deps.AndroidX.Lifecycle.livedata) + testImplementation(Deps.Test.junit) androidTestImplementation(Deps.Test.junitExt) androidTestImplementation(Deps.Test.espresso) diff --git a/examples/virtual-device-app/android/App/core/model/src/main/java/com/matter/virtual/device/app/core/model/databinding/ButtonData.kt b/examples/virtual-device-app/android/App/core/model/src/main/java/com/matter/virtual/device/app/core/model/databinding/ButtonData.kt new file mode 100644 index 00000000000000..5101ea8c05534f --- /dev/null +++ b/examples/virtual-device-app/android/App/core/model/src/main/java/com/matter/virtual/device/app/core/model/databinding/ButtonData.kt @@ -0,0 +1,10 @@ +package com.matter.virtual.device.app.core.model.databinding + +import androidx.annotation.StringRes +import androidx.lifecycle.LiveData + +data class ButtonData( + val onOff: LiveData, + @StringRes val onText: Int, + @StringRes val offText: Int +) diff --git a/examples/virtual-device-app/android/App/core/ui/.gitignore b/examples/virtual-device-app/android/App/core/ui/.gitignore new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/examples/virtual-device-app/android/App/core/ui/build.gradle.kts b/examples/virtual-device-app/android/App/core/ui/build.gradle.kts new file mode 100644 index 00000000000000..27cf142a1b85e2 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/build.gradle.kts @@ -0,0 +1,67 @@ +import com.matter.buildsrc.Deps +import com.matter.buildsrc.Versions + +plugins { + id("com.android.library") + id("org.jetbrains.kotlin.android") + id("com.google.dagger.hilt.android") + kotlin("kapt") +} + +android { + namespace = "com.matter.virtual.device.app.core.ui" + compileSdk = Versions.compileSdkVersion + + defaultConfig { + minSdk = Versions.minSdkVersion + targetSdk = Versions.targetSdkVersion + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = "1.8" + } + buildFeatures { + viewBinding = true + dataBinding = true + } +} + +dependencies { + + implementation(project(":core:common")) + implementation(project(":core:domain")) + implementation(project(":core:model")) + + implementation(Deps.AndroidX.core) + implementation(Deps.AndroidX.appcompat) + implementation(Deps.AndroidX.fragment) + implementation(Deps.AndroidX.Lifecycle.viewmodel) + implementation(Deps.material) + + implementation(Deps.Kotlin.serialization) + + implementation(Deps.Dagger.hiltAndroid) + kapt(Deps.Dagger.hiltAndroidCompiler) + + implementation(Deps.timber) + + testImplementation(Deps.Test.junit) + androidTestImplementation(Deps.Test.junitExt) + androidTestImplementation(Deps.Test.espresso) +} \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/ui/proguard-rules.pro b/examples/virtual-device-app/android/App/core/ui/proguard-rules.pro new file mode 100644 index 00000000000000..481bb434814107 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/ui/src/androidTest/java/com/matter/virtual/device/app/core/ui/ExampleInstrumentedTest.kt b/examples/virtual-device-app/android/App/core/ui/src/androidTest/java/com/matter/virtual/device/app/core/ui/ExampleInstrumentedTest.kt new file mode 100644 index 00000000000000..ba6f86d1419bdb --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/androidTest/java/com/matter/virtual/device/app/core/ui/ExampleInstrumentedTest.kt @@ -0,0 +1,22 @@ +package com.matter.virtual.device.app.core.ui + +import androidx.test.ext.junit.runners.AndroidJUnit4 +import androidx.test.platform.app.InstrumentationRegistry +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("com.matter.virtual.device.app.core.ui.test", appContext.packageName) + } +} diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/AndroidManifest.xml b/examples/virtual-device-app/android/App/core/ui/src/main/AndroidManifest.xml new file mode 100644 index 00000000000000..a5918e68abcdde --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/java/com/matter/virtual/device/app/core/ui/BaseFragment.kt b/examples/virtual-device-app/android/App/core/ui/src/main/java/com/matter/virtual/device/app/core/ui/BaseFragment.kt new file mode 100644 index 00000000000000..9a254643c1c0a2 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/java/com/matter/virtual/device/app/core/ui/BaseFragment.kt @@ -0,0 +1,130 @@ +package com.matter.virtual.device.app.core.ui + +import android.os.Bundle +import android.view.Gravity +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.PopupMenu +import androidx.annotation.LayoutRes +import androidx.appcompat.app.AppCompatActivity +import androidx.databinding.DataBindingUtil +import androidx.databinding.ViewDataBinding +import androidx.fragment.app.Fragment +import androidx.fragment.app.activityViewModels +import com.matter.virtual.device.app.core.common.EventObserver +import com.matter.virtual.device.app.core.common.MatterSettings +import com.matter.virtual.device.app.core.ui.databinding.LayoutAppbarBinding +import kotlin.math.abs +import timber.log.Timber + +abstract class BaseFragment( + @LayoutRes val layoutResId: Int +) : Fragment() { + + private var _binding: T? = null + protected val binding + get() = _binding!! + + protected abstract val viewModel: V + private val sharedViewModel by activityViewModels() + protected lateinit var matterSettings: MatterSettings + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + _binding = DataBindingUtil.inflate(inflater, layoutResId, container, false) + return binding.root + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + Timber.d("onViewCreated()") + + binding.lifecycleOwner = viewLifecycleOwner + + /** Appbar */ + val layoutAppBarBinding = setupAppbar() + (activity as AppCompatActivity).setSupportActionBar(layoutAppBarBinding.toolbar) + (activity as AppCompatActivity).supportActionBar?.setDisplayHomeAsUpEnabled(true) + + layoutAppBarBinding.appBarLayout.addOnOffsetChangedListener { appBarLayout, verticalOffset -> + var ratio = 0F + if (abs(verticalOffset) != 0) { + ratio = abs(verticalOffset).toFloat() / appBarLayout.totalScrollRange.toFloat() + } + + layoutAppBarBinding.collapseTitle.alpha = 1f - ratio * 2f + 0.1f + layoutAppBarBinding.toolbarTitle.alpha = (ratio - 0.5f) * 2f + 0.1f + } + + layoutAppBarBinding.toolbarMoreMenuButton.setOnClickListener { + Timber.d("More") + showMoreMenuPopup(it) + } + + setupNavArgs() + setupUi() + setupObservers() + + viewModel.onFabricRemoved.observe( + viewLifecycleOwner, + EventObserver { onFrabricRemoved -> + if (onFrabricRemoved) { + sharedViewModel.requestFactoryReset( + messageResId = R.string.dialog_fabric_removed_factory_reset_message, + isCancelable = false + ) + } + } + ) + } + + protected abstract fun setupAppbar(): LayoutAppbarBinding + + protected abstract fun setupNavArgs() + + protected abstract fun setupUi() + + protected abstract fun setupObservers() + + override fun onDestroyView() { + super.onDestroyView() + Timber.d("onDestroyView()") + _binding = null + } + + private fun showMoreMenuPopup(anchor: View) { + val morePopupMenu = + PopupMenu( + requireContext(), + anchor, + Gravity.TOP or Gravity.END, + 0, + R.style.CustomMenuPopupRound + ) + .apply { + menuInflater.inflate(R.menu.more, this.menu) + + setOnMenuItemClickListener { menuItem -> + return@setOnMenuItemClickListener when (menuItem.itemId) { + R.id.action_reset -> { + Timber.d("reset") + sharedViewModel.requestFactoryReset( + messageResId = R.string.dialog_factory_reset_message, + isCancelable = true + ) + false + } + else -> { + false + } + } + } + } + + morePopupMenu.show() + } +} diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/java/com/matter/virtual/device/app/core/ui/BaseViewModel.kt b/examples/virtual-device-app/android/App/core/ui/src/main/java/com/matter/virtual/device/app/core/ui/BaseViewModel.kt new file mode 100644 index 00000000000000..b613ed4de24988 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/java/com/matter/virtual/device/app/core/ui/BaseViewModel.kt @@ -0,0 +1,37 @@ +package com.matter.virtual.device.app.core.ui + +import androidx.lifecycle.* +import com.matter.virtual.device.app.core.common.Event +import com.matter.virtual.device.app.core.common.MatterSettings +import kotlinx.coroutines.launch +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.decodeFromString +import kotlinx.serialization.json.Json +import timber.log.Timber + +@OptIn(ExperimentalSerializationApi::class) +abstract class BaseViewModel constructor(savedStateHandle: SavedStateHandle) : ViewModel() { + + private val _onFabricRemoved = MutableLiveData>() + val onFabricRemoved: LiveData> + get() = _onFabricRemoved + + protected lateinit var matterSettings: MatterSettings + + init { + viewModelScope.launch { + val jsonSettings = savedStateHandle.get("setting") + jsonSettings?.let { matterSettings = Json.decodeFromString(it) } + } + } + + override fun onCleared() { + super.onCleared() + Timber.d("onCleared()") + } + + protected fun onFabricRemoved() { + Timber.d("onFabricRemoved()") + _onFabricRemoved.value = Event(true) + } +} diff --git a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/ui/DisableAppBarLayoutBehavior.kt b/examples/virtual-device-app/android/App/core/ui/src/main/java/com/matter/virtual/device/app/core/ui/DisableAppBarLayoutBehavior.kt similarity index 93% rename from examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/ui/DisableAppBarLayoutBehavior.kt rename to examples/virtual-device-app/android/App/core/ui/src/main/java/com/matter/virtual/device/app/core/ui/DisableAppBarLayoutBehavior.kt index 929306fbdc92f8..6818a549b441e7 100644 --- a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/ui/DisableAppBarLayoutBehavior.kt +++ b/examples/virtual-device-app/android/App/core/ui/src/main/java/com/matter/virtual/device/app/core/ui/DisableAppBarLayoutBehavior.kt @@ -1,4 +1,4 @@ -package com.matter.virtual.device.app.core.common.ui +package com.matter.virtual.device.app.core.ui import android.content.Context import android.util.AttributeSet diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/java/com/matter/virtual/device/app/core/ui/SharedViewModel.kt b/examples/virtual-device-app/android/App/core/ui/src/main/java/com/matter/virtual/device/app/core/ui/SharedViewModel.kt new file mode 100644 index 00000000000000..fa588ec9f60cc0 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/java/com/matter/virtual/device/app/core/ui/SharedViewModel.kt @@ -0,0 +1,52 @@ +package com.matter.virtual.device.app.core.ui + +import androidx.annotation.StringRes +import androidx.lifecycle.LiveData +import androidx.lifecycle.MutableLiveData +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.matter.virtual.device.app.core.common.Event +import com.matter.virtual.device.app.core.domain.usecase.matter.ResetMatterAppUseCase +import dagger.hilt.android.lifecycle.HiltViewModel +import javax.inject.Inject +import kotlinx.coroutines.delay +import kotlinx.coroutines.launch +import timber.log.Timber + +@HiltViewModel +class SharedViewModel +@Inject +constructor(private val resetMatterAppUseCase: ResetMatterAppUseCase) : ViewModel() { + + private val _uiState = MutableLiveData>() + val uiState: LiveData> + get() = _uiState + + override fun onCleared() { + Timber.d("onCleared()") + super.onCleared() + } + + fun requestFactoryReset(@StringRes messageResId: Int, isCancelable: Boolean) { + Timber.d("Hit") + viewModelScope.launch { _uiState.value = Event(UiState.Reset(messageResId, isCancelable)) } + } + + fun resetMatterAppServer() { + Timber.d("Hit") + viewModelScope.launch { + _uiState.value = Event(UiState.Waiting) + resetMatterAppUseCase() + delay(1500) + _uiState.value = Event(UiState.Exit) + } + } +} + +sealed class UiState { + data class Reset(@StringRes val messageResId: Int, val isCancelable: Boolean) : UiState() + + object Waiting : UiState() + + object Exit : UiState() +} diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/device_title_icon_bg.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/device_title_icon_bg.xml new file mode 100644 index 00000000000000..efdaea92a3f153 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/device_title_icon_bg.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/menu_popup_round.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/menu_popup_round.xml new file mode 100644 index 00000000000000..3060692ad462c2 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/menu_popup_round.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/round_more_vert_24.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/round_more_vert_24.xml new file mode 100644 index 00000000000000..39fbab5f7806cc --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/round_more_vert_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/round_toggle_off_24.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/round_toggle_off_24.xml new file mode 100644 index 00000000000000..8349d993c3b0a5 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/round_toggle_off_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/round_toggle_on_24.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/round_toggle_on_24.xml new file mode 100644 index 00000000000000..d42714cc7696e0 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/drawable/round_toggle_on_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_appbar.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_appbar.xml new file mode 100644 index 00000000000000..b612ae66d543d2 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_appbar.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_item_value_on_off_button.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_item_value_on_off_button.xml new file mode 100644 index 00000000000000..2cc3c1bd19948e --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_item_value_on_off_button.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_item_value_radio_button.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_item_value_radio_button.xml new file mode 100644 index 00000000000000..ad3ca0a131ce43 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_item_value_radio_button.xml @@ -0,0 +1,36 @@ + + + + + + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_space_bottom.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_space_bottom.xml new file mode 100644 index 00000000000000..2aeb588ac270d4 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_space_bottom.xml @@ -0,0 +1,4 @@ + + diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_space_top.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_space_top.xml new file mode 100644 index 00000000000000..47421036d7f28c --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_space_top.xml @@ -0,0 +1,4 @@ + + diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_title.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_title.xml new file mode 100644 index 00000000000000..7ad14914499681 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/layout/layout_title.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/menu/more.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/menu/more.xml new file mode 100644 index 00000000000000..8bec4877b12122 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/menu/more.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/values-night/colors.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/values-night/colors.xml new file mode 100644 index 00000000000000..84b136dbfb181b --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/values-night/colors.xml @@ -0,0 +1,5 @@ + + + #666666 + @android:color/white + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/values/colors.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/values/colors.xml new file mode 100644 index 00000000000000..9dccb8060e7ff1 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/values/colors.xml @@ -0,0 +1,5 @@ + + + #fcfcfc + @android:color/black + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/values/dimens.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/values/dimens.xml new file mode 100644 index 00000000000000..24bd23b54f6de7 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/values/dimens.xml @@ -0,0 +1,28 @@ + + + 350dp + 25sp + 17sp + 20dp + + 60dp + 60dp + 20dp + 10sp + 24sp + + 44dp + 12dp + 25dp + 20dp + 20dp + 20dp + 20dp + 12dp + 36dp + 36dp + 20sp + 75dp + 0dp + 36dp + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/values/strings.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/values/strings.xml new file mode 100644 index 00000000000000..70fd88fd75a365 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/values/strings.xml @@ -0,0 +1,12 @@ + + + button + Reset + + "The Matter device app will be reset and closed. Continue?" + "The commissioning was not completed. The Matter device app will be reset and closed. Continue?" + "The fabric was removed. The Matter device app will be reset and closed." + + On + Off + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/ui/src/main/res/values/themes.xml b/examples/virtual-device-app/android/App/core/ui/src/main/res/values/themes.xml new file mode 100644 index 00000000000000..aaa0ee6a970053 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/main/res/values/themes.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/ui/src/test/java/com/matter/virtual/device/app/core/ui/ExampleUnitTest.kt b/examples/virtual-device-app/android/App/core/ui/src/test/java/com/matter/virtual/device/app/core/ui/ExampleUnitTest.kt new file mode 100644 index 00000000000000..abb1e0f8802fcf --- /dev/null +++ b/examples/virtual-device-app/android/App/core/ui/src/test/java/com/matter/virtual/device/app/core/ui/ExampleUnitTest.kt @@ -0,0 +1,16 @@ +package com.matter.virtual.device.app.core.ui + +import org.junit.Assert.* +import org.junit.Test + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} diff --git a/examples/virtual-device-app/android/App/feature/control/build.gradle.kts b/examples/virtual-device-app/android/App/feature/control/build.gradle.kts index a9315f089d25ed..c96bf15592d636 100644 --- a/examples/virtual-device-app/android/App/feature/control/build.gradle.kts +++ b/examples/virtual-device-app/android/App/feature/control/build.gradle.kts @@ -45,9 +45,18 @@ android { dependencies { + implementation(project(":core:common")) + implementation(project(":core:domain")) + implementation(project(":core:model")) + implementation(project(":core:ui")) + implementation(Deps.AndroidX.core) implementation(Deps.AndroidX.appcompat) implementation(Deps.AndroidX.fragment) + implementation(Deps.AndroidX.Lifecycle.viewmodel) + implementation(Deps.AndroidX.Lifecycle.livedata) + + implementation(Deps.Kotlin.serialization) implementation(Deps.Navigation.fragment) implementation(Deps.Navigation.ui) diff --git a/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchFragment.kt b/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchFragment.kt index 5f89d07467ed5f..3b13eb0898e123 100644 --- a/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchFragment.kt +++ b/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchFragment.kt @@ -1,37 +1,51 @@ package com.matter.virtual.device.app.feature.control -import android.os.Bundle -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import androidx.databinding.DataBindingUtil -import androidx.fragment.app.Fragment +import androidx.fragment.app.viewModels +import androidx.navigation.fragment.navArgs +import com.matter.virtual.device.app.core.model.databinding.ButtonData +import com.matter.virtual.device.app.core.ui.BaseFragment +import com.matter.virtual.device.app.core.ui.databinding.LayoutAppbarBinding import com.matter.virtual.device.app.feature.control.databinding.FragmentOnOffSwitchBinding import dagger.hilt.android.AndroidEntryPoint +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.decodeFromString +import kotlinx.serialization.json.Json import timber.log.Timber @AndroidEntryPoint -class OnOffSwitchFragment : Fragment() { +class OnOffSwitchFragment : + BaseFragment(R.layout.fragment_on_off_switch) { - private lateinit var binding: FragmentOnOffSwitchBinding + override val viewModel: OnOffSwitchViewModel by viewModels() - override fun onCreateView( - inflater: LayoutInflater, - container: ViewGroup?, - savedInstanceState: Bundle? - ): View { - Timber.d("onCreateView()") - binding = DataBindingUtil.inflate(inflater, R.layout.fragment_on_off_switch, container, false) - binding.lifecycleOwner = viewLifecycleOwner - - return binding.root + @OptIn(ExperimentalSerializationApi::class) + override fun setupNavArgs() { + val args: OnOffSwitchFragmentArgs by navArgs() + matterSettings = Json.decodeFromString(args.setting) } - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - Timber.d("onViewCreated()") - super.onViewCreated(view, savedInstanceState) + override fun setupAppbar(): LayoutAppbarBinding = binding.appbar + + override fun setupUi() { + /** title icon */ + binding.onOffSwitchTitleLayout.titleIcon.setImageResource(matterSettings.device.deviceIconResId) + + /** title text */ + binding.onOffSwitchTitleLayout.titleText.text = getString(matterSettings.device.deviceNameResId) + + /** OnOff layout */ + binding.onOffSwitchOnOffLayout.buttonData = + ButtonData( + onOff = viewModel.onOff, + onText = R.string.on_off_switch_power_on, + offText = R.string.on_off_switch_power_off + ) + + binding.onOffSwitchOnOffLayout.button.setOnClickListener { viewModel.onClickButton() } } + override fun setupObservers() {} + override fun onResume() { Timber.d("onResume()") super.onResume() diff --git a/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchViewModel.kt b/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchViewModel.kt new file mode 100644 index 00000000000000..bae5e8c88f8be7 --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchViewModel.kt @@ -0,0 +1,65 @@ +package com.matter.virtual.device.app.feature.control + +import androidx.lifecycle.LiveData +import androidx.lifecycle.SavedStateHandle +import androidx.lifecycle.asLiveData +import androidx.lifecycle.viewModelScope +import com.matter.virtual.device.app.core.common.successOr +import com.matter.virtual.device.app.core.domain.usecase.matter.IsFabricRemovedUseCase +import com.matter.virtual.device.app.core.domain.usecase.matter.StartMatterAppServiceUseCase +import com.matter.virtual.device.app.core.domain.usecase.matter.cluster.GetOnOffFlowUseCase +import com.matter.virtual.device.app.core.domain.usecase.matter.cluster.SetOnOffUseCase +import com.matter.virtual.device.app.core.ui.BaseViewModel +import dagger.hilt.android.lifecycle.HiltViewModel +import javax.inject.Inject +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.launch +import timber.log.Timber + +@HiltViewModel +class OnOffSwitchViewModel +@Inject +constructor( + getOnOffFlowUseCase: GetOnOffFlowUseCase, + private val setOnOffUseCase: SetOnOffUseCase, + private val startMatterAppServiceUseCase: StartMatterAppServiceUseCase, + private val isFabricRemovedUseCase: IsFabricRemovedUseCase, + savedStateHandle: SavedStateHandle +) : BaseViewModel(savedStateHandle) { + + private val _onOff: StateFlow = getOnOffFlowUseCase() + val onOff: LiveData + get() = _onOff.asLiveData() + + init { + Timber.d("init()") + viewModelScope.launch { startMatterAppServiceUseCase(matterSettings) } + + viewModelScope.launch { + val isFabricRemoved = isFabricRemovedUseCase().successOr(false) + if (isFabricRemoved) { + Timber.d("Fabric Removed") + onFabricRemoved() + } + } + } + + override fun onCleared() { + Timber.d("onCleared()") + super.onCleared() + } + + fun onClickButton() { + Timber.d("Hit") + viewModelScope.launch { + Timber.d("current value = ${_onOff.value}") + if (_onOff.value) { + Timber.d("set value = false") + setOnOffUseCase(false) + } else { + Timber.d("set value = true") + setOnOffUseCase(true) + } + } + } +} diff --git a/examples/virtual-device-app/android/App/feature/control/src/main/res/layout/fragment_on_off_switch.xml b/examples/virtual-device-app/android/App/feature/control/src/main/res/layout/fragment_on_off_switch.xml index 35d548cddf3cc8..1978e7c383f3d0 100644 --- a/examples/virtual-device-app/android/App/feature/control/src/main/res/layout/fragment_on_off_switch.xml +++ b/examples/virtual-device-app/android/App/feature/control/src/main/res/layout/fragment_on_off_switch.xml @@ -1,10 +1,55 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/main/build.gradle.kts b/examples/virtual-device-app/android/App/feature/main/build.gradle.kts index c9931cf58938e4..500ac8d758212f 100644 --- a/examples/virtual-device-app/android/App/feature/main/build.gradle.kts +++ b/examples/virtual-device-app/android/App/feature/main/build.gradle.kts @@ -48,6 +48,7 @@ dependencies { implementation(project(":core:common")) implementation(project(":core:domain")) implementation(project(":core:model")) + implementation(project(":core:ui")) implementation(Deps.AndroidX.core) implementation(Deps.AndroidX.appcompat) diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingFragment.kt b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingFragment.kt index 8c81bd26429433..e5d768c3e790b7 100644 --- a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingFragment.kt +++ b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingFragment.kt @@ -9,14 +9,21 @@ import androidx.activity.OnBackPressedCallback import androidx.appcompat.app.AppCompatActivity import androidx.databinding.DataBindingUtil import androidx.fragment.app.Fragment +import androidx.fragment.app.activityViewModels +import androidx.fragment.app.viewModels +import androidx.navigation.NavOptions import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.navArgs +import com.matter.virtual.device.app.core.common.DeepLink +import com.matter.virtual.device.app.core.common.EventObserver import com.matter.virtual.device.app.core.common.MatterSettings +import com.matter.virtual.device.app.core.ui.SharedViewModel import com.matter.virtual.device.app.feature.main.databinding.FragmentLoadingBinding import dagger.hilt.android.AndroidEntryPoint import kotlin.math.abs import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.decodeFromString +import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import timber.log.Timber @@ -24,6 +31,8 @@ import timber.log.Timber class LoadingFragment : Fragment() { private lateinit var binding: FragmentLoadingBinding + private val viewModel by viewModels() + private val sharedViewModel by activityViewModels() private lateinit var matterSettings: MatterSettings private lateinit var onBackPressedCallback: OnBackPressedCallback @@ -60,6 +69,40 @@ class LoadingFragment : Fragment() { val args: LoadingFragmentArgs by navArgs() this.matterSettings = Json.decodeFromString(args.setting) + + viewModel.uiState.observe( + viewLifecycleOwner, + EventObserver { uiStete -> + when (uiStete) { + is LoadingUiState.Complete -> { + matterSettings.device = uiStete.device + + try { + val navOptions = NavOptions.Builder().setPopUpTo(R.id.mainFragment, true).build() + + findNavController() + .navigate( + DeepLink.getDeepLinkRequestFromDevice( + uiStete.device, + Json.encodeToString(matterSettings) + ), + navOptions + ) + } catch (e: Exception) { + Timber.e(e, "navigate failure") + } + } + LoadingUiState.Failure -> { + Timber.e("Failure or Timeout") + sharedViewModel.requestFactoryReset( + messageResId = R.string.dialog_timeout_factory_reset_message, + isCancelable = false + ) + } + LoadingUiState.Loading -> {} + } + } + ) } override fun onResume() { @@ -75,7 +118,10 @@ class LoadingFragment : Fragment() { object : OnBackPressedCallback(true) { override fun handleOnBackPressed() { Timber.d("handleOnBackPressed()") - findNavController().popBackStack() + sharedViewModel.requestFactoryReset( + messageResId = R.string.dialog_user_factory_reset_message, + isCancelable = true + ) } } diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingViewModel.kt b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingViewModel.kt new file mode 100644 index 00000000000000..5017bc04fc1ec1 --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingViewModel.kt @@ -0,0 +1,70 @@ +package com.matter.virtual.device.app.feature.main + +import androidx.lifecycle.* +import com.matter.virtual.device.app.core.common.Device +import com.matter.virtual.device.app.core.common.Event +import com.matter.virtual.device.app.core.common.MatterSettings +import com.matter.virtual.device.app.core.common.successOr +import com.matter.virtual.device.app.core.domain.usecase.matter.IsCommissioningCompletedUseCase +import com.matter.virtual.device.app.core.domain.usecase.sharedpreferences.SetCommissionedDeviceUseCase +import com.matter.virtual.device.app.core.domain.usecase.sharedpreferences.SetCommissioningDeviceCompletedUseCase +import com.matter.virtual.device.app.core.domain.usecase.sharedpreferences.SetCommissioningSequenceFlagUseCase +import dagger.hilt.android.lifecycle.HiltViewModel +import javax.inject.Inject +import kotlinx.coroutines.launch +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.decodeFromString +import kotlinx.serialization.json.Json +import timber.log.Timber + +@OptIn(ExperimentalSerializationApi::class) +@HiltViewModel +class LoadingViewModel +@Inject +constructor( + private val isCommissioningCompletedUseCase: IsCommissioningCompletedUseCase, + private val setCommissioningDeviceCompletedUseCase: SetCommissioningDeviceCompletedUseCase, + private val setCommissionedDeviceUseCase: SetCommissionedDeviceUseCase, + private val setCommissioningSequenceFlagUseCase: SetCommissioningSequenceFlagUseCase, + savedStateHandle: SavedStateHandle +) : ViewModel() { + + private val _uiState = MutableLiveData>(Event(LoadingUiState.Loading)) + val uiState: LiveData> + get() = _uiState + + init { + viewModelScope.launch { + val jsonSettings = savedStateHandle.get("setting") + jsonSettings?.let { + val matterSettings = Json.decodeFromString(it) + Timber.d("device:${matterSettings.device.title}") + + val isCommissioningCompleted = isCommissioningCompletedUseCase().successOr(false) + if (isCommissioningCompleted) { + Timber.d("Commissioning Completed") + setCommissioningDeviceCompletedUseCase(true) + setCommissioningSequenceFlagUseCase(false) + setCommissionedDeviceUseCase(matterSettings.device) + _uiState.value = Event(LoadingUiState.Complete(matterSettings.device)) + } else { + Timber.e("Commissioning Failure or Timeout") + _uiState.value = Event(LoadingUiState.Failure) + } + } + } + } + + override fun onCleared() { + Timber.d("onCleared()") + super.onCleared() + } +} + +sealed class LoadingUiState { + object Loading : LoadingUiState() + + data class Complete(val device: Device) : LoadingUiState() + + object Failure : LoadingUiState() +} diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainFragment.kt b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainFragment.kt index 55ebdace76a00e..861bf01b257817 100644 --- a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainFragment.kt +++ b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainFragment.kt @@ -9,10 +9,14 @@ import androidx.activity.OnBackPressedCallback import androidx.appcompat.app.AppCompatActivity import androidx.databinding.DataBindingUtil import androidx.fragment.app.Fragment +import androidx.fragment.app.activityViewModels +import androidx.fragment.app.viewModels +import androidx.navigation.NavOptions import androidx.navigation.fragment.findNavController import androidx.recyclerview.widget.LinearLayoutManager import com.matter.virtual.device.app.core.common.DeepLink import com.matter.virtual.device.app.core.common.MatterSettings +import com.matter.virtual.device.app.core.ui.SharedViewModel import com.matter.virtual.device.app.feature.main.databinding.FragmentMainBinding import com.matter.virtual.device.app.feature.main.model.Menu import dagger.hilt.android.AndroidEntryPoint @@ -26,6 +30,9 @@ import timber.log.Timber class MainFragment : Fragment() { private lateinit var binding: FragmentMainBinding + private val viewModel by viewModels() + private val sharedViewModel by activityViewModels() + private lateinit var onBackPressedCallback: OnBackPressedCallback override fun onCreateView( @@ -33,7 +40,7 @@ class MainFragment : Fragment() { container: ViewGroup?, savedInstanceState: Bundle? ): View { - Timber.d("Hit") + Timber.d("onCreateView()") binding = DataBindingUtil.inflate(inflater, R.layout.fragment_main, container, false) binding.lifecycleOwner = viewLifecycleOwner @@ -42,7 +49,7 @@ class MainFragment : Fragment() { @OptIn(ExperimentalSerializationApi::class) override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - Timber.d("Hit") + Timber.d("onViewCreated()") super.onViewCreated(view, savedInstanceState) (activity as AppCompatActivity).setSupportActionBar(binding.toolbar) @@ -58,34 +65,69 @@ class MainFragment : Fragment() { binding.toolbarTitle.alpha = (ratio - 0.5f) * 2f + 0.1f } - val itemList = arrayListOf(Menu.ON_OFF_SWITCH) - - val menuAdapter = - MenuAdapter( - object : MenuAdapter.ItemHandler { - override fun onClick(item: Menu) { - val matterSettings = MatterSettings(device = item.device) - val jsonSettings = Json.encodeToString(matterSettings) - try { - findNavController() - .navigate(DeepLink.getDeepLinkRequestForSetupFragment(jsonSettings)) - } catch (e: Exception) { - Timber.e(e, "navigate failure") - } + viewModel.uiState.observe(viewLifecycleOwner) { uiState -> + Timber.d("uiState:$uiState") + when (uiState) { + MainUiState.Loading -> {} + is MainUiState.CommissioningCompleted -> { + try { + val navOptions = + NavOptions.Builder() + .setPopUpTo(destinationId = R.id.mainFragment, inclusive = true) + .build() + + findNavController() + .navigate( + DeepLink.getDeepLinkRequestFromDevice( + uiState.device, + Json.encodeToString(MatterSettings(device = uiState.device)) + ), + navOptions + ) + } catch (e: Exception) { + Timber.e("navigate failure") + } + } + is MainUiState.Reset -> { + sharedViewModel.requestFactoryReset( + messageResId = uiState.messageResId, + isCancelable = uiState.isCancelable + ) + } + MainUiState.Start -> { + val itemList = arrayListOf(Menu.ON_OFF_SWITCH) + + val menuAdapter = + MenuAdapter( + object : MenuAdapter.ItemHandler { + override fun onClick(item: Menu) { + viewModel.consumeUiState() + + val matterSettings = MatterSettings(device = item.device) + val jsonSettings = Json.encodeToString(matterSettings) + try { + findNavController() + .navigate(DeepLink.getDeepLinkRequestForSetupFragment(jsonSettings)) + } catch (e: Exception) { + Timber.e(e, "navigate failure") + } + } + } + ) + .apply { submitList(itemList) } + + val sideSpace = resources.getDimension(R.dimen.menu_item_side_space).toInt() + val bottomSpace = resources.getDimension(R.dimen.menu_item_bottom_space).toInt() + + binding.recyclerView.apply { + layoutManager = LinearLayoutManager(requireContext()) + if (itemDecorationCount == 0) { + addItemDecoration(VerticalSpaceItemDecoration(sideSpace, bottomSpace)) } + adapter = menuAdapter } - ) - .apply { submitList(itemList) } - - val sideSpace = resources.getDimension(R.dimen.menu_item_side_space).toInt() - val bottomSpace = resources.getDimension(R.dimen.menu_item_bottom_space).toInt() - - binding.recyclerView.apply { - layoutManager = LinearLayoutManager(requireContext()) - if (itemDecorationCount == 0) { - addItemDecoration(VerticalSpaceItemDecoration(sideSpace, bottomSpace)) + } } - adapter = menuAdapter } } @@ -95,7 +137,7 @@ class MainFragment : Fragment() { } override fun onAttach(context: Context) { - Timber.d("Hit") + Timber.d("onAttach()") super.onAttach(context) onBackPressedCallback = diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainViewModel.kt b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainViewModel.kt new file mode 100644 index 00000000000000..c776b2468de3f6 --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainViewModel.kt @@ -0,0 +1,78 @@ +package com.matter.virtual.device.app.feature.main + +import androidx.annotation.StringRes +import androidx.lifecycle.LiveData +import androidx.lifecycle.MutableLiveData +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.matter.virtual.device.app.core.common.Device +import com.matter.virtual.device.app.core.common.successOr +import com.matter.virtual.device.app.core.domain.usecase.sharedpreferences.GetCommissionedDeviceUseCase +import com.matter.virtual.device.app.core.domain.usecase.sharedpreferences.IsCommissioningDeviceCompletedUseCase +import com.matter.virtual.device.app.core.domain.usecase.sharedpreferences.IsCommissioningSequenceUseCase +import dagger.hilt.android.lifecycle.HiltViewModel +import javax.inject.Inject +import kotlinx.coroutines.cancel +import kotlinx.coroutines.launch +import timber.log.Timber + +@HiltViewModel +class MainViewModel +@Inject +constructor( + private val isCommissioningDeviceCompletedUseCase: IsCommissioningDeviceCompletedUseCase, + private val getCommissionedDeviceUseCase: GetCommissionedDeviceUseCase, + private val isCommissioningSequenceUseCase: IsCommissioningSequenceUseCase, +) : ViewModel() { + + private val _uiState = MutableLiveData(MainUiState.Loading) + val uiState: LiveData + get() = _uiState + + init { + viewModelScope.launch { + val isCommissioningSequence = isCommissioningSequenceUseCase().successOr(false) + if (isCommissioningSequence) { + Timber.e("Need factory reset") + _uiState.value = + MainUiState.Reset( + messageResId = R.string.dialog_force_factory_reset_message, + isCancelable = false + ) + this.cancel() + return@launch + } + + val isCommissioningDeviceCompleted = isCommissioningDeviceCompletedUseCase().successOr(false) + val commissionedDevice = getCommissionedDeviceUseCase().successOr(Device.Unknown) + + if (isCommissioningDeviceCompleted) { + Timber.d("Go to commissioned device") + _uiState.value = MainUiState.CommissioningCompleted(commissionedDevice) + } else { + Timber.d("Start commissioning") + _uiState.value = MainUiState.Start + } + } + } + + override fun onCleared() { + Timber.d("onCleared()") + super.onCleared() + } + + fun consumeUiState() { + Timber.d("consumeUiState()") + viewModelScope.launch { _uiState.value = MainUiState.Start } + } +} + +sealed class MainUiState { + object Loading : MainUiState() + + object Start : MainUiState() + + data class CommissioningCompleted(val device: Device) : MainUiState() + + data class Reset(@StringRes val messageResId: Int, val isCancelable: Boolean) : MainUiState() +} diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/fragment_loading.xml b/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/fragment_loading.xml index 852207c49e1b6f..a76061ed6ca8e4 100644 --- a/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/fragment_loading.xml +++ b/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/fragment_loading.xml @@ -15,7 +15,7 @@ android:fitsSystemWindows="true" app:elevation="0dp" app:expanded="false" - app:layout_behavior="com.matter.virtual.device.app.core.common.ui.DisableAppBarLayoutBehavior"> + app:layout_behavior="com.matter.virtual.device.app.core.ui.DisableAppBarLayoutBehavior"> Matter Virtual Device Loading Commissioning in process. + + "The last commissioning was not completed. The Matter device app will be reset and closed." + "The commissioning timed out. The Matter device app will be reset and closed." \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/qrcode/build.gradle.kts b/examples/virtual-device-app/android/App/feature/qrcode/build.gradle.kts index f93270453f1efe..826f2e1204737d 100644 --- a/examples/virtual-device-app/android/App/feature/qrcode/build.gradle.kts +++ b/examples/virtual-device-app/android/App/feature/qrcode/build.gradle.kts @@ -48,6 +48,7 @@ dependencies { implementation(project(":core:common")) implementation(project(":core:domain")) implementation(project(":core:model")) + implementation(project(":core:ui")) implementation(Deps.AndroidX.core) implementation(Deps.AndroidX.appcompat) diff --git a/examples/virtual-device-app/android/App/feature/qrcode/src/main/java/com/matter/virtual/device/app/feature/qrcode/QrcodeFragment.kt b/examples/virtual-device-app/android/App/feature/qrcode/src/main/java/com/matter/virtual/device/app/feature/qrcode/QrcodeFragment.kt index e8622ff6f71f45..6f220d7851453b 100644 --- a/examples/virtual-device-app/android/App/feature/qrcode/src/main/java/com/matter/virtual/device/app/feature/qrcode/QrcodeFragment.kt +++ b/examples/virtual-device-app/android/App/feature/qrcode/src/main/java/com/matter/virtual/device/app/feature/qrcode/QrcodeFragment.kt @@ -10,17 +10,18 @@ import androidx.activity.OnBackPressedCallback import androidx.appcompat.app.AppCompatActivity import androidx.databinding.DataBindingUtil import androidx.fragment.app.Fragment +import androidx.fragment.app.activityViewModels import androidx.fragment.app.viewModels import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.navArgs -import com.matter.virtual.device.app.core.common.MatterConstants -import com.matter.virtual.device.app.core.common.MatterSettings -import com.matter.virtual.device.app.core.common.QrcodeUtil +import com.matter.virtual.device.app.core.common.* +import com.matter.virtual.device.app.core.ui.SharedViewModel import com.matter.virtual.device.app.feature.qrcode.databinding.FragmentQrcodeBinding import dagger.hilt.android.AndroidEntryPoint import kotlin.math.abs import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.decodeFromString +import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import timber.log.Timber @@ -29,6 +30,7 @@ class QrcodeFragment : Fragment() { private lateinit var binding: FragmentQrcodeBinding private val viewModel by viewModels() + private val sharedViewModel by activityViewModels() private lateinit var onBackPressedCallback: OnBackPressedCallback @@ -66,59 +68,72 @@ class QrcodeFragment : Fragment() { val args: QrcodeFragmentArgs by navArgs() val matterSettings = Json.decodeFromString(args.setting) - viewModel.uiState.observe(viewLifecycleOwner) { - when (it) { - QrcodeUiState.Loading -> { - binding.progressBar.visibility = View.VISIBLE + viewModel.uiState.observe( + viewLifecycleOwner, + EventObserver { + when (it) { + QrcodeUiState.Loading -> { + binding.progressBar.visibility = View.VISIBLE + } + is QrcodeUiState.Qrcode -> { + binding.progressBar.visibility = View.GONE + + binding.qrTypeImage.setImageResource(matterSettings.device.deviceIconResId) + binding.qrTypeTitle.text = getString(matterSettings.device.deviceNameResId) + + val qrCodeBitmap: Bitmap? = + QrcodeUtil.createQrCodeBitmap(it.qrCode, QR_WIDTH, QR_HEIGHT) + binding.qrImage.setImageBitmap(qrCodeBitmap) + + binding.qrText.text = getString(R.string.qrcode_qr_text, it.qrCode) + binding.manualCodeText.text = + getString(R.string.qrcode_manual_code_text, it.manualPairingCode) + binding.versionText.text = + getString(R.string.qrcode_version_text, MatterConstants.DEFAULT_VERSION.toString()) + binding.vendorIdText.text = + getString( + R.string.qrcode_vendor_id_text, + MatterConstants.DEFAULT_VENDOR_ID.toString(), + MatterConstants.DEFAULT_VENDOR_ID + ) + binding.productIdText.text = + getString( + R.string.qrcode_product_id_text, + MatterConstants.DEFAULT_PRODUCT_ID.toString(), + MatterConstants.DEFAULT_PRODUCT_ID + ) + binding.commissioningFlowText.text = + getString( + R.string.qrcode_commissioning_flow_text, + MatterConstants.DEFAULT_COMMISSIONING_FLOW.toString() + ) + binding.onboardingTypeText.text = + getString(R.string.qrcode_onboarding_type_text, matterSettings.onboardingType) + binding.setupPinCodeText.text = + getString( + R.string.qrcode_setup_pin_code_text, + MatterConstants.DEFAULT_SETUP_PINCODE.toString() + ) + binding.discriminatorText.text = + getString( + R.string.qrcode_discriminator_text, + matterSettings.discriminator.toString(), + matterSettings.discriminator + ) + } + QrcodeUiState.SessionEstablishmentStarted -> { + try { + findNavController() + .navigate( + DeepLink.getDeepLinkRequestForLoadingFragment(Json.encodeToString(matterSettings)) + ) + } catch (e: Exception) { + Timber.e(e, "navigate failure") + } + } } - is QrcodeUiState.Qrcode -> { - binding.progressBar.visibility = View.GONE - - binding.qrTypeImage.setImageResource(matterSettings.device.deviceIconResId) - binding.qrTypeTitle.text = getString(matterSettings.device.deviceNameResId) - - val qrCodeBitmap: Bitmap? = QrcodeUtil.createQrCodeBitmap(it.qrCode, QR_WIDTH, QR_HEIGHT) - binding.qrImage.setImageBitmap(qrCodeBitmap) - - binding.qrText.text = getString(R.string.qrcode_qr_text, it.qrCode) - binding.manualCodeText.text = - getString(R.string.qrcode_manual_code_text, it.manualPairingCode) - binding.versionText.text = - getString(R.string.qrcode_version_text, MatterConstants.DEFAULT_VERSION.toString()) - binding.vendorIdText.text = - getString( - R.string.qrcode_vendor_id_text, - MatterConstants.DEFAULT_VENDOR_ID.toString(), - MatterConstants.DEFAULT_VENDOR_ID - ) - binding.productIdText.text = - getString( - R.string.qrcode_product_id_text, - MatterConstants.DEFAULT_PRODUCT_ID.toString(), - MatterConstants.DEFAULT_PRODUCT_ID - ) - binding.commissioningFlowText.text = - getString( - R.string.qrcode_commissioning_flow_text, - MatterConstants.DEFAULT_COMMISSIONING_FLOW.toString() - ) - binding.onboardingTypeText.text = - getString(R.string.qrcode_onboarding_type_text, matterSettings.onboardingType) - binding.setupPinCodeText.text = - getString( - R.string.qrcode_setup_pin_code_text, - MatterConstants.DEFAULT_SETUP_PINCODE.toString() - ) - binding.discriminatorText.text = - getString( - R.string.qrcode_discriminator_text, - matterSettings.discriminator.toString(), - matterSettings.discriminator - ) - } - else -> {} } - } + ) } override fun onResume() { @@ -134,7 +149,10 @@ class QrcodeFragment : Fragment() { object : OnBackPressedCallback(true) { override fun handleOnBackPressed() { Timber.d("handleOnBackPressed()") - findNavController().popBackStack() + sharedViewModel.requestFactoryReset( + messageResId = R.string.dialog_user_factory_reset_message, + isCancelable = true + ) } } diff --git a/examples/virtual-device-app/android/App/feature/qrcode/src/main/java/com/matter/virtual/device/app/feature/qrcode/QrcodeViewModel.kt b/examples/virtual-device-app/android/App/feature/qrcode/src/main/java/com/matter/virtual/device/app/feature/qrcode/QrcodeViewModel.kt index 3505f33eef6e78..7cb138258479aa 100644 --- a/examples/virtual-device-app/android/App/feature/qrcode/src/main/java/com/matter/virtual/device/app/feature/qrcode/QrcodeViewModel.kt +++ b/examples/virtual-device-app/android/App/feature/qrcode/src/main/java/com/matter/virtual/device/app/feature/qrcode/QrcodeViewModel.kt @@ -1,10 +1,13 @@ package com.matter.virtual.device.app.feature.qrcode import androidx.lifecycle.* +import com.matter.virtual.device.app.core.common.Event import com.matter.virtual.device.app.core.common.MatterSettings import com.matter.virtual.device.app.core.common.successOr import com.matter.virtual.device.app.core.domain.usecase.matter.GetManualPairingCodeStringUseCase import com.matter.virtual.device.app.core.domain.usecase.matter.GetQrcodeStringUseCase +import com.matter.virtual.device.app.core.domain.usecase.matter.IsCommissioningSessionEstablishmentStarted +import com.matter.virtual.device.app.core.domain.usecase.matter.StartMatterAppServiceUseCase import com.matter.virtual.device.app.core.model.Payload import dagger.hilt.android.lifecycle.HiltViewModel import javax.inject.Inject @@ -22,11 +25,14 @@ class QrcodeViewModel constructor( private val getQrcodeStringUseCase: GetQrcodeStringUseCase, private val getManualPairingCodeStringUseCase: GetManualPairingCodeStringUseCase, + private val isCommissioningSessionEstablishmentStarted: + IsCommissioningSessionEstablishmentStarted, + private val startMatterAppServiceUseCase: StartMatterAppServiceUseCase, savedStateHandle: SavedStateHandle ) : ViewModel() { - private val _uiState = MutableLiveData(QrcodeUiState.Loading) - val uiState: LiveData + private val _uiState = MutableLiveData>(Event(QrcodeUiState.Loading)) + val uiState: LiveData> get() = _uiState init { @@ -35,7 +41,7 @@ constructor( jsonSettings?.let { val matterSettings = Json.decodeFromString(it) - // TODO : start service + startMatterAppServiceUseCase(matterSettings) delay(500) val payload = @@ -47,7 +53,14 @@ constructor( val qrCode = getQrcodeStringUseCase(payload).successOr("") val manualPairingCode = getManualPairingCodeStringUseCase(payload).successOr("") - _uiState.value = QrcodeUiState.Qrcode(qrCode, manualPairingCode) + _uiState.value = Event(QrcodeUiState.Qrcode(qrCode, manualPairingCode)) + + val isCommissioningSessionEstablishmentStarted = + isCommissioningSessionEstablishmentStarted().successOr(false) + if (isCommissioningSessionEstablishmentStarted) { + Timber.d("Session Establishment Started") + _uiState.value = Event(QrcodeUiState.SessionEstablishmentStarted) + } } } } @@ -62,4 +75,6 @@ sealed interface QrcodeUiState { object Loading : QrcodeUiState data class Qrcode(val qrCode: String, val manualPairingCode: String) : QrcodeUiState + + object SessionEstablishmentStarted : QrcodeUiState } diff --git a/examples/virtual-device-app/android/App/feature/qrcode/src/main/res/layout/fragment_qrcode.xml b/examples/virtual-device-app/android/App/feature/qrcode/src/main/res/layout/fragment_qrcode.xml index 997f74826654a0..5bd72ce74776d5 100644 --- a/examples/virtual-device-app/android/App/feature/qrcode/src/main/res/layout/fragment_qrcode.xml +++ b/examples/virtual-device-app/android/App/feature/qrcode/src/main/res/layout/fragment_qrcode.xml @@ -22,7 +22,7 @@ android:fitsSystemWindows="true" app:elevation="0dp" app:expanded="false" - app:layout_behavior="com.matter.virtual.device.app.core.common.ui.DisableAppBarLayoutBehavior"> + app:layout_behavior="com.matter.virtual.device.app.core.ui.DisableAppBarLayoutBehavior"> #include #include +#include #include #include #include @@ -58,14 +59,14 @@ void DeviceAppJNI::InitializeWithObjects(jobject app) jclass managerClass = env->GetObjectClass(mDeviceAppObject); VerifyOrReturn(managerClass != nullptr, ChipLogError(Zcl, "Failed to get DeviceAppJNI Java class")); - mPostClusterInitMethod = env->GetMethodID(managerClass, "postClusterInit", "(II)V"); + mPostClusterInitMethod = env->GetMethodID(managerClass, "postClusterInit", "(JI)V"); if (mPostClusterInitMethod == nullptr) { ChipLogError(Zcl, "Failed to access DeviceApp 'postClusterInit' method"); env->ExceptionClear(); } - mPostEventMethod = env->GetMethodID(managerClass, "postEvent", "(I)V"); + mPostEventMethod = env->GetMethodID(managerClass, "postEvent", "(J)V"); if (mPostEventMethod == nullptr) { ChipLogError(Zcl, "Failed to access DeviceApp 'postEvent' method"); @@ -80,7 +81,7 @@ void DeviceAppJNI::PostClusterInit(int clusterId, int endpoint) VerifyOrReturn(mDeviceAppObject != nullptr, ChipLogError(Zcl, "DeviceAppJNI::mDeviceAppObject null")); VerifyOrReturn(mPostClusterInitMethod != nullptr, ChipLogError(Zcl, "DeviceAppJNI::mPostClusterInitMethod null")); - env->CallVoidMethod(mDeviceAppObject, mPostClusterInitMethod, static_cast(clusterId), static_cast(endpoint)); + env->CallVoidMethod(mDeviceAppObject, mPostClusterInitMethod, static_cast(clusterId), static_cast(endpoint)); if (env->ExceptionCheck()) { ChipLogError(Zcl, "Failed to call DeviceAppJNI 'postClusterInit' method"); @@ -95,7 +96,7 @@ void DeviceAppJNI::PostEvent(int event) VerifyOrReturn(mDeviceAppObject != nullptr, ChipLogError(Zcl, "DeviceAppJNI::mDeviceAppObject null")); VerifyOrReturn(mPostEventMethod != nullptr, ChipLogError(Zcl, "DeviceAppJNI::mPostEventMethod null")); - env->CallVoidMethod(mDeviceAppObject, mPostEventMethod, static_cast(event)); + env->CallVoidMethod(mDeviceAppObject, mPostEventMethod, static_cast(event)); if (env->ExceptionCheck()) { ChipLogError(Zcl, "Failed to call DeviceAppJNI 'postEventMethod' method"); @@ -139,8 +140,7 @@ JNI_METHOD(void, setDACProvider)(JNIEnv *, jobject, jobject provider) { if (!chip::Credentials::IsDeviceAttestationCredentialsProviderSet()) { - JNIDACProvider * p = new JNIDACProvider(provider); - chip::Credentials::SetDeviceAttestationCredentialsProvider(p); + chip::Credentials::SetDeviceAttestationCredentialsProvider(chip::Credentials::Examples::GetExampleDACProvider()); } } diff --git a/examples/virtual-device-app/android/java/OnOffManager.cpp b/examples/virtual-device-app/android/java/OnOffManager.cpp index 09d5265df8ab09..c5a12dfebf30bf 100644 --- a/examples/virtual-device-app/android/java/OnOffManager.cpp +++ b/examples/virtual-device-app/android/java/OnOffManager.cpp @@ -97,10 +97,10 @@ CHIP_ERROR OnOffManager::InitializeWithObjects(jobject managerObject) jclass OnOffManagerClass = env->GetObjectClass(managerObject); VerifyOrReturnLogError(OnOffManagerClass != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - mHandleOnOffChangedMethod = env->GetMethodID(OnOffManagerClass, "HandleOnOffChanged", "(Z)V"); + mHandleOnOffChangedMethod = env->GetMethodID(OnOffManagerClass, "handleOnOffChanged", "(Z)V"); if (mHandleOnOffChangedMethod == nullptr) { - ChipLogError(Zcl, "Failed to access OnOffManager 'HandleOnOffChanged' method"); + ChipLogError(Zcl, "Failed to access OnOffManager 'handleOnOffChanged' method"); env->ExceptionClear(); return CHIP_ERROR_INVALID_ARGUMENT; } diff --git a/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/Clusters.java b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/Clusters.java new file mode 100644 index 00000000000000..47e1dd0f5192a4 --- /dev/null +++ b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/Clusters.java @@ -0,0 +1,138 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.matter.virtual.device.app; + +public class Clusters { + + public static final long ClusterId_PowerConfiguration = 0x00000001; + public static final long ClusterId_DeviceTemperatureConfiguration = 0x00000002; + public static final long ClusterId_Identify = 0x00000003; + public static final long ClusterId_Groups = 0x00000004; + public static final long ClusterId_Scenes = 0x00000005; + public static final long ClusterId_OnOff = 0x00000006; + public static final long ClusterId_OnOffSwitchConfiguration = 0x00000007; + public static final long ClusterId_LevelControl = 0x00000008; + public static final long ClusterId_Alarms = 0x00000009; + public static final long ClusterId_Time = 0x0000000A; + public static final long ClusterId_BinaryInputBasic = 0x0000000F; + public static final long ClusterId_PowerProfile = 0x0000001A; + public static final long ClusterId_ApplianceControl = 0x0000001B; + public static final long ClusterId_PulseWidthModulation = 0x0000001C; + public static final long ClusterId_Descriptor = 0x0000001D; + public static final long ClusterId_Binding = 0x0000001E; + public static final long ClusterId_AccessControl = 0x0000001F; + public static final long ClusterId_PollControl = 0x00000020; + public static final long ClusterId_Actions = 0x00000025; + public static final long ClusterId_Basic = 0x00000028; + public static final long ClusterId_OtaSoftwareUpdateProvider = 0x00000029; + public static final long ClusterId_OtaSoftwareUpdateRequestor = 0x0000002A; + public static final long ClusterId_LocalizationConfiguration = 0x0000002B; + public static final long ClusterId_LocalizationTimeFormat = 0x0000002C; + public static final long ClusterId_LocalizationUnit = 0x0000002D; + public static final long ClusterId_PowerSourceConfiguration = 0x0000002E; + public static final long ClusterId_PowerSource = 0x0000002F; + public static final long ClusterId_GeneralCommissioning = 0x00000030; + public static final long ClusterId_NetworkCommissioning = 0x00000031; + public static final long ClusterId_DiagnosticLogs = 0x00000032; + public static final long ClusterId_GeneralDiagnostics = 0x00000033; + public static final long ClusterId_SoftwareDiagnostics = 0x00000034; + public static final long ClusterId_ThreadNetworkDiagnostics = 0x00000035; + public static final long ClusterId_WiFiNetworkDiagnostics = 0x00000036; + public static final long ClusterId_EthernetNetworkDiagnostics = 0x00000037; + public static final long ClusterId_TimeSynchronization = 0x00000038; + public static final long ClusterId_BridgedDeviceBasic = 0x00000039; + public static final long ClusterId_Switch = 0x0000003B; + public static final long ClusterId_AdministratorCommissioning = 0x0000003C; + public static final long ClusterId_OperationalCredentials = 0x0000003E; + public static final long ClusterId_GroupKeyManagement = 0x0000003F; + public static final long ClusterId_FixedLabel = 0x00000040; + public static final long ClusterId_UserLabel = 0x00000041; + public static final long ClusterId_ProxyConfiguration = 0x00000042; + public static final long ClusterId_ProxyDiscovery = 0x00000043; + public static final long ClusterId_ProxyValid = 0x00000044; + public static final long ClusterId_BooleanState = 0x00000045; + public static final long ClusterId_ModeSelect = 0x00000050; + public static final long ClusterId_ShadeConfiguration = 0x00000100; + public static final long ClusterId_DoorLock = 0x00000101; + public static final long ClusterId_WindowCovering = 0x00000102; + public static final long ClusterId_BarrierControl = 0x00000103; + public static final long ClusterId_PumpConfigurationAndControl = 0x00000200; + public static final long ClusterId_Thermostat = 0x00000201; + public static final long ClusterId_FanControl = 0x00000202; + public static final long ClusterId_DehumidificationControl = 0x00000203; + public static final long ClusterId_ThermostatUserInterfaceConfiguration = 0x00000204; + public static final long ClusterId_ColorControl = 0x00000300; + public static final long ClusterId_BallastConfiguration = 0x00000301; + public static final long ClusterId_IlluminanceMeasurement = 0x00000400; + public static final long ClusterId_TemperatureMeasurement = 0x00000402; + public static final long ClusterId_PressureMeasurement = 0x00000403; + public static final long ClusterId_FlowMeasurement = 0x00000404; + public static final long ClusterId_RelativeHumidityMeasurement = 0x00000405; + public static final long ClusterId_OccupancySensing = 0x00000406; + public static final long ClusterId_CarbonMonoxideConcentrationMeasurement = 0x0000040C; + public static final long ClusterId_CarbonDioxideConcentrationMeasurement = 0x0000040D; + public static final long ClusterId_EthyleneConcentrationMeasurement = 0x0000040E; + public static final long ClusterId_EthyleneOxideConcentrationMeasurement = 0x0000040F; + public static final long ClusterId_HydrogenConcentrationMeasurement = 0x00000410; + public static final long ClusterId_HydrogenSulphideConcentrationMeasurement = 0x00000411; + public static final long ClusterId_NitricOxideConcentrationMeasurement = 0x00000412; + public static final long ClusterId_NitrogenDioxideConcentrationMeasurement = 0x00000413; + public static final long ClusterId_OxygenConcentrationMeasurement = 0x00000414; + public static final long ClusterId_OzoneConcentrationMeasurement = 0x00000415; + public static final long ClusterId_SulfurDioxideConcentrationMeasurement = 0x00000416; + public static final long ClusterId_DissolvedOxygenConcentrationMeasurement = 0x00000417; + public static final long ClusterId_BromateConcentrationMeasurement = 0x00000418; + public static final long ClusterId_ChloraminesConcentrationMeasurement = 0x00000419; + public static final long ClusterId_ChlorineConcentrationMeasurement = 0x0000041A; + public static final long ClusterId_FecalColiformAndEColiConcentrationMeasurement = 0x0000041B; + public static final long ClusterId_FluorideConcentrationMeasurement = 0x0000041C; + public static final long ClusterId_HaloaceticAcidsConcentrationMeasurement = 0x0000041D; + public static final long ClusterId_TotalTrihalomethanesConcentrationMeasurement = 0x0000041E; + public static final long ClusterId_TotalColiformBacteriaConcentrationMeasurement = 0x0000041F; + public static final long ClusterId_TurbidityConcentrationMeasurement = 0x00000420; + public static final long ClusterId_CopperConcentrationMeasurement = 0x00000421; + public static final long ClusterId_LeadConcentrationMeasurement = 0x00000422; + public static final long ClusterId_ManganeseConcentrationMeasurement = 0x00000423; + public static final long ClusterId_SulfateConcentrationMeasurement = 0x00000424; + public static final long ClusterId_BromodichloromethaneConcentrationMeasurement = 0x00000425; + public static final long ClusterId_BromoformConcentrationMeasurement = 0x00000426; + public static final long ClusterId_ChlorodibromomethaneConcentrationMeasurement = 0x00000427; + public static final long ClusterId_ChloroformConcentrationMeasurement = 0x00000428; + public static final long ClusterId_SodiumConcentrationMeasurement = 0x00000429; + public static final long ClusterId_IasZone = 0x00000500; + public static final long ClusterId_IasAce = 0x00000501; + public static final long ClusterId_IasWd = 0x00000502; + public static final long ClusterId_WakeOnLan = 0x00000503; + public static final long ClusterId_Channel = 0x00000504; + public static final long ClusterId_TargetNavigator = 0x00000505; + public static final long ClusterId_MediaPlayback = 0x00000506; + public static final long ClusterId_MediaInput = 0x00000507; + public static final long ClusterId_LowPower = 0x00000508; + public static final long ClusterId_KeypadInput = 0x00000509; + public static final long ClusterId_ContentLauncher = 0x0000050A; + public static final long ClusterId_AudioOutput = 0x0000050B; + public static final long ClusterId_ApplicationLauncher = 0x0000050C; + public static final long ClusterId_ApplicationBasic = 0x0000050D; + public static final long ClusterId_AccountLogin = 0x0000050E; + public static final long ClusterId_TestCluster = 0xFFF1FC05; + public static final long ClusterId_Messaging = 0x00000703; + public static final long ClusterId_ApplianceIdentification = 0x00000B00; + public static final long ClusterId_MeterIdentification = 0x00000B01; + public static final long ClusterId_ApplianceEventsAndAlert = 0x00000B02; + public static final long ClusterId_ApplianceStatistics = 0x00000B03; + public static final long ClusterId_ElectricalMeasurement = 0x00000B04; +} diff --git a/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceApp.java b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceApp.java index 6d86374cdf7b0c..3df52b020487e1 100644 --- a/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceApp.java +++ b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceApp.java @@ -20,22 +20,25 @@ import android.util.Log; public class DeviceApp { - private DeviceAppCallback mCallback; + private DeviceAppCallback mCallback = null; private static final String TAG = "DeviceApp"; - public DeviceApp(DeviceAppCallback callback) { - mCallback = callback; + public DeviceApp() { nativeInit(); } - private void postClusterInit(int clusterId, int endpoint) { + public void setCallback(DeviceAppCallback callback) { + mCallback = callback; + } + + private void postClusterInit(long clusterId, int endpoint) { Log.d(TAG, "postClusterInit for " + clusterId + " at " + endpoint); if (mCallback != null) { mCallback.onClusterInit(this, clusterId, endpoint); } } - private void postEvent(int event) { + private void postEvent(long event) { Log.d(TAG, "postEvent : " + event); if (mCallback != null) { mCallback.onEvent(event); diff --git a/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceAppCallback.java b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceAppCallback.java index d0cb46a341d448..6b417c24f41f08 100644 --- a/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceAppCallback.java +++ b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceAppCallback.java @@ -17,7 +17,7 @@ package com.matter.virtual.device.app; public interface DeviceAppCallback { - void onClusterInit(DeviceApp app, int clusterId, int endpoint); + void onClusterInit(DeviceApp app, long clusterId, int endpoint); - void onEvent(int event); + void onEvent(long event); } diff --git a/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceEventType.java b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceEventType.java new file mode 100644 index 00000000000000..07b0f0e6219343 --- /dev/null +++ b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceEventType.java @@ -0,0 +1,49 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.matter.virtual.device.app; + +public class DeviceEventType { + public static final long EventId_WiFiConnectivityChange = 0x8000; + public static final long EventId_ThreadConnectivityChange = 0x8001; + public static final long EventId_InternetConnectivityChange = 0x8002; + public static final long EventId_ServiceConnectivityChange = 0x8003; + public static final long EventId_ServiceProvisioningChange = 0x8004; + public static final long EventId_TimeSyncChange = 0x8005; + public static final long EventId_ICDPollingIntervalChang = 0x8006; + public static final long EventId_CHIPoBLEConnectionEstablished = 0x8007; + public static final long EventId_CHIPoBLEConnectionClosed = 0x8008; + public static final long EventId_ThreadStateChange = 0x8009; + public static final long EventId_ThreadInterfaceStateChange = 0x800A; + public static final long EventId_CHIPoBLEAdvertisingChange = 0x800B; + public static final long EventId_InterfaceIpAddressChanged = 0x800C; + public static final long EventId_CommissioningWindowStatusChanged = 0x800D; + public static final long EventId_CommissioningComplete = 0x800E; + public static final long EventId_FailSafeTimerExpired = 0x800F; + public static final long EventId_FailSafeStateChanged = 0x8010; + public static final long EventId_OperationalNetworkEnabled = 0x8011; + public static final long EventId_DnssdInitialized = 0x8012; + public static final long EventId_DnssdRestartNeeded = 0x8013; + public static final long EventId_BindingsChangedViaCluster = 0x8014; + public static final long EventId_OtaStateChanged = 0x8015; + public static final long EventId_ServerReady = 0x8016; + public static final long EventId_ChipMsgSentEvent = 0x8017; + public static final long EventId_ChipMsgRxEventHandled = 0x8018; + public static final long EventId_AppWakeUpEvent = 0x8018; + + // out of public event range (0x8000) + public static final long EventId_FabricRemoved = 0x9FFF; +} diff --git a/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/OnOffManager.java b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/OnOffManager.java index d6ec0f2d56d543..5a6182e86afbd9 100644 --- a/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/OnOffManager.java +++ b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/OnOffManager.java @@ -1,11 +1,15 @@ package com.matter.virtual.device.app; public interface OnOffManager { + + /** initialize OnOff value by DeviceApp */ + void initAttributeValue(); + /** - * Notify that the OnOff value be changed by matter and should effect it. Note, set by TvApp will - * also trigger this function, so must check if value is same + * Notify that the OnOff value be changed by matter and should effect it. Note, set by DeviceApp + * will also trigger this function, so must check if value is same * * @param value */ - void HandleOnOffChanged(boolean value); + void handleOnOffChanged(boolean value); } diff --git a/examples/virtual-device-app/virtual-device-common/include/CHIPProjectAppConfig.h b/examples/virtual-device-app/virtual-device-common/include/CHIPProjectAppConfig.h index baaeab39b590dc..ecb57a91b07222 100644 --- a/examples/virtual-device-app/virtual-device-common/include/CHIPProjectAppConfig.h +++ b/examples/virtual-device-app/virtual-device-common/include/CHIPProjectAppConfig.h @@ -38,9 +38,10 @@ #define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_TYPE 1 #define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 +#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 259 // 0x0103 On/Off Light Switch #define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_NAME 1 -#define CHIP_DEVICE_CONFIG_DEVICE_NAME "Matter Device" +#define CHIP_DEVICE_CONFIG_DEVICE_NAME "Matter Virtual Device" // Enable app platform #define CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED 0 From 963a859806b8b5c2c030599cf47f2311b7431a51 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Mon, 7 Aug 2023 14:03:19 -0400 Subject: [PATCH 32/74] [Silabs] Add ICD configurations to the Silabs Light-Switch app (#28559) * Enable ICDM cluster on light-switch * enable LIT ICDs on light-switch * update esp * Restyled by gn --------- Co-authored-by: Restyled.io --- .../esp32/main/CMakeLists.txt | 2 + .../light-switch-app.matter | 32 ++ .../light-switch-common/light-switch-app.zap | 344 +++++++++++++++++- .../light-switch-app/silabs/openthread.gn | 2 +- .../light-switch-app/silabs/openthread.gni | 14 + 5 files changed, 384 insertions(+), 10 deletions(-) diff --git a/examples/light-switch-app/esp32/main/CMakeLists.txt b/examples/light-switch-app/esp32/main/CMakeLists.txt index 37a97c711e6cf6..5bdac22300b33f 100644 --- a/examples/light-switch-app/esp32/main/CMakeLists.txt +++ b/examples/light-switch-app/esp32/main/CMakeLists.txt @@ -31,6 +31,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information" @@ -58,6 +59,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-synchronization-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/icd-management-server" PRIV_REQUIRES chip QRCode bt app_update driver nvs_flash spi_flash) get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH) diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index fa297694008ccc..5984488b8c4032 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -1957,6 +1957,30 @@ server cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** Allows servers to ensure that listed clients are notified when a server is available for communication. */ +server cluster IcdManagement = 70 { + bitmap Feature : BITMAP32 { + kCheckInProtocolSupport = 0x1; + } + + fabric_scoped struct MonitoringRegistrationStruct { + fabric_sensitive node_id checkInNodeID = 1; + fabric_sensitive int64u monitoredSubject = 2; + fabric_sensitive octet_string<16> key = 3; + fabric_idx fabricIndex = 254; + } + + readonly attribute int32u idleModeInterval = 0; + readonly attribute int32u activeModeInterval = 1; + readonly attribute int16u activeModeThreshold = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + /** Attributes and commands for controlling the color properties of a color-capable light. */ client cluster ColorControl = 768 { enum ColorLoopAction : ENUM8 { @@ -2581,6 +2605,14 @@ endpoint 0 { ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } + + server cluster IcdManagement { + callback attribute idleModeInterval default = 500; + callback attribute activeModeInterval default = 300; + callback attribute activeModeThreshold default = 300; + ram attribute featureMap default = 0x0000; + ram attribute clusterRevision default = 1; + } } endpoint 1 { device type ma_onofflightswitch = 259, version 1; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index fd8e23449ecf4e..3f659df7e99319 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 10, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5808,11 +5834,291 @@ "reportableChange": 0 } ] + }, + { + "name": "ICD Management", + "code": 70, + "mfgCode": null, + "define": "ICD_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "ICD Management", + "code": 70, + "mfgCode": null, + "define": "ICD_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RegisterClientResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "IdleModeInterval", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "500", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeInterval", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "300", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeThreshold", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "300", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RegisteredClients", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ICDCounter", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientsSupportedPerFabric", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] } ] }, { + "id": 8, "name": "MA-onofflightswitch", + "deviceTypeRef": { + "id": 15, + "code": 259, + "profileId": 259, + "label": "MA-onofflightswitch", + "name": "MA-onofflightswitch" + }, + "deviceTypes": [ + { + "id": 15, + "code": 259, + "profileId": 259, + "label": "MA-onofflightswitch", + "name": "MA-onofflightswitch" + } + ], + "deviceTypeRefs": [ + 15 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 259 + ], "deviceTypeName": "MA-onofflightswitch", "deviceTypeCode": 259, "deviceTypeProfileId": 259, @@ -8460,7 +8766,33 @@ ] }, { + "id": 9, "name": "MA-genericswitch", + "deviceTypeRef": { + "id": 20, + "code": 15, + "profileId": 259, + "label": "MA-genericswitch", + "name": "MA-genericswitch" + }, + "deviceTypes": [ + { + "id": 20, + "code": 15, + "profileId": 259, + "label": "MA-genericswitch", + "name": "MA-genericswitch" + } + ], + "deviceTypeRefs": [ + 20 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 15 + ], "deviceTypeName": "MA-genericswitch", "deviceTypeCode": 15, "deviceTypeProfileId": 259, @@ -9757,27 +10089,21 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-onofflightswitch", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 259 + "networkId": 0 }, { "endpointTypeName": "MA-genericswitch", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 2, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 15 + "networkId": 0 } ], "log": [] diff --git a/examples/light-switch-app/silabs/openthread.gn b/examples/light-switch-app/silabs/openthread.gn index b05216fc9d7eae..27aa6c766a17e6 100644 --- a/examples/light-switch-app/silabs/openthread.gn +++ b/examples/light-switch-app/silabs/openthread.gn @@ -23,7 +23,7 @@ check_system_includes = true default_args = { target_cpu = "arm" target_os = "freertos" - chip_openthread_ftd = true + chip_openthread_ftd = false import("//openthread.gni") } diff --git a/examples/light-switch-app/silabs/openthread.gni b/examples/light-switch-app/silabs/openthread.gni index 344d0ea4973481..09acff17959824 100644 --- a/examples/light-switch-app/silabs/openthread.gni +++ b/examples/light-switch-app/silabs/openthread.gni @@ -24,3 +24,17 @@ chip_enable_openthread = true openthread_external_platform = "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" + +# ICD Default configurations +chip_enable_icd_server = true +chip_subscription_timeout_resumption = false +sl_use_subscription_synching = true + +# Openthread Configuration flags +sl_ot_idle_interval_ms = 30000 # 30s Idle Intervals +sl_ot_active_interval_ms = 500 # 500ms Active Intervals + +# ICD Matter Configuration flags +sl_idle_mode_interval_ms = 3600000 # 60min Idle Mode Interval +sl_active_mode_interval_ms = 60000 # 60s Active Mode Interval +sl_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold From 63179b0f527435c2b81c306803c5eb3e9788d676 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Mon, 7 Aug 2023 15:47:07 -0700 Subject: [PATCH 33/74] [Java] Add support for Timestamp type in EventState (#28540) * [Java] Add Timestamp type in EventState * Restyled by whitespace * Restyled by clang-format * Address reivew comments * Restyled by clang-format --------- Co-authored-by: Restyled.io --- .../clusterclient/WildcardFragment.kt | 3 +- src/controller/java/AndroidCallbacks.cpp | 34 +++++++++++++++---- .../devicecontroller/model/EventState.java | 17 +++++++--- 3 files changed, 42 insertions(+), 12 deletions(-) diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt index a755b1a441f03a..f03f68eee8c089 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt @@ -225,7 +225,8 @@ class WildcardFragment : Fragment() { for (event in events) { stringBuilder.append("\t\teventNumber: ${event.eventNumber}\n") stringBuilder.append("\t\tpriorityLevel: ${event.priorityLevel}\n") - stringBuilder.append("\t\tsystemTimeStamp: ${event.systemTimeStamp}\n") + stringBuilder.append("\t\ttimestampType: ${event.timestampType}\n") + stringBuilder.append("\t\ttimestampValue: ${event.timestampValue}\n") val eventName = ChipIdLookup.eventIdToName(clusterId, eventId) stringBuilder.append("\t\t$eventName: ${event.value}\n") diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index 5d787dc35c45cc..f6d9499d8f8d2a 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -21,6 +21,7 @@ #include #include #endif +#include #include #include #include @@ -35,6 +36,9 @@ namespace chip { namespace Controller { +static const int MILLIS_SINCE_BOOT = 0; +static const int MILLIS_SINCE_EPOCH = 1; + GetConnectedDeviceCallback::GetConnectedDeviceCallback(jobject wrapperCallback, jobject javaCallback) : mOnSuccess(OnDeviceConnectedFn, this), mOnFailure(OnDeviceConnectionFailureFn, this) { @@ -364,9 +368,25 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); - jlong eventNumber = static_cast(aEventHeader.mEventNumber); - jint priorityLevel = static_cast(aEventHeader.mPriorityLevel); - jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); + jlong eventNumber = static_cast(aEventHeader.mEventNumber); + jint priorityLevel = static_cast(aEventHeader.mPriorityLevel); + jlong timestampValue = static_cast(aEventHeader.mTimestamp.mValue); + + jint timestampType = 0; + if (aEventHeader.mTimestamp.mType == app::Timestamp::Type::kSystem) + { + timestampType = static_cast(MILLIS_SINCE_BOOT); + } + else if (aEventHeader.mTimestamp.mType == app::Timestamp::Type::kEpoch) + { + timestampType = static_cast(MILLIS_SINCE_EPOCH); + } + else + { + ChipLogError(Controller, "Unsupported event timestamp type"); + ReportError(nullptr, eventPathObj, CHIP_ERROR_INVALID_ARGUMENT); + return; + } jobject value = nullptr; #if USE_JAVA_TLV_ENCODE_DECODE @@ -407,13 +427,13 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV // Create EventState object jclass eventStateCls; err = JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/model/EventState", eventStateCls); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Could not find EventState class")); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Failed to find EventState class")); VerifyOrReturn(eventStateCls != nullptr, ChipLogError(Controller, "Could not find EventState class")); chip::JniClass eventStateJniCls(eventStateCls); - jmethodID eventStateCtor = env->GetMethodID(eventStateCls, "", "(JIJLjava/lang/Object;[BLjava/lang/String;)V"); + jmethodID eventStateCtor = env->GetMethodID(eventStateCls, "", "(JIIJLjava/lang/Object;[BLjava/lang/String;)V"); VerifyOrReturn(eventStateCtor != nullptr, ChipLogError(Controller, "Could not find EventState constructor")); - jobject eventStateObj = env->NewObject(eventStateCls, eventStateCtor, eventNumber, priorityLevel, timestamp, value, - jniByteArray.jniValue(), jsonString.jniValue()); + jobject eventStateObj = env->NewObject(eventStateCls, eventStateCtor, eventNumber, priorityLevel, timestampType, timestampValue, + value, jniByteArray.jniValue(), jsonString.jniValue()); VerifyOrReturn(eventStateObj != nullptr, ChipLogError(Controller, "Could not create EventState object")); // Add EventState to NodeState diff --git a/src/controller/java/src/chip/devicecontroller/model/EventState.java b/src/controller/java/src/chip/devicecontroller/model/EventState.java index 2856f54ce47ce4..23988c7884687f 100644 --- a/src/controller/java/src/chip/devicecontroller/model/EventState.java +++ b/src/controller/java/src/chip/devicecontroller/model/EventState.java @@ -23,11 +23,14 @@ /** Represents the reported value of an attribute in object form, TLV and JSON. */ public final class EventState { + public static final int MILLIS_SINCE_BOOT = 0; + public static final int MILLIS_SINCE_EPOCH = 1; private static final String TAG = "EventState"; private long eventNumber; private int priorityLevel; - private long systemTimeStamp; + private int timestampType; + private long timestampValue; private Object valueObject; private byte[] tlv; @@ -36,13 +39,15 @@ public final class EventState { public EventState( long eventNumber, int priorityLevel, + int timestampType, long systemTimeStamp, Object valueObject, byte[] tlv, String jsonString) { this.eventNumber = eventNumber; this.priorityLevel = priorityLevel; - this.systemTimeStamp = systemTimeStamp; + this.timestampType = timestampType; + this.timestampValue = timestampValue; this.valueObject = valueObject; this.tlv = tlv; @@ -61,8 +66,12 @@ public int getPriorityLevel() { return priorityLevel; } - public long getSystemTimeStamp() { - return systemTimeStamp; + public int getTimestampType() { + return timestampType; + } + + public long getTimestampValue() { + return timestampValue; } public Object getValue() { From 367a0c672c18e0137e0162c15b78adbcb039a33a Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Tue, 8 Aug 2023 13:20:47 +1200 Subject: [PATCH 34/74] Get configure working again and fix the minimal build (#28547) * Don't bootstrap in minimal-build workflow The configure script is a replacement for running PW bootstrap, so running bootstrap first makes this no longer a valid test of how the configure script sets up the build environment from scratch. * configure: bootstrap pip from pypa.io if necessary This is a workaround for the Debian / Ubuntu missing the ensurepip module used by venv unless python3-venv is installed, which is "suggested" but not required by the python3 package, and hence may or may not be installed in build environments. (https://bugs.launchpad.net/bugs/1290847) Also avoid := syntax which is unavailable on Python 3.7 * configure: use x64 build of zap even on arm (there is no mac arm build) * configure: Add matter_ argument prefixes * Revert pigweed to 0889de6~1 0889de6 introduced https://issues.pigweed.dev/issues/294886611 which breaks the configure-based build. --- .github/workflows/minimal-build.yaml | 6 +++-- scripts/configure | 38 ++++++++++++++++++---------- scripts/configure.impl.py | 27 ++++++++++++++------ third_party/pigweed/repo | 2 +- 4 files changed, 49 insertions(+), 24 deletions(-) diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index 794d108446fa4d..c980dcd3e0a8e6 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -36,10 +36,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap + + - name: Checkout submodules # but don't bootstrap! + uses: ./.github/actions/checkout-submodules with: platform: linux + - name: Configure and build All Clusters App run: | CC=gcc CXX=g++ scripts/configure --project=examples/all-clusters-app/linux && ./ninja-build diff --git a/scripts/configure b/scripts/configure index d48971862e2943..a4e7536e627b23 100755 --- a/scripts/configure +++ b/scripts/configure @@ -226,9 +226,22 @@ function check_build_env() { function configure_python_env() { progress "Setting up Python venv" - "$PYTHON" -m venv --clear "$BUILD_ENV_PATH" + # Debian and Ubuntu ship python3 with a broken venv module unless the + # python3-venv package is installed (https://bugs.launchpad.net/bugs/1290847) + local withoutpip=() pip="${BUILD_ENV_PATH}/bin/pip" + if ! "$PYTHON" -m ensurepip --version >/dev/null 2>&1; then + withoutpip=(--without-pip) pip="${pip}.pyz" # bootstrapped below + fi + "$PYTHON" -m venv --clear "${withoutpip[@]}" "$BUILD_ENV_PATH" info "$BUILD_ENV_PATH" + # Download a standalone pip.pyz from pypa.io if necessary + if [[ -n "$withoutpip" ]]; then + progress "Bootstrapping pip via pypa.io (venv module is missing ensurepip dependency)" + call_impl download https://bootstrap.pypa.io/pip/pip.pyz "$pip" + info "ok" + fi + # Install our auto-loading venvactivate module so that running scripts via # the venv python has the side-effect of fully activating the environment. local sitepkgs=("${BUILD_ENV_PATH}/lib/python"*"/site-packages") @@ -236,7 +249,9 @@ function configure_python_env() { cp "${CHIP_ROOT}/scripts/configure.venv/venvactivate".{pth,py} "${sitepkgs}/" progress "Installing Python build dependencies" - "${BUILD_ENV_PATH}/bin/pip" install --require-virtualenv --quiet --upgrade pip wheel + # Ensure pip and wheel are up to date first (using pip.pyz if necessary) + "${BUILD_ENV_PATH}/bin/python3" "$pip" install --require-virtualenv --quiet --upgrade pip wheel + "${BUILD_ENV_PATH}/bin/pip" install --require-virtualenv --quiet \ -r "${CHIP_ROOT}/scripts/setup/requirements.build.txt" \ -c "${CHIP_ROOT}/scripts/setup/constraints.txt" @@ -254,19 +269,16 @@ function finalize_build_env() { } function download_zap() { - local version platform arch + local version read -r version <"${CHIP_ROOT}/scripts/setup/zap.version" - case "$OSTYPE" in - linux*) platform=linux ;; - darwin*) platform=mac ;; - *) fail "Unable to determine zap platform for OSTYPE='$OSTYPE'" ;; - esac - case "$(uname -m)" in - arm64) arch=arm64 ;; - x86_64) arch=x64 ;; - *) fail "Unable to determine zap architecture for 'uname -m'='$(uname -m)'" ;; + local platform="$(uname -sm)" flavor + case "$platform" in + Linux\ x86_64) flavor=linux-x64 ;; + Linux\ arm64) flavor=linux-arm64 ;; + Darwin\ *) flavor=mac-x64 ;; # there is no mac arm build of zap (can run x64 via Rosetta) + *) fail "Unable to determine zap flavor for $platform" ;; esac - local url="https://github.com/project-chip/zap/releases/download/${version}/zap-${platform}-${arch}.zip" + local url="https://github.com/project-chip/zap/releases/download/${version}/zap-${flavor}.zip" progress "Installing zap-cli from $url" call_impl download_and_extract_zip "$url" "${BUILD_ENV_PATH}/bin" zap-cli diff --git a/scripts/configure.impl.py b/scripts/configure.impl.py index b51e40fa00cf55..cedb67a2a5fb05 100644 --- a/scripts/configure.impl.py +++ b/scripts/configure.impl.py @@ -24,6 +24,10 @@ import zipfile +def download(url, dest): + urllib.request.urlretrieve(url, dest) + + def download_and_extract_zip(url, dest_dir, *member_names): file, *_ = urllib.request.urlretrieve(url) with zipfile.ZipFile(file) as zip: @@ -44,8 +48,10 @@ def process_project_args(gn_args_json_file, *params): class ProjectArgProcessor: # Prefixes to try when mapping parameters to GN arguments - BOOL_ARG_PREFIXES = ('is_', 'enable_', 'use_', 'chip_', 'chip_enable', 'chip_use_', 'chip_config_') - GENERIC_ARG_PREFIXES = ('chip_', 'chip_config_') + BOOL_ARG_PREFIXES = ('is_', 'enable_', 'use_', + 'chip_', 'chip_enable_', 'chip_use_', 'chip_config_', + 'matter_', 'matter_enable_', 'matter_use_', 'matter_config_') + GENERIC_ARG_PREFIXES = ('chip_', 'chip_config_', 'matter_', 'matter_config_') gn_args = {} # GN arg -> type ('s'tring, 'b'ool, 'i'integer, '[' list, '{' struct) args = collections.OrderedDict() # collected arguments @@ -84,7 +90,8 @@ def add_env_arg(self, arg, envvar, default=None, list=False): value = os.environ.get(envvar, default) if not value: return - if not (type := self.gn_args.get(arg, None)): + type = self.gn_args.get(arg, None) + if not type: info("Warning: Not propagating %s, project has no build arg '%s'" % (envvar, arg)) return self.args[arg] = json.dumps(value if type != '[' else value.split() if list else [value]) @@ -94,7 +101,8 @@ def gn_arg(self, name, prefixes=(), type=None): arg = name.translate(str.maketrans('-', '_')) candidates = [p + arg for p in (('',) + prefixes) if (p + arg) in self.gn_args] preferred = [c for c in candidates if self.gn_args[c] == type] if type else [] - if not (match := next(iter(preferred + candidates), None)): + match = next(iter(preferred + candidates), None) + if not match: info("Warning: Project has no build arg '%s'" % arg) return match @@ -109,7 +117,8 @@ def process_triplet_parameter(self, name, value): self.add_arg(prefix + 'os', triplet[1 if len(triplet) == 2 else 2]) def process_enable_parameter(self, name, value): - if not (arg := self.gn_arg(name[len('enable-'):], self.BOOL_ARG_PREFIXES, 'b')): + arg = self.gn_arg(name[len('enable-'):], self.BOOL_ARG_PREFIXES, 'b') + if not arg: return if self.gn_args[arg] != 'b': fail("Project build arg '%s' is not a boolean" % arg) @@ -118,7 +127,8 @@ def process_enable_parameter(self, name, value): self.add_arg(arg, value is None) def process_generic_parameter(self, name, value): - if not (arg := self.gn_arg(name, self.GENERIC_ARG_PREFIXES)): + arg = self.gn_arg(name, self.GENERIC_ARG_PREFIXES) + if not arg: return if self.gn_args[arg] == 'b': fail("Project build arg '%s' is a boolean, use --enable-..." % arg) @@ -137,9 +147,10 @@ def process_parameter(self, name, value): def process_parameters(self, args): """Process GNU-style configure command line parameters""" for arg in args: - if not (m := re.fullmatch(r'--([a-z][a-z0-9-]*)(?:=(.*))?', arg)): + match = re.fullmatch(r'--([a-z][a-z0-9-]*)(?:=(.*))?', arg) + if not match: fail("Invalid argument: '%s'" % arg) - self.process_parameter(m.group(1), m.group(2)) + self.process_parameter(match.group(1), match.group(2)) def info(message): diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index cf4291da443f5b..f04f934b3c6991 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit cf4291da443f5b2db18827747bb66499459de5bd +Subproject commit f04f934b3c69910f866059471625a2bc95e113c4 From b75b249592713671811c256a6fb9da3a0ebb3bda Mon Sep 17 00:00:00 2001 From: William Date: Tue, 8 Aug 2023 14:00:31 +0100 Subject: [PATCH 35/74] Explicitly call the EndianPutSigned for signed integers. (#28374) * Explicitly call the EndianPutSigned for signed integers. * Added constexpr to compile for Android. --- src/app/SafeAttributePersistenceProvider.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/SafeAttributePersistenceProvider.h b/src/app/SafeAttributePersistenceProvider.h index c6cba4e9f7135d..ed02d6039043ad 100644 --- a/src/app/SafeAttributePersistenceProvider.h +++ b/src/app/SafeAttributePersistenceProvider.h @@ -54,7 +54,14 @@ class SafeAttributePersistenceProvider { uint8_t value[sizeof(T)]; auto w = Encoding::LittleEndian::BufferWriter(value, sizeof(T)); - w.EndianPut(uint64_t(aValue), sizeof(T)); + if constexpr (std::is_signed_v) + { + w.EndianPutSigned(aValue, sizeof(T)); + } + else + { + w.EndianPut(aValue, sizeof(T)); + } return SafeWriteValue(aPath, ByteSpan(value)); } @@ -76,7 +83,7 @@ class SafeAttributePersistenceProvider return err; } - chip::Encoding::LittleEndian::Reader r(tempVal.data(), tempVal.size()); + Encoding::LittleEndian::Reader r(tempVal.data(), tempVal.size()); r.RawReadLowLevelBeCareful(&aValue); return r.StatusCode(); } From 159e12a2a5b12b0ba4d23e8d827029bf5a33953c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Aug 2023 13:28:25 +0000 Subject: [PATCH 36/74] Bump third_party/mbedtls/repo from `e15b8d2` to `f97832a` (#28555) Bumps [third_party/mbedtls/repo](https://github.com/ARMmbed/mbedtls) from `e15b8d2` to `f97832a`. - [Release notes](https://github.com/ARMmbed/mbedtls/releases) - [Commits](https://github.com/ARMmbed/mbedtls/compare/e15b8d21d62a68ac602c4f8dbfd6cb17d04bf06c...f97832a5ecb422b9fe75d39bc168962d763648e8) --- updated-dependencies: - dependency-name: third_party/mbedtls/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/mbedtls/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo index e15b8d21d62a68..f97832a5ecb422 160000 --- a/third_party/mbedtls/repo +++ b/third_party/mbedtls/repo @@ -1 +1 @@ -Subproject commit e15b8d21d62a68ac602c4f8dbfd6cb17d04bf06c +Subproject commit f97832a5ecb422b9fe75d39bc168962d763648e8 From 40694b949a044348ce0a549265de7bf3afeb1bef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Aug 2023 13:28:39 +0000 Subject: [PATCH 37/74] Bump third_party/ot-br-posix/repo from `8a6c5a0` to `b0bbad3` (#28554) Bumps [third_party/ot-br-posix/repo](https://github.com/openthread/ot-br-posix) from `8a6c5a0` to `b0bbad3`. - [Release notes](https://github.com/openthread/ot-br-posix/releases) - [Commits](https://github.com/openthread/ot-br-posix/compare/8a6c5a03a2eec6e71cfed0fe35451841ca24bb4e...b0bbad3ed28e60bef7cd206c15a9a46e0528f919) --- updated-dependencies: - dependency-name: third_party/ot-br-posix/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/ot-br-posix/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/ot-br-posix/repo b/third_party/ot-br-posix/repo index 8a6c5a03a2eec6..b0bbad3ed28e60 160000 --- a/third_party/ot-br-posix/repo +++ b/third_party/ot-br-posix/repo @@ -1 +1 @@ -Subproject commit 8a6c5a03a2eec6e71cfed0fe35451841ca24bb4e +Subproject commit b0bbad3ed28e60bef7cd206c15a9a46e0528f919 From eb29dc01b3d3eedc1269b9c752f75c800ef953c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Aug 2023 13:29:05 +0000 Subject: [PATCH 38/74] Bump third_party/imgui/repo from `19ae142` to `226923f` (#28553) Bumps [third_party/imgui/repo](https://github.com/ocornut/imgui) from `19ae142` to `226923f`. - [Release notes](https://github.com/ocornut/imgui/releases) - [Commits](https://github.com/ocornut/imgui/compare/19ae142bdddf9fcb840549b4b1279739a36c3fa6...226923fa7e9d73e28958a04884943318797d9991) --- updated-dependencies: - dependency-name: third_party/imgui/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/imgui/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/imgui/repo b/third_party/imgui/repo index 19ae142bdddf9f..226923fa7e9d73 160000 --- a/third_party/imgui/repo +++ b/third_party/imgui/repo @@ -1 +1 @@ -Subproject commit 19ae142bdddf9fcb840549b4b1279739a36c3fa6 +Subproject commit 226923fa7e9d73e28958a04884943318797d9991 From ca3dbdf02e88f97d7f2eac3abc89f67050acf963 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Tue, 8 Aug 2023 19:12:20 +0530 Subject: [PATCH 39/74] [ESP32] Fix the docs when upgrading to esp-idf v5.1 (#28570) --- docs/guides/esp32/setup_idf_chip.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/guides/esp32/setup_idf_chip.md b/docs/guides/esp32/setup_idf_chip.md index ef57e61ca3c3ac..66f6931192cca3 100644 --- a/docs/guides/esp32/setup_idf_chip.md +++ b/docs/guides/esp32/setup_idf_chip.md @@ -22,21 +22,22 @@ step. [v5.1 release](https://github.com/espressif/esp-idf/releases/tag/v5.1) ``` - $ git clone -b v5.1 --recursive --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git - $ cd esp-idf - $ ./install.sh + git clone -b v5.1 --recursive --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git + cd esp-idf + ./install.sh ``` - To update an existing esp-idf toolchain to v5.1: ``` - $ cd path/to/esp-idf - $ git fetch origin - $ git checkout v5.1 - $ git reset --hard origin/v5.1 - $ git submodule update --recursive --init - $ git clean -fdx - $ ./install.sh + cd path/to/esp-idf + git fetch --depth 1 origin v5.1 + git reset --hard FETCH_HEAD + git submodule update --depth 1 --recursive --init + + # -ff is for cleaning untracked files as well as submodules + git clean -ffdx + ./install.sh ``` ## Setup Matter environment From 40f39f7b26c482f2605fad5dffdff6784e9fdb2c Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 8 Aug 2023 11:33:21 -0400 Subject: [PATCH 40/74] Improve size calculation for our packets. (#28563) * Improve size calculation for our packets. We were hardcoding kMaxAppMessageLen and kMaxSecureSduLengthBytes, but those defines were not even consistent with each other, and both were overly conservative. Specific changes: 1. Fix computation of CHIP_SYSTEM_HEADER_RESERVE_SIZE: we don't have any "crypto headers". 2. Fix computation of kMaxAppMessageLen to use our actual packet buffer sizes and defined header sizes. 3. Fix kMaxSecureSduLengthBytes to be consistent with kMaxAppMessageLen. * Simplify the size computation logic. --- src/app/StatusResponse.h | 3 +- src/app/tests/TestReadInteraction.cpp | 55 +++++++++++--------- src/app/tests/TestWriteInteraction.cpp | 6 ++- src/controller/tests/TestWriteChunking.cpp | 38 ++++++++------ src/controller/tests/data_model/TestRead.cpp | 22 +++++--- src/system/SystemConfig.h | 54 ++++++++++--------- src/transport/raw/MessageHeader.h | 29 ++++++++++- 7 files changed, 128 insertions(+), 79 deletions(-) diff --git a/src/app/StatusResponse.h b/src/app/StatusResponse.h index 7021e3868bcb5a..93f2557b679854 100644 --- a/src/app/StatusResponse.h +++ b/src/app/StatusResponse.h @@ -22,10 +22,11 @@ #include #include #include +#include namespace chip { namespace app { -static constexpr size_t kMaxSecureSduLengthBytes = 1024; +static constexpr size_t kMaxSecureSduLengthBytes = kMaxAppMessageLen + kMaxTagLen; class StatusResponse { diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index 0026b1567abb66..0f907567ee44f4 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -67,6 +67,9 @@ chip::EndpointId kInvalidTestEndpointId = 3; chip::DataVersion kTestDataVersion1 = 3; chip::DataVersion kTestDataVersion2 = 5; +// Number of items in the list for MockAttributeId(4). +constexpr int kMockAttribute4ListLength = 6; + static chip::System::Clock::Internal::MockClock gMockClock; static chip::System::Clock::ClockBase * gRealClock; @@ -1214,7 +1217,8 @@ void TestReadInteraction::TestReadChunking(nlTestSuite * apSuite, void * apConte NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); chip::app::AttributePathParams attributePathParams[1]; - // Mock Attribute 4 is a big attribute, with 6 large OCTET_STRING + // Mock Attribute 4 is a big attribute, with kMockAttribute4ListLength large + // OCTET_STRING elements. attributePathParams[0].mEndpointId = Test::kMockEndpoint3; attributePathParams[0].mClusterId = Test::MockClusterId(2); attributePathParams[0].mAttributeId = Test::MockAttributeId(4); @@ -1234,8 +1238,10 @@ void TestReadInteraction::TestReadChunking(nlTestSuite * apSuite, void * apConte ctx.DrainAndServiceIO(); - // We get one chunk with 3 array elements, and then one chunk per element. - NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 4); + // We get one chunk with 4 array elements, and then one chunk per + // element, and the total size of the array is + // kMockAttribute4ListLength. + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1 + (kMockAttribute4ListLength - 4)); NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == 6); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, !delegate.mReadError); @@ -1380,13 +1386,16 @@ void TestReadInteraction::TestSetDirtyBetweenChunks(nlTestSuite * apSuite, void ctx.DrainAndServiceIO(); - // We should receive another (3 + 1) = 4 attribute reports represeting 6 - // array items, since the underlying path iterator should be reset to - // the beginning of the cluster it is currently iterating. + // Our list has length kMockAttribute4ListLength. Since the underlying + // path iterator should be reset to the beginning of the cluster it is + // currently iterating, we expect to get another value for our + // attribute. The way the packet boundaries happen to fall, that value + // will encode 4 items in the first IB and then one IB per item. + const int expectedIBs = 1 + (kMockAttribute4ListLength - 4); ChipLogError(DataManagement, "OLD: %d\n", currentAttributeResponsesWhenSetDirty); ChipLogError(DataManagement, "NEW: %d\n", delegate.mNumAttributeResponse); - NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == currentAttributeResponsesWhenSetDirty + 4); - NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == currentArrayItemsWhenSetDirty + 6); + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == currentAttributeResponsesWhenSetDirty + expectedIBs); + NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == currentArrayItemsWhenSetDirty + kMockAttribute4ListLength); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, !delegate.mReadError); // By now we should have closed all exchanges and sent all pending acks, so @@ -2341,7 +2350,7 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap // paths, for a total of 58 attributes. // // Attribute 0xFFFC::0xFFF1'FC02::0xFFF1'0004 (kMockEndpoint3::MockClusterId(2)::MockAttributeId(4)) - // is a list of 6 elements of size 256 bytes each, which cannot fit in a single + // is a list of kMockAttribute4ListLength elements of size 256 bytes each, which cannot fit in a single // packet, so gets list chunking applied to it. // // Because delegate.mNumAttributeResponse counts AttributeDataIB instances, not attributes, @@ -2350,21 +2359,16 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap // in the response, there will be one AttributeDataIB for the start of the list (which will include // some number of 256-byte elements), then one AttributeDataIB for each of the remaining elements. // - // When EventList is enabled, for the first report for the list attribute we receive two - // of its items in the initial list, then 4 additional items. For the second report we - // receive 3 items in the initial list followed by 3 additional items. - // - // Thus we should receive 29*2 + 4 + 3 = 65 attribute data in total. - constexpr size_t kExpectedAttributeResponse = 65; + // When EventList is enabled, for the first report for the list attribute we receive three + // of its items in the initial list, then the remaining items. For the second report we + // receive 2 items in the initial list followed by the remaining items. + constexpr size_t kExpectedAttributeResponse = 29 * 2 + (kMockAttribute4ListLength - 3) + (kMockAttribute4ListLength - 2); #else // When EventList is not enabled, the packet boundaries shift and for the first - // report for the list attribute we receive two of its items in the initial list, - // then 4 additional items. For the second report we receive 3 items in - // the initial list followed by 3 additional items. - // - // Thus we should receive 29*2 + 4 + 3 = 65 attribute data when the eventlist - // attribute is not available. - constexpr size_t kExpectedAttributeResponse = 65; + // report for the list attribute we receive four of its items in the initial list, + // then additional items. For the second report we receive 4 items in + // the initial list followed by additional items. + constexpr size_t kExpectedAttributeResponse = 29 * 2 + (kMockAttribute4ListLength - 4) + (kMockAttribute4ListLength - 4); #endif NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == kExpectedAttributeResponse); NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == 12); @@ -3460,9 +3464,10 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReport(nlTestSuite * ap gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(10)); } } - // Two chunked reports carry 4 attributeDataIB: 1 with a list of 3 items, - // and then one per remaining item. - NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 4); + // We get one chunk with 4 array elements, and then one chunk per + // element, and the total size of the array is + // kMockAttribute4ListLength. + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1 + (kMockAttribute4ListLength - 4)); NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == 6); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadClients() == 0); diff --git a/src/app/tests/TestWriteInteraction.cpp b/src/app/tests/TestWriteInteraction.cpp index a8f5d27979c152..19d0d49c940ad9 100644 --- a/src/app/tests/TestWriteInteraction.cpp +++ b/src/app/tests/TestWriteInteraction.cpp @@ -579,8 +579,9 @@ void TestWriteInteraction::TestWriteHandlerReceiveInvalidMessage(nlTestSuite * a err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + // Reserve all except the last 128 bytes, so that we make sure to chunk. app::WriteClient writeClient(&ctx.GetExchangeManager(), &writeCallback, Optional::Missing(), - static_cast(900) /* reserved buffer size */); + static_cast(kMaxSecureSduLengthBytes - 128) /* reserved buffer size */); ByteSpan list[5]; @@ -647,8 +648,9 @@ void TestWriteInteraction::TestWriteHandlerInvalidateFabric(nlTestSuite * apSuit err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + // Reserve all except the last 128 bytes, so that we make sure to chunk. app::WriteClient writeClient(&ctx.GetExchangeManager(), &writeCallback, Optional::Missing(), - static_cast(900) /* reserved buffer size */); + static_cast(kMaxSecureSduLengthBytes - 128) /* reserved buffer size */); ByteSpan list[5]; diff --git a/src/controller/tests/TestWriteChunking.cpp b/src/controller/tests/TestWriteChunking.cpp index 100ec13b01ae27..8f9fa06336b0da 100644 --- a/src/controller/tests/TestWriteChunking.cpp +++ b/src/controller/tests/TestWriteChunking.cpp @@ -203,21 +203,22 @@ void TestWriteChunking::TestListChunking(nlTestSuite * apSuite, void * apContext app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute); // - // We've empirically determined that by reserving 950 bytes in the packet buffer, we can fit 2 + // We've empirically determined that by reserving all but 75 bytes in the packet buffer, we can fit 2 // AttributeDataIBs into the packet. ~30-40 bytes covers a single write chunk, but let's 2-3x that // to ensure we'll sweep from fitting 2 chunks to 3-4 chunks. // - for (int i = 100; i > 0; i--) + constexpr size_t minReservationSize = kMaxSecureSduLengthBytes - 75 - 100; + for (uint32_t i = 100; i > 0; i--) { CHIP_ERROR err = CHIP_NO_ERROR; TestWriteCallback writeCallback; ChipLogDetail(DataManagement, "Running iteration %d\n", i); - gIterationCount = (uint32_t) i; + gIterationCount = i; app::WriteClient writeClient(&ctx.GetExchangeManager(), &writeCallback, Optional::Missing(), - static_cast(850 + i) /* reserved buffer size */); + static_cast(minReservationSize + i) /* reserved buffer size */); ByteSpan list[kTestListLength]; @@ -358,15 +359,16 @@ void TestWriteChunking::TestConflictWrite(nlTestSuite * apSuite, void * apContex app::AttributePathParams attributePath(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute); + /* use a smaller chunk (128 bytes) so we only need a few attributes in the write request. */ + constexpr size_t kReserveSize = kMaxSecureSduLengthBytes - 128; + TestWriteCallback writeCallback1; - app::WriteClient writeClient1( - &ctx.GetExchangeManager(), &writeCallback1, Optional::Missing(), - static_cast(900) /* use a smaller chunk so we only need a few attributes in the write request. */); + app::WriteClient writeClient1(&ctx.GetExchangeManager(), &writeCallback1, Optional::Missing(), + static_cast(kReserveSize)); TestWriteCallback writeCallback2; - app::WriteClient writeClient2( - &ctx.GetExchangeManager(), &writeCallback2, Optional::Missing(), - static_cast(900) /* use a smaller chunk so we only need a few attributes in the write request. */); + app::WriteClient writeClient2(&ctx.GetExchangeManager(), &writeCallback2, Optional::Missing(), + static_cast(kReserveSize)); ByteSpan list[kTestListLength]; @@ -435,15 +437,16 @@ void TestWriteChunking::TestNonConflictWrite(nlTestSuite * apSuite, void * apCon app::AttributePathParams attributePath1(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute); app::AttributePathParams attributePath2(kTestEndpointId, app::Clusters::UnitTesting::Id, kTestListAttribute2); + /* use a smaller chunk (128 bytes) so we only need a few attributes in the write request. */ + constexpr size_t kReserveSize = kMaxSecureSduLengthBytes - 128; + TestWriteCallback writeCallback1; - app::WriteClient writeClient1( - &ctx.GetExchangeManager(), &writeCallback1, Optional::Missing(), - static_cast(900) /* use a smaller chunk so we only need a few attributes in the write request. */); + app::WriteClient writeClient1(&ctx.GetExchangeManager(), &writeCallback1, Optional::Missing(), + static_cast(kReserveSize)); TestWriteCallback writeCallback2; - app::WriteClient writeClient2( - &ctx.GetExchangeManager(), &writeCallback2, Optional::Missing(), - static_cast(900) /* use a smaller chunk so we only need a few attributes in the write request. */); + app::WriteClient writeClient2(&ctx.GetExchangeManager(), &writeCallback2, Optional::Missing(), + static_cast(kReserveSize)); ByteSpan list[kTestListLength]; @@ -514,7 +517,8 @@ void RunTest(nlTestSuite * apSuite, TestContext & ctx, Instructions instructions TestWriteCallback writeCallback; std::unique_ptr writeClient = std::make_unique( &ctx.GetExchangeManager(), &writeCallback, Optional::Missing(), - static_cast(900) /* use a smaller chunk so we only need a few attributes in the write request. */); + static_cast(kMaxSecureSduLengthBytes - + 128) /* use a smaller chunk so we only need a few attributes in the write request. */); ConcreteAttributePath onGoingPath = ConcreteAttributePath(); std::vector status; diff --git a/src/controller/tests/data_model/TestRead.cpp b/src/controller/tests/data_model/TestRead.cpp index 30120eca8ad794..59485d46cf971f 100644 --- a/src/controller/tests/data_model/TestRead.cpp +++ b/src/controller/tests/data_model/TestRead.cpp @@ -1063,7 +1063,7 @@ void TestReadInteraction::TestReadSubscribeAttributeResponseWithCache(nlTestSuit } // Read of E2C3A* and E3C2A2, and inject a large amount of event path list, then it would try to apply previous cache - // latest data version and construct data version list but no enough memory, finally fully rollback data version filter. Expect + // latest data version and construct data version list but run out of memory, finally fully rollback data version filter. Expect // E2C3A* attributes in report, and E3C2A2 attribute in report { testId++; @@ -1081,8 +1081,12 @@ void TestReadInteraction::TestReadSubscribeAttributeResponseWithCache(nlTestSuit readPrepareParams.mpAttributePathParamsList = attributePathParams2; readPrepareParams.mAttributePathParamsListSize = 2; - readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mEventPathParamsListSize = 64; + readPrepareParams.mpEventPathParamsList = eventPathParams; + // This size needs to be big enough that we can't fit our + // DataVersionFilterIBs in the same packet. Max size is + // ArraySize(eventPathParams); + static_assert(75 <= ArraySize(eventPathParams)); + readPrepareParams.mEventPathParamsListSize = 75; err = readClient.SendRequest(readPrepareParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -1252,8 +1256,8 @@ void TestReadInteraction::TestReadSubscribeAttributeResponseWithCache(nlTestSuit // Read of E1C2A*(3 attributes) and E2C3A*(5 attributes) and E2C2A*(4 attributes), and inject a large amount of event path // list, then it would try to apply previous cache latest data version and construct data version list with the ordering from - // largest cluster size to smallest cluster size(C2, C3, C1) but no enough memory, finally partially rollback data version - // filter with only C2. Expect E1C2A*, E2C2A* attributes(7 attributes) in report, + // largest cluster size to smallest cluster size(C3, C2, C1) but run out of memory, finally partially rollback data version + // filter with only C3. Expect E1C2A*, E2C2A* attributes(7 attributes) in report, { testId++; ChipLogProgress(DataManagement, "\t -- Running Read with ClusterStateCache Test ID %d", testId); @@ -1275,8 +1279,12 @@ void TestReadInteraction::TestReadSubscribeAttributeResponseWithCache(nlTestSuit readPrepareParams.mpAttributePathParamsList = attributePathParams3; readPrepareParams.mAttributePathParamsListSize = 3; readPrepareParams.mpEventPathParamsList = eventPathParams; - readPrepareParams.mEventPathParamsListSize = 62; - err = readClient.SendRequest(readPrepareParams); + + // This size needs to be big enough that we can only fit our first + // DataVersionFilterIB. Max size is ArraySize(eventPathParams); + static_assert(73 <= ArraySize(eventPathParams)); + readPrepareParams.mEventPathParamsListSize = 73; + err = readClient.SendRequest(readPrepareParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); diff --git a/src/system/SystemConfig.h b/src/system/SystemConfig.h index d0188ca70f46e2..dceac0f8a49479 100644 --- a/src/system/SystemConfig.h +++ b/src/system/SystemConfig.h @@ -293,23 +293,17 @@ #endif // CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING && CHIP_SYSTEM_CONFIG_NO_LOCKING /** - * @def CHIP_SYSTEM_HEADER_RESERVE_SIZE + * @def CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE * * @brief * The number of bytes to reserve in a network packet buffer to contain - * the CHIP message and exchange headers. - * - * This number was calculated as follows: + * the Matter crypto headers. * - * CHIP Crypto Header: - * - * 4 -- Length of encrypted block - * 4 -- Reserve - * 8 -- Initialization Vector - * 8 -- Encryption Tag + * This is 0, because Matter does not have any crypto headers. This define + * is still here only for backwards compatibility. */ #ifndef CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE -#define CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE 24 +#define CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE 0 #endif /** @@ -317,31 +311,39 @@ * * @brief * The number of bytes to reserve in a network packet buffer to contain - * the CHIP message and exchange headers. + * the CHIP message and payload headers. * * This number was calculated as follows: * - * CHIP Message Header: + * Matter Message Header: * * 2 -- Frame Length - * 2 -- Message Header - * 4 -- Message Id - * 8 -- Source Node Id - * 8 -- Destination Node Id - * 2 -- Key Id + * 1 -- Message Flags + * 2 -- Session ID + * 1 -- Security Flags + * 4 -- Message Counter + * 8 -- Source Node ID + * 8 -- Destination Node ID + * + * Total: 26 bytes. + * + * Matter Payload Header: * - * CHIP Exchange Header: + * 1 -- Exhange Flags + * 1 -- Protocol Opcode + * 2 -- Exchange ID + * 2 -- Protocol Vendor ID + * 2 -- Protocol ID + * 4 -- Acknowledged MEssage Counter * - * 1 -- Application Version - * 1 -- Message Type - * 2 -- Exchange Id - * 4 -- Profile Id - * 4 -- Acknowledged Message Id + * Total: 12 bytes. * - * @note A number of these fields are optional or not presently used. So most headers will be considerably smaller than this. + * @note A number of these fields are optional or not presently used. So most + * headers will be considerably smaller than this. + * @note This calculation assumes ther are no Message Extensions or Secured Extensions. */ #ifndef CHIP_SYSTEM_HEADER_RESERVE_SIZE -#define CHIP_SYSTEM_HEADER_RESERVE_SIZE (38 + CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE) +#define CHIP_SYSTEM_HEADER_RESERVE_SIZE (26 + 12 + CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE) #endif /* CHIP_SYSTEM_HEADER_RESERVE_SIZE */ /** diff --git a/src/transport/raw/MessageHeader.h b/src/transport/raw/MessageHeader.h index ec957315714bbb..aa7185d8ff7412 100644 --- a/src/transport/raw/MessageHeader.h +++ b/src/transport/raw/MessageHeader.h @@ -35,15 +35,42 @@ #include #include #include +#include #include #include #include namespace chip { +namespace detail { +// Figure out the max size of a packet we can allocate, including all headers. +static constexpr size_t kMaxIPPacketSizeBytes = 1280; +static constexpr size_t kMaxUDPAndIPHeaderSizeBytes = 48; + +static_assert(kMaxIPPacketSizeBytes >= kMaxUDPAndIPHeaderSizeBytes + CHIP_SYSTEM_HEADER_RESERVE_SIZE, + "Matter headers and IP headers must fit in an MTU."); + +// Max space we have for our Application Payload and MIC, per spec. +static constexpr size_t kMaxPerSpecApplicationPayloadAndMICSizeBytes = + kMaxIPPacketSizeBytes - kMaxUDPAndIPHeaderSizeBytes - CHIP_SYSTEM_HEADER_RESERVE_SIZE; + +// Max space we have for our Application Payload and MIC in our actual packet +// buffers. This is the size _excluding_ the header reserve. +static constexpr size_t kMaxPacketBufferApplicationPayloadAndMICSizeBytes = System::PacketBuffer::kMaxSize; + +static constexpr size_t kMaxApplicationPayloadAndMICSizeBytes = + min(kMaxPerSpecApplicationPayloadAndMICSizeBytes, kMaxPacketBufferApplicationPayloadAndMICSizeBytes); + +} // namespace detail + static constexpr size_t kMaxTagLen = 16; -static constexpr size_t kMaxAppMessageLen = 1200; +static_assert(detail::kMaxApplicationPayloadAndMICSizeBytes > kMaxTagLen, "Need to be able to fit our tag in a message"); + +// This is somewhat of an under-estimate, because in practice any time we have a +// tag we will not have source/destination node IDs, but above we are including +// those in the header sizes. +static constexpr size_t kMaxAppMessageLen = detail::kMaxApplicationPayloadAndMICSizeBytes - kMaxTagLen; static constexpr uint16_t kMsgUnicastSessionIdUnsecured = 0x0000; From 0342ae40c612c85917874babf1a34a4bdbdeb700 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Wed, 9 Aug 2023 00:27:32 +0800 Subject: [PATCH 41/74] [kvs] replace checkexist with deletekey (#28513) - checkexist doesnt work on certain keys - just use deletekey which will search for the key and delete it if found --- src/platform/Ameba/KeyValueStoreManagerImpl.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/platform/Ameba/KeyValueStoreManagerImpl.cpp b/src/platform/Ameba/KeyValueStoreManagerImpl.cpp index 282d58c47c1f65..386127c68656c7 100644 --- a/src/platform/Ameba/KeyValueStoreManagerImpl.cpp +++ b/src/platform/Ameba/KeyValueStoreManagerImpl.cpp @@ -88,16 +88,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, goto exit; } - if (checkExist(key, key)) - { - error = deleteKey(key, key); - err = AmebaUtils::MapError(error, AmebaErrorType::kDctError); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "Warning, KVS leakage, failed to remove old kvs value"); - } - } - + deleteKey(key, key); // delete key if it exists error = setPref_new(key, key, (uint8_t *) value, value_size); err = AmebaUtils::MapError(error, AmebaErrorType::kDctError); From efc6c7db24d2e1ae9b02c0ff5b2ad11b856dbdc2 Mon Sep 17 00:00:00 2001 From: Youngho Yoon <34558998+yhoyoon@users.noreply.github.com> Date: Wed, 9 Aug 2023 03:06:25 +0900 Subject: [PATCH 42/74] [Android] Support FabricFilter to ChipClusters API (#28208) * [Android] Support FabricFilter to ChipClusters API This change adds a version that allows users to set FabricFilter options to APIs that read Attribute, which is Fabric-Scoped List. For example, - OperationalCredentialsCluster.readFabricsAttribute - OperationalCredentialsCluster.readFabricsAttributeWithFabricFilter In the existing API, FabricFilter was hard-coded with true value. So, there was no way to read all fabric information of the attribute on the PASE Session before the Android commissioner completed commissioning of the device. New API provides a FabricFilter parameter. So, before the Android commissioner completes device commissioning, all fabric information of the corresponding attribute can be read based on PASE Session. Signed-off-by: Youngho Yoon <34558998+yhoyoon@users.noreply.github.com> * Fix unit test errors Signed-off-by: Youngho Yoon <34558998+yhoyoon@users.noreply.github.com> * Fix the templates to not add extra whitespace Signed-off-by: Youngho Yoon <34558998+yhoyoon@users.noreply.github.com> * Restore empty line of end of file Signed-off-by: Youngho Yoon <34558998+yhoyoon@users.noreply.github.com> * Add unit test for FabricFilter Signed-off-by: Youngho Yoon <34558998+yhoyoon@users.noreply.github.com> * Remove new apis in ClusterReadMapping Signed-off-by: Youngho Yoon <34558998+yhoyoon@users.noreply.github.com> --------- Signed-off-by: Youngho Yoon <34558998+yhoyoon@users.noreply.github.com> --- .../generators/java/ChipClustersRead.jinja | 4 +- .../matter_idl/generators/java/__init__.py | 11 +- .../matter_idl/test_generators.py | 1 + .../tests/inputs/several_clusters.matter | 10 ++ .../tests/outputs/proto/second_cluster.proto | 26 +++++ .../java/ClusterIDMapping.java | 1 + .../java/ClusterReadMapping.java | 13 ++- .../several_clusters/jni/CHIPCallbackTypes.h | 1 + .../jni/CHIPReadReadCallbacks.h | 26 +++++ .../jni/SecondClient-InvokeSubscribeImpl.cpp | 23 +++- .../jni/SecondClient-ReadImpl.cpp | 24 +++++ .../java/templates/ChipClusters-java.zapt | 17 ++- .../chip/devicecontroller/ChipClusters.java | 100 ++++++++++++++++-- 13 files changed, 241 insertions(+), 16 deletions(-) diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja index 96572922054095..f5e4c228419ebd 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja +++ b/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja @@ -27,7 +27,7 @@ extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME {%- for attr in cluster.attributes | attributesWithCallback(typeLookup) %} -JNI_METHOD(void, {{cluster.name | capitalcase}}Cluster, read{{attr.definition.name | capitalcase}}Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, {{cluster.name | capitalcase}}Cluster, read{{attr.definition.name | capitalcase}}Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback{% if attr | isFabricScopedList(typeLookup) %}, jboolean isFabricFiltered{% endif %}) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::{{cluster.name | capitalcase}}::Attributes::{{attr.definition.name | capitalcase}}::TypeInfo; @@ -44,7 +44,7 @@ JNI_METHOD(void, {{cluster.name | capitalcase}}Cluster, read{{attr.definition.na auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall{% if attr | isFabricScopedList(typeLookup) %}, isFabricFiltered{% endif %}); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); onSuccess.release(); diff --git a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py index 3f974d3b2d8d18..84b9badd7a1e27 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py @@ -23,7 +23,7 @@ from matter_idl.generators.types import (BasicInteger, BasicString, FundamentalType, IdlBitmapType, IdlEnumType, IdlType, ParseDataType, TypeLookupContext) from matter_idl.matter_idl_types import (Attribute, Cluster, ClusterSide, Command, DataType, Field, FieldQuality, Idl, Struct, - StructTag) + StructQuality, StructTag) from stringcase import capitalcase @@ -601,6 +601,14 @@ def CanGenerateSubscribe(attr: Attribute, lookup: TypeLookupContext) -> bool: return not lookup.is_struct_type(attr.definition.data_type.name) +def IsFabricScopedList(attr: Attribute, lookup: TypeLookupContext) -> bool: + if not attr.definition.is_list: + return False + + struct = lookup.find_struct(attr.definition.data_type.name) + return struct and struct.qualities == StructQuality.FABRIC_SCOPED + + def IsResponseStruct(s: Struct) -> bool: return s.tag == StructTag.RESPONSE @@ -632,6 +640,7 @@ def __init__(self, storage: GeneratorStorage, idl: Idl, **kargs): self.jinja_env.filters['createLookupContext'] = CreateLookupContext self.jinja_env.filters['canGenerateSubscribe'] = CanGenerateSubscribe self.jinja_env.filters['decodableJniType'] = DecodableJniType + self.jinja_env.filters['isFabricScopedList'] = IsFabricScopedList self.jinja_env.tests['is_response_struct'] = IsResponseStruct self.jinja_env.tests['is_using_global_callback'] = _IsUsingGlobalCallback diff --git a/scripts/py_matter_idl/matter_idl/test_generators.py b/scripts/py_matter_idl/matter_idl/test_generators.py index 0576f3222e8bd5..31f95bbdfff0ac 100755 --- a/scripts/py_matter_idl/matter_idl/test_generators.py +++ b/scripts/py_matter_idl/matter_idl/test_generators.py @@ -164,6 +164,7 @@ def build_tests(yaml_data) -> List[GeneratorTest]: class TestGenerators(unittest.TestCase): def test_generators(self): + self.maxDiff = None with open(os.path.join(TESTS_DIR, "available_tests.yaml"), 'rt') as stream: yaml_data = yaml.safe_load(stream) diff --git a/scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter b/scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter index 4451abbe828d69..39e5227ba3dc8b 100644 --- a/scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter +++ b/scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter @@ -3,6 +3,16 @@ client cluster First = 1 { } client cluster Second = 2 { + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + readonly attribute FabricDescriptorStruct fabrics[] = 0; readonly attribute octet_string<32> someBytes = 123; } diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/proto/second_cluster.proto b/scripts/py_matter_idl/matter_idl/tests/outputs/proto/second_cluster.proto index 1ac9be7447c174..e0d99270b10304 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/proto/second_cluster.proto +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/proto/second_cluster.proto @@ -15,7 +15,33 @@ message SecondCluster { CLUSTER_ID = 2; } + // Structs + message FabricDescriptorStruct { + /** octet_string Type: 5 IsList: 0 FieldId: 1 */ + bytes root_public_key = 2621441; + /** vendor_id Type: 1 IsList: 0 FieldId: 2 */ + uint32 vendor_id = 524290; + /** fabric_id Type: 1 IsList: 0 FieldId: 3 */ + uint64 fabric_id = 524291; + /** node_id Type: 1 IsList: 0 FieldId: 4 */ + uint64 node_id = 524292; + /** char_string Type: 4 IsList: 0 FieldId: 5 */ + string label = 2097157; + /** fabric_idx Type: 1 IsList: 0 FieldId: 254 */ + uint32 fabric_index = 524542; + } + + // Attributes + /** FabricDescriptorStruct Type: 6 IsList: 1 FieldId: 0 */ + FabricDescriptorStruct fabrics = 3145728; + /* + [(attribute) = { + is_subscribable: true, + }]; + */ + + /** octet_string Type: 5 IsList: 0 FieldId: 123 */ bytes some_bytes = 2621563; /* diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterIDMapping.java b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterIDMapping.java index 86cdd093afe959..22493a3a4ace9b 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterIDMapping.java +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterIDMapping.java @@ -140,6 +140,7 @@ public long getID() { } public enum Attribute { + Fabrics(0L), SomeBytes(123L),; private final long id; Attribute(long id) { diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterReadMapping.java b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterReadMapping.java index e57dd4a37828d9..a5c86be6fc291d 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterReadMapping.java +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ClusterReadMapping.java @@ -41,7 +41,18 @@ private static Map readFirstInteractionInfo() { return result; } private static Map readSecondInteractionInfo() { - Map result = new LinkedHashMap<>();Map readSecondSomeBytesCommandParams = new LinkedHashMap(); + Map result = new LinkedHashMap<>();Map readSecondFabricsCommandParams = new LinkedHashMap(); + InteractionInfo readSecondFabricsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.SecondCluster) cluster).readFabricsAttribute( + (ChipClusters.SecondCluster.FabricsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedSecondClusterFabricsAttributeCallback(), + readSecondFabricsCommandParams + ); + result.put("readFabricsAttribute", readSecondFabricsAttributeInteractionInfo); + Map readSecondSomeBytesCommandParams = new LinkedHashMap(); InteractionInfo readSecondSomeBytesAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.SecondCluster) cluster).readSomeBytesAttribute( diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h index 9b4ea4e30e366f..d32e68fbfda3ab 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h @@ -24,6 +24,7 @@ typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); typedef void (*CHIPFirstClusterSomeIntegerAttributeCallbackType)(void *, chip::app::Clusters::First::Attributes::SomeInteger::TypeInfo::DecodableArgType); +typedef void (*CHIPSecondClusterFabricsAttributeCallbackType)(void *, const chip::app::Clusters::Second::Attributes::Fabrics::TypeInfo::DecodableType &); typedef void (*CHIPSecondClusterSomeBytesAttributeCallbackType)(void *, chip::app::Clusters::Second::Attributes::SomeBytes::TypeInfo::DecodableArgType); typedef void (*CHIPThirdClusterSomeEnumAttributeCallbackType)(void *, chip::app::Clusters::Third::Attributes::SomeEnum::TypeInfo::DecodableArgType); typedef void (*CHIPThirdClusterOptionsAttributeCallbackType)(void *, chip::app::Clusters::Third::Attributes::Options::TypeInfo::DecodableArgType); diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h index 5cc0fa52eea6af..60603103b8f692 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h @@ -340,6 +340,32 @@ class CHIPOctetStringAttributeCallback : public chip::Callback::Callback +{ +public: + CHIPSecondFabricsAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPSecondFabricsAttributeCallback(); + + static void maybeDestroy(CHIPSecondFabricsAttributeCallback * callback) { + if (!callback->keepAlive) { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished(reinterpret_cast(context)->javaCallbackRef, subscriptionId); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + + class CHIPThirdSomeEnumAttributeCallback : public chip::Callback::Callback diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp index f5330797d97be8..f123a5407e0170 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp @@ -34,7 +34,28 @@ JNI_METHOD(jlong, SecondCluster, initWithDevice)(JNIEnv * env, jobject self, jlo return reinterpret_cast(cppCluster); } -JNI_METHOD(void, SecondCluster, subscribeSomeBytesAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, SecondCluster, subscribeFabricsAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ClusterBase * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Second::Attributes::Fabrics::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPSecondFabricsAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +}JNI_METHOD(void, SecondCluster, subscribeSomeBytesAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-ReadImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-ReadImpl.cpp index 9f718035cd39f5..714790e2c9d28e 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-ReadImpl.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-ReadImpl.cpp @@ -12,6 +12,30 @@ #define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME +JNI_METHOD(void, SecondCluster, readFabricsAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jboolean isFabricFiltered) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Second::Attributes::Fabrics::TypeInfo; + std::unique_ptr onSuccess(chip::Platform::New(callback, false), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure(chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::ClusterBase * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, isFabricFiltered); + VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + + JNI_METHOD(void, SecondCluster, readSomeBytesAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/templates/ChipClusters-java.zapt b/src/controller/java/templates/ChipClusters-java.zapt index 1f02502b7ac533..ce2cbbb60402f8 100644 --- a/src/controller/java/templates/ChipClusters-java.zapt +++ b/src/controller/java/templates/ChipClusters-java.zapt @@ -181,8 +181,20 @@ public class ChipClusters { {{asUpperCamelCase name}}AttributeCallback callback {{/if_basic_attribute}} ) { - read{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback); + read{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback{{#if_is_fabric_scoped_struct type}}, true{{/if_is_fabric_scoped_struct}}); } + {{#if_is_fabric_scoped_struct type}} + public void read{{asUpperCamelCase name}}AttributeWithFabricFilter( + {{#if_basic_attribute type ../id}} + {{as_underlying_java_zcl_type type ../id boolean="Boolean"}}AttributeCallback callback + {{else}} + {{asUpperCamelCase name}}AttributeCallback callback + {{/if_basic_attribute}}, + boolean isFabricFiltered + ) { + read{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback, isFabricFiltered); + } + {{/if_is_fabric_scoped_struct}} {{#if isWritableAttribute}} {{#unless mustUseTimedWrite}} public void write{{asUpperCamelCase name}}Attribute(DefaultClusterCallback callback, {{asJavaType type chipType parent.name}} value) { @@ -218,6 +230,9 @@ public class ChipClusters { {{else}} {{asUpperCamelCase name}}AttributeCallback callback {{/if_basic_attribute}} + {{#if_is_fabric_scoped_struct type}} + , boolean isFabricFiltered + {{/if_is_fabric_scoped_struct}} ); {{#if isWritableAttribute}} diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 54e2e40372e417..9fdaae6a73d93e 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -3110,7 +3110,14 @@ default void onSubscriptionEstablished(long subscriptionId) {} public void readBindingAttribute( BindingAttributeCallback callback ) { - readBindingAttribute(chipClusterPtr, callback); + readBindingAttribute(chipClusterPtr, callback, true); + } + public void readBindingAttributeWithFabricFilter( + BindingAttributeCallback callback + , + boolean isFabricFiltered + ) { + readBindingAttribute(chipClusterPtr, callback, isFabricFiltered); } public void writeBindingAttribute(DefaultClusterCallback callback, ArrayList value) { writeBindingAttribute(chipClusterPtr, callback, value, null); @@ -3200,6 +3207,7 @@ public void subscribeClusterRevisionAttribute( private native void readBindingAttribute(long chipClusterPtr, BindingAttributeCallback callback + , boolean isFabricFiltered ); private native void writeBindingAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); @@ -3294,7 +3302,14 @@ default void onSubscriptionEstablished(long subscriptionId) {} public void readAclAttribute( AclAttributeCallback callback ) { - readAclAttribute(chipClusterPtr, callback); + readAclAttribute(chipClusterPtr, callback, true); + } + public void readAclAttributeWithFabricFilter( + AclAttributeCallback callback + , + boolean isFabricFiltered + ) { + readAclAttribute(chipClusterPtr, callback, isFabricFiltered); } public void writeAclAttribute(DefaultClusterCallback callback, ArrayList value) { writeAclAttribute(chipClusterPtr, callback, value, null); @@ -3313,7 +3328,14 @@ public void subscribeAclAttribute( public void readExtensionAttribute( ExtensionAttributeCallback callback ) { - readExtensionAttribute(chipClusterPtr, callback); + readExtensionAttribute(chipClusterPtr, callback, true); + } + public void readExtensionAttributeWithFabricFilter( + ExtensionAttributeCallback callback + , + boolean isFabricFiltered + ) { + readExtensionAttribute(chipClusterPtr, callback, isFabricFiltered); } public void writeExtensionAttribute(DefaultClusterCallback callback, ArrayList value) { writeExtensionAttribute(chipClusterPtr, callback, value, null); @@ -3439,6 +3461,7 @@ public void subscribeClusterRevisionAttribute( private native void readAclAttribute(long chipClusterPtr, AclAttributeCallback callback + , boolean isFabricFiltered ); private native void writeAclAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); @@ -3448,6 +3471,7 @@ private native void subscribeAclAttribute(long chipClusterPtr, private native void readExtensionAttribute(long chipClusterPtr, ExtensionAttributeCallback callback + , boolean isFabricFiltered ); private native void writeExtensionAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); @@ -4706,7 +4730,14 @@ default void onSubscriptionEstablished(long subscriptionId) {} public void readDefaultOTAProvidersAttribute( DefaultOTAProvidersAttributeCallback callback ) { - readDefaultOTAProvidersAttribute(chipClusterPtr, callback); + readDefaultOTAProvidersAttribute(chipClusterPtr, callback, true); + } + public void readDefaultOTAProvidersAttributeWithFabricFilter( + DefaultOTAProvidersAttributeCallback callback + , + boolean isFabricFiltered + ) { + readDefaultOTAProvidersAttribute(chipClusterPtr, callback, isFabricFiltered); } public void writeDefaultOTAProvidersAttribute(DefaultClusterCallback callback, ArrayList value) { writeDefaultOTAProvidersAttribute(chipClusterPtr, callback, value, null); @@ -4832,6 +4863,7 @@ public void subscribeClusterRevisionAttribute( private native void readDefaultOTAProvidersAttribute(long chipClusterPtr, DefaultOTAProvidersAttributeCallback callback + , boolean isFabricFiltered ); private native void writeDefaultOTAProvidersAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); @@ -11736,7 +11768,14 @@ default void onSubscriptionEstablished(long subscriptionId) {} public void readNOCsAttribute( NOCsAttributeCallback callback ) { - readNOCsAttribute(chipClusterPtr, callback); + readNOCsAttribute(chipClusterPtr, callback, true); + } + public void readNOCsAttributeWithFabricFilter( + NOCsAttributeCallback callback + , + boolean isFabricFiltered + ) { + readNOCsAttribute(chipClusterPtr, callback, isFabricFiltered); } public void subscribeNOCsAttribute( NOCsAttributeCallback callback @@ -11748,7 +11787,14 @@ public void subscribeNOCsAttribute( public void readFabricsAttribute( FabricsAttributeCallback callback ) { - readFabricsAttribute(chipClusterPtr, callback); + readFabricsAttribute(chipClusterPtr, callback, true); + } + public void readFabricsAttributeWithFabricFilter( + FabricsAttributeCallback callback + , + boolean isFabricFiltered + ) { + readFabricsAttribute(chipClusterPtr, callback, isFabricFiltered); } public void subscribeFabricsAttribute( FabricsAttributeCallback callback @@ -11879,6 +11925,7 @@ public void subscribeClusterRevisionAttribute( private native void readNOCsAttribute(long chipClusterPtr, NOCsAttributeCallback callback + , boolean isFabricFiltered ); private native void subscribeNOCsAttribute(long chipClusterPtr, NOCsAttributeCallback callback @@ -11886,6 +11933,7 @@ private native void subscribeNOCsAttribute(long chipClusterPtr, private native void readFabricsAttribute(long chipClusterPtr, FabricsAttributeCallback callback + , boolean isFabricFiltered ); private native void subscribeFabricsAttribute(long chipClusterPtr, FabricsAttributeCallback callback @@ -12074,7 +12122,14 @@ default void onSubscriptionEstablished(long subscriptionId) {} public void readGroupKeyMapAttribute( GroupKeyMapAttributeCallback callback ) { - readGroupKeyMapAttribute(chipClusterPtr, callback); + readGroupKeyMapAttribute(chipClusterPtr, callback, true); + } + public void readGroupKeyMapAttributeWithFabricFilter( + GroupKeyMapAttributeCallback callback + , + boolean isFabricFiltered + ) { + readGroupKeyMapAttribute(chipClusterPtr, callback, isFabricFiltered); } public void writeGroupKeyMapAttribute(DefaultClusterCallback callback, ArrayList value) { writeGroupKeyMapAttribute(chipClusterPtr, callback, value, null); @@ -12093,7 +12148,14 @@ public void subscribeGroupKeyMapAttribute( public void readGroupTableAttribute( GroupTableAttributeCallback callback ) { - readGroupTableAttribute(chipClusterPtr, callback); + readGroupTableAttribute(chipClusterPtr, callback, true); + } + public void readGroupTableAttributeWithFabricFilter( + GroupTableAttributeCallback callback + , + boolean isFabricFiltered + ) { + readGroupTableAttribute(chipClusterPtr, callback, isFabricFiltered); } public void subscribeGroupTableAttribute( GroupTableAttributeCallback callback @@ -12200,6 +12262,7 @@ public void subscribeClusterRevisionAttribute( private native void readGroupKeyMapAttribute(long chipClusterPtr, GroupKeyMapAttributeCallback callback + , boolean isFabricFiltered ); private native void writeGroupKeyMapAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); @@ -12209,6 +12272,7 @@ private native void subscribeGroupKeyMapAttribute(long chipClusterPtr, private native void readGroupTableAttribute(long chipClusterPtr, GroupTableAttributeCallback callback + , boolean isFabricFiltered ); private native void subscribeGroupTableAttribute(long chipClusterPtr, GroupTableAttributeCallback callback @@ -13346,7 +13410,14 @@ public void subscribeActiveModeThresholdAttribute( public void readRegisteredClientsAttribute( RegisteredClientsAttributeCallback callback ) { - readRegisteredClientsAttribute(chipClusterPtr, callback); + readRegisteredClientsAttribute(chipClusterPtr, callback, true); + } + public void readRegisteredClientsAttributeWithFabricFilter( + RegisteredClientsAttributeCallback callback + , + boolean isFabricFiltered + ) { + readRegisteredClientsAttribute(chipClusterPtr, callback, isFabricFiltered); } public void subscribeRegisteredClientsAttribute( RegisteredClientsAttributeCallback callback @@ -13474,6 +13545,7 @@ private native void subscribeActiveModeThresholdAttribute(long chipClusterPtr, private native void readRegisteredClientsAttribute(long chipClusterPtr, RegisteredClientsAttributeCallback callback + , boolean isFabricFiltered ); private native void subscribeRegisteredClientsAttribute(long chipClusterPtr, RegisteredClientsAttributeCallback callback @@ -37758,7 +37830,14 @@ public void subscribeListLongOctetStringAttribute( public void readListFabricScopedAttribute( ListFabricScopedAttributeCallback callback ) { - readListFabricScopedAttribute(chipClusterPtr, callback); + readListFabricScopedAttribute(chipClusterPtr, callback, true); + } + public void readListFabricScopedAttributeWithFabricFilter( + ListFabricScopedAttributeCallback callback + , + boolean isFabricFiltered + ) { + readListFabricScopedAttribute(chipClusterPtr, callback, isFabricFiltered); } public void writeListFabricScopedAttribute(DefaultClusterCallback callback, ArrayList value) { writeListFabricScopedAttribute(chipClusterPtr, callback, value, null); @@ -38926,6 +39005,7 @@ private native void subscribeListLongOctetStringAttribute(long chipClusterPtr, private native void readListFabricScopedAttribute(long chipClusterPtr, ListFabricScopedAttributeCallback callback + , boolean isFabricFiltered ); private native void writeListFabricScopedAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); From 81c4c9a52ce97aa490ab9efbb6906fb4792506b2 Mon Sep 17 00:00:00 2001 From: William Date: Tue, 8 Aug 2023 19:33:11 +0100 Subject: [PATCH 43/74] Mode base reporting change in supported modes (#28575) * Reordered Mode Base functions. * Moved generic OpState cluster objects into one header file. * Reordered OperationalStateServer functions. * Moved OpState delegate in the server header file. * Updated the TestOperationalStateDelegate inctludes following the operational state delegate change in location. * Renamed TestOperationalStateDelegate.cpp -> src/app/tests/TestOperationalStateClusterObjects.cpp * Restyled by clang-format * Minor corrections following revision. * Added a method for the SDK consumer to report that the contents of the supported modes has changed and updated documentation accordingly. * Fixed comments from review. * Restyled by clang-format --------- Co-authored-by: Restyled.io --- .../include/operational-state-delegate-impl.h | 2 +- .../include/operational-state-delegate-impl.h | 2 +- src/app/chip_data_model.gni | 2 +- .../mode-base-server/mode-base-server.cpp | 460 +++++++++--------- .../mode-base-server/mode-base-server.h | 146 +++--- ....h => operational-state-cluster-objects.h} | 142 ++---- .../operational-state-server.cpp | 50 -- .../operational-state-server.h | 150 +++++- src/app/tests/BUILD.gn | 4 +- ...=> TestOperationalStateClusterObjects.cpp} | 8 +- 10 files changed, 497 insertions(+), 469 deletions(-) rename src/app/clusters/operational-state-server/{operational-state-delegate.h => operational-state-cluster-objects.h} (60%) rename src/app/tests/{TestOperationalStateDelegate.cpp => TestOperationalStateClusterObjects.cpp} (99%) diff --git a/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h b/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h index 935fdb626bfd14..939213d296ad53 100644 --- a/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h +++ b/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h @@ -19,7 +19,7 @@ #pragma once #include -#include +#include #include #include diff --git a/examples/dishwasher-app/dishwasher-common/include/operational-state-delegate-impl.h b/examples/dishwasher-app/dishwasher-common/include/operational-state-delegate-impl.h index 935fdb626bfd14..939213d296ad53 100644 --- a/examples/dishwasher-app/dishwasher-common/include/operational-state-delegate-impl.h +++ b/examples/dishwasher-app/dishwasher-common/include/operational-state-delegate-impl.h @@ -19,7 +19,7 @@ #pragma once #include -#include +#include #include #include diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 20b1f9d0e18e1e..d484d7ce654e9b 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -267,7 +267,7 @@ template("chip_data_model") { sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp", "${_app_root}/clusters/${cluster}/${cluster}.h", - "${_app_root}/clusters/${cluster}/operational-state-delegate.h", + "${_app_root}/clusters/${cluster}/operational-state-cluster-objects.h", ] } else if (cluster == "dishwasher-alarm-server") { sources += [ diff --git a/src/app/clusters/mode-base-server/mode-base-server.cpp b/src/app/clusters/mode-base-server/mode-base-server.cpp index 4495e728fc7ecb..b5b8a403b9ba3e 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.cpp +++ b/src/app/clusters/mode-base-server/mode-base-server.cpp @@ -39,104 +39,22 @@ namespace app { namespace Clusters { namespace ModeBase { -void Instance::RegisterInstance() -{ - if (!gModeBaseAliasesInstances.Contains(this)) - { - gModeBaseAliasesInstances.PushBack(this); - } -} - -void Instance::UnregisterInstance() -{ - gModeBaseAliasesInstances.Remove(this); -} - -bool Instance::HasFeature(Feature feature) const +Instance::Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClusterId, uint32_t aFeature) : + CommandHandlerInterface(Optional(aEndpointId), aClusterId), + AttributeAccessInterface(Optional(aEndpointId), aClusterId), mDelegate(aDelegate), mEndpointId(aEndpointId), + mClusterId(aClusterId), + mCurrentMode(0), // This is a temporary value and may not be valid. We will change this to the value of the first + // mode in the list at the start of the Init function to ensure that it represents a valid mode. + mFeature(aFeature) { - return (mFeature & to_underlying(feature)) != 0; + mDelegate->SetInstance(this); } -void Instance::LoadPersistentAttributes() +Instance::~Instance() { - // Load Current Mode - uint8_t tempCurrentMode; - CHIP_ERROR err = GetSafeAttributePersistenceProvider()->ReadScalarValue( - ConcreteAttributePath(mEndpointId, mClusterId, Attributes::CurrentMode::Id), tempCurrentMode); - if (err == CHIP_NO_ERROR) - { - Status status = UpdateCurrentMode(tempCurrentMode); - if (status == Status::Success) - { - ChipLogDetail(Zcl, "ModeBase: Loaded CurrentMode as %u", GetCurrentMode()); - } - else - { - ChipLogError(Zcl, "ModeBase: Could not update CurrentMode to %u: %u", tempCurrentMode, to_underlying(status)); - } - } - else - { - // If we cannot find the previous CurrentMode, we will assume it to be the first mode in the - // list, as was initialised in the constructor. - ChipLogDetail(Zcl, "ModeBase: Unable to load the CurrentMode from the KVS. Assuming %u", GetCurrentMode()); - } - - // Load Start-Up Mode - DataModel::Nullable tempStartUpMode; - err = GetSafeAttributePersistenceProvider()->ReadScalarValue( - ConcreteAttributePath(mEndpointId, mClusterId, Attributes::StartUpMode::Id), tempStartUpMode); - if (err == CHIP_NO_ERROR) - { - Status status = UpdateStartUpMode(tempStartUpMode); - if (status == Status::Success) - { - if (GetStartUpMode().IsNull()) - { - ChipLogDetail(Zcl, "ModeBase: Loaded StartUpMode as null"); - } - else - { - ChipLogDetail(Zcl, "ModeBase: Loaded StartUpMode as %u", GetStartUpMode().Value()); - } - } - else - { - ChipLogError(Zcl, "ModeBase: Could not update StartUpMode: %u", to_underlying(status)); - } - } - else - { - ChipLogDetail(Zcl, "ModeBase: Unable to load the StartUpMode from the KVS. Assuming null"); - } - - // Load On Mode - DataModel::Nullable tempOnMode; - err = GetSafeAttributePersistenceProvider()->ReadScalarValue( - ConcreteAttributePath(mEndpointId, mClusterId, Attributes::OnMode::Id), tempOnMode); - if (err == CHIP_NO_ERROR) - { - Status status = UpdateOnMode(tempOnMode); - if (status == Status::Success) - { - if (GetOnMode().IsNull()) - { - ChipLogDetail(Zcl, "ModeBase: Loaded OnMode as null"); - } - else - { - ChipLogDetail(Zcl, "ModeBase: Loaded OnMode as %u", GetOnMode().Value()); - } - } - else - { - ChipLogError(Zcl, "ModeBase: Could not update OnMode: %u", to_underlying(status)); - } - } - else - { - ChipLogDetail(Zcl, "ModeBase: Unable to load the OnMode from the KVS. Assuming null"); - } + UnregisterInstance(); + chip::app::InteractionModelEngine::GetInstance()->UnregisterCommandHandler(this); + unregisterAttributeAccessOverride(this); } CHIP_ERROR Instance::Init() @@ -194,6 +112,7 @@ CHIP_ERROR Instance::Init() } } } + #ifdef EMBER_AF_PLUGIN_ON_OFF_SERVER // OnMode with Power Up // If the On/Off feature is supported and the On/Off cluster attribute StartUpOnOff is present, with a @@ -229,9 +148,110 @@ CHIP_ERROR Instance::Init() } } #endif // EMBER_AF_PLUGIN_ON_OFF_SERVER + return CHIP_NO_ERROR; } +Status Instance::UpdateCurrentMode(uint8_t aNewMode) +{ + if (!IsSupportedMode(aNewMode)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + uint8_t oldMode = mCurrentMode; + mCurrentMode = aNewMode; + if (mCurrentMode != oldMode) + { + // Write new value to persistent storage. + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::CurrentMode::Id); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mCurrentMode); + MatterReportingAttributeChangeCallback(path); + } + return Protocols::InteractionModel::Status::Success; +} + +Status Instance::UpdateStartUpMode(DataModel::Nullable aNewStartUpMode) +{ + if (!aNewStartUpMode.IsNull()) + { + if (!IsSupportedMode(aNewStartUpMode.Value())) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + } + DataModel::Nullable oldStartUpMode = mStartUpMode; + mStartUpMode = aNewStartUpMode; + if (mStartUpMode != oldStartUpMode) + { + // Write new value to persistent storage. + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::StartUpMode::Id); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mStartUpMode); + MatterReportingAttributeChangeCallback(path); + } + return Protocols::InteractionModel::Status::Success; +} + +Status Instance::UpdateOnMode(DataModel::Nullable aNewOnMode) +{ + if (!aNewOnMode.IsNull()) + { + if (!IsSupportedMode(aNewOnMode.Value())) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + } + DataModel::Nullable oldOnMode = mOnMode; + mOnMode = aNewOnMode; + if (mOnMode != oldOnMode) + { + // Write new value to persistent storage. + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::OnMode::Id); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mOnMode); + MatterReportingAttributeChangeCallback(path); + } + return Protocols::InteractionModel::Status::Success; +} + +uint8_t Instance::GetCurrentMode() const +{ + return mCurrentMode; +} + +DataModel::Nullable Instance::GetStartUpMode() const +{ + return mStartUpMode; +} + +DataModel::Nullable Instance::GetOnMode() const +{ + return mOnMode; +} + +void Instance::ReportSupportedModesChange() +{ + MatterReportingAttributeChangeCallback(ConcreteAttributePath(mEndpointId, mClusterId, Attributes::SupportedModes::Id)); +} + +bool Instance::HasFeature(Feature feature) const +{ + return (mFeature & to_underlying(feature)) != 0; +} + +bool Instance::IsSupportedMode(uint8_t modeValue) +{ + uint8_t value; + for (uint8_t i = 0; mDelegate->GetModeValueByIndex(i, value) != CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; i++) + { + if (value == modeValue) + { + return true; + } + } + ChipLogDetail(Zcl, "Cannot find a mode with value %u", modeValue); + return false; +} + +// private methods template void Instance::HandleCommand(HandlerContext & handlerContext, FuncT func) { @@ -257,31 +277,6 @@ void Instance::HandleCommand(HandlerContext & handlerContext, FuncT func) } } -void Instance::HandleChangeToMode(HandlerContext & ctx, const Commands::ChangeToMode::DecodableType & commandData) -{ - uint8_t newMode = commandData.newMode; - - Commands::ChangeToModeResponse::Type response; - - if (!IsSupportedMode(newMode)) - { - ChipLogError(Zcl, "ModeBase: Failed to find the option with mode %u", newMode); - response.status = to_underlying(StatusCode::kUnsupportedMode); - ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); - return; - } - - mDelegate->HandleChangeToMode(newMode, response); - - if (response.status == to_underlying(StatusCode::kSuccess)) - { - UpdateCurrentMode(newMode); - ChipLogProgress(Zcl, "ModeBase: HandleChangeToMode changed to mode %u", newMode); - } - - ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); -} - // This function is called by the interaction model engine when a command destined for this instance is received. void Instance::InvokeCommand(HandlerContext & handlerContext) { @@ -310,38 +305,6 @@ CHIP_ERROR Instance::EnumerateGeneratedCommands(const ConcreteClusterPath & clus return CHIP_NO_ERROR; } -CHIP_ERROR Instance::EncodeSupportedModes(const AttributeValueEncoder::ListEncodeHelper & encoder) -{ - for (uint8_t i = 0; true; i++) - { - ModeOptionStructType mode; - - // Get the mode label - char buffer[kMaxModeLabelSize]; - MutableCharSpan label(buffer); - auto err = mDelegate->GetModeLabelByIndex(i, label); - if (err == CHIP_ERROR_PROVIDER_LIST_EXHAUSTED) - { - return CHIP_NO_ERROR; - } - ReturnErrorOnFailure(err); - - mode.label = label; - - // Get the mode value - ReturnErrorOnFailure(mDelegate->GetModeValueByIndex(i, mode.mode)); - - // Get the mode tags - ModeTagStructType tagsBuffer[kMaxNumOfModeTags]; - DataModel::List tags(tagsBuffer); - ReturnErrorOnFailure(mDelegate->GetModeTagsByIndex(i, tags)); - mode.modeTags = tags; - - ReturnErrorOnFailure(encoder.Encode(mode)); - } - return CHIP_NO_ERROR; -} - // Implements the read functionality for complex attributes. CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { @@ -387,111 +350,156 @@ CHIP_ERROR Instance::Write(const ConcreteDataAttributePath & attributePath, Attr return CHIP_ERROR_INCORRECT_STATE; } -Status Instance::UpdateCurrentMode(uint8_t aNewMode) +void Instance::RegisterInstance() { - if (!IsSupportedMode(aNewMode)) + if (!gModeBaseAliasesInstances.Contains(this)) { - return Protocols::InteractionModel::Status::ConstraintError; + gModeBaseAliasesInstances.PushBack(this); } - uint8_t oldMode = mCurrentMode; - mCurrentMode = aNewMode; - if (mCurrentMode != oldMode) +} + +void Instance::UnregisterInstance() +{ + gModeBaseAliasesInstances.Remove(this); +} + +void Instance::HandleChangeToMode(HandlerContext & ctx, const Commands::ChangeToMode::DecodableType & commandData) +{ + uint8_t newMode = commandData.newMode; + + Commands::ChangeToModeResponse::Type response; + + if (!IsSupportedMode(newMode)) { - // Write new value to persistent storage. - ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::CurrentMode::Id); - GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mCurrentMode); - MatterReportingAttributeChangeCallback(path); + ChipLogError(Zcl, "ModeBase: Failed to find the option with mode %u", newMode); + response.status = to_underlying(StatusCode::kUnsupportedMode); + ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); + return; } - return Protocols::InteractionModel::Status::Success; + + mDelegate->HandleChangeToMode(newMode, response); + + if (response.status == to_underlying(StatusCode::kSuccess)) + { + UpdateCurrentMode(newMode); + ChipLogProgress(Zcl, "ModeBase: HandleChangeToMode changed to mode %u", newMode); + } + + ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); } -Status Instance::UpdateStartUpMode(DataModel::Nullable aNewStartUpMode) +void Instance::LoadPersistentAttributes() { - if (!aNewStartUpMode.IsNull()) + // Load Current Mode + uint8_t tempCurrentMode; + CHIP_ERROR err = GetSafeAttributePersistenceProvider()->ReadScalarValue( + ConcreteAttributePath(mEndpointId, mClusterId, Attributes::CurrentMode::Id), tempCurrentMode); + if (err == CHIP_NO_ERROR) { - if (!IsSupportedMode(aNewStartUpMode.Value())) + Status status = UpdateCurrentMode(tempCurrentMode); + if (status == Status::Success) { - return Protocols::InteractionModel::Status::ConstraintError; + ChipLogDetail(Zcl, "ModeBase: Loaded CurrentMode as %u", GetCurrentMode()); + } + else + { + ChipLogError(Zcl, "ModeBase: Could not update CurrentMode to %u: %u", tempCurrentMode, to_underlying(status)); } } - DataModel::Nullable oldStartUpMode = mStartUpMode; - mStartUpMode = aNewStartUpMode; - if (mStartUpMode != oldStartUpMode) + else { - // Write new value to persistent storage. - ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::StartUpMode::Id); - GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mStartUpMode); - MatterReportingAttributeChangeCallback(path); + // If we cannot find the previous CurrentMode, we will assume it to be the first mode in the + // list, as was initialised in the constructor. + ChipLogDetail(Zcl, "ModeBase: Unable to load the CurrentMode from the KVS. Assuming %u", GetCurrentMode()); } - return Protocols::InteractionModel::Status::Success; -} -Status Instance::UpdateOnMode(DataModel::Nullable aNewOnMode) -{ - if (!aNewOnMode.IsNull()) + // Load Start-Up Mode + DataModel::Nullable tempStartUpMode; + err = GetSafeAttributePersistenceProvider()->ReadScalarValue( + ConcreteAttributePath(mEndpointId, mClusterId, Attributes::StartUpMode::Id), tempStartUpMode); + if (err == CHIP_NO_ERROR) { - if (!IsSupportedMode(aNewOnMode.Value())) + Status status = UpdateStartUpMode(tempStartUpMode); + if (status == Status::Success) { - return Protocols::InteractionModel::Status::ConstraintError; + if (GetStartUpMode().IsNull()) + { + ChipLogDetail(Zcl, "ModeBase: Loaded StartUpMode as null"); + } + else + { + ChipLogDetail(Zcl, "ModeBase: Loaded StartUpMode as %u", GetStartUpMode().Value()); + } + } + else + { + ChipLogError(Zcl, "ModeBase: Could not update StartUpMode: %u", to_underlying(status)); } } - DataModel::Nullable oldOnMode = mOnMode; - mOnMode = aNewOnMode; - if (mOnMode != oldOnMode) + else { - // Write new value to persistent storage. - ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::OnMode::Id); - GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mOnMode); - MatterReportingAttributeChangeCallback(path); + ChipLogDetail(Zcl, "ModeBase: Unable to load the StartUpMode from the KVS. Assuming null"); } - return Protocols::InteractionModel::Status::Success; -} -DataModel::Nullable Instance::GetStartUpMode() const -{ - return mStartUpMode; -} - -DataModel::Nullable Instance::GetOnMode() const -{ - return mOnMode; -} - -uint8_t Instance::GetCurrentMode() const -{ - return mCurrentMode; -} - -bool Instance::IsSupportedMode(uint8_t modeValue) -{ - uint8_t value; - for (uint8_t i = 0; mDelegate->GetModeValueByIndex(i, value) != CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; i++) + // Load On Mode + DataModel::Nullable tempOnMode; + err = GetSafeAttributePersistenceProvider()->ReadScalarValue( + ConcreteAttributePath(mEndpointId, mClusterId, Attributes::OnMode::Id), tempOnMode); + if (err == CHIP_NO_ERROR) { - if (value == modeValue) + Status status = UpdateOnMode(tempOnMode); + if (status == Status::Success) { - return true; + if (GetOnMode().IsNull()) + { + ChipLogDetail(Zcl, "ModeBase: Loaded OnMode as null"); + } + else + { + ChipLogDetail(Zcl, "ModeBase: Loaded OnMode as %u", GetOnMode().Value()); + } + } + else + { + ChipLogError(Zcl, "ModeBase: Could not update OnMode: %u", to_underlying(status)); } } - ChipLogDetail(Zcl, "Cannot find a mode with value %u", modeValue); - return false; + else + { + ChipLogDetail(Zcl, "ModeBase: Unable to load the OnMode from the KVS. Assuming null"); + } } -Instance::Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClusterId, uint32_t aFeature) : - CommandHandlerInterface(Optional(aEndpointId), aClusterId), - AttributeAccessInterface(Optional(aEndpointId), aClusterId), mDelegate(aDelegate), mEndpointId(aEndpointId), - mClusterId(aClusterId), - mCurrentMode(0), // This is a temporary value and may not be valid. We will change this to the value of the first - // mode in the list at the start of the Init function to ensure that it represents a valid mode. - mFeature(aFeature) +CHIP_ERROR Instance::EncodeSupportedModes(const AttributeValueEncoder::ListEncodeHelper & encoder) { - mDelegate->SetInstance(this); -} + for (uint8_t i = 0; true; i++) + { + ModeOptionStructType mode; -Instance::~Instance() -{ - UnregisterInstance(); - chip::app::InteractionModelEngine::GetInstance()->UnregisterCommandHandler(this); - unregisterAttributeAccessOverride(this); + // Get the mode label + char buffer[kMaxModeLabelSize]; + MutableCharSpan label(buffer); + auto err = mDelegate->GetModeLabelByIndex(i, label); + if (err == CHIP_ERROR_PROVIDER_LIST_EXHAUSTED) + { + return CHIP_NO_ERROR; + } + ReturnErrorOnFailure(err); + + mode.label = label; + + // Get the mode value + ReturnErrorOnFailure(mDelegate->GetModeValueByIndex(i, mode.mode)); + + // Get the mode tags + ModeTagStructType tagsBuffer[kMaxNumOfModeTags]; + DataModel::List tags(tagsBuffer); + ReturnErrorOnFailure(mDelegate->GetModeTagsByIndex(i, tags)); + mode.modeTags = tags; + + ReturnErrorOnFailure(encoder.Encode(mode)); + } + return CHIP_NO_ERROR; } IntrusiveList & GetModeBaseInstanceList() diff --git a/src/app/clusters/mode-base-server/mode-base-server.h b/src/app/clusters/mode-base-server/mode-base-server.h index b75eeb85e67481..10a2a97c07080f 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.h +++ b/src/app/clusters/mode-base-server/mode-base-server.h @@ -34,55 +34,20 @@ class Delegate; class Instance : public CommandHandlerInterface, public AttributeAccessInterface, public IntrusiveListNodeBase<> { -private: - Delegate * mDelegate; - - EndpointId mEndpointId{}; - ClusterId mClusterId{}; - - // Attribute data store - uint8_t mCurrentMode; - DataModel::Nullable mStartUpMode; - DataModel::Nullable mOnMode; - uint32_t mFeature; - - // CommandHandlerInterface - void InvokeCommand(HandlerContext & ctx) override; - CHIP_ERROR EnumerateAcceptedCommands(const ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override; - CHIP_ERROR EnumerateGeneratedCommands(const ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override; - - // AttributeAccessInterface - CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; - - /** - * Register this ModeBase instance. - */ - void RegisterInstance(); - - /** - * Unregister this ModeBase instance. - */ - void UnregisterInstance(); - - /** - * Internal change-to-mode command handler function. - */ - void HandleChangeToMode(HandlerContext & ctx, const Commands::ChangeToMode::DecodableType & req); - +public: /** - * Helper function that loads all the persistent attributes from the KVS. These attributes are CurrentMode, - * StartUpMode and OnMode. + * Creates a mode base cluster instance. The Init() function needs to be called for this instance to be registered and + * called by the interaction model at the appropriate times. + * @param aDelegate A pointer to the delegate to be used by this server. + * Note: the caller must ensure that the delegate lives throughout the instance's lifetime. + * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. + * @param aClusterId The ID of the ModeBase derived cluster to be instantiated. + * @param aFeature The bitmask value that identifies which features are supported by this instance. */ - void LoadPersistentAttributes(); + Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClusterId, uint32_t aFeature); - /** - * Helper function that encodes the supported modes. - * @param encoder The encoder to encode the supported modes into. - */ - CHIP_ERROR EncodeSupportedModes(const AttributeValueEncoder::ListEncodeHelper & encoder); + ~Instance() override; -public: /** * Initialise the ModeBase server instance. * @return Returns an error if the given endpoint and cluster ID have not been enabled in zap, if the @@ -91,6 +56,13 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface CHIP_ERROR Init(); // Attribute setters + /** + * Sets the Current-Mode attribute. Note, this also handles writing the new value into non-volatile storage. + * @param aNewMode The value to which the Current-Mode mode is to be set. + * @return Returns a ConstraintError if the aNewMode value is not valid. Returns Success otherwise. + */ + Protocols::InteractionModel::Status UpdateCurrentMode(uint8_t aNewMode); + /** * Sets the Start-Up attribute. Note, this also handles writing the new value into non-volatile storage. * @param aNewStartUpMode The value to which the Start-Up mode is to be set. @@ -105,14 +77,12 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface */ Protocols::InteractionModel::Status UpdateOnMode(DataModel::Nullable aNewOnMode); + // Attribute getters. /** - * Sets the Current-Mode attribute. Note, this also handles writing the new value into non-volatile storage. - * @param aNewMode The value to which the Current-Mode mode is to be set. - * @return Returns a ConstraintError if the aNewMode value is not valid. Returns Success otherwise. + * @return The Current mode. */ - Protocols::InteractionModel::Status UpdateCurrentMode(uint8_t aNewMode); + uint8_t GetCurrentMode() const; - // Attribute getters. /** * @return The Start-Up mode. */ @@ -123,11 +93,6 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface */ DataModel::Nullable GetOnMode() const; - /** - * @return The Current mode. - */ - uint8_t GetCurrentMode() const; - /** * @return The endpoint ID. */ @@ -137,6 +102,13 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface static constexpr uint8_t kMaxModeLabelSize = 64; static constexpr uint8_t kMaxNumOfModeTags = 8; + // List change reporting + /** + * Reports that the contents of the supported modes attribute have changed. + * The device SHALL call this method whenever it changes the list of supported modes. + */ + void ReportSupportedModesChange(); + /** * Returns true if the feature is supported. * @param feature the feature to check. @@ -149,19 +121,56 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface */ bool IsSupportedMode(uint8_t mode); - /** - * Creates a mode base cluster instance. The Init() function needs to be called for this instance to be registered and - * called by the interaction model at the appropriate times. - * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. - * @param aClusterId The ID of the ModeBase aliased cluster to be instantiated. - * @param aFeature The bitmask value that identifies which features are supported by this instance. - */ - Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClusterId, uint32_t aFeature); +private: + Delegate * mDelegate; - ~Instance() override; + EndpointId mEndpointId{}; + ClusterId mClusterId{}; + + // Attribute data store + uint8_t mCurrentMode; + DataModel::Nullable mStartUpMode; + DataModel::Nullable mOnMode; + uint32_t mFeature; template void HandleCommand(HandlerContext & handlerContext, FuncT func); + + // CommandHandlerInterface + void InvokeCommand(HandlerContext & ctx) override; + CHIP_ERROR EnumerateAcceptedCommands(const ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override; + CHIP_ERROR EnumerateGeneratedCommands(const ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override; + + // AttributeAccessInterface + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; + + /** + * Register this ModeBase instance. + */ + void RegisterInstance(); + + /** + * Unregister this ModeBase instance. + */ + void UnregisterInstance(); + + /** + * Internal change-to-mode command handler function. + */ + void HandleChangeToMode(HandlerContext & ctx, const Commands::ChangeToMode::DecodableType & req); + + /** + * Helper function that loads all the persistent attributes from the KVS. These attributes are CurrentMode, + * StartUpMode and OnMode. + */ + void LoadPersistentAttributes(); + + /** + * Helper function that encodes the supported modes. + * @param encoder The encoder to encode the supported modes into. + */ + CHIP_ERROR EncodeSupportedModes(const AttributeValueEncoder::ListEncodeHelper & encoder); }; class Delegate @@ -194,6 +203,9 @@ class Delegate * CopyCharSpanToMutableCharSpan to copy into the MutableCharSpan. * @return Returns a CHIP_NO_ERROR if there was no error and the label was returned successfully. * CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the modeIndex in beyond the list of available labels. + * + * Note: This is used by the SDK to populate the supported modes attribute. If the contents of this list change, + * the device SHALL call the Instance's ReportSupportedModesChange method to report that this attribute has changed. */ virtual CHIP_ERROR GetModeLabelByIndex(uint8_t modeIndex, MutableCharSpan & label) = 0; @@ -203,6 +215,9 @@ class Delegate * @param value a reference to the uint8_t variable that is to contain the mode value. * @return Returns a CHIP_NO_ERROR if there was no error and the value was returned successfully. * CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the modeIndex in beyond the list of available values. + * + * Note: This is used by the SDK to populate the supported modes attribute. If the contents of this list change, + * the device SHALL call the Instance's ReportSupportedModesChange method to report that this attribute has changed. */ virtual CHIP_ERROR GetModeValueByIndex(uint8_t modeIndex, uint8_t & value) = 0; @@ -218,6 +233,9 @@ class Delegate * to copy into the buffer. * @return Returns a CHIP_NO_ERROR if there was no error and the mode tags were returned successfully. * CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the modeIndex in beyond the list of available mode tags. + * + * Note: This is used by the SDK to populate the supported modes attribute. If the contents of this list change, + * the device SHALL call the Instance's ReportSupportedModesChange method to report that this attribute has changed. */ virtual CHIP_ERROR GetModeTagsByIndex(uint8_t modeIndex, DataModel::List & modeTags) = 0; diff --git a/src/app/clusters/operational-state-server/operational-state-delegate.h b/src/app/clusters/operational-state-server/operational-state-cluster-objects.h similarity index 60% rename from src/app/clusters/operational-state-server/operational-state-delegate.h rename to src/app/clusters/operational-state-server/operational-state-cluster-objects.h index 34bbe2d1ba10c0..d7159791964915 100644 --- a/src/app/clusters/operational-state-server/operational-state-delegate.h +++ b/src/app/clusters/operational-state-server/operational-state-cluster-objects.h @@ -188,118 +188,54 @@ struct GenericOperationalPhase }; /** - * A delegate to handle application logic of the Operational State aliased Cluster. - * The delegate API assumes there will be separate delegate objects for each cluster instance. - * (i.e. each separate operational state cluster derivation, on each separate endpoint), - * since the delegate methods are not handed the cluster id or endpoint. + * A class which represents the operational error event of an Operational State cluster derivation instance. */ -class Delegate +class GenericErrorEvent : private app::Clusters::OperationalState::Events::OperationalError::Type { -public: - /** - * Get the current operational state. - * @return The current operational state value - */ - virtual uint8_t GetCurrentOperationalState() = 0; - - /** - * Get the list of supported operational states. - * Fills in the provided GenericOperationalState with the state at index `index` if there is one, - * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of states. - * @param index The index of the state, with 0 representing the first state. - * @param operationalState The GenericOperationalState is filled. - */ - virtual CHIP_ERROR GetOperationalStateAtIndex(size_t index, GenericOperationalState & operationalState) = 0; - - /** - * Get the list of supported operational phases. - * Fills in the provided GenericOperationalPhase with the phase at index `index` if there is one, - * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of phases. - * @param index The index of the phase, with 0 representing the first phase. - * @param operationalPhase The GenericOperationalPhase is filled. - */ - virtual CHIP_ERROR GetOperationalPhaseAtIndex(size_t index, GenericOperationalPhase & operationalPhase) = 0; - - /** - * Get current operational error. - * @param error The GenericOperationalError to fill with the current operational error value - */ - virtual void GetCurrentOperationalError(GenericOperationalError & error) = 0; - - /** - * Get current phase - * @param phase The app::DataModel::Nullable to fill with the current phase value - */ - virtual void GetCurrentPhase(app::DataModel::Nullable & phase) = 0; - - /** - * Get countdown time - * @param time The app::DataModel::Nullable to fill with the coutdown time value - */ - virtual void GetCountdownTime(app::DataModel::Nullable & time) = 0; + using super = app::Clusters::OperationalState::Events::OperationalError::Type; - /** - * Set current operational state. - * @param opState The operational state that should now be the current one. - */ - virtual CHIP_ERROR SetOperationalState(uint8_t opState) = 0; - - /** - * Set operational error. - * @param opErrState The new operational error. - */ - virtual CHIP_ERROR SetOperationalError(const GenericOperationalError & opErrState) = 0; - - /** - * Set operational phase. - * @param phase The operational phase that should now be the current one. - */ - virtual CHIP_ERROR SetPhase(const app::DataModel::Nullable & phase) = 0; - - /** - * Set coutdown time. - * @param time The coutdown time that should now be the current one. - */ - virtual CHIP_ERROR SetCountdownTime(const app::DataModel::Nullable & time) = 0; - - // command callback - /** - * Handle Command Callback in application: Pause - * @param[out] get operational error after callback. - */ - virtual void HandlePauseStateCallback(GenericOperationalError & err) = 0; - - /** - * Handle Command Callback in application: Resume - * @param[out] get operational error after callback. - */ - virtual void HandleResumeStateCallback(GenericOperationalError & err) = 0; +public: + GenericErrorEvent(ClusterId aClusterId, const Structs::ErrorStateStruct::Type & aError) : mClusterId(aClusterId) + { + errorState = aError; + } + using super::GetEventId; + using super::GetPriorityLevel; + ClusterId GetClusterId() const { return mClusterId; } + using super::Encode; + using super::kIsFabricScoped; - /** - * Handle Command Callback in application: Start - * @param[out] get operational error after callback. - */ - virtual void HandleStartStateCallback(GenericOperationalError & err) = 0; +private: + ClusterId mClusterId; +}; - /** - * Handle Command Callback in application: Stop - * @param[out] get operational error after callback. - */ - virtual void HandleStopStateCallback(GenericOperationalError & err) = 0; +/** + * A class which represents the operational completion event of an Operational State cluster derivation instance. + */ +class GenericOperationCompletionEvent : private app::Clusters::OperationalState::Events::OperationCompletion::Type +{ + using super = app::Clusters::OperationalState::Events::OperationCompletion::Type; - Delegate() = default; +public: + GenericOperationCompletionEvent(ClusterId aClusterId, uint8_t aCompletionErrorCode, + const Optional> & aTotalOperationalTime = NullOptional, + const Optional> & aPausedTime = NullOptional) : + mClusterId(aClusterId) + { + completionErrorCode = aCompletionErrorCode; + totalOperationalTime = aTotalOperationalTime; + pausedTime = aPausedTime; + } + using super::GetEventId; + using super::GetPriorityLevel; + ClusterId GetClusterId() const { return mClusterId; } + using super::Encode; + using super::kIsFabricScoped; - virtual ~Delegate() = default; +private: + ClusterId mClusterId; }; -// @brief Instance getter for the delegate for the given operational state alias cluster on the given endpoint. -// The delegate API assumes there will be separate delegate objects for each cluster instance. -// (i.e. each separate operational state cluster derivation, on each separate endpoint) -// @note This API should always be called prior to using the delegate and the return pointer should never be cached. -// This should be implemented by the application. -// @return Default global delegate instance. -Delegate * GetOperationalStateDelegate(EndpointId endpointId, ClusterId clusterId); - } // namespace OperationalState } // namespace Clusters } // namespace app diff --git a/src/app/clusters/operational-state-server/operational-state-server.cpp b/src/app/clusters/operational-state-server/operational-state-server.cpp index 5fa7473f0e1641..f818c63c5cc14f 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.cpp +++ b/src/app/clusters/operational-state-server/operational-state-server.cpp @@ -20,7 +20,6 @@ * @brief Implementation for the Operational State Server Cluster ***************************************************************************/ #include "operational-state-server.h" -#include "operational-state-delegate.h" #include #include #include @@ -45,55 +44,6 @@ using namespace chip::app::Clusters::OperationalState::Attributes; using Status = Protocols::InteractionModel::Status; -/** - * A class which represents the operational error event of an Operational State cluster derivation instance. - */ -class GenericErrorEvent : private app::Clusters::OperationalState::Events::OperationalError::Type -{ - using super = app::Clusters::OperationalState::Events::OperationalError::Type; - -public: - GenericErrorEvent(ClusterId aClusterId, const Structs::ErrorStateStruct::Type & aError) : mClusterId(aClusterId) - { - errorState = aError; - } - using super::GetEventId; - using super::GetPriorityLevel; - ClusterId GetClusterId() const { return mClusterId; } - using super::Encode; - using super::kIsFabricScoped; - -private: - ClusterId mClusterId; -}; - -/** - * A class which represents the operational completion event of an Operational State cluster derivation instance. - */ -class GenericOperationCompletionEvent : private app::Clusters::OperationalState::Events::OperationCompletion::Type -{ - using super = app::Clusters::OperationalState::Events::OperationCompletion::Type; - -public: - GenericOperationCompletionEvent(ClusterId aClusterId, uint8_t aCompletionErrorCode, - const Optional> & aTotalOperationalTime = NullOptional, - const Optional> & aPausedTime = NullOptional) : - mClusterId(aClusterId) - { - completionErrorCode = aCompletionErrorCode; - totalOperationalTime = aTotalOperationalTime; - pausedTime = aPausedTime; - } - using super::GetEventId; - using super::GetPriorityLevel; - ClusterId GetClusterId() const { return mClusterId; } - using super::Encode; - using super::kIsFabricScoped; - -private: - ClusterId mClusterId; -}; - CHIP_ERROR OperationalStateServer::Init() { // Check if the cluster has been selected in zap diff --git a/src/app/clusters/operational-state-server/operational-state-server.h b/src/app/clusters/operational-state-server/operational-state-server.h index 5bb50d3b5df6ef..3e96fa6ca03405 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.h +++ b/src/app/clusters/operational-state-server/operational-state-server.h @@ -17,6 +17,8 @@ */ #pragma once + +#include "operational-state-cluster-objects.h" #include #include #include @@ -45,6 +47,23 @@ class Uncopyable class OperationalStateServer : public CommandHandlerInterface, public AttributeAccessInterface, public Uncopyable { public: + /** + * Creates an operational state cluster instance. The Init() function needs to be called for this instance to be registered and + * called by the interaction model at the appropriate times. + * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. + * @param aClusterId The ID of the operational state aliased cluster to be instantiated. + */ + OperationalStateServer(EndpointId aEndpointId, ClusterId aClusterId) : + CommandHandlerInterface(MakeOptional(aEndpointId), aClusterId), + AttributeAccessInterface(MakeOptional(aEndpointId), aClusterId) + { + + mEndpointId = aEndpointId; + mClusterId = aClusterId; + } + + ~OperationalStateServer() override {} + /** * Init the operational state server. * This function must be called after defining a OperationalStateServer class object. @@ -76,23 +95,6 @@ class OperationalStateServer : public CommandHandlerInterface, public AttributeA const Optional> & aTotalOperationalTime = NullOptional, const Optional> & aPausedTime = NullOptional); - /** - * Creates an operational state cluster instance. The Init() function needs to be called for this instance to be registered and - * called by the interaction model at the appropriate times. - * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. - * @param aClusterId The ID of the operational state aliased cluster to be instantiated. - */ - OperationalStateServer(EndpointId aEndpointId, ClusterId aClusterId) : - CommandHandlerInterface(MakeOptional(aEndpointId), aClusterId), - AttributeAccessInterface(MakeOptional(aEndpointId), aClusterId) - { - - mEndpointId = aEndpointId; - mClusterId = aClusterId; - } - - ~OperationalStateServer() override {} - private: // Inherited from CommandHandlerInterface template @@ -129,6 +131,120 @@ class OperationalStateServer : public CommandHandlerInterface, public AttributeA EndpointId mEndpointId; ClusterId mClusterId; }; + +/** + * A delegate to handle application logic of the Operational State aliased Cluster. + * The delegate API assumes there will be separate delegate objects for each cluster instance. + * (i.e. each separate operational state cluster derivation, on each separate endpoint), + * since the delegate methods are not handed the cluster id or endpoint. + */ +class Delegate +{ +public: + /** + * Get the current operational state. + * @return The current operational state value + */ + virtual uint8_t GetCurrentOperationalState() = 0; + + /** + * Get the list of supported operational states. + * Fills in the provided GenericOperationalState with the state at index `index` if there is one, + * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of states. + * @param index The index of the state, with 0 representing the first state. + * @param operationalState The GenericOperationalState is filled. + */ + virtual CHIP_ERROR GetOperationalStateAtIndex(size_t index, GenericOperationalState & operationalState) = 0; + + /** + * Get the list of supported operational phases. + * Fills in the provided GenericOperationalPhase with the phase at index `index` if there is one, + * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of phases. + * @param index The index of the phase, with 0 representing the first phase. + * @param operationalPhase The GenericOperationalPhase is filled. + */ + virtual CHIP_ERROR GetOperationalPhaseAtIndex(size_t index, GenericOperationalPhase & operationalPhase) = 0; + + /** + * Get current operational error. + * @param error The GenericOperationalError to fill with the current operational error value + */ + virtual void GetCurrentOperationalError(GenericOperationalError & error) = 0; + + /** + * Get current phase + * @param phase The app::DataModel::Nullable to fill with the current phase value + */ + virtual void GetCurrentPhase(app::DataModel::Nullable & phase) = 0; + + /** + * Get countdown time + * @param time The app::DataModel::Nullable to fill with the coutdown time value + */ + virtual void GetCountdownTime(app::DataModel::Nullable & time) = 0; + + /** + * Set current operational state. + * @param opState The operational state that should now be the current one. + */ + virtual CHIP_ERROR SetOperationalState(uint8_t opState) = 0; + + /** + * Set operational error. + * @param opErrState The new operational error. + */ + virtual CHIP_ERROR SetOperationalError(const GenericOperationalError & opErrState) = 0; + + /** + * Set operational phase. + * @param phase The operational phase that should now be the current one. + */ + virtual CHIP_ERROR SetPhase(const app::DataModel::Nullable & phase) = 0; + + /** + * Set coutdown time. + * @param time The coutdown time that should now be the current one. + */ + virtual CHIP_ERROR SetCountdownTime(const app::DataModel::Nullable & time) = 0; + + // command callback + /** + * Handle Command Callback in application: Pause + * @param[out] get operational error after callback. + */ + virtual void HandlePauseStateCallback(GenericOperationalError & err) = 0; + + /** + * Handle Command Callback in application: Resume + * @param[out] get operational error after callback. + */ + virtual void HandleResumeStateCallback(GenericOperationalError & err) = 0; + + /** + * Handle Command Callback in application: Start + * @param[out] get operational error after callback. + */ + virtual void HandleStartStateCallback(GenericOperationalError & err) = 0; + + /** + * Handle Command Callback in application: Stop + * @param[out] get operational error after callback. + */ + virtual void HandleStopStateCallback(GenericOperationalError & err) = 0; + + Delegate() = default; + + virtual ~Delegate() = default; +}; + +// @brief Instance getter for the delegate for the given operational state alias cluster on the given endpoint. +// The delegate API assumes there will be separate delegate objects for each cluster instance. +// (i.e. each separate operational state cluster derivation, on each separate endpoint) +// @note This API should always be called prior to using the delegate and the return pointer should never be cached. +// This should be implemented by the application. +// @return Default global delegate instance. +Delegate * GetOperationalStateDelegate(EndpointId endpointId, ClusterId clusterId); + } // namespace OperationalState } // namespace Clusters } // namespace app diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 9078702fb983e9..65ea68ff53eee4 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -109,7 +109,7 @@ source_set("scenes-table-test-srcs") { } source_set("operational-state-test-srcs") { - sources = [ "${chip_root}/src/app/clusters/operational-state-server/operational-state-delegate.h" ] + sources = [ "${chip_root}/src/app/clusters/operational-state-server/operational-state-cluster-objects.h" ] public_deps = [ "${chip_root}/src/app/common:cluster-objects", @@ -143,7 +143,7 @@ chip_test_suite("tests") { "TestInteractionModelEngine.cpp", "TestMessageDef.cpp", "TestNumericAttributeTraits.cpp", - "TestOperationalStateDelegate.cpp", + "TestOperationalStateClusterObjects.cpp", "TestPendingNotificationMap.cpp", "TestPowerSourceCluster.cpp", "TestReadInteraction.cpp", diff --git a/src/app/tests/TestOperationalStateDelegate.cpp b/src/app/tests/TestOperationalStateClusterObjects.cpp similarity index 99% rename from src/app/tests/TestOperationalStateDelegate.cpp rename to src/app/tests/TestOperationalStateClusterObjects.cpp index e82f80bbdaff84..493d02f8ae1935 100644 --- a/src/app/tests/TestOperationalStateDelegate.cpp +++ b/src/app/tests/TestOperationalStateClusterObjects.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include +#include #include #include @@ -579,13 +579,13 @@ int TestTearDown(void * inContext) } // namespace -int TestOperationalStateDelegate() +int TestOperationalStateClusterObjects() { - nlTestSuite theSuite = { "Test Operational State delegate tests", &sTests[0], TestSetup, TestTearDown }; + nlTestSuite theSuite = { "Test Operational State Cluster Objects tests", &sTests[0], TestSetup, TestTearDown }; // Run test suit againt one context. nlTestRunner(&theSuite, nullptr); return nlTestRunnerStats(&theSuite); } -CHIP_REGISTER_TEST_SUITE(TestOperationalStateDelegate) +CHIP_REGISTER_TEST_SUITE(TestOperationalStateClusterObjects) From c5a1b52f75b80a9c58b8550cb6f399a018b0916f Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 8 Aug 2023 14:47:25 -0400 Subject: [PATCH 44/74] TC-PS-3.1: Add cluster revision check (#28482) * TC-PS-3.1: Add cluster revision check This allows the test suite to be dual-purposed against existing devices in the field as well as being used for cert. Correct cluster revision for cert testing purposes is tested in the TC-PS-1.1 test. Test: Down-rev'd one PS cluster on all clusters and removed EndpointList - saw note, test passes. * appease the linter * Change location. --- src/python_testing/TC_DeviceBasicComposition.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index 1d3f3fc944514e..295a15cc3c559a 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -465,8 +465,20 @@ def test_TC_PS_3_1(self): for endpoint_id, endpoint in self.endpoints.items(): if Clusters.PowerSource not in endpoint: continue + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=attribute_id) + cluster_revision = Clusters.PowerSource.Attributes.ClusterRevision + if cluster_revision not in endpoint[Clusters.PowerSource]: + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, + attribute_id=cluster_revision.attribute_id) + self.record_error(self.get_test_name( + ), location=location, problem=f'Did not find Cluster revision on {location.as_cluster_string(self.cluster_mapper)}', spec_location='Global attributes') + if endpoint[Clusters.PowerSource][cluster_revision] < 2: + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, + attribute_id=cluster_revision.attribute_id) + self.record_note(self.get_test_name(), location=location, + problem='Power source ClusterRevision is < 2, skipping remainder of test for this endpoint') + continue if Clusters.PowerSource.Attributes.EndpointList not in endpoint[Clusters.PowerSource]: - location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=attribute_id) self.record_error(self.get_test_name(), location=location, problem=f'Did not find {attribute_string} on {location.as_cluster_string(self.cluster_mapper)}', spec_location="EndpointList Attribute") success = False From c42f94a004276d98d7c3224943abbff84a18331b Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 8 Aug 2023 14:48:28 -0400 Subject: [PATCH 45/74] python testing: Support QR / manual codes for commissioning (#28479) * Support QR / manual codes for commissioning * Remove now unused imports --- .../TC_DeviceBasicComposition.py | 31 +------- src/python_testing/matter_testing_support.py | 74 ++++++++++++++++--- 2 files changed, 65 insertions(+), 40 deletions(-) diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index 295a15cc3c559a..67f5bc4f952b8c 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -27,10 +27,7 @@ import chip.clusters as Clusters import chip.tlv -from chip import discovery from chip.clusters.Attribute import ValueDecodeFailure -from chip.exceptions import ChipStackError -from chip.setup_payload import SetupPayload from matter_testing_support import AttributePathLocation, MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts @@ -171,32 +168,10 @@ async def setup_class(self): dump_device_composition_path: Optional[str] = self.user_params.get("dump_device_composition_path", None) if do_test_over_pase: - if self.matter_test_config.qr_code_content is not None: - qr_code = self.matter_test_config.qr_code_content - try: - setup_payload = SetupPayload().ParseQrCode(qr_code) - except ChipStackError: - asserts.fail(f"QR code '{qr_code} failed to parse properly as a Matter setup code.") - - elif self.matter_test_config.manual_code is not None: - manual_code = self.matter_test_config.manual_code - try: - setup_payload = SetupPayload().ParseManualPairingCode(manual_code) - except ChipStackError: - asserts.fail( - f"Manual code code '{manual_code}' failed to parse properly as a Matter setup code. Check that all digits are correct and length is 11 or 21 characters.") - else: - asserts.fail("Require either --qr-code or --manual-code to proceed with PASE needed for test.") - - if setup_payload.short_discriminator is not None: - filter_type = discovery.FilterType.SHORT_DISCRIMINATOR - filter_value = setup_payload.short_discriminator - else: - filter_type = discovery.FilterType.LONG_DISCRIMINATOR - filter_value = setup_payload.long_discriminator + info = self.get_setup_payload_info() commissionable_nodes = dev_ctrl.DiscoverCommissionableNodes( - filter_type, filter_value, stopOnFirst=True, timeoutSecond=15) + info.filter_type, info.filter_value, stopOnFirst=True, timeoutSecond=15) logging.info(f"Commissionable nodes: {commissionable_nodes}") # TODO: Support BLE if commissionable_nodes is not None and len(commissionable_nodes) > 0: @@ -208,7 +183,7 @@ async def setup_class(self): logging.info(f"Found instance {instance_name}, VID={vid}, PID={pid}, Address={address}") node_id = 1 - dev_ctrl.EstablishPASESessionIP(address, setup_payload.setup_passcode, node_id) + dev_ctrl.EstablishPASESessionIP(address, info.passcode, node_id) else: asserts.fail("Failed to find the DUT according to command line arguments.") else: diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 008848177b3271..a394952445de60 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -47,9 +47,12 @@ import chip.clusters as Clusters import chip.logging import chip.native +from chip import discovery from chip.ChipStack import ChipStack from chip.clusters.Attribute import EventReadResult, SubscriptionTransaction +from chip.exceptions import ChipStackError from chip.interaction_model import InteractionModelError, Status +from chip.setup_payload import SetupPayload from chip.storage import PersistentStorage from chip.tracing import TracingContext from mobly import asserts, base_test, signals, utils @@ -350,6 +353,13 @@ class ProblemNotice: spec_location: str = "" +@dataclass +class SetupPayloadInfo: + filter_type: discovery.FilterType = discovery.FilterType.LONG_DISCRIMINATOR + filter_value: int = 0 + passcode: int = 0 + + class MatterStackState: def __init__(self, config: MatterTestConfig): self._logger = logger @@ -550,6 +560,35 @@ def record_warning(self, test_name: str, location: Union[AttributePathLocation, def record_note(self, test_name: str, location: Union[AttributePathLocation, EventPathLocation, CommandPathLocation], problem: str, spec_location: str = ""): self.problems.append(ProblemNotice(test_name, location, ProblemSeverity.NOTE, problem, spec_location)) + def get_setup_payload_info(self) -> SetupPayloadInfo: + if self.matter_test_config.qr_code_content is not None: + qr_code = self.matter_test_config.qr_code_content + try: + setup_payload = SetupPayload().ParseQrCode(qr_code) + except ChipStackError: + asserts.fail(f"QR code '{qr_code} failed to parse properly as a Matter setup code.") + + elif self.matter_test_config.manual_code is not None: + manual_code = self.matter_test_config.manual_code + try: + setup_payload = SetupPayload().ParseManualPairingCode(manual_code) + except ChipStackError: + asserts.fail( + f"Manual code code '{manual_code}' failed to parse properly as a Matter setup code. Check that all digits are correct and length is 11 or 21 characters.") + else: + asserts.fail("Require either --qr-code or --manual-code.") + + info = SetupPayloadInfo() + info.passcode = setup_payload.setup_passcode + if setup_payload.short_discriminator is not None: + info.filter_type = discovery.FilterType.SHORT_DISCRIMINATOR + info.filter_value = setup_payload.short_discriminator + else: + info.filter_type = discovery.FilterType.LONG_DISCRIMINATOR + info.filter_value = setup_payload.long_discriminator + + return info + def generate_mobly_test_config(matter_test_config: MatterTestConfig): test_run_config = TestRunConfig() @@ -755,12 +794,15 @@ def populate_commissioning_args(args: argparse.Namespace, config: MatterTestConf print("error: supplied number of discriminators does not match number of passcodes") return False - if len(config.dut_node_ids) > len(config.discriminators): + device_descriptors = [config.qr_code_content] if config.qr_code_content is not None else [ + config.manual_code] if config.manual_code is not None else config.discriminators + + if len(config.dut_node_ids) > len(device_descriptors): print("error: More node IDs provided than discriminators") return False - if len(config.dut_node_ids) < len(config.discriminators): - missing = len(config.discriminators) - len(config.dut_node_ids) + if len(config.dut_node_ids) < len(device_descriptors): + missing = len(device_descriptors) - len(config.dut_node_ids) # We generate new node IDs sequentially from the last one seen for all # missing NodeIDs when commissioning many nodes at once. for i in range(missing): @@ -985,27 +1027,35 @@ def _commission_device(self, i) -> bool: dev_ctrl = self.default_controller conf = self.matter_test_config - # TODO: support by manual code and QR + # TODO: qr code and manual code aren't lists + + if conf.qr_code_content or conf.manual_code: + info = self.get_setup_payload_info() + else: + info = SetupPayloadInfo() + info.passcode = conf.setup_passcodes[i] + info.filter_type = DiscoveryFilterType.LONG_DISCRIMINATOR + info.filter_value = conf.discriminators[i] if conf.commissioning_method == "on-network": return dev_ctrl.CommissionOnNetwork( nodeId=conf.dut_node_ids[i], - setupPinCode=conf.setup_passcodes[i], - filterType=DiscoveryFilterType.LONG_DISCRIMINATOR, - filter=conf.discriminators[i] + setupPinCode=info.passcode, + filterType=info.filter_type, + filter=info.filter_value ) elif conf.commissioning_method == "ble-wifi": return dev_ctrl.CommissionWiFi( - conf.discriminators[i], - conf.setup_passcodes[i], + info.filter_value, + info.passcode, conf.dut_node_ids[i], conf.wifi_ssid, conf.wifi_passphrase ) elif conf.commissioning_method == "ble-thread": return dev_ctrl.CommissionThread( - conf.discriminators[i], - conf.setup_passcodes[i], + info.filter_value, + info.passcode, conf.dut_node_ids[i], conf.thread_operational_dataset ) @@ -1013,7 +1063,7 @@ def _commission_device(self, i) -> bool: logging.warning("==== USING A DIRECT IP COMMISSIONING METHOD NOT SUPPORTED IN THE LONG TERM ====") return dev_ctrl.CommissionIP( ipaddr=conf.commissionee_ip_address_just_for_testing, - setupPinCode=conf.setup_passcodes[i], nodeid=conf.dut_node_ids[i] + setupPinCode=info.passcode, nodeid=conf.dut_node_ids[i] ) else: raise ValueError("Invalid commissioning method %s!" % conf.commissioning_method) From 0ba5315007897cff60f0087b96b21ff0a6442573 Mon Sep 17 00:00:00 2001 From: Ricardo Casallas <77841255+rcasallas-silabs@users.noreply.github.com> Date: Tue, 8 Aug 2023 14:48:54 -0400 Subject: [PATCH 46/74] EFR32: PSA configuration for compatibility with GSDK 4.3.0 attestation key. (#28442) --- src/platform/silabs/efr32/psa_crypto_config.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/platform/silabs/efr32/psa_crypto_config.h b/src/platform/silabs/efr32/psa_crypto_config.h index 165a7b94967e74..450f9233cb9c4b 100644 --- a/src/platform/silabs/efr32/psa_crypto_config.h +++ b/src/platform/silabs/efr32/psa_crypto_config.h @@ -121,3 +121,8 @@ #endif #endif // TFM_CONFIG_SL_SECURE_LIBRARY + +/* Defaults in GSDK 4.3.0 */ +#define SL_PSA_ITS_SUPPORT_V1_DRIVER 0 +#define SL_PSA_ITS_SUPPORT_V2_DRIVER 0 +#define SL_PSA_ITS_SUPPORT_V3_DRIVER 1 From 732f797f9baad2619675536ae5c5fd4913ddb032 Mon Sep 17 00:00:00 2001 From: Wang Qixiang <43193572+wqx6@users.noreply.github.com> Date: Wed, 9 Aug 2023 02:49:16 +0800 Subject: [PATCH 47/74] ESP32: Add ICD support for Thread devices (#28359) * ESP32: Add ICD support for Thread devices * Restyled by clang-format * fix compile issue * fix compile issue --------- Co-authored-by: Restyled.io --- config/esp32/components/chip/CMakeLists.txt | 4 + config/esp32/components/chip/Kconfig | 58 ++++++------- .../esp32/main/CMakeLists.txt | 5 ++ .../esp32/main/Kconfig.projbuild | 7 +- examples/all-clusters-app/esp32/main/main.cpp | 28 +----- .../esp32/sdkconfig.defaults.esp32h2 | 78 +++++++++++++++++ .../esp32/main/main.cpp | 27 +----- examples/lighting-app/esp32/main/main.cpp | 26 +----- .../platform/esp32/common/Esp32AppServer.cpp | 11 +++ .../platform/esp32/common/Esp32ThreadInit.cpp | 85 +++++++++++++++++++ .../{OpenthreadConfig.h => Esp32ThreadInit.h} | 10 ++- .../esp32/icd/ICDSubscriptionCallback.cpp | 65 ++++++++++++++ .../esp32/icd/ICDSubscriptionCallback.h | 35 ++++++++ src/platform/ESP32/CHIPDevicePlatformConfig.h | 7 +- src/platform/ESP32/ConnectivityManagerImpl.h | 6 +- .../ESP32/ConnectivityManagerImpl_WiFi.cpp | 34 ++------ .../ESP32/DiagnosticDataProviderImpl.cpp | 2 + src/platform/ESP32/ESP32Utils.cpp | 7 -- .../ESP32/NetworkCommissioningDriver.cpp | 3 - 19 files changed, 344 insertions(+), 154 deletions(-) create mode 100644 examples/all-clusters-app/esp32/sdkconfig.defaults.esp32h2 create mode 100644 examples/platform/esp32/common/Esp32ThreadInit.cpp rename examples/platform/esp32/common/{OpenthreadConfig.h => Esp32ThreadInit.h} (85%) create mode 100644 examples/platform/esp32/icd/ICDSubscriptionCallback.cpp create mode 100644 examples/platform/esp32/icd/ICDSubscriptionCallback.h diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index 6aa824bdcba6f3..8dc09e91131be2 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -132,6 +132,10 @@ if(CHIP_CODEGEN_PREGEN_DIR) chip_gn_arg_append("chip_code_pre_generated_directory" "\"${CHIP_CODEGEN_PREGEN_DIR}\"") endif() +if(CONFIG_ENABLE_ICD_SERVER) + chip_gn_arg_append("chip_enable_icd_server" "true") +endif() + if(CONFIG_ENABLE_PW_RPC) string(APPEND chip_gn_args "import(\"//build_overrides/pigweed.gni\")\n") chip_gn_arg_append("remove_default_configs" "[\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_build:toolchain_cpp_standard\"]") diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 5c871c2d043a30..30c152eff480fa 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -292,6 +292,31 @@ menu "CHIP Device Layer" help Enables or Disables the support for Commissionable Device Type. + config ENABLE_ICD_SERVER + bool "Enable ICD server" + depends on OPENTHREAD_MTD + default n + help + Enables or Disables ICD server + + config ICD_SLOW_POLL_INTERVAL + int "ICD Slow Polling Interval" + depends on ENABLE_ICD_SERVER + default 5000 + help + The value defines the fastest frequency at which the device will typically receive + messages in Idle Mode. The Slow Polling interval MAY be the same as the Idle Mode + Interval. + + config ICD_FAST_POLL_INTERVAL + int "ICD Fast Polling Interval" + depends on ENABLE_ICD_SERVER + default 200 + help + Fast Polling defines the fastest frequency at which the device can receive messages + in Active Mode. The Fast Polling interval SHALL be smaller than the Active Mode + Interval. + config ENABLE_BG_EVENT_PROCESSING bool "Enable Background event processing" default n @@ -435,39 +460,6 @@ menu "CHIP Device Layer" The amount of time (in milliseconds) to wait for Internet connectivity to be established on the device's WiFi station interface during a Network Provisioning TestConnectivity operation. - choice WIFI_POWER_SAVE_MODE - prompt "WiFi power-saving mode" - default WIFI_POWER_SAVE_MIN - depends on ENABLE_WIFI_STATION && !ENABLE_WIFI_AP - help - The Modem-sleep mode which refers to the legacy power-saving mode in the IEEE 802.11 protocol. - - config WIFI_POWER_SAVE_MIN - bool "Minimal power-saving mode" - help - In minimum power-saving mode, station wakes up every DTIM to receive beacon. - - config WIFI_POWER_SAVE_MAX - bool "Maximum power-saving mode" - help - In maximum power-saving mode, station wakes up in every listen interval to receive beacon. - Listen interval can be configured by calling API 'esp_wifi_set_config()' before connecting - to AP. - - config WIFI_POWER_SAVE_NONE - bool "No power-saving" - help - No power save - - endchoice - - config WIFI_PS_LISTEN_INTERVAL - int "Listen interval for maximum power-saving mode" - depends on WIFI_POWER_SAVE_MAX - default 3 - help - Interval for station to listen to beacon from AP. The unit of listen interval is one beacon interval. - endmenu menu "WiFi AP Options" diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 1b4b6ff21e6296..b5435325459417 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -125,6 +125,11 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" ) endif (CONFIG_ENABLE_PW_RPC) +if (CONFIG_ENABLE_ICD_SERVER) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/icd") + list(APPEND SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/icd") +endif() + set(PRIV_REQUIRES_LIST chip QRCode bt app_update nvs_flash spi_flash openthread) if(${IDF_TARGET} STREQUAL "esp32") diff --git a/examples/all-clusters-app/esp32/main/Kconfig.projbuild b/examples/all-clusters-app/esp32/main/Kconfig.projbuild index fb2eb7d6c3b46f..2cec0c32093734 100644 --- a/examples/all-clusters-app/esp32/main/Kconfig.projbuild +++ b/examples/all-clusters-app/esp32/main/Kconfig.projbuild @@ -54,6 +54,9 @@ menu "Demo" config DEVICE_TYPE_ESP32_C6_DEVKITC bool "ESP32C6-DevKitC" depends on IDF_TARGET_ESP32C6 + config DEVICE_TYPE_ESP32_H2_DEVKITM + bool "ESP32H2-DevKitM" + depends on IDF_TARGET_ESP32H2 endchoice choice @@ -84,7 +87,7 @@ menu "Demo" config TFT_PREDEFINED_DISPLAY_TYPE int range 0 5 - default 0 if DEVICE_TYPE_ESP32_DEVKITC + default 0 if DEVICE_TYPE_ESP32_DEVKITC || DEVICE_TYPE_ESP32_H2_DEVKITM default 0 if DEVICE_TYPE_ESP32_C3_DEVKITM || DEVICE_TYPE_ESP32_C2_DEVKITM || DEVICE_TYPE_ESP32_C6_DEVKITC default 3 if DEVICE_TYPE_M5STACK default 4 if DEVICE_TYPE_ESP32_WROVER_KIT @@ -115,7 +118,7 @@ menu "Demo" range 0 40 default 2 if DEVICE_TYPE_ESP32_DEVKITC #Use LED1 (blue LED) as status LED on DevKitC default 2 if DEVICE_TYPE_ESP32_ETHERNET_KIT - default 8 if DEVICE_TYPE_ESP32_C3_DEVKITM || DEVICE_TYPE_ESP32_C2_DEVKITM || DEVICE_TYPE_ESP32_C6_DEVKITC + default 8 if DEVICE_TYPE_ESP32_C3_DEVKITM || DEVICE_TYPE_ESP32_C2_DEVKITM || DEVICE_TYPE_ESP32_C6_DEVKITC || DEVICE_TYPE_ESP32_H2_DEVKITM default 26 if DEVICE_TYPE_ESP32_WROVER_KIT default 40 if DEVICE_TYPE_M5STACK help diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index ecca799c81d07b..2ea1710ad7ebd5 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -52,12 +53,6 @@ #include "Rpc.h" #endif -#if CONFIG_OPENTHREAD_ENABLED -#include -#include -#include -#endif - #if CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER #include #endif // CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER @@ -71,6 +66,7 @@ using namespace ::chip; using namespace ::chip::Shell; using namespace ::chip::DeviceManager; +using namespace ::chip::DeviceLayer; using namespace ::chip::Credentials; // Used to indicate that an IP address has been added to the QRCode @@ -206,25 +202,7 @@ extern "C" void app_main() { ESP_LOGE(TAG, "GetAppTask().StartAppTask() failed : %" CHIP_ERROR_FORMAT, error.Format()); } -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD - esp_openthread_platform_config_t config = { - .radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(), - .host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(), - .port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(), - }; - set_openthread_platform_config(&config); - - if (DeviceLayer::ThreadStackMgr().InitThreadStack() != CHIP_NO_ERROR) - { - ESP_LOGE(TAG, "Failed to initialize Thread stack"); - return; - } - if (DeviceLayer::ThreadStackMgr().StartThreadTask() != CHIP_NO_ERROR) - { - ESP_LOGE(TAG, "Failed to launch Thread task"); - return; - } -#endif + ESPOpenThreadInit(); chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast(nullptr)); } diff --git a/examples/all-clusters-app/esp32/sdkconfig.defaults.esp32h2 b/examples/all-clusters-app/esp32/sdkconfig.defaults.esp32h2 new file mode 100644 index 00000000000000..f415104a665ec2 --- /dev/null +++ b/examples/all-clusters-app/esp32/sdkconfig.defaults.esp32h2 @@ -0,0 +1,78 @@ +CONFIG_IDF_TARGET="esp32h2" +CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_2=y + +# Default to 921600 baud when flashing and monitoring device +CONFIG_ESPTOOLPY_BAUD_921600B=y +CONFIG_ESPTOOLPY_BAUD=921600 +CONFIG_ESPTOOLPY_COMPRESSED=y +CONFIG_ESPTOOLPY_FLASHMODE_QIO=y +CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +CONFIG_ESPTOOLPY_FLASHFREQ="40m" +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 + +# libsodium +CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y + + +# NIMBLE +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y +CONFIG_BT_NIMBLE_EXT_ADV=n +CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 +CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=n + +# Enable OpenThread +CONFIG_OPENTHREAD_ENABLED=y +CONFIG_OPENTHREAD_SRP_CLIENT=y +CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC=n +CONFIG_OPENTHREAD_LOG_LEVEL_NOTE=y +CONFIG_OPENTHREAD_CLI=n +CONFIG_OPENTHREAD_DNS_CLIENT=y + +# Disable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=n + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" + +# LwIP config for OpenThread +CONFIG_LWIP_IPV6_NUM_ADDRESSES=8 +CONFIG_LWIP_MULTICAST_PING=y + +# mbedTLS +CONFIG_MBEDTLS_HARDWARE_AES=n +CONFIG_MBEDTLS_HARDWARE_MPI=n +CONFIG_MBEDTLS_HARDWARE_SHA=n +CONFIG_MBEDTLS_HARDWARE_ECC=y +CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN=n +CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY=n +CONFIG_MBEDTLS_CMAC_C=y +CONFIG_MBEDTLS_SSL_PROTO_DTLS=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECJPAKE=y + +# rtc clk for ble +# CONFIG_ESP32H2_RTC_CLK_SRC_EXT_CRYS=y + +# MDNS platform +CONFIG_USE_MINIMAL_MDNS=n +CONFIG_ENABLE_EXTENDED_DISCOVERY=y + +# FreeRTOS should use legacy API +CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y + +# Disable STA and AP for ESP32H2 +CONFIG_ENABLE_WIFI_STATION=n +CONFIG_ENABLE_WIFI_AP=n +# Enable this to avoid implicit declaration of function 'esp_send_assoc_resp' +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y + +# Enable OTA Requestor +CONFIG_ENABLE_OTA_REQUESTOR=y + +# Enable chip shell +CONFIG_ENABLE_CHIP_SHELL=y + +# Enable HKDF in mbedtls +CONFIG_MBEDTLS_HKDF_C=y diff --git a/examples/all-clusters-minimal-app/esp32/main/main.cpp b/examples/all-clusters-minimal-app/esp32/main/main.cpp index a673a706291a58..5b2af4cc4b2232 100644 --- a/examples/all-clusters-minimal-app/esp32/main/main.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/main.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -51,12 +52,6 @@ #include "Rpc.h" #endif -#if CONFIG_OPENTHREAD_ENABLED -#include -#include -#include -#endif - #if CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER #include #endif // CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER @@ -188,25 +183,7 @@ extern "C" void app_main() ESP_LOGE(TAG, "GetAppTask().StartAppTask() failed : %" CHIP_ERROR_FORMAT, error.Format()); } -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD - esp_openthread_platform_config_t config = { - .radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(), - .host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(), - .port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(), - }; - set_openthread_platform_config(&config); - - if (DeviceLayer::ThreadStackMgr().InitThreadStack() != CHIP_NO_ERROR) - { - ESP_LOGE(TAG, "Failed to initialize Thread stack"); - return; - } - if (DeviceLayer::ThreadStackMgr().StartThreadTask() != CHIP_NO_ERROR) - { - ESP_LOGE(TAG, "Failed to launch Thread task"); - return; - } -#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD + ESPOpenThreadInit(); chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast(nullptr)); } diff --git a/examples/lighting-app/esp32/main/main.cpp b/examples/lighting-app/esp32/main/main.cpp index a33d783a98439c..38d9ea040b05fe 100644 --- a/examples/lighting-app/esp32/main/main.cpp +++ b/examples/lighting-app/esp32/main/main.cpp @@ -20,6 +20,7 @@ #include "AppTask.h" #include #include +#include #include "esp_log.h" #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) @@ -46,11 +47,6 @@ #include "Rpc.h" #endif -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD -#include -#include -#endif - #include "DeviceWithDisplay.h" #if CONFIG_ENABLE_ESP32_DEVICE_INFO_PROVIDER @@ -162,25 +158,7 @@ extern "C" void app_main() #endif SetDeviceAttestationCredentialsProvider(get_dac_provider()); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD - esp_openthread_platform_config_t config = { - .radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(), - .host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(), - .port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(), - }; - set_openthread_platform_config(&config); - - if (ThreadStackMgr().InitThreadStack() != CHIP_NO_ERROR) - { - ESP_LOGE(TAG, "Failed to initialize Thread stack"); - return; - } - if (ThreadStackMgr().StartThreadTask() != CHIP_NO_ERROR) - { - ESP_LOGE(TAG, "Failed to launch Thread task"); - return; - } -#endif + ESPOpenThreadInit(); chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast(nullptr)); diff --git a/examples/platform/esp32/common/Esp32AppServer.cpp b/examples/platform/esp32/common/Esp32AppServer.cpp index 06bb0d9a6c6c0b..db787d09867b68 100644 --- a/examples/platform/esp32/common/Esp32AppServer.cpp +++ b/examples/platform/esp32/common/Esp32AppServer.cpp @@ -18,11 +18,15 @@ #include "Esp32AppServer.h" #include "CHIPDeviceManager.h" +#include #include #include #include #include #include +#if CONFIG_ENABLE_ICD_SERVER +#include +#endif #include using namespace chip; @@ -50,6 +54,9 @@ static uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLe 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; #endif +#if CONFIG_ENABLE_ICD_SERVER +static ICDSubscriptionCallback sICDSubscriptionHandler; +#endif } // namespace #if CONFIG_TEST_EVENT_TRIGGER_ENABLED @@ -113,6 +120,10 @@ void Esp32AppServer::Init(AppDelegate * sAppDelegate) initParams.appDelegate = sAppDelegate; } chip::Server::GetInstance().Init(initParams); +#if CONFIG_ENABLE_ICD_SERVER + // Register ICD subscription callback to match subscription max intervals to its idle time interval + chip::app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(&sICDSubscriptionHandler); +#endif // CONFIG_ENABLE_ICD_SERVER #if CHIP_DEVICE_CONFIG_ENABLE_WIFI sWiFiNetworkCommissioningInstance.Init(); diff --git a/examples/platform/esp32/common/Esp32ThreadInit.cpp b/examples/platform/esp32/common/Esp32ThreadInit.cpp new file mode 100644 index 00000000000000..6964598649e519 --- /dev/null +++ b/examples/platform/esp32/common/Esp32ThreadInit.cpp @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Esp32ThreadInit.h" +#include +#if CONFIG_OPENTHREAD_ENABLED +#include +#include +#endif // CONFIG_OPENTHREAD_ENABLED + +#include +#if CONFIG_PM_ENABLE +#include "esp_pm.h" +#endif + +using namespace ::chip::DeviceLayer; + +static constexpr char TAG[] = "Esp32ThreadInit"; + +void ESPOpenThreadInit() +{ +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + esp_openthread_platform_config_t config = { + .radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(), + .host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(), + .port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(), + }; + set_openthread_platform_config(&config); + + if (ThreadStackMgr().InitThreadStack() != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to initialize Thread stack"); + return; + } +#if CHIP_DEVICE_CONFIG_THREAD_FTD + if (ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_Router) != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to set the Thread device type"); + return; + } +#elif CHIP_CONFIG_ENABLE_ICD_SERVER +#if CONFIG_PM_ENABLE + esp_pm_config_t pm_config = { + .max_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ, + .min_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ, +#if CONFIG_FREERTOS_USE_TICKLESS_IDLE + .light_sleep_enable = true +#endif // CONFIG_FREERTOS_USE_TICKLESS_IDLE + }; + esp_pm_configure(&pm_config); +#endif // CONFIG_PM_ENABLE + if (ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_SleepyEndDevice) != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to set the Thread device type"); + return; + } +#else + if (ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_MinimalEndDevice) != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to set the Thread device type"); + return; + } +#endif // CHIP_DEVICE_CONFIG_THREAD_FTD + + if (ThreadStackMgr().StartThreadTask() != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to launch Thread task"); + return; + } +#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD +} diff --git a/examples/platform/esp32/common/OpenthreadConfig.h b/examples/platform/esp32/common/Esp32ThreadInit.h similarity index 85% rename from examples/platform/esp32/common/OpenthreadConfig.h rename to examples/platform/esp32/common/Esp32ThreadInit.h index 2a29e68fe9ecf5..f6edba24b2b82f 100644 --- a/examples/platform/esp32/common/OpenthreadConfig.h +++ b/examples/platform/esp32/common/Esp32ThreadInit.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2022 Project CHIP Authors + * Copyright (c) 2023 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,9 @@ #pragma once +#include + +#if CONFIG_OPENTHREAD_ENABLED #include "esp_openthread_types.h" #define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ @@ -31,5 +34,8 @@ #define ESP_OPENTHREAD_DEFAULT_PORT_CONFIG() \ { \ - .storage_partition_name = "ot_storage", .netif_queue_size = 10, .task_queue_size = 10, \ + .storage_partition_name = "nvs", .netif_queue_size = 10, .task_queue_size = 10, \ } +#endif // CONFIG_OPENTHREAD_ENABLED + +void ESPOpenThreadInit(); diff --git a/examples/platform/esp32/icd/ICDSubscriptionCallback.cpp b/examples/platform/esp32/icd/ICDSubscriptionCallback.cpp new file mode 100644 index 00000000000000..eba28968085d60 --- /dev/null +++ b/examples/platform/esp32/icd/ICDSubscriptionCallback.cpp @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ICDSubscriptionCallback.h" +#include + +CHIP_ERROR ICDSubscriptionCallback::OnSubscriptionRequested(chip::app::ReadHandler & aReadHandler, + chip::Transport::SecureSession & aSecureSession) +{ + using namespace chip::System::Clock; + + Seconds32 interval_s32 = std::chrono::duration_cast(CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL); + + if (interval_s32 > Seconds16::max()) + { + interval_s32 = Seconds16::max(); + } + uint32_t decidedMaxInterval = interval_s32.count(); + + uint16_t requestedMinInterval = 0; + uint16_t requestedMaxInterval = 0; + aReadHandler.GetReportingIntervals(requestedMinInterval, requestedMaxInterval); + + // If requestedMinInterval is greater than IdleTimeInterval, select next wake up time as max interval + if (requestedMinInterval > decidedMaxInterval) + { + uint16_t ratio = requestedMinInterval / decidedMaxInterval; + if (requestedMinInterval % decidedMaxInterval) + { + ratio++; + } + + decidedMaxInterval *= ratio; + } + + // Verify that decidedMaxInterval is an acceptable value + if (decidedMaxInterval > Seconds16::max().count()) + { + decidedMaxInterval = Seconds16::max().count(); + } + + // Verify that the decidedMaxInterval respects MAX(SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT, MaxIntervalCeiling) + uint16_t maximumMaxInterval = std::max(kSubscriptionMaxIntervalPublisherLimit, requestedMaxInterval); + if (decidedMaxInterval > maximumMaxInterval) + { + decidedMaxInterval = maximumMaxInterval; + } + + return aReadHandler.SetMaxReportingInterval(decidedMaxInterval); +} diff --git a/examples/platform/esp32/icd/ICDSubscriptionCallback.h b/examples/platform/esp32/icd/ICDSubscriptionCallback.h new file mode 100644 index 00000000000000..c9f77e6df2a3c6 --- /dev/null +++ b/examples/platform/esp32/icd/ICDSubscriptionCallback.h @@ -0,0 +1,35 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include + +/** + * @brief The goal of the ICDSubscriptionCallback class is to negotiate the max interval subscription to match the idle interval of + * the IC device. When a subscription is requested, the device will change the requested max interval to match its idle time + * interval through the OnSubscriptionRequested function. + */ +class ICDSubscriptionCallback : public chip::app::ReadHandler::ApplicationCallback +{ + /** + * @brief Function called when a subscription is requested. + * An ICD will use this function to negotiate the subscription max interval to match its idle time interval + */ + CHIP_ERROR OnSubscriptionRequested(chip::app::ReadHandler & aReadHandler, + chip::Transport::SecureSession & aSecureSession) override; +}; diff --git a/src/platform/ESP32/CHIPDevicePlatformConfig.h b/src/platform/ESP32/CHIPDevicePlatformConfig.h index 493d240000c203..f7d59b60197bde 100644 --- a/src/platform/ESP32/CHIPDevicePlatformConfig.h +++ b/src/platform/ESP32/CHIPDevicePlatformConfig.h @@ -24,6 +24,7 @@ */ #pragma once +#include // ==================== Platform Adaptations ==================== @@ -72,8 +73,10 @@ #define CHIP_DEVICE_CONFIG_ENABLE_WIFI CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP | CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION #endif // CONFIG_IDF_TARGET_ESP32H2 -#define CHIP_DEVICE_CONFIG_ENABLE_SED \ - !CONFIG_ENABLE_ETHERNET_TELEMETRY && (CONFIG_WIFI_POWER_SAVE_MIN || CONFIG_WIFI_POWER_SAVE_MAX) +#if CONFIG_ENABLE_ICD_SERVER +#define CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL chip::System::Clock::Milliseconds32(CONFIG_ICD_SLOW_POLL_INTERVAL) +#define CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL chip::System::Clock::Milliseconds32(CONFIG_ICD_FAST_POLL_INTERVAL) +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER #define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE CONFIG_ENABLE_CHIPOBLE #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY CONFIG_ENABLE_EXTENDED_DISCOVERY diff --git a/src/platform/ESP32/ConnectivityManagerImpl.h b/src/platform/ESP32/ConnectivityManagerImpl.h index bc12092c506391..97d07b894cb9c2 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl.h +++ b/src/platform/ESP32/ConnectivityManagerImpl.h @@ -119,10 +119,8 @@ class ConnectivityManagerImpl final : public ConnectivityManager, void _OnWiFiScanDone(); void _OnWiFiStationProvisionChange(); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR _GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _RequestSEDActiveMode(bool onOff, bool delayIdle = false); +#if CHIP_CONFIG_ENABLE_ICD_SERVER + CHIP_ERROR _SetPollingInterval(System::Clock::Milliseconds32 pollingInterval); #endif // ===== Private members reserved for use by this class only. diff --git a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp index e79ba6e5830aaf..27ecfbcfd74bc5 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp @@ -423,10 +423,7 @@ CHIP_ERROR ConnectivityManagerImpl::InitWiFi() std::min(sizeof(wifiConfig.sta.password), strlen(CONFIG_DEFAULT_WIFI_PASSWORD))); wifiConfig.sta.scan_method = WIFI_ALL_CHANNEL_SCAN; wifiConfig.sta.sort_method = WIFI_CONNECT_AP_BY_SIGNAL; -#if CONFIG_WIFI_POWER_SAVE_MAX - wifiConfig.sta.listen_interval = CONFIG_WIFI_PS_LISTEN_INTERVAL; -#endif - esp_err_t err = esp_wifi_set_config(WIFI_IF_STA, &wifiConfig); + esp_err_t err = esp_wifi_set_config(WIFI_IF_STA, &wifiConfig); if (err != ESP_OK) { ChipLogError(DeviceLayer, "esp_wifi_set_config() failed: %s", esp_err_to_name(err)); @@ -1112,32 +1109,15 @@ void ConnectivityManagerImpl::OnStationIPv6AddressAvailable(const ip_event_got_i #endif } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -static constexpr uint32_t kBeaconIntervalMs = 100; -static constexpr uint32_t kDefaultDTIMInterval = 3; // this is determined by the AP, use a constant value for it. - -CHIP_ERROR ConnectivityManagerImpl::_GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & sedIntervalsConfig) -{ - sedIntervalsConfig.ActiveIntervalMS = chip::System::Clock::Milliseconds32(kBeaconIntervalMs); -#if CONFIG_WIFI_POWER_SAVE_MIN - sedIntervalsConfig.IdleIntervalMS = chip::System::Clock::Milliseconds32(kDefaultDTIMInterval * kBeaconIntervalMs); -#elif CONFIG_WIFI_POWER_SAVE_MAX - sedIntervalsConfig.IdleIntervalMS = chip::System::Clock::Milliseconds32(CONFIG_WIFI_PS_LISTEN_INTERVAL * kBeaconIntervalMs); -#endif - return CHIP_NO_ERROR; -} - -CHIP_ERROR ConnectivityManagerImpl::_SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; -} +#if CHIP_CONFIG_ENABLE_ICD_SERVER -CHIP_ERROR ConnectivityManagerImpl::_RequestSEDActiveMode(bool onOff, bool delayIdle) +CHIP_ERROR ConnectivityManagerImpl::_SetPollingInterval(System::Clock::Milliseconds32 pollingInterval) { - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; + (void) pollingInterval; + // For ESP32 platform, the listen interval of the legacy power-saving mode can only be configured before connecting to AP. + return CHIP_ERROR_NOT_IMPLEMENTED; } - -#endif // CHIP_DEVICE_CONFIG_ENABLE_SED +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp index e04d807507cb42..0afc494ac6cc29 100644 --- a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp @@ -231,12 +231,14 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** { ifp->hardwareAddress = ByteSpan(ifp->MacAddress, 6); } +#if !CONFIG_DISABLE_IPV4 if (esp_netif_get_ip_info(ifa, &ipv4_info) == ESP_OK) { memcpy(ifp->Ipv4AddressesBuffer[0], &(ipv4_info.ip.addr), kMaxIPv4AddrSize); ifp->Ipv4AddressSpans[0] = ByteSpan(ifp->Ipv4AddressesBuffer[0], kMaxIPv4AddrSize); ifp->IPv4Addresses = app::DataModel::List(ifp->Ipv4AddressSpans, 1); } +#endif static_assert(kMaxIPv6AddrCount <= UINT8_MAX, "Count might not fit in ipv6_addr_count"); static_assert(ArraySize(ip6_addr) >= LWIP_IPV6_NUM_ADDRESSES, "Not enough space for our addresses."); diff --git a/src/platform/ESP32/ESP32Utils.cpp b/src/platform/ESP32/ESP32Utils.cpp index c5000929ab08dd..4a03d08282dcda 100644 --- a/src/platform/ESP32/ESP32Utils.cpp +++ b/src/platform/ESP32/ESP32Utils.cpp @@ -117,13 +117,6 @@ CHIP_ERROR ESP32Utils::StartWiFiLayer(void) ChipLogError(DeviceLayer, "esp_wifi_start() failed: %s", esp_err_to_name(err)); return ESP32Utils::MapError(err); } -#if CONFIC_WIFI_POWER_SAVE_MIN - esp_wifi_set_ps(WIFI_PS_MIN_MODEM); -#elif CONFIC_WIFI_POWER_SAVE_MAX - esp_wifi_set_ps(WIFI_PS_MAX_MODEM); -#elif CONFIG_WIFI_POWER_SAVE_NONE - esp_wifi_set_ps(WIFI_PS_NONE); -#endif } return CHIP_NO_ERROR; diff --git a/src/platform/ESP32/NetworkCommissioningDriver.cpp b/src/platform/ESP32/NetworkCommissioningDriver.cpp index 2c597da14d2ad3..e2ef8bb660ed0b 100644 --- a/src/platform/ESP32/NetworkCommissioningDriver.cpp +++ b/src/platform/ESP32/NetworkCommissioningDriver.cpp @@ -223,9 +223,6 @@ CHIP_ERROR ESPWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, memset(&wifiConfig, 0, sizeof(wifiConfig)); memcpy(wifiConfig.sta.ssid, ssid, std::min(ssidLen, static_cast(sizeof(wifiConfig.sta.ssid)))); memcpy(wifiConfig.sta.password, key, std::min(keyLen, static_cast(sizeof(wifiConfig.sta.password)))); -#if CONFIG_WIFI_POWER_SAVE_MAX - wifiConfig.sta..listen_interval = CONFIG_WIFI_PS_LISTEN_INTERVAL; -#endif // Configure the ESP WiFi interface. esp_err_t err = esp_wifi_set_config(WIFI_IF_STA, &wifiConfig); From 4f658f62aeced8b413f0f3bf9f5117897234a120 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 8 Aug 2023 16:29:32 -0400 Subject: [PATCH 48/74] Fix cancellation of subscriptions to work correctly. (#28569) * Fix cancellation of subscriptions to work correctly. When a subscription came in with KeepSubscriptions set to false, we would just directly delete the ReadHandlers for the subscriptions not being kept, instead of calling Close(). That meant we skipped deleting subscription persistence data, and also failed to correcly update the reporting engine's round-robin reporting state, which could lead to subscriptions not being serviced fairly. The fix is to just call Close() just like we do for out-of-resource eviction, instead of manually deleting the object. * Fix build issue. --- src/app/InteractionModelEngine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 23aaf9d85d03be..a86dd4b98aed9e 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -615,14 +615,14 @@ Protocols::InteractionModel::Status InteractionModelEngine::OnReadInitialRequest // Walk through all existing subscriptions and shut down those whose subscriber matches // that which just came in. // - mReadHandlers.ForEachActiveObject([this, apExchangeContext](ReadHandler * handler) { + mReadHandlers.ForEachActiveObject([apExchangeContext](ReadHandler * handler) { if (handler->IsFromSubscriber(*apExchangeContext)) { ChipLogProgress(InteractionModel, "Deleting previous subscription from NodeId: " ChipLogFormatX64 ", FabricIndex: %u", ChipLogValueX64(apExchangeContext->GetSessionHandle()->AsSecureSession()->GetPeerNodeId()), apExchangeContext->GetSessionHandle()->GetFabricIndex()); - mReadHandlers.ReleaseObject(handler); + handler->Close(); } return Loop::Continue; From 4d7932e5acff2ea411faa47b08fb19c5f5142205 Mon Sep 17 00:00:00 2001 From: joonhaengHeo <85541460+joonhaengHeo@users.noreply.github.com> Date: Wed, 9 Aug 2023 06:20:55 +0900 Subject: [PATCH 49/74] [Android] Decouple generated API - 2 (#28010) * decouple ChipStructs, ChipIDMapping * modify build.gn * restore kotlin file * Restyled by autopep8 * add matter idl file * Seperate each class * Restyled by autopep8 * add exclude kotlin check (generated file) * remove previous generated file * add kotlin check config * relocation * remodified * Remove MagicNumber check * remove kotlin check exception * Update generated kt file * update TlvReaderExt * modify unused import * Update generated file * Update unit test * fix kotlin static check error * Restyled by whitespace * update build.gn * Kotlin format * Run kotlin format during zap regen * Restyled by autopep8 * Fix traceback print * Install a newer openjdk for zap generation * Try to make linter happy * Try to make linter happy * Fix unit tests --------- Co-authored-by: Restyled.io Co-authored-by: Andrei Litvin Co-authored-by: Andrei Litvin --- .github/workflows/zap_templates.yaml | 7 +- kotlin-detect-config.yaml | 29 ++ scripts/build/builders/android.py | 12 + .../dry_run_android-arm64-chip-tool.txt | 4 + scripts/py_matter_idl/files.gni | 2 + .../generators/java/ChipEventStructs.jinja | 153 +++++++ .../generators/java/ChipStructs.jinja | 153 +++++++ .../matter_idl/generators/java/__init__.py | 77 ++++ .../matter_idl/tests/available_tests.yaml | 1 + .../SecondClusterFabricDescriptorStruct.kt | 82 ++++ scripts/tools/zap_regen_all.py | 35 ++ src/controller/java/BUILD.gn | 53 ++- ...olClusterAccessControlEntryChangedEvent.kt | 115 +++++ ...usterAccessControlExtensionChangedEvent.kt | 115 +++++ .../ActionsClusterActionFailedEvent.kt | 69 +++ .../ActionsClusterStateChangedEvent.kt | 60 +++ .../BasicInformationClusterLeaveEvent.kt | 52 +++ ...InformationClusterReachableChangedEvent.kt | 52 +++ .../BasicInformationClusterStartUpEvent.kt | 52 +++ .../BooleanStateClusterStateChangeEvent.kt | 52 +++ ...InformationClusterReachableChangedEvent.kt | 55 +++ ...viceBasicInformationClusterStartUpEvent.kt | 52 +++ .../DishwasherAlarmClusterNotifyEvent.kt | 69 +++ .../DoorLockClusterDoorLockAlarmEvent.kt | 52 +++ .../DoorLockClusterDoorStateChangeEvent.kt | 52 +++ .../DoorLockClusterLockOperationErrorEvent.kt | 159 +++++++ .../DoorLockClusterLockOperationEvent.kt | 153 +++++++ .../DoorLockClusterLockUserChangeEvent.kt | 132 ++++++ ...eneralDiagnosticsClusterBootReasonEvent.kt | 52 +++ ...gnosticsClusterHardwareFaultChangeEvent.kt | 82 ++++ ...agnosticsClusterNetworkFaultChangeEvent.kt | 82 ++++ ...DiagnosticsClusterRadioFaultChangeEvent.kt | 82 ++++ ...nalStateClusterOperationCompletionEvent.kt | 103 +++++ ...tionalStateClusterOperationalErrorEvent.kt | 58 +++ ...pdateRequestorClusterDownloadErrorEvent.kt | 97 +++++ ...ateRequestorClusterStateTransitionEvent.kt | 87 ++++ ...dateRequestorClusterVersionAppliedEvent.kt | 62 +++ ...rSourceClusterBatChargeFaultChangeEvent.kt | 79 ++++ .../PowerSourceClusterBatFaultChangeEvent.kt | 79 ++++ ...PowerSourceClusterWiredFaultChangeEvent.kt | 79 ++++ .../RefrigeratorAlarmClusterNotifyEvent.kt | 69 +++ ...nalStateClusterOperationCompletionEvent.kt | 106 +++++ ...tionalStateClusterOperationalErrorEvent.kt | 58 +++ .../SmokeCoAlarmClusterCOAlarmEvent.kt | 52 +++ ...eCoAlarmClusterInterconnectCOAlarmEvent.kt | 52 +++ ...AlarmClusterInterconnectSmokeAlarmEvent.kt | 52 +++ .../SmokeCoAlarmClusterLowBatteryEvent.kt | 52 +++ .../SmokeCoAlarmClusterSmokeAlarmEvent.kt | 52 +++ ...areDiagnosticsClusterSoftwareFaultEvent.kt | 81 ++++ .../SwitchClusterInitialPressEvent.kt | 52 +++ .../SwitchClusterLongPressEvent.kt | 52 +++ .../SwitchClusterLongReleaseEvent.kt | 52 +++ .../SwitchClusterMultiPressCompleteEvent.kt | 60 +++ .../SwitchClusterMultiPressOngoingEvent.kt | 60 +++ .../SwitchClusterShortReleaseEvent.kt | 52 +++ .../SwitchClusterSwitchLatchedEvent.kt | 52 +++ ...DiagnosticsClusterConnectionStatusEvent.kt | 55 +++ ...agnosticsClusterNetworkFaultChangeEvent.kt | 85 ++++ ...imeSynchronizationClusterDSTStatusEvent.kt | 52 +++ ...nchronizationClusterTimeZoneStatusEvent.kt | 65 +++ .../UnitTestingClusterTestEventEvent.kt | 111 +++++ ...estingClusterTestFabricScopedEventEvent.kt | 52 +++ ...agnosticsClusterAssociationFailureEvent.kt | 62 +++ ...DiagnosticsClusterConnectionStatusEvent.kt | 55 +++ ...orkDiagnosticsClusterDisconnectionEvent.kt | 52 +++ ...sControlClusterAccessControlEntryStruct.kt | 121 ++++++ ...trolClusterAccessControlExtensionStruct.kt | 56 +++ ...ControlClusterAccessControlTargetStruct.kt | 94 +++++ .../structs/ActionsClusterActionStruct.kt | 86 ++++ .../ActionsClusterEndpointListStruct.kt | 81 ++++ ...nitoringClusterReplacementProductStruct.kt | 66 +++ ...pplicationBasicClusterApplicationStruct.kt | 59 +++ ...ationLauncherClusterApplicationEPStruct.kt | 72 ++++ ...icationLauncherClusterApplicationStruct.kt | 59 +++ .../AudioOutputClusterOutputInfoStruct.kt | 60 +++ ...nformationClusterCapabilityMinimaStruct.kt | 63 +++ ...formationClusterProductAppearanceStruct.kt | 66 +++ .../structs/BindingClusterTargetStruct.kt | 107 +++++ ...formationClusterProductAppearanceStruct.kt | 72 ++++ ...nitoringClusterReplacementProductStruct.kt | 66 +++ .../ChannelClusterChannelInfoStruct.kt | 105 +++++ .../structs/ChannelClusterLineupInfoStruct.kt | 86 ++++ ...tentLauncherClusterAdditionalInfoStruct.kt | 56 +++ ...auncherClusterBrandingInformationStruct.kt | 152 +++++++ ...ntentLauncherClusterContentSearchStruct.kt | 66 +++ .../ContentLauncherClusterDimensionStruct.kt | 64 +++ .../ContentLauncherClusterParameterStruct.kt | 86 ++++ ...ntLauncherClusterStyleInformationStruct.kt | 91 ++++ .../DescriptorClusterDeviceTypeStruct.kt | 56 +++ .../DescriptorClusterSemanticTagStruct.kt | 97 +++++ .../DishwasherModeClusterModeOptionStruct.kt | 76 ++++ .../DishwasherModeClusterModeTagStruct.kt | 65 +++ .../DoorLockClusterCredentialStruct.kt | 56 +++ ...nitoringClusterReplacementProductStruct.kt | 66 +++ .../structs/FixedLabelClusterLabelStruct.kt | 56 +++ ...nitoringClusterReplacementProductStruct.kt | 63 +++ ...missioningClusterBasicCommissioningInfo.kt | 64 +++ ...neralDiagnosticsClusterNetworkInterface.kt | 147 +++++++ ...pKeyManagementClusterGroupInfoMapStruct.kt | 90 ++++ ...upKeyManagementClusterGroupKeyMapStruct.kt | 64 +++ ...upKeyManagementClusterGroupKeySetStruct.kt | 159 +++++++ ...nitoringClusterReplacementProductStruct.kt | 66 +++ ...mentClusterMonitoringRegistrationStruct.kt | 74 ++++ ...nitoringClusterReplacementProductStruct.kt | 66 +++ ...nitoringClusterReplacementProductStruct.kt | 66 +++ ...aundryWasherModeClusterModeOptionStruct.kt | 76 ++++ .../LaundryWasherModeClusterModeTagStruct.kt | 65 +++ .../MediaInputClusterInputInfoStruct.kt | 69 +++ ...iaPlaybackClusterPlaybackPositionStruct.kt | 66 +++ .../ModeSelectClusterModeOptionStruct.kt | 76 ++++ .../ModeSelectClusterSemanticTagStruct.kt | 56 +++ ...rkCommissioningClusterNetworkInfoStruct.kt | 59 +++ ...gClusterThreadInterfaceScanResultStruct.kt | 101 +++++ ...ingClusterWiFiInterfaceScanResultStruct.kt | 89 ++++ ...redentialsClusterFabricDescriptorStruct.kt | 89 ++++ .../OperationalCredentialsClusterNOCStruct.kt | 74 ++++ ...OperationalStateClusterErrorStateStruct.kt | 85 ++++ ...ionalStateClusterOperationalStateStruct.kt | 71 ++++ ...eUpdateRequestorClusterProviderLocation.kt | 68 +++ ...nitoringClusterReplacementProductStruct.kt | 66 +++ ...erSourceClusterBatChargeFaultChangeType.kt | 79 ++++ .../PowerSourceClusterBatFaultChangeType.kt | 79 ++++ .../PowerSourceClusterWiredFaultChangeType.kt | 79 ++++ ...olledCabinetModeClusterModeOptionStruct.kt | 88 ++++ ...ntrolledCabinetModeClusterModeTagStruct.kt | 71 ++++ .../RvcCleanModeClusterModeOptionStruct.kt | 76 ++++ .../RvcCleanModeClusterModeTagStruct.kt | 65 +++ ...OperationalStateClusterErrorStateStruct.kt | 85 ++++ ...ionalStateClusterOperationalStateStruct.kt | 71 ++++ .../RvcRunModeClusterModeOptionStruct.kt | 76 ++++ .../structs/RvcRunModeClusterModeTagStruct.kt | 65 +++ .../ScenesClusterAttributeValuePair.kt | 56 +++ .../structs/ScenesClusterExtensionFieldSet.kt | 71 ++++ ...reDiagnosticsClusterThreadMetricsStruct.kt | 113 +++++ .../TargetNavigatorClusterTargetInfoStruct.kt | 56 +++ ...statClusterThermostatScheduleTransition.kt | 88 ++++ ...rkDiagnosticsClusterNeighborTableStruct.kt | 157 +++++++ ...ticsClusterOperationalDatasetComponents.kt | 130 ++++++ ...tworkDiagnosticsClusterRouteTableStruct.kt | 110 +++++ ...NetworkDiagnosticsClusterSecurityPolicy.kt | 56 +++ ...meSynchronizationClusterDSTOffsetStruct.kt | 74 ++++ ...sterFabricScopedTrustedTimeSourceStruct.kt | 62 +++ ...imeSynchronizationClusterTimeZoneStruct.kt | 73 ++++ ...onizationClusterTrustedTimeSourceStruct.kt | 64 +++ ...nitoringClusterReplacementProductStruct.kt | 66 +++ ...nitTestingClusterDoubleNestedStructList.kt | 64 +++ .../structs/UnitTestingClusterNestedStruct.kt | 64 +++ .../UnitTestingClusterNestedStructList.kt | 129 ++++++ ...stingClusterNullablesAndOptionalsStruct.kt | 308 ++++++++++++++ .../structs/UnitTestingClusterSimpleStruct.kt | 89 ++++ .../UnitTestingClusterTestFabricScoped.kt | 161 +++++++ .../UnitTestingClusterTestListStructOctet.kt | 56 +++ .../structs/UserLabelClusterLabelStruct.kt | 56 +++ ...nitoringClusterReplacementProductStruct.kt | 63 +++ ...nitoringClusterReplacementProductStruct.kt | 66 +++ ...nitoringClusterReplacementProductStruct.kt | 66 +++ .../cluster/TlvReaderExtension.kt | 44 ++ .../chip/devicecontroller/cluster/files.gni | 151 +++++++ .../cluster/ChipClusterEventStructTest.kt | 82 ++++ .../cluster/ChipClusterStructTest.kt | 395 ++++++++++++++++++ 160 files changed, 12460 insertions(+), 3 deletions(-) create mode 100644 scripts/py_matter_idl/matter_idl/generators/java/ChipEventStructs.jinja create mode 100644 scripts/py_matter_idl/matter_idl/generators/java/ChipStructs.jinja create mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/SecondClusterFabricDescriptorStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CeramicFilterMonitoringClusterReplacementProductStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectrostaticFilterMonitoringClusterReplacementProductStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FuelTankMonitoringClusterReplacementProductStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/InkCartridgeMonitoringClusterReplacementProductStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IonizingFilterMonitoringClusterReplacementProductStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OzoneFilterMonitoringClusterReplacementProductStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TonerCartridgeMonitoringClusterReplacementProductStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UvFilterMonitoringClusterReplacementProductStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterTankMonitoringClusterReplacementProductStruct.kt create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZeoliteFilterMonitoringClusterReplacementProductStruct.kt create mode 100644 src/controller/java/src/chip/devicecontroller/cluster/TlvReaderExtension.kt create mode 100644 src/controller/java/src/chip/devicecontroller/cluster/files.gni create mode 100644 src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt create mode 100644 src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 0e6033035f7297..32fbcef6f52a44 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -45,7 +45,12 @@ jobs: uses: ./.github/actions/checkout-submodules-and-bootstrap with: platform: linux - + # Java formatting requires a newer java to run ktfmt + # TODO: this should be eventually inside Docker files + - name: Update java + run: | + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -fy --fix-missing openjdk-17-jre - name: Generate all run: ./scripts/run_in_build_env.sh scripts/tools/zap_regen_all.py - name: Ensure git works in current working directory diff --git a/kotlin-detect-config.yaml b/kotlin-detect-config.yaml index f6d723a9b638ac..3af04f5b389369 100644 --- a/kotlin-detect-config.yaml +++ b/kotlin-detect-config.yaml @@ -38,6 +38,8 @@ style: - "**/src/controller/java/src/chip/tlv/values.kt" - "**/src/controller/java/src/chip/WildcardImport examples/android/CHIPTest/app/src/androidTest/java/com/tcl/chip/chiptest/ExampleInstrumentedTest.kt" + - "**/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt" + - "**/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt" - "**/src/controller/java/tests/chip/jsontlv/JsonToTlvToJsonTest.kt" - "**/src/controller/java/tests/chip/onboardingpayload/ManualCodeTest.kt" - "**/src/controller/java/tests/chip/onboardingpayload/QRCodeTest.kt" @@ -58,6 +60,7 @@ style: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/SelectActionFragment.kt" - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/BarcodeFragment.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/Main.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/jsontlv/JsonToTlv.kt" - "**/src/controller/java/src/chip/jsontlv/TlvToJson.kt" - "**/src/controller/java/tests/chip/jsontlv/JsonToTlvToJsonTest.kt" @@ -123,6 +126,7 @@ style: - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/MatterCommand.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairingCommand.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImSubscribeCommand.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/jsontlv/TlvToJson.kt" - "**/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadGenerator.kt" - "**/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadParser.kt" @@ -133,12 +137,14 @@ style: UnusedParameter: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/bluetooth/BluetoothManager.kt" + - "**/src/controller/java/generated/java/**/*" ReturnCount: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/CHIPToolActivity.kt" - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/SensorClientFragment.kt" - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/EnterNetworkFragment.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/CommandManager.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/Verhoeff.kt" - "**/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt" UnusedPrivateProperty: @@ -162,6 +168,7 @@ style: ThrowsCount: excludes: - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/CommandManager.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/tlv/TlvReader.kt" - "**/src/controller/java/src/chip/jsontlv/JsonToTlv.kt" - "**/src/controller/java/src/chip/jsontlv/TlvToJson.kt" @@ -174,13 +181,16 @@ style: UnusedPrivateMember: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/BarcodeFragment.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt" UseCheckOrError: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/tlv/tags.kt" - "**/src/controller/java/src/chip/tlv/types.kt" UseRequire: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/jsontlv/JsonToTlv.kt" - "**/src/controller/java/src/chip/onboardingpayload/Verhoeff10.kt" UtilityClassWithPublicConstructor: @@ -188,9 +198,11 @@ style: - "**/src/controller/java/src/chip/onboardingpayload/Verhoeff.kt" MayBeConst: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/Base38.kt" FunctionOnlyReturningConstant: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/QRCodeOnboardingPayloadGenerator.kt" exceptions: @@ -202,6 +214,7 @@ exceptions: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/BarcodeFragment.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/Argument.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/Main.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/tests/chip/onboardingpayload/ManualCodeTest.kt" - "**/src/controller/java/tests/chip/onboardingpayload/QRCodeTest.kt" SwallowedException: @@ -211,14 +224,17 @@ exceptions: TooGenericExceptionThrown: excludes: - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/discover/DiscoverCommissionablesCommand.kt" + - "**/src/controller/java/generated/java/**/*" ThrowingExceptionsWithoutMessageOrCause: excludes: - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/CommandManager.kt" + - "**/src/controller/java/generated/java/**/*" naming: FunctionNaming: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/SelectActionFragment.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/tests/chip/tlv/TlvReadWriteTest.kt" - "**/src/controller/java/tests/chip/tlv/TlvWriterTest.kt" - "**/src/controller/java/tests/chip/tlv/TlvReaderTest.kt" @@ -229,21 +245,26 @@ naming: ConstructorParameterNaming: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/HistoryCommandAdapter.kt" + - "**/src/controller/java/generated/java/**/*" TopLevelPropertyNaming: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt" performance: SpreadOperator: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/tests/chip/tlv/TlvReaderTest.kt" potential-bugs: EqualsWithHashCodeExist: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt" ImplicitDefaultLocale: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt" - "**/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadGenerator.kt" @@ -262,6 +283,7 @@ complexity: - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/Command.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/CommandManager.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairingCommand.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/jsontlv/JsonToTlv.kt" - "**/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt" - "**/src/controller/java/src/chip/tlv/TlvReader.kt" @@ -273,15 +295,18 @@ complexity: NestedBlockDepth: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt" + - "**/src/controller/java/generated/java/**/*" LongParameterList: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/ClusterDetailFragment.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/Command.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt" LongMethod: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/AddressCommissioningFragment.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/common/CommandManager.kt" + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/Base38.kt" - "**/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadGenerator.kt" - "**/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadParser.kt" @@ -291,15 +316,18 @@ complexity: - "**/src/controller/java/tests/chip/tlv/TlvReaderTest.kt" LargeClass: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/tests/chip/tlv/TlvReadWriteTest.kt" - "**/src/controller/java/tests/chip/jsontlv/JsonToTlvToJsonTest.kt" CyclomaticComplexMethod: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/tlv/TlvReader.kt" - "**/src/controller/java/src/chip/tlv/types.kt" - "**/src/controller/java/src/chip/jsontlv/TlvToJson.kt" ComplexCondition: excludes: + - "**/src/controller/java/generated/java/**/*" - "**/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadGenerator.kt" empty-blocks: @@ -324,3 +352,4 @@ empty-blocks: - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkShortCommand.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkVendorCommand.kt" - "**/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/UnpairCommand.kt" + - "**/src/controller/java/generated/java/**/*" diff --git a/scripts/build/builders/android.py b/scripts/build/builders/android.py index cd358798c218fc..7b12090b9f15f5 100644 --- a/scripts/build/builders/android.py +++ b/scripts/build/builders/android.py @@ -235,6 +235,8 @@ def copyToSrcAndroid(self): "OnboardingPayload.jar": "src/controller/java/OnboardingPayload.jar", "AndroidPlatform.jar": "src/platform/android/AndroidPlatform.jar", "libCHIPTlv.jar": "src/controller/java/libCHIPTlv.jar", + "CHIPClusters.jar": "src/controller/java/CHIPClusters.jar", + "CHIPClusterID.jar": "src/controller/java/CHIPClusterID.jar", } for jarName in jars.keys(): @@ -573,6 +575,16 @@ def build_outputs(self): "lib", "src/controller/java/OnboardingPayload.jar", ), + "CHIPClusters.jar": os.path.join( + self.output_dir, + "lib", + "src/controller/java/CHIPClusters.jar", + ), + "CHIPClusterID.jar": os.path.join( + self.output_dir, + "lib", + "src/controller/java/CHIPClusterID.jar", + ), "jni/%s/libCHIPController.so" % self.board.AbiName(): os.path.join( self.output_dir, diff --git a/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt b/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt index b62ee9eb522803..766a82be3bb318 100644 --- a/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt +++ b/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt @@ -31,5 +31,9 @@ cp {out}/android-arm64-chip-tool/lib/src/platform/android/AndroidPlatform.jar {r cp {out}/android-arm64-chip-tool/lib/src/controller/java/libCHIPTlv.jar {root}/examples/android/CHIPTool/app/libs/libCHIPTlv.jar +cp {out}/android-arm64-chip-tool/lib/src/controller/java/CHIPClusters.jar {root}/examples/android/CHIPTool/app/libs/CHIPClusters.jar + +cp {out}/android-arm64-chip-tool/lib/src/controller/java/CHIPClusterID.jar {root}/examples/android/CHIPTool/app/libs/CHIPClusterID.jar + # Building APP android-arm64-chip-tool {root}/examples/android/CHIPTool/gradlew -p {root}/examples/android/CHIPTool -PmatterBuildSrcDir={out}/android-arm64-chip-tool -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm64-chip-tool assembleDebug diff --git a/scripts/py_matter_idl/files.gni b/scripts/py_matter_idl/files.gni index 1f7a7b0271196d..bfcfd27aec6fcd 100644 --- a/scripts/py_matter_idl/files.gni +++ b/scripts/py_matter_idl/files.gni @@ -10,8 +10,10 @@ matter_idl_generator_templates = [ "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/CHIPCallbackTypes.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersCpp.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja", + "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ChipEventStructs.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/CHIPGlobalCallbacks_cpp.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/CHIPReadCallbacks_h.jinja", + "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ChipStructs.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ClusterIDMapping.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ClusterReadMapping.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ClusterWriteMapping.jinja", diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ChipEventStructs.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ChipEventStructs.jinja new file mode 100644 index 00000000000000..4ce1f2f19d5861 --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/generators/java/ChipEventStructs.jinja @@ -0,0 +1,153 @@ +{%- macro encode_value(source, encodable, depth) -%} + {%- if encodable.is_nullable -%} + {{encode_value(source, encodable.without_nullable(), depth + 1)}}? + {%- elif encodable.is_optional -%} + Optional<{{encode_value(source, encodable.without_optional(), depth + 1)}}> + {%- elif encodable.is_list -%} + List<{{encode_value(source, encodable.without_list(), depth + 1)}}> + {%- elif encodable.is_struct -%} + {%- set struct = encodable.get_underlying_struct() -%} + chip.devicecontroller.cluster.structs.{{source.name}}Cluster{{struct.name}} + {%- else -%} + {{encodable.kotlin_type}} + {%- endif -%} +{%- endmacro -%} + +{%- macro encode_tlv(encodable, tag, name, depth) %} + {%- if encodable.is_nullable -%} + if ({{name}} != null) { + {{encode_tlv(encodable.without_nullable(), tag, name, depth + 1)}} + } else { + putNull({{tag}}) + } + {%- elif encodable.is_optional -%} + if ({{name}}.isPresent) { + val opt{{name}} = {{name}}.get() + {{encode_tlv(encodable.without_optional(), tag, "opt" + name, depth + 1)}} + } + {%- elif encodable.is_list -%} + startList({{tag}}) + for (item in {{name}}.iterator()) { + {{encode_tlv(encodable.without_list(), "AnonymousTag", "item", depth + 1)}} + } + endList() + {%- elif encodable.is_struct -%} + {{name}}.toTlv({{tag}}, this) + {%- else -%} + put({{tag}}, {{name}}) + {%- endif -%} +{%- endmacro -%} + +{%- macro decode_tlv(source, encodable, tag, depth) %} + {%- if encodable.is_nullable -%} + if (!tlvReader.isNull()) { + {{decode_tlv(source, encodable.without_nullable(), tag, depth + 1)}} + } else { + tlvReader.getNull({{tag}}) + null + } + {%- elif encodable.is_optional -%} + if (tlvReader.isNextTag({{tag}})) { + Optional.of({{decode_tlv(source, encodable.without_optional(), tag, depth + 1)}}) + } else { + Optional.empty() + } + {%- elif encodable.is_list -%} + {%- set encodablewithoutlist = encodable.without_list() -%} + buildList <{{encode_value(source, encodablewithoutlist, depth + 1)}}> { + tlvReader.enterList({{tag}}) + while(!tlvReader.isEndOfContainer()) { + this.add({{decode_tlv(source, encodablewithoutlist, "AnonymousTag", depth + 1)}}) + } + tlvReader.exitContainer() + } + {%- elif encodable.is_struct -%} + {%- set struct = encodable.get_underlying_struct() -%} + chip.devicecontroller.cluster.structs.{{source.name}}Cluster{{struct.name}}.fromTlv({{tag}}, tlvReader) + {%- else -%} + tlvReader.get{{encodable.kotlin_type}}({{tag}}) + {%- endif -%} +{%- endmacro -%} + +{%- macro contextSpecificTag(field) -%} + ContextSpecificTag(TAG_{{field.name | constcase}}) +{%- endmacro -%} + +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvParsingException +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +import java.util.Optional + +class {{cluster.name}}Cluster{{event.name}}Event ( + {%- for field in event.fields -%} + {%- set encodable = field | asEncodable(typeLookup) %} + val {{field.name}}: {{encode_value(cluster, encodable, 0)}} + {%- if loop.index0 < loop.length - 1 -%}{{","}}{%- endif -%} + {%- endfor -%}) { + override fun toString(): String = buildString { + append("{{cluster.name}}Cluster{{event.name}}Event {\n") + {%- for field in event.fields %} + append("\t{{field.name}} : ${{field.name}}\n") + {%- endfor %} + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + {% for field in event.fields %} + {%- set encodable = field | asEncodable(typeLookup) %} + {%- set tag = contextSpecificTag(field) -%} + {{encode_tlv(encodable, tag, field.name, 0)}} + {% endfor -%} + endStructure() + } + } + + companion object { + {%- for field in event.fields %} + private const val TAG_{{field.name | constcase}} = {{field.code}} + {%- endfor %} + + fun fromTlv(tag: Tag, tlvReader: TlvReader) : {{cluster.name}}Cluster{{event.name}}Event { + tlvReader.enterStructure(tag) + {% for field in event.fields %} + {%- set decodable = field | asEncodable(typeLookup) %} + {%- set tag = contextSpecificTag(field) -%} + val {{field.name}} = {{decode_tlv(cluster, decodable, tag, 0)}} + {% endfor %} + tlvReader.exitContainer() + + return {{cluster.name}}Cluster{{event.name}}Event( + {%- for field in event.fields -%} + {%- set encodable = field | asEncodable(typeLookup) -%} + {{field.name}} + {%- if loop.index0 < loop.length - 1 -%}{{", "}}{%- endif -%} + {%- endfor -%} + ) + } + } +} diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ChipStructs.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ChipStructs.jinja new file mode 100644 index 00000000000000..7463e6f26c7a2c --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/generators/java/ChipStructs.jinja @@ -0,0 +1,153 @@ +{%- macro encode_value(source, encodable, depth) -%} + {%- if encodable.is_nullable -%} + {{encode_value(source, encodable.without_nullable(), depth + 1)}}? + {%- elif encodable.is_optional -%} + Optional<{{encode_value(source, encodable.without_optional(), depth + 1)}}> + {%- elif encodable.is_list -%} + List<{{encode_value(source, encodable.without_list(), depth + 1)}}> + {%- elif encodable.is_struct -%} + {%- set struct = encodable.get_underlying_struct() -%} + {{source.name}}Cluster{{struct.name}} + {%- else -%} + {{encodable.kotlin_type}} + {%- endif -%} +{%- endmacro -%} + +{%- macro encode_tlv(encodable, tag, name, depth) %} + {%- if encodable.is_nullable -%} + if ({{name}} != null) { + {{encode_tlv(encodable.without_nullable(), tag, name, depth + 1)}} + } else { + putNull({{tag}}) + } + {%- elif encodable.is_optional -%} + if ({{name}}.isPresent) { + val opt{{name}} = {{name}}.get() + {{encode_tlv(encodable.without_optional(), tag, "opt" + name, depth + 1)}} + } + {%- elif encodable.is_list -%} + startList({{tag}}) + for (item in {{name}}.iterator()) { + {{encode_tlv(encodable.without_list(), "AnonymousTag", "item", depth + 1)}} + } + endList() + {%- elif encodable.is_struct -%} + {{name}}.toTlv({{tag}}, this) + {%- else -%} + put({{tag}}, {{name}}) + {%- endif -%} +{%- endmacro -%} + +{%- macro decode_tlv(source, encodable, tag, depth) %} + {%- if encodable.is_nullable -%} + if (!tlvReader.isNull()) { + {{decode_tlv(source, encodable.without_nullable(), tag, depth + 1)}} + } else { + tlvReader.getNull({{tag}}) + null + } + {%- elif encodable.is_optional -%} + if (tlvReader.isNextTag({{tag}})) { + Optional.of({{decode_tlv(source, encodable.without_optional(), tag, depth + 1)}}) + } else { + Optional.empty() + } + {%- elif encodable.is_list -%} + {%- set encodablewithoutlist = encodable.without_list() -%} + buildList<{{encode_value(source, encodablewithoutlist, depth + 1)}}> { + tlvReader.enterList({{tag}}) + while(!tlvReader.isEndOfContainer()) { + add({{decode_tlv(source, encodablewithoutlist, "AnonymousTag", depth + 1)}}) + } + tlvReader.exitContainer() + } + {%- elif encodable.is_struct -%} + {%- set struct = encodable.get_underlying_struct() -%} + {{source.name}}Cluster{{struct.name}}.fromTlv({{tag}}, tlvReader) + {%- else -%} + tlvReader.get{{encodable.kotlin_type}}({{tag}}) + {%- endif -%} +{%- endmacro -%} + +{%- macro contextSpecificTag(field) -%} + ContextSpecificTag(TAG_{{field.name | constcase}}) +{%- endmacro -%} + +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvParsingException +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +import java.util.Optional + +class {{cluster.name}}Cluster{{struct.name}} ( + {%- for field in struct.fields %} + {%- set encodable = field | asEncodable(typeLookup) %} + val {{field.name}}: {{encode_value(cluster, encodable, 0)}} + {%- if loop.index0 < loop.length - 1 -%}{{","}}{%- endif -%} + {%- endfor -%}) { + override fun toString(): String = buildString { + append("{{cluster.name}}Cluster{{struct.name}} {\n") + {%- for field in struct.fields %} + append("\t{{field.name}} : ${{field.name}}\n") + {%- endfor %} + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + {% for field in struct.fields %} + {%- set encodable = field | asEncodable(typeLookup) %} + {%- set tag = contextSpecificTag(field) -%} + {{encode_tlv(encodable, tag, field.name, 0)}} + {% endfor -%} + endStructure() + } + } + + companion object { + {%- for field in struct.fields %} + private const val TAG_{{field.name | constcase}} = {{field.code}} + {%- endfor %} + + fun fromTlv(tag: Tag, tlvReader: TlvReader) : {{cluster.name}}Cluster{{struct.name}} { + tlvReader.enterStructure(tag) + {% for field in struct.fields %} + {%- set decodable = field | asEncodable(typeLookup) %} + {%- set tag = contextSpecificTag(field) -%} + val {{field.name}} = {{decode_tlv(cluster, decodable, tag, 0)}} + {% endfor %} + tlvReader.exitContainer() + + return {{cluster.name}}Cluster{{struct.name}}( + {%- for field in struct.fields -%} + {%- set encodable = field | asEncodable(typeLookup) -%} + {{field.name}} + {%- if loop.index0 < loop.length - 1 -%}{{", "}}{%- endif -%} + {%- endfor -%} + ) + } + } +} diff --git a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py index 84b9badd7a1e27..5abc912ebabd34 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py @@ -478,6 +478,43 @@ def boxed_java_type(self): else: return "Object" + @property + def kotlin_type(self): + t = ParseDataType(self.data_type, self.context) + + if isinstance(t, FundamentalType): + if t == FundamentalType.BOOL: + return "Boolean" + elif t == FundamentalType.FLOAT: + return "Float" + elif t == FundamentalType.DOUBLE: + return "Double" + else: + raise Exception("Unknown fundamental type") + elif isinstance(t, BasicInteger): + # the >= 3 will include int24_t to be considered "long" + if t.byte_count >= 3: + return "Long" + else: + return "Int" + elif isinstance(t, BasicString): + if t.is_binary: + return "ByteArray" + else: + return "String" + elif isinstance(t, IdlEnumType): + if t.base_type.byte_count >= 3: + return "Long" + else: + return "Int" + elif isinstance(t, IdlBitmapType): + if t.base_type.byte_count >= 3: + return "Long" + else: + return "Int" + else: + return "Any" + @property def unboxed_java_signature(self): if self.is_optional or self.is_list: @@ -752,3 +789,43 @@ def internal_render_all(self): 'clientClusters': clientClusters, } ) + + # Every cluster has its own impl, to avoid + # very large compilations (running out of RAM) + for cluster in self.idl.clusters: + if cluster.side != ClusterSide.CLIENT: + continue + + for struct in cluster.structs: + if struct.tag: + continue + + output_name = "java/chip/devicecontroller/cluster/structs/{cluster_name}Cluster{struct_name}.kt" + self.internal_render_one_output( + template_path="ChipStructs.jinja", + output_file_name=output_name.format( + cluster_name=cluster.name, + struct_name=struct.name), + vars={ + 'cluster': cluster, + 'struct': struct, + 'typeLookup': TypeLookupContext(self.idl, cluster), + } + ) + + for event in cluster.events: + if not event.fields: + continue + + output_name = "java/chip/devicecontroller/cluster/eventstructs/{cluster_name}Cluster{event_name}Event.kt" + self.internal_render_one_output( + template_path="ChipEventStructs.jinja", + output_file_name=output_name.format( + cluster_name=cluster.name, + event_name=event.name), + vars={ + 'cluster': cluster, + 'event': event, + 'typeLookup': TypeLookupContext(self.idl, cluster), + } + ) diff --git a/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml b/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml index 3a50ebc076dcb8..de117835790d10 100644 --- a/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml +++ b/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml @@ -52,6 +52,7 @@ java-jni: java-class: inputs/several_clusters.matter: + java/chip/devicecontroller/cluster/structs/SecondClusterFabricDescriptorStruct.kt: outputs/several_clusters/java/SecondClusterFabricDescriptorStruct.kt java/chip/devicecontroller/ClusterWriteMapping.java: outputs/several_clusters/java/ClusterWriteMapping.java java/chip/devicecontroller/ClusterReadMapping.java: outputs/several_clusters/java/ClusterReadMapping.java java/chip/devicecontroller/ClusterIDMapping.java: outputs/several_clusters/java/ClusterIDMapping.java diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/SecondClusterFabricDescriptorStruct.kt b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/SecondClusterFabricDescriptorStruct.kt new file mode 100644 index 00000000000000..e86ce5788fd642 --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/SecondClusterFabricDescriptorStruct.kt @@ -0,0 +1,82 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvParsingException +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +import java.util.Optional + +class SecondClusterFabricDescriptorStruct ( + val rootPublicKey: ByteArray, + val vendorID: Int, + val fabricID: Long, + val nodeID: Long, + val label: String, + val fabricIndex: Int) { + override fun toString(): String = buildString { + append("SecondClusterFabricDescriptorStruct {\n") + append("\trootPublicKey : $rootPublicKey\n") + append("\tvendorID : $vendorID\n") + append("\tfabricID : $fabricID\n") + append("\tnodeID : $nodeID\n") + append("\tlabel : $label\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY), rootPublicKey) + put(ContextSpecificTag(TAG_VENDOR_I_D), vendorID) + put(ContextSpecificTag(TAG_FABRIC_I_D), fabricID) + put(ContextSpecificTag(TAG_NODE_I_D), nodeID) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_ROOT_PUBLIC_KEY = 1 + private const val TAG_VENDOR_I_D = 2 + private const val TAG_FABRIC_I_D = 3 + private const val TAG_NODE_I_D = 4 + private const val TAG_LABEL = 5 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SecondClusterFabricDescriptorStruct { + tlvReader.enterStructure(tag) + val rootPublicKey = tlvReader.getByteArray(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY)) + val vendorID = tlvReader.getInt(ContextSpecificTag(TAG_VENDOR_I_D)) + val fabricID = tlvReader.getLong(ContextSpecificTag(TAG_FABRIC_I_D)) + val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return SecondClusterFabricDescriptorStruct(rootPublicKey, vendorID, fabricID, nodeID, label, fabricIndex) + } + } +} diff --git a/scripts/tools/zap_regen_all.py b/scripts/tools/zap_regen_all.py index 2dca8db565480b..03a1ee12b20753 100755 --- a/scripts/tools/zap_regen_all.py +++ b/scripts/tools/zap_regen_all.py @@ -19,11 +19,14 @@ import logging import multiprocessing import os +import os.path import shutil import subprocess import sys import tempfile import time +import traceback +import urllib.request from dataclasses import dataclass from enum import Flag, auto from pathlib import Path @@ -270,11 +273,43 @@ def __init__(self, generator: str, output_directory: str, idl_path: str): self.command = ["./scripts/codegen.py", "--output-dir", output_directory, "--generator", generator, idl_path] + def formatKotlinFiles(self, paths): + try: + logging.info("Prettifying %d kotlin files:", len(paths)) + for name in paths: + logging.info(" %s" % name) + + VERSION = "0.44" + JAR_NAME = f"ktfmt-{VERSION}-jar-with-dependencies.jar" + jar_url = f"https://repo1.maven.org/maven2/com/facebook/ktfmt/{VERSION}/{JAR_NAME}" + + with tempfile.TemporaryDirectory(prefix='ktfmt') as tmpdir: + path, http_message = urllib.request.urlretrieve(jar_url, Path(tmpdir).joinpath(JAR_NAME).as_posix()) + subprocess.check_call(['java', '-jar', path, '--google-style'] + paths) + except Exception: + traceback.print_exc() + + def codeFormat(self): + outputs = subprocess.check_output(["./scripts/codegen.py", "--name-only", "--generator", + self.generator, "--log-level", "fatal", self.idl_path]).decode("utf8").split("\n") + outputs = [os.path.join(self.output_directory, name) for name in outputs if name] + + # Split output files by extension, + name_dict = {} + for name in outputs: + _, extension = os.path.splitext(name) + name_dict[extension] = name_dict.get(extension, []) + [name] + + if '.kt' in name_dict: + self.formatKotlinFiles(name_dict['.kt']) + def generate(self) -> TargetRunStats: generate_start = time.time() subprocess.check_call(self.command) + self.codeFormat() + generate_end = time.time() return TargetRunStats( diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index ee227cf1cf4c06..e967b0bd007936 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -300,8 +300,43 @@ kotlin_library("onboardingpayload_qr_code_test") { kotlinc_flags = [ "-Xlint:deprecation" ] } +kotlin_library("chipcluster") { + import( + "${chip_root}/src/controller/java/src/chip/devicecontroller/cluster/files.gni") + + output_name = "CHIPClusters.jar" + + deps = [ ":tlv" ] + + sources = [ "src/chip/devicecontroller/cluster/TlvReaderExtension.kt" ] + + sources += structs_sources + sources += eventstructs_sources + + kotlinc_flags = [ "-Xlint:deprecation" ] +} + +kotlin_library("chipcluster_test") { + output_name = "CHIPClustersTest.jar" + + deps = [ + ":chipcluster", + ":tlv", + "${chip_root}/third_party/java_deps:junit-4", + "${chip_root}/third_party/java_deps:truth", + ] + + sources = [ + "tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt", + "tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt", + ] + + kotlinc_flags = [ "-Xlint:deprecation" ] +} + group("unit_tests") { deps = [ + ":chipcluster_test", ":json_to_tlv_to_json_test", ":onboardingpayload_manual_code_test", ":onboardingpayload_qr_code_test", @@ -311,10 +346,26 @@ group("unit_tests") { ] } +android_library("chipclusterID") { + output_name = "CHIPClusterID.jar" + + sources = [ + "generated/java/chip/devicecontroller/ClusterIDMapping.java", + "src/chip/devicecontroller/ChipIdLookup.java", + ] + + javac_flags = [ + "-Xlint:deprecation", + "-parameters", # Store infomation about method parameters + ] +} + android_library("java") { output_name = "CHIPController.jar" deps = [ + ":chipcluster", + ":chipclusterID", ":tlv", "${chip_root}/third_party/java_deps:annotation", ] @@ -322,7 +373,6 @@ android_library("java") { data_deps = [ ":jni" ] sources = [ - "generated/java/chip/devicecontroller/ClusterIDMapping.java", "src/chip/devicecontroller/AttestationInfo.java", "src/chip/devicecontroller/AttestationTrustStoreDelegate.java", "src/chip/devicecontroller/CSRInfo.java", @@ -330,7 +380,6 @@ android_library("java") { "src/chip/devicecontroller/ChipCommandType.java", "src/chip/devicecontroller/ChipDeviceController.java", "src/chip/devicecontroller/ChipDeviceControllerException.java", - "src/chip/devicecontroller/ChipIdLookup.java", "src/chip/devicecontroller/ControllerParams.java", "src/chip/devicecontroller/DeviceAttestationDelegate.java", "src/chip/devicecontroller/DiscoveredDevice.java", diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt new file mode 100644 index 00000000000000..e926e70d861c20 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt @@ -0,0 +1,115 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class AccessControlClusterAccessControlEntryChangedEvent( + val adminNodeID: Long?, + val adminPasscodeID: Int?, + val changeType: Int, + val latestValue: + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("AccessControlClusterAccessControlEntryChangedEvent {\n") + append("\tadminNodeID : $adminNodeID\n") + append("\tadminPasscodeID : $adminPasscodeID\n") + append("\tchangeType : $changeType\n") + append("\tlatestValue : $latestValue\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (adminNodeID != null) { + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } + if (adminPasscodeID != null) { + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } + put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) + if (latestValue != null) { + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_ADMIN_NODE_I_D = 1 + private const val TAG_ADMIN_PASSCODE_I_D = 2 + private const val TAG_CHANGE_TYPE = 3 + private const val TAG_LATEST_VALUE = 4 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): AccessControlClusterAccessControlEntryChangedEvent { + tlvReader.enterStructure(tag) + val adminNodeID = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } + val changeType = tlvReader.getInt(ContextSpecificTag(TAG_CHANGE_TYPE)) + val latestValue = + if (!tlvReader.isNull()) { + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct + .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return AccessControlClusterAccessControlEntryChangedEvent( + adminNodeID, + adminPasscodeID, + changeType, + latestValue, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt new file mode 100644 index 00000000000000..e01b81cec705bb --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt @@ -0,0 +1,115 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class AccessControlClusterAccessControlExtensionChangedEvent( + val adminNodeID: Long?, + val adminPasscodeID: Int?, + val changeType: Int, + val latestValue: + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("AccessControlClusterAccessControlExtensionChangedEvent {\n") + append("\tadminNodeID : $adminNodeID\n") + append("\tadminPasscodeID : $adminPasscodeID\n") + append("\tchangeType : $changeType\n") + append("\tlatestValue : $latestValue\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (adminNodeID != null) { + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } + if (adminPasscodeID != null) { + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } + put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) + if (latestValue != null) { + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_ADMIN_NODE_I_D = 1 + private const val TAG_ADMIN_PASSCODE_I_D = 2 + private const val TAG_CHANGE_TYPE = 3 + private const val TAG_LATEST_VALUE = 4 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): AccessControlClusterAccessControlExtensionChangedEvent { + tlvReader.enterStructure(tag) + val adminNodeID = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } + val changeType = tlvReader.getInt(ContextSpecificTag(TAG_CHANGE_TYPE)) + val latestValue = + if (!tlvReader.isNull()) { + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct + .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return AccessControlClusterAccessControlExtensionChangedEvent( + adminNodeID, + adminPasscodeID, + changeType, + latestValue, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt new file mode 100644 index 00000000000000..d2e375338f705d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ActionsClusterActionFailedEvent( + val actionID: Int, + val invokeID: Long, + val newState: Int, + val error: Int +) { + override fun toString(): String = buildString { + append("ActionsClusterActionFailedEvent {\n") + append("\tactionID : $actionID\n") + append("\tinvokeID : $invokeID\n") + append("\tnewState : $newState\n") + append("\terror : $error\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ACTION_I_D), actionID) + put(ContextSpecificTag(TAG_INVOKE_I_D), invokeID) + put(ContextSpecificTag(TAG_NEW_STATE), newState) + put(ContextSpecificTag(TAG_ERROR), error) + endStructure() + } + } + + companion object { + private const val TAG_ACTION_I_D = 0 + private const val TAG_INVOKE_I_D = 1 + private const val TAG_NEW_STATE = 2 + private const val TAG_ERROR = 3 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterActionFailedEvent { + tlvReader.enterStructure(tag) + val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) + val invokeID = tlvReader.getLong(ContextSpecificTag(TAG_INVOKE_I_D)) + val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) + val error = tlvReader.getInt(ContextSpecificTag(TAG_ERROR)) + + tlvReader.exitContainer() + + return ActionsClusterActionFailedEvent(actionID, invokeID, newState, error) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt new file mode 100644 index 00000000000000..05ad68aae272ea --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ActionsClusterStateChangedEvent(val actionID: Int, val invokeID: Long, val newState: Int) { + override fun toString(): String = buildString { + append("ActionsClusterStateChangedEvent {\n") + append("\tactionID : $actionID\n") + append("\tinvokeID : $invokeID\n") + append("\tnewState : $newState\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ACTION_I_D), actionID) + put(ContextSpecificTag(TAG_INVOKE_I_D), invokeID) + put(ContextSpecificTag(TAG_NEW_STATE), newState) + endStructure() + } + } + + companion object { + private const val TAG_ACTION_I_D = 0 + private const val TAG_INVOKE_I_D = 1 + private const val TAG_NEW_STATE = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterStateChangedEvent { + tlvReader.enterStructure(tag) + val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) + val invokeID = tlvReader.getLong(ContextSpecificTag(TAG_INVOKE_I_D)) + val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) + + tlvReader.exitContainer() + + return ActionsClusterStateChangedEvent(actionID, invokeID, newState) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt new file mode 100644 index 00000000000000..962ed26cddb40d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BasicInformationClusterLeaveEvent(val fabricIndex: Int) { + override fun toString(): String = buildString { + append("BasicInformationClusterLeaveEvent {\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_FABRIC_INDEX = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterLeaveEvent { + tlvReader.enterStructure(tag) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return BasicInformationClusterLeaveEvent(fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt new file mode 100644 index 00000000000000..c40211aa617dcc --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolean) { + override fun toString(): String = buildString { + append("BasicInformationClusterReachableChangedEvent {\n") + append("\treachableNewValue : $reachableNewValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE), reachableNewValue) + endStructure() + } + } + + companion object { + private const val TAG_REACHABLE_NEW_VALUE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterReachableChangedEvent { + tlvReader.enterStructure(tag) + val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) + + tlvReader.exitContainer() + + return BasicInformationClusterReachableChangedEvent(reachableNewValue) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt new file mode 100644 index 00000000000000..23082666b05cae --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BasicInformationClusterStartUpEvent(val softwareVersion: Long) { + override fun toString(): String = buildString { + append("BasicInformationClusterStartUpEvent {\n") + append("\tsoftwareVersion : $softwareVersion\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) + endStructure() + } + } + + companion object { + private const val TAG_SOFTWARE_VERSION = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterStartUpEvent { + tlvReader.enterStructure(tag) + val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + + tlvReader.exitContainer() + + return BasicInformationClusterStartUpEvent(softwareVersion) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt new file mode 100644 index 00000000000000..a0ecfb76141580 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BooleanStateClusterStateChangeEvent(val stateValue: Boolean) { + override fun toString(): String = buildString { + append("BooleanStateClusterStateChangeEvent {\n") + append("\tstateValue : $stateValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_STATE_VALUE), stateValue) + endStructure() + } + } + + companion object { + private const val TAG_STATE_VALUE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BooleanStateClusterStateChangeEvent { + tlvReader.enterStructure(tag) + val stateValue = tlvReader.getBoolean(ContextSpecificTag(TAG_STATE_VALUE)) + + tlvReader.exitContainer() + + return BooleanStateClusterStateChangeEvent(stateValue) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt new file mode 100644 index 00000000000000..e75b2f7af96f93 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BridgedDeviceBasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolean) { + override fun toString(): String = buildString { + append("BridgedDeviceBasicInformationClusterReachableChangedEvent {\n") + append("\treachableNewValue : $reachableNewValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE), reachableNewValue) + endStructure() + } + } + + companion object { + private const val TAG_REACHABLE_NEW_VALUE = 0 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): BridgedDeviceBasicInformationClusterReachableChangedEvent { + tlvReader.enterStructure(tag) + val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) + + tlvReader.exitContainer() + + return BridgedDeviceBasicInformationClusterReachableChangedEvent(reachableNewValue) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt new file mode 100644 index 00000000000000..80c60be6847056 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: Long) { + override fun toString(): String = buildString { + append("BridgedDeviceBasicInformationClusterStartUpEvent {\n") + append("\tsoftwareVersion : $softwareVersion\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) + endStructure() + } + } + + companion object { + private const val TAG_SOFTWARE_VERSION = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BridgedDeviceBasicInformationClusterStartUpEvent { + tlvReader.enterStructure(tag) + val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + + tlvReader.exitContainer() + + return BridgedDeviceBasicInformationClusterStartUpEvent(softwareVersion) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt new file mode 100644 index 00000000000000..0b7206788e842a --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class DishwasherAlarmClusterNotifyEvent( + val active: Long, + val inactive: Long, + val state: Long, + val mask: Long +) { + override fun toString(): String = buildString { + append("DishwasherAlarmClusterNotifyEvent {\n") + append("\tactive : $active\n") + append("\tinactive : $inactive\n") + append("\tstate : $state\n") + append("\tmask : $mask\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ACTIVE), active) + put(ContextSpecificTag(TAG_INACTIVE), inactive) + put(ContextSpecificTag(TAG_STATE), state) + put(ContextSpecificTag(TAG_MASK), mask) + endStructure() + } + } + + companion object { + private const val TAG_ACTIVE = 0 + private const val TAG_INACTIVE = 1 + private const val TAG_STATE = 2 + private const val TAG_MASK = 3 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherAlarmClusterNotifyEvent { + tlvReader.enterStructure(tag) + val active = tlvReader.getLong(ContextSpecificTag(TAG_ACTIVE)) + val inactive = tlvReader.getLong(ContextSpecificTag(TAG_INACTIVE)) + val state = tlvReader.getLong(ContextSpecificTag(TAG_STATE)) + val mask = tlvReader.getLong(ContextSpecificTag(TAG_MASK)) + + tlvReader.exitContainer() + + return DishwasherAlarmClusterNotifyEvent(active, inactive, state, mask) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt new file mode 100644 index 00000000000000..6417fb85009e88 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class DoorLockClusterDoorLockAlarmEvent(val alarmCode: Int) { + override fun toString(): String = buildString { + append("DoorLockClusterDoorLockAlarmEvent {\n") + append("\talarmCode : $alarmCode\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ALARM_CODE), alarmCode) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_CODE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterDoorLockAlarmEvent { + tlvReader.enterStructure(tag) + val alarmCode = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_CODE)) + + tlvReader.exitContainer() + + return DoorLockClusterDoorLockAlarmEvent(alarmCode) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt new file mode 100644 index 00000000000000..d0b6acbe7ea227 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class DoorLockClusterDoorStateChangeEvent(val doorState: Int) { + override fun toString(): String = buildString { + append("DoorLockClusterDoorStateChangeEvent {\n") + append("\tdoorState : $doorState\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_DOOR_STATE), doorState) + endStructure() + } + } + + companion object { + private const val TAG_DOOR_STATE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterDoorStateChangeEvent { + tlvReader.enterStructure(tag) + val doorState = tlvReader.getInt(ContextSpecificTag(TAG_DOOR_STATE)) + + tlvReader.exitContainer() + + return DoorLockClusterDoorStateChangeEvent(doorState) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt new file mode 100644 index 00000000000000..59e38fa054dd87 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt @@ -0,0 +1,159 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class DoorLockClusterLockOperationErrorEvent( + val lockOperationType: Int, + val operationSource: Int, + val operationError: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val credentials: + Optional>? +) { + override fun toString(): String = buildString { + append("DoorLockClusterLockOperationErrorEvent {\n") + append("\tlockOperationType : $lockOperationType\n") + append("\toperationSource : $operationSource\n") + append("\toperationError : $operationError\n") + append("\tuserIndex : $userIndex\n") + append("\tfabricIndex : $fabricIndex\n") + append("\tsourceNode : $sourceNode\n") + append("\tcredentials : $credentials\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE), lockOperationType) + put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) + put(ContextSpecificTag(TAG_OPERATION_ERROR), operationError) + if (userIndex != null) { + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } + if (fabricIndex != null) { + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } + if (sourceNode != null) { + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } + if (credentials != null) { + if (credentials.isPresent) { + val optcredentials = credentials.get() + startList(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) + } + endStructure() + } + } + + companion object { + private const val TAG_LOCK_OPERATION_TYPE = 0 + private const val TAG_OPERATION_SOURCE = 1 + private const val TAG_OPERATION_ERROR = 2 + private const val TAG_USER_INDEX = 3 + private const val TAG_FABRIC_INDEX = 4 + private const val TAG_SOURCE_NODE = 5 + private const val TAG_CREDENTIALS = 6 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationErrorEvent { + tlvReader.enterStructure(tag) + val lockOperationType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) + val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) + val operationError = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_ERROR)) + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + + tlvReader.exitContainer() + + return DoorLockClusterLockOperationErrorEvent( + lockOperationType, + operationSource, + operationError, + userIndex, + fabricIndex, + sourceNode, + credentials + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt new file mode 100644 index 00000000000000..4fbf71082c7adc --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt @@ -0,0 +1,153 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class DoorLockClusterLockOperationEvent( + val lockOperationType: Int, + val operationSource: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val credentials: + Optional>? +) { + override fun toString(): String = buildString { + append("DoorLockClusterLockOperationEvent {\n") + append("\tlockOperationType : $lockOperationType\n") + append("\toperationSource : $operationSource\n") + append("\tuserIndex : $userIndex\n") + append("\tfabricIndex : $fabricIndex\n") + append("\tsourceNode : $sourceNode\n") + append("\tcredentials : $credentials\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE), lockOperationType) + put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) + if (userIndex != null) { + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } + if (fabricIndex != null) { + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } + if (sourceNode != null) { + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } + if (credentials != null) { + if (credentials.isPresent) { + val optcredentials = credentials.get() + startList(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) + } + endStructure() + } + } + + companion object { + private const val TAG_LOCK_OPERATION_TYPE = 0 + private const val TAG_OPERATION_SOURCE = 1 + private const val TAG_USER_INDEX = 2 + private const val TAG_FABRIC_INDEX = 3 + private const val TAG_SOURCE_NODE = 4 + private const val TAG_CREDENTIALS = 5 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationEvent { + tlvReader.enterStructure(tag) + val lockOperationType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) + val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + + tlvReader.exitContainer() + + return DoorLockClusterLockOperationEvent( + lockOperationType, + operationSource, + userIndex, + fabricIndex, + sourceNode, + credentials + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt new file mode 100644 index 00000000000000..6fc562b39959ff --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt @@ -0,0 +1,132 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class DoorLockClusterLockUserChangeEvent( + val lockDataType: Int, + val dataOperationType: Int, + val operationSource: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val dataIndex: Int? +) { + override fun toString(): String = buildString { + append("DoorLockClusterLockUserChangeEvent {\n") + append("\tlockDataType : $lockDataType\n") + append("\tdataOperationType : $dataOperationType\n") + append("\toperationSource : $operationSource\n") + append("\tuserIndex : $userIndex\n") + append("\tfabricIndex : $fabricIndex\n") + append("\tsourceNode : $sourceNode\n") + append("\tdataIndex : $dataIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LOCK_DATA_TYPE), lockDataType) + put(ContextSpecificTag(TAG_DATA_OPERATION_TYPE), dataOperationType) + put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) + if (userIndex != null) { + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } + if (fabricIndex != null) { + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } + if (sourceNode != null) { + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } + if (dataIndex != null) { + put(ContextSpecificTag(TAG_DATA_INDEX), dataIndex) + } else { + putNull(ContextSpecificTag(TAG_DATA_INDEX)) + } + endStructure() + } + } + + companion object { + private const val TAG_LOCK_DATA_TYPE = 0 + private const val TAG_DATA_OPERATION_TYPE = 1 + private const val TAG_OPERATION_SOURCE = 2 + private const val TAG_USER_INDEX = 3 + private const val TAG_FABRIC_INDEX = 4 + private const val TAG_SOURCE_NODE = 5 + private const val TAG_DATA_INDEX = 6 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockUserChangeEvent { + tlvReader.enterStructure(tag) + val lockDataType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_DATA_TYPE)) + val dataOperationType = tlvReader.getInt(ContextSpecificTag(TAG_DATA_OPERATION_TYPE)) + val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val dataIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_DATA_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DATA_INDEX)) + null + } + + tlvReader.exitContainer() + + return DoorLockClusterLockUserChangeEvent( + lockDataType, + dataOperationType, + operationSource, + userIndex, + fabricIndex, + sourceNode, + dataIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt new file mode 100644 index 00000000000000..3d743983f1a00f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GeneralDiagnosticsClusterBootReasonEvent(val bootReason: Int) { + override fun toString(): String = buildString { + append("GeneralDiagnosticsClusterBootReasonEvent {\n") + append("\tbootReason : $bootReason\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_BOOT_REASON), bootReason) + endStructure() + } + } + + companion object { + private const val TAG_BOOT_REASON = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterBootReasonEvent { + tlvReader.enterStructure(tag) + val bootReason = tlvReader.getInt(ContextSpecificTag(TAG_BOOT_REASON)) + + tlvReader.exitContainer() + + return GeneralDiagnosticsClusterBootReasonEvent(bootReason) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt new file mode 100644 index 00000000000000..1287eba322b742 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt @@ -0,0 +1,82 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GeneralDiagnosticsClusterHardwareFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { + append("GeneralDiagnosticsClusterHardwareFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterHardwareFaultChangeEvent { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return GeneralDiagnosticsClusterHardwareFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt new file mode 100644 index 00000000000000..f9fc3cadc8b934 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt @@ -0,0 +1,82 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GeneralDiagnosticsClusterNetworkFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { + append("GeneralDiagnosticsClusterNetworkFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkFaultChangeEvent { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return GeneralDiagnosticsClusterNetworkFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt new file mode 100644 index 00000000000000..35daf8dd691bf5 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt @@ -0,0 +1,82 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GeneralDiagnosticsClusterRadioFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { + append("GeneralDiagnosticsClusterRadioFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterRadioFaultChangeEvent { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return GeneralDiagnosticsClusterRadioFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt new file mode 100644 index 00000000000000..092e062784a118 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt @@ -0,0 +1,103 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class OperationalStateClusterOperationCompletionEvent( + val completionErrorCode: Int, + val totalOperationalTime: Optional?, + val pausedTime: Optional? +) { + override fun toString(): String = buildString { + append("OperationalStateClusterOperationCompletionEvent {\n") + append("\tcompletionErrorCode : $completionErrorCode\n") + append("\ttotalOperationalTime : $totalOperationalTime\n") + append("\tpausedTime : $pausedTime\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) + if (totalOperationalTime != null) { + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } + if (pausedTime != null) { + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } + endStructure() + } + } + + companion object { + private const val TAG_COMPLETION_ERROR_CODE = 0 + private const val TAG_TOTAL_OPERATIONAL_TIME = 1 + private const val TAG_PAUSED_TIME = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationCompletionEvent { + tlvReader.enterStructure(tag) + val completionErrorCode = tlvReader.getInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) + val totalOperationalTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + + tlvReader.exitContainer() + + return OperationalStateClusterOperationCompletionEvent( + completionErrorCode, + totalOperationalTime, + pausedTime + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt new file mode 100644 index 00000000000000..b5623a0d701579 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt @@ -0,0 +1,58 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OperationalStateClusterOperationalErrorEvent( + val errorState: chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct +) { + override fun toString(): String = buildString { + append("OperationalStateClusterOperationalErrorEvent {\n") + append("\terrorState : $errorState\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + errorState.toTlv(ContextSpecificTag(TAG_ERROR_STATE), this) + endStructure() + } + } + + companion object { + private const val TAG_ERROR_STATE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalErrorEvent { + tlvReader.enterStructure(tag) + val errorState = + chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct.fromTlv( + ContextSpecificTag(TAG_ERROR_STATE), + tlvReader + ) + + tlvReader.exitContainer() + + return OperationalStateClusterOperationalErrorEvent(errorState) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt new file mode 100644 index 00000000000000..8a82cbf93c9f1f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt @@ -0,0 +1,97 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( + val softwareVersion: Long, + val bytesDownloaded: Long, + val progressPercent: Int?, + val platformCode: Long? +) { + override fun toString(): String = buildString { + append("OtaSoftwareUpdateRequestorClusterDownloadErrorEvent {\n") + append("\tsoftwareVersion : $softwareVersion\n") + append("\tbytesDownloaded : $bytesDownloaded\n") + append("\tprogressPercent : $progressPercent\n") + append("\tplatformCode : $platformCode\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) + put(ContextSpecificTag(TAG_BYTES_DOWNLOADED), bytesDownloaded) + if (progressPercent != null) { + put(ContextSpecificTag(TAG_PROGRESS_PERCENT), progressPercent) + } else { + putNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + } + if (platformCode != null) { + put(ContextSpecificTag(TAG_PLATFORM_CODE), platformCode) + } else { + putNull(ContextSpecificTag(TAG_PLATFORM_CODE)) + } + endStructure() + } + } + + companion object { + private const val TAG_SOFTWARE_VERSION = 0 + private const val TAG_BYTES_DOWNLOADED = 1 + private const val TAG_PROGRESS_PERCENT = 2 + private const val TAG_PLATFORM_CODE = 3 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { + tlvReader.enterStructure(tag) + val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + val bytesDownloaded = tlvReader.getLong(ContextSpecificTag(TAG_BYTES_DOWNLOADED)) + val progressPercent = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + null + } + val platformCode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_PLATFORM_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PLATFORM_CODE)) + null + } + + tlvReader.exitContainer() + + return OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( + softwareVersion, + bytesDownloaded, + progressPercent, + platformCode + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt new file mode 100644 index 00000000000000..b0b075689fc3be --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt @@ -0,0 +1,87 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OtaSoftwareUpdateRequestorClusterStateTransitionEvent( + val previousState: Int, + val newState: Int, + val reason: Int, + val targetSoftwareVersion: Long? +) { + override fun toString(): String = buildString { + append("OtaSoftwareUpdateRequestorClusterStateTransitionEvent {\n") + append("\tpreviousState : $previousState\n") + append("\tnewState : $newState\n") + append("\treason : $reason\n") + append("\ttargetSoftwareVersion : $targetSoftwareVersion\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PREVIOUS_STATE), previousState) + put(ContextSpecificTag(TAG_NEW_STATE), newState) + put(ContextSpecificTag(TAG_REASON), reason) + if (targetSoftwareVersion != null) { + put(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION), targetSoftwareVersion) + } else { + putNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + } + endStructure() + } + } + + companion object { + private const val TAG_PREVIOUS_STATE = 0 + private const val TAG_NEW_STATE = 1 + private const val TAG_REASON = 2 + private const val TAG_TARGET_SOFTWARE_VERSION = 3 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterStateTransitionEvent { + tlvReader.enterStructure(tag) + val previousState = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_STATE)) + val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) + val reason = tlvReader.getInt(ContextSpecificTag(TAG_REASON)) + val targetSoftwareVersion = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + null + } + + tlvReader.exitContainer() + + return OtaSoftwareUpdateRequestorClusterStateTransitionEvent( + previousState, + newState, + reason, + targetSoftwareVersion + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt new file mode 100644 index 00000000000000..ff1034ace97e31 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt @@ -0,0 +1,62 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent( + val softwareVersion: Long, + val productID: Int +) { + override fun toString(): String = buildString { + append("OtaSoftwareUpdateRequestorClusterVersionAppliedEvent {\n") + append("\tsoftwareVersion : $softwareVersion\n") + append("\tproductID : $productID\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) + put(ContextSpecificTag(TAG_PRODUCT_I_D), productID) + endStructure() + } + } + + companion object { + private const val TAG_SOFTWARE_VERSION = 0 + private const val TAG_PRODUCT_I_D = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterVersionAppliedEvent { + tlvReader.enterStructure(tag) + val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + val productID = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_I_D)) + + tlvReader.exitContainer() + + return OtaSoftwareUpdateRequestorClusterVersionAppliedEvent(softwareVersion, productID) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt new file mode 100644 index 00000000000000..c3eb0d1e658b56 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class PowerSourceClusterBatChargeFaultChangeEvent(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterBatChargeFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeEvent { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterBatChargeFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt new file mode 100644 index 00000000000000..c010184156ecb3 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class PowerSourceClusterBatFaultChangeEvent(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterBatFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeEvent { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterBatFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt new file mode 100644 index 00000000000000..8a06b36fba61d0 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class PowerSourceClusterWiredFaultChangeEvent(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterWiredFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeEvent { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterWiredFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt new file mode 100644 index 00000000000000..c116f16ac73229 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class RefrigeratorAlarmClusterNotifyEvent( + val active: Long, + val inactive: Long, + val state: Long, + val mask: Long +) { + override fun toString(): String = buildString { + append("RefrigeratorAlarmClusterNotifyEvent {\n") + append("\tactive : $active\n") + append("\tinactive : $inactive\n") + append("\tstate : $state\n") + append("\tmask : $mask\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ACTIVE), active) + put(ContextSpecificTag(TAG_INACTIVE), inactive) + put(ContextSpecificTag(TAG_STATE), state) + put(ContextSpecificTag(TAG_MASK), mask) + endStructure() + } + } + + companion object { + private const val TAG_ACTIVE = 0 + private const val TAG_INACTIVE = 1 + private const val TAG_STATE = 2 + private const val TAG_MASK = 3 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RefrigeratorAlarmClusterNotifyEvent { + tlvReader.enterStructure(tag) + val active = tlvReader.getLong(ContextSpecificTag(TAG_ACTIVE)) + val inactive = tlvReader.getLong(ContextSpecificTag(TAG_INACTIVE)) + val state = tlvReader.getLong(ContextSpecificTag(TAG_STATE)) + val mask = tlvReader.getLong(ContextSpecificTag(TAG_MASK)) + + tlvReader.exitContainer() + + return RefrigeratorAlarmClusterNotifyEvent(active, inactive, state, mask) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt new file mode 100644 index 00000000000000..c6afaa9750adf8 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt @@ -0,0 +1,106 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class RvcOperationalStateClusterOperationCompletionEvent( + val completionErrorCode: Int, + val totalOperationalTime: Optional?, + val pausedTime: Optional? +) { + override fun toString(): String = buildString { + append("RvcOperationalStateClusterOperationCompletionEvent {\n") + append("\tcompletionErrorCode : $completionErrorCode\n") + append("\ttotalOperationalTime : $totalOperationalTime\n") + append("\tpausedTime : $pausedTime\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) + if (totalOperationalTime != null) { + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } + if (pausedTime != null) { + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } + endStructure() + } + } + + companion object { + private const val TAG_COMPLETION_ERROR_CODE = 0 + private const val TAG_TOTAL_OPERATIONAL_TIME = 1 + private const val TAG_PAUSED_TIME = 2 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): RvcOperationalStateClusterOperationCompletionEvent { + tlvReader.enterStructure(tag) + val completionErrorCode = tlvReader.getInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) + val totalOperationalTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + + tlvReader.exitContainer() + + return RvcOperationalStateClusterOperationCompletionEvent( + completionErrorCode, + totalOperationalTime, + pausedTime + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt new file mode 100644 index 00000000000000..bf6fed9817f60f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt @@ -0,0 +1,58 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class RvcOperationalStateClusterOperationalErrorEvent( + val errorState: chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct +) { + override fun toString(): String = buildString { + append("RvcOperationalStateClusterOperationalErrorEvent {\n") + append("\terrorState : $errorState\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + errorState.toTlv(ContextSpecificTag(TAG_ERROR_STATE), this) + endStructure() + } + } + + companion object { + private const val TAG_ERROR_STATE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterOperationalErrorEvent { + tlvReader.enterStructure(tag) + val errorState = + chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct.fromTlv( + ContextSpecificTag(TAG_ERROR_STATE), + tlvReader + ) + + tlvReader.exitContainer() + + return RvcOperationalStateClusterOperationalErrorEvent(errorState) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt new file mode 100644 index 00000000000000..2bc948e2a667b1 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SmokeCoAlarmClusterCOAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { + append("SmokeCoAlarmClusterCOAlarmEvent {\n") + append("\talarmSeverityLevel : $alarmSeverityLevel\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_SEVERITY_LEVEL = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterCOAlarmEvent { + tlvReader.enterStructure(tag) + val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + + tlvReader.exitContainer() + + return SmokeCoAlarmClusterCOAlarmEvent(alarmSeverityLevel) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt new file mode 100644 index 00000000000000..19223606c4685d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SmokeCoAlarmClusterInterconnectCOAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { + append("SmokeCoAlarmClusterInterconnectCOAlarmEvent {\n") + append("\talarmSeverityLevel : $alarmSeverityLevel\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_SEVERITY_LEVEL = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectCOAlarmEvent { + tlvReader.enterStructure(tag) + val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + + tlvReader.exitContainer() + + return SmokeCoAlarmClusterInterconnectCOAlarmEvent(alarmSeverityLevel) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt new file mode 100644 index 00000000000000..38e2fe872915f7 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { + append("SmokeCoAlarmClusterInterconnectSmokeAlarmEvent {\n") + append("\talarmSeverityLevel : $alarmSeverityLevel\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_SEVERITY_LEVEL = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { + tlvReader.enterStructure(tag) + val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + + tlvReader.exitContainer() + + return SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(alarmSeverityLevel) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt new file mode 100644 index 00000000000000..ce2d9ad47341d0 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SmokeCoAlarmClusterLowBatteryEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { + append("SmokeCoAlarmClusterLowBatteryEvent {\n") + append("\talarmSeverityLevel : $alarmSeverityLevel\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_SEVERITY_LEVEL = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterLowBatteryEvent { + tlvReader.enterStructure(tag) + val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + + tlvReader.exitContainer() + + return SmokeCoAlarmClusterLowBatteryEvent(alarmSeverityLevel) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt new file mode 100644 index 00000000000000..324a5d4461a225 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SmokeCoAlarmClusterSmokeAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { + append("SmokeCoAlarmClusterSmokeAlarmEvent {\n") + append("\talarmSeverityLevel : $alarmSeverityLevel\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_SEVERITY_LEVEL = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterSmokeAlarmEvent { + tlvReader.enterStructure(tag) + val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + + tlvReader.exitContainer() + + return SmokeCoAlarmClusterSmokeAlarmEvent(alarmSeverityLevel) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt new file mode 100644 index 00000000000000..50b455842e538f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt @@ -0,0 +1,81 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class SoftwareDiagnosticsClusterSoftwareFaultEvent( + val id: Long, + val name: Optional, + val faultRecording: Optional +) { + override fun toString(): String = buildString { + append("SoftwareDiagnosticsClusterSoftwareFaultEvent {\n") + append("\tid : $id\n") + append("\tname : $name\n") + append("\tfaultRecording : $faultRecording\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ID), id) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + if (faultRecording.isPresent) { + val optfaultRecording = faultRecording.get() + put(ContextSpecificTag(TAG_FAULT_RECORDING), optfaultRecording) + } + endStructure() + } + } + + companion object { + private const val TAG_ID = 0 + private const val TAG_NAME = 1 + private const val TAG_FAULT_RECORDING = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterSoftwareFaultEvent { + tlvReader.enterStructure(tag) + val id = tlvReader.getLong(ContextSpecificTag(TAG_ID)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val faultRecording = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_FAULT_RECORDING))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_FAULT_RECORDING))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return SoftwareDiagnosticsClusterSoftwareFaultEvent(id, name, faultRecording) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt new file mode 100644 index 00000000000000..893412c1f25322 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SwitchClusterInitialPressEvent(val newPosition: Int) { + override fun toString(): String = buildString { + append("SwitchClusterInitialPressEvent {\n") + append("\tnewPosition : $newPosition\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) + endStructure() + } + } + + companion object { + private const val TAG_NEW_POSITION = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterInitialPressEvent { + tlvReader.enterStructure(tag) + val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) + + tlvReader.exitContainer() + + return SwitchClusterInitialPressEvent(newPosition) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt new file mode 100644 index 00000000000000..3fa420f46ddec3 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SwitchClusterLongPressEvent(val newPosition: Int) { + override fun toString(): String = buildString { + append("SwitchClusterLongPressEvent {\n") + append("\tnewPosition : $newPosition\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) + endStructure() + } + } + + companion object { + private const val TAG_NEW_POSITION = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterLongPressEvent { + tlvReader.enterStructure(tag) + val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) + + tlvReader.exitContainer() + + return SwitchClusterLongPressEvent(newPosition) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt new file mode 100644 index 00000000000000..eb90698fc735ab --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SwitchClusterLongReleaseEvent(val previousPosition: Int) { + override fun toString(): String = buildString { + append("SwitchClusterLongReleaseEvent {\n") + append("\tpreviousPosition : $previousPosition\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PREVIOUS_POSITION), previousPosition) + endStructure() + } + } + + companion object { + private const val TAG_PREVIOUS_POSITION = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterLongReleaseEvent { + tlvReader.enterStructure(tag) + val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) + + tlvReader.exitContainer() + + return SwitchClusterLongReleaseEvent(previousPosition) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt new file mode 100644 index 00000000000000..81141e17424fbb --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SwitchClusterMultiPressCompleteEvent( + val previousPosition: Int, + val totalNumberOfPressesCounted: Int +) { + override fun toString(): String = buildString { + append("SwitchClusterMultiPressCompleteEvent {\n") + append("\tpreviousPosition : $previousPosition\n") + append("\ttotalNumberOfPressesCounted : $totalNumberOfPressesCounted\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PREVIOUS_POSITION), previousPosition) + put(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED), totalNumberOfPressesCounted) + endStructure() + } + } + + companion object { + private const val TAG_PREVIOUS_POSITION = 0 + private const val TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressCompleteEvent { + tlvReader.enterStructure(tag) + val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) + val totalNumberOfPressesCounted = + tlvReader.getInt(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) + + tlvReader.exitContainer() + + return SwitchClusterMultiPressCompleteEvent(previousPosition, totalNumberOfPressesCounted) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt new file mode 100644 index 00000000000000..11fab26fdfce8e --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SwitchClusterMultiPressOngoingEvent( + val newPosition: Int, + val currentNumberOfPressesCounted: Int +) { + override fun toString(): String = buildString { + append("SwitchClusterMultiPressOngoingEvent {\n") + append("\tnewPosition : $newPosition\n") + append("\tcurrentNumberOfPressesCounted : $currentNumberOfPressesCounted\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) + put(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED), currentNumberOfPressesCounted) + endStructure() + } + } + + companion object { + private const val TAG_NEW_POSITION = 0 + private const val TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressOngoingEvent { + tlvReader.enterStructure(tag) + val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) + val currentNumberOfPressesCounted = + tlvReader.getInt(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) + + tlvReader.exitContainer() + + return SwitchClusterMultiPressOngoingEvent(newPosition, currentNumberOfPressesCounted) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt new file mode 100644 index 00000000000000..0eeb9e2841fd7c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SwitchClusterShortReleaseEvent(val previousPosition: Int) { + override fun toString(): String = buildString { + append("SwitchClusterShortReleaseEvent {\n") + append("\tpreviousPosition : $previousPosition\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PREVIOUS_POSITION), previousPosition) + endStructure() + } + } + + companion object { + private const val TAG_PREVIOUS_POSITION = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterShortReleaseEvent { + tlvReader.enterStructure(tag) + val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) + + tlvReader.exitContainer() + + return SwitchClusterShortReleaseEvent(previousPosition) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt new file mode 100644 index 00000000000000..2b921b37ac6c2b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class SwitchClusterSwitchLatchedEvent(val newPosition: Int) { + override fun toString(): String = buildString { + append("SwitchClusterSwitchLatchedEvent {\n") + append("\tnewPosition : $newPosition\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) + endStructure() + } + } + + companion object { + private const val TAG_NEW_POSITION = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterSwitchLatchedEvent { + tlvReader.enterStructure(tag) + val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) + + tlvReader.exitContainer() + + return SwitchClusterSwitchLatchedEvent(newPosition) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt new file mode 100644 index 00000000000000..ffdc72b1e54c89 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: Int) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterConnectionStatusEvent {\n") + append("\tconnectionStatus : $connectionStatus\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CONNECTION_STATUS), connectionStatus) + endStructure() + } + } + + companion object { + private const val TAG_CONNECTION_STATUS = 0 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterConnectionStatusEvent { + tlvReader.enterStructure(tag) + val connectionStatus = tlvReader.getInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt new file mode 100644 index 00000000000000..f9110c39fa1d40 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt new file mode 100644 index 00000000000000..53090f750b4e06 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class TimeSynchronizationClusterDSTStatusEvent(val DSTOffsetActive: Boolean) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterDSTStatusEvent {\n") + append("\tDSTOffsetActive : $DSTOffsetActive\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_D_S_T_OFFSET_ACTIVE), DSTOffsetActive) + endStructure() + } + } + + companion object { + private const val TAG_D_S_T_OFFSET_ACTIVE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTStatusEvent { + tlvReader.enterStructure(tag) + val DSTOffsetActive = tlvReader.getBoolean(ContextSpecificTag(TAG_D_S_T_OFFSET_ACTIVE)) + + tlvReader.exitContainer() + + return TimeSynchronizationClusterDSTStatusEvent(DSTOffsetActive) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt new file mode 100644 index 00000000000000..452e9d902c4767 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class TimeSynchronizationClusterTimeZoneStatusEvent(val offset: Long, val name: Optional) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterTimeZoneStatusEvent {\n") + append("\toffset : $offset\n") + append("\tname : $name\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_OFFSET), offset) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + endStructure() + } + } + + companion object { + private const val TAG_OFFSET = 0 + private const val TAG_NAME = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStatusEvent { + tlvReader.enterStructure(tag) + val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return TimeSynchronizationClusterTimeZoneStatusEvent(offset, name) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt new file mode 100644 index 00000000000000..8c2e410ab80f6d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt @@ -0,0 +1,111 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UnitTestingClusterTestEventEvent( + val arg1: Int, + val arg2: Int, + val arg3: Boolean, + val arg4: chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct, + val arg5: List, + val arg6: List +) { + override fun toString(): String = buildString { + append("UnitTestingClusterTestEventEvent {\n") + append("\targ1 : $arg1\n") + append("\targ2 : $arg2\n") + append("\targ3 : $arg3\n") + append("\targ4 : $arg4\n") + append("\targ5 : $arg5\n") + append("\targ6 : $arg6\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ARG1), arg1) + put(ContextSpecificTag(TAG_ARG2), arg2) + put(ContextSpecificTag(TAG_ARG3), arg3) + arg4.toTlv(ContextSpecificTag(TAG_ARG4), this) + startList(ContextSpecificTag(TAG_ARG5)) + for (item in arg5.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + startList(ContextSpecificTag(TAG_ARG6)) + for (item in arg6.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_ARG1 = 1 + private const val TAG_ARG2 = 2 + private const val TAG_ARG3 = 3 + private const val TAG_ARG4 = 4 + private const val TAG_ARG5 = 5 + private const val TAG_ARG6 = 6 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestEventEvent { + tlvReader.enterStructure(tag) + val arg1 = tlvReader.getInt(ContextSpecificTag(TAG_ARG1)) + val arg2 = tlvReader.getInt(ContextSpecificTag(TAG_ARG2)) + val arg3 = tlvReader.getBoolean(ContextSpecificTag(TAG_ARG3)) + val arg4 = + chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_ARG4), + tlvReader + ) + val arg5 = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ARG5)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + val arg6 = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ARG6)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return UnitTestingClusterTestEventEvent(arg1, arg2, arg3, arg4, arg5, arg6) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt new file mode 100644 index 00000000000000..d746c65d5ea1f1 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UnitTestingClusterTestFabricScopedEventEvent(val fabricIndex: Int) { + override fun toString(): String = buildString { + append("UnitTestingClusterTestFabricScopedEventEvent {\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScopedEventEvent { + tlvReader.enterStructure(tag) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return UnitTestingClusterTestFabricScopedEventEvent(fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt new file mode 100644 index 00000000000000..087484ef1bfa7b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt @@ -0,0 +1,62 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( + val associationFailure: Int, + val status: Int +) { + override fun toString(): String = buildString { + append("WiFiNetworkDiagnosticsClusterAssociationFailureEvent {\n") + append("\tassociationFailure : $associationFailure\n") + append("\tstatus : $status\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ASSOCIATION_FAILURE), associationFailure) + put(ContextSpecificTag(TAG_STATUS), status) + endStructure() + } + } + + companion object { + private const val TAG_ASSOCIATION_FAILURE = 0 + private const val TAG_STATUS = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): WiFiNetworkDiagnosticsClusterAssociationFailureEvent { + tlvReader.enterStructure(tag) + val associationFailure = tlvReader.getInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE)) + val status = tlvReader.getInt(ContextSpecificTag(TAG_STATUS)) + + tlvReader.exitContainer() + + return WiFiNetworkDiagnosticsClusterAssociationFailureEvent(associationFailure, status) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt new file mode 100644 index 00000000000000..3599597c99b152 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class WiFiNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: Int) { + override fun toString(): String = buildString { + append("WiFiNetworkDiagnosticsClusterConnectionStatusEvent {\n") + append("\tconnectionStatus : $connectionStatus\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CONNECTION_STATUS), connectionStatus) + endStructure() + } + } + + companion object { + private const val TAG_CONNECTION_STATUS = 0 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): WiFiNetworkDiagnosticsClusterConnectionStatusEvent { + tlvReader.enterStructure(tag) + val connectionStatus = tlvReader.getInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) + + tlvReader.exitContainer() + + return WiFiNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt new file mode 100644 index 00000000000000..6d54ae4f2bfdcd --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class WiFiNetworkDiagnosticsClusterDisconnectionEvent(val reasonCode: Int) { + override fun toString(): String = buildString { + append("WiFiNetworkDiagnosticsClusterDisconnectionEvent {\n") + append("\treasonCode : $reasonCode\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_REASON_CODE), reasonCode) + endStructure() + } + } + + companion object { + private const val TAG_REASON_CODE = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): WiFiNetworkDiagnosticsClusterDisconnectionEvent { + tlvReader.enterStructure(tag) + val reasonCode = tlvReader.getInt(ContextSpecificTag(TAG_REASON_CODE)) + + tlvReader.exitContainer() + + return WiFiNetworkDiagnosticsClusterDisconnectionEvent(reasonCode) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt new file mode 100644 index 00000000000000..6daac4451c1833 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt @@ -0,0 +1,121 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class AccessControlClusterAccessControlEntryStruct( + val privilege: Int, + val authMode: Int, + val subjects: List?, + val targets: List?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("AccessControlClusterAccessControlEntryStruct {\n") + append("\tprivilege : $privilege\n") + append("\tauthMode : $authMode\n") + append("\tsubjects : $subjects\n") + append("\ttargets : $targets\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRIVILEGE), privilege) + put(ContextSpecificTag(TAG_AUTH_MODE), authMode) + if (subjects != null) { + startList(ContextSpecificTag(TAG_SUBJECTS)) + for (item in subjects.iterator()) { + put(AnonymousTag, item) + } + endList() + } else { + putNull(ContextSpecificTag(TAG_SUBJECTS)) + } + if (targets != null) { + startList(ContextSpecificTag(TAG_TARGETS)) + for (item in targets.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + } else { + putNull(ContextSpecificTag(TAG_TARGETS)) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_PRIVILEGE = 1 + private const val TAG_AUTH_MODE = 2 + private const val TAG_SUBJECTS = 3 + private const val TAG_TARGETS = 4 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlEntryStruct { + tlvReader.enterStructure(tag) + val privilege = tlvReader.getInt(ContextSpecificTag(TAG_PRIVILEGE)) + val authMode = tlvReader.getInt(ContextSpecificTag(TAG_AUTH_MODE)) + val subjects = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_SUBJECTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getLong(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SUBJECTS)) + null + } + val targets = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_TARGETS)) + while (!tlvReader.isEndOfContainer()) { + add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) + null + } + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return AccessControlClusterAccessControlEntryStruct( + privilege, + authMode, + subjects, + targets, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt new file mode 100644 index 00000000000000..4a1d95221d816c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class AccessControlClusterAccessControlExtensionStruct(val data: ByteArray, val fabricIndex: Int) { + override fun toString(): String = buildString { + append("AccessControlClusterAccessControlExtensionStruct {\n") + append("\tdata : $data\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_DATA), data) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_DATA = 1 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlExtensionStruct { + tlvReader.enterStructure(tag) + val data = tlvReader.getByteArray(ContextSpecificTag(TAG_DATA)) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return AccessControlClusterAccessControlExtensionStruct(data, fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt new file mode 100644 index 00000000000000..e721aa3fefe91d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt @@ -0,0 +1,94 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class AccessControlClusterAccessControlTargetStruct( + val cluster: Long?, + val endpoint: Int?, + val deviceType: Long? +) { + override fun toString(): String = buildString { + append("AccessControlClusterAccessControlTargetStruct {\n") + append("\tcluster : $cluster\n") + append("\tendpoint : $endpoint\n") + append("\tdeviceType : $deviceType\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (cluster != null) { + put(ContextSpecificTag(TAG_CLUSTER), cluster) + } else { + putNull(ContextSpecificTag(TAG_CLUSTER)) + } + if (endpoint != null) { + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + } else { + putNull(ContextSpecificTag(TAG_ENDPOINT)) + } + if (deviceType != null) { + put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) + } else { + putNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + } + endStructure() + } + } + + companion object { + private const val TAG_CLUSTER = 0 + private const val TAG_ENDPOINT = 1 + private const val TAG_DEVICE_TYPE = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlTargetStruct { + tlvReader.enterStructure(tag) + val cluster = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) + null + } + val endpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) + null + } + val deviceType = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + null + } + + tlvReader.exitContainer() + + return AccessControlClusterAccessControlTargetStruct(cluster, endpoint, deviceType) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt new file mode 100644 index 00000000000000..2ed7a3f08152be --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt @@ -0,0 +1,86 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ActionsClusterActionStruct( + val actionID: Int, + val name: String, + val type: Int, + val endpointListID: Int, + val supportedCommands: Int, + val state: Int +) { + override fun toString(): String = buildString { + append("ActionsClusterActionStruct {\n") + append("\tactionID : $actionID\n") + append("\tname : $name\n") + append("\ttype : $type\n") + append("\tendpointListID : $endpointListID\n") + append("\tsupportedCommands : $supportedCommands\n") + append("\tstate : $state\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ACTION_I_D), actionID) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_TYPE), type) + put(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D), endpointListID) + put(ContextSpecificTag(TAG_SUPPORTED_COMMANDS), supportedCommands) + put(ContextSpecificTag(TAG_STATE), state) + endStructure() + } + } + + companion object { + private const val TAG_ACTION_I_D = 0 + private const val TAG_NAME = 1 + private const val TAG_TYPE = 2 + private const val TAG_ENDPOINT_LIST_I_D = 3 + private const val TAG_SUPPORTED_COMMANDS = 4 + private const val TAG_STATE = 5 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterActionStruct { + tlvReader.enterStructure(tag) + val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) + val endpointListID = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) + val supportedCommands = tlvReader.getInt(ContextSpecificTag(TAG_SUPPORTED_COMMANDS)) + val state = tlvReader.getInt(ContextSpecificTag(TAG_STATE)) + + tlvReader.exitContainer() + + return ActionsClusterActionStruct( + actionID, + name, + type, + endpointListID, + supportedCommands, + state + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt new file mode 100644 index 00000000000000..b714e693156957 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt @@ -0,0 +1,81 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ActionsClusterEndpointListStruct( + val endpointListID: Int, + val name: String, + val type: Int, + val endpoints: List +) { + override fun toString(): String = buildString { + append("ActionsClusterEndpointListStruct {\n") + append("\tendpointListID : $endpointListID\n") + append("\tname : $name\n") + append("\ttype : $type\n") + append("\tendpoints : $endpoints\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D), endpointListID) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_TYPE), type) + startList(ContextSpecificTag(TAG_ENDPOINTS)) + for (item in endpoints.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_ENDPOINT_LIST_I_D = 0 + private const val TAG_NAME = 1 + private const val TAG_TYPE = 2 + private const val TAG_ENDPOINTS = 3 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterEndpointListStruct { + tlvReader.enterStructure(tag) + val endpointListID = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) + val endpoints = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ActionsClusterEndpointListStruct(endpointListID, name, type, endpoints) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..68a44d37dfff0f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("ActivatedCarbonFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt new file mode 100644 index 00000000000000..21649a8ecc73df --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt @@ -0,0 +1,59 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ApplicationBasicClusterApplicationStruct( + val catalogVendorID: Int, + val applicationID: String +) { + override fun toString(): String = buildString { + append("ApplicationBasicClusterApplicationStruct {\n") + append("\tcatalogVendorID : $catalogVendorID\n") + append("\tapplicationID : $applicationID\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D), catalogVendorID) + put(ContextSpecificTag(TAG_APPLICATION_I_D), applicationID) + endStructure() + } + } + + companion object { + private const val TAG_CATALOG_VENDOR_I_D = 0 + private const val TAG_APPLICATION_I_D = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationBasicClusterApplicationStruct { + tlvReader.enterStructure(tag) + val catalogVendorID = tlvReader.getInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) + val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) + + tlvReader.exitContainer() + + return ApplicationBasicClusterApplicationStruct(catalogVendorID, applicationID) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt new file mode 100644 index 00000000000000..f710204737cb52 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt @@ -0,0 +1,72 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class ApplicationLauncherClusterApplicationEPStruct( + val application: ApplicationLauncherClusterApplicationStruct, + val endpoint: Optional +) { + override fun toString(): String = buildString { + append("ApplicationLauncherClusterApplicationEPStruct {\n") + append("\tapplication : $application\n") + append("\tendpoint : $endpoint\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + application.toTlv(ContextSpecificTag(TAG_APPLICATION), this) + if (endpoint.isPresent) { + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } + endStructure() + } + } + + companion object { + private const val TAG_APPLICATION = 0 + private const val TAG_ENDPOINT = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationEPStruct { + tlvReader.enterStructure(tag) + val application = + ApplicationLauncherClusterApplicationStruct.fromTlv( + ContextSpecificTag(TAG_APPLICATION), + tlvReader + ) + val endpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ApplicationLauncherClusterApplicationEPStruct(application, endpoint) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt new file mode 100644 index 00000000000000..68e78e31084c04 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt @@ -0,0 +1,59 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ApplicationLauncherClusterApplicationStruct( + val catalogVendorID: Int, + val applicationID: String +) { + override fun toString(): String = buildString { + append("ApplicationLauncherClusterApplicationStruct {\n") + append("\tcatalogVendorID : $catalogVendorID\n") + append("\tapplicationID : $applicationID\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D), catalogVendorID) + put(ContextSpecificTag(TAG_APPLICATION_I_D), applicationID) + endStructure() + } + } + + companion object { + private const val TAG_CATALOG_VENDOR_I_D = 0 + private const val TAG_APPLICATION_I_D = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationStruct { + tlvReader.enterStructure(tag) + val catalogVendorID = tlvReader.getInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) + val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) + + tlvReader.exitContainer() + + return ApplicationLauncherClusterApplicationStruct(catalogVendorID, applicationID) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt new file mode 100644 index 00000000000000..aef8596f19a83c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class AudioOutputClusterOutputInfoStruct(val index: Int, val outputType: Int, val name: String) { + override fun toString(): String = buildString { + append("AudioOutputClusterOutputInfoStruct {\n") + append("\tindex : $index\n") + append("\toutputType : $outputType\n") + append("\tname : $name\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_INDEX), index) + put(ContextSpecificTag(TAG_OUTPUT_TYPE), outputType) + put(ContextSpecificTag(TAG_NAME), name) + endStructure() + } + } + + companion object { + private const val TAG_INDEX = 0 + private const val TAG_OUTPUT_TYPE = 1 + private const val TAG_NAME = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): AudioOutputClusterOutputInfoStruct { + tlvReader.enterStructure(tag) + val index = tlvReader.getInt(ContextSpecificTag(TAG_INDEX)) + val outputType = tlvReader.getInt(ContextSpecificTag(TAG_OUTPUT_TYPE)) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + + tlvReader.exitContainer() + + return AudioOutputClusterOutputInfoStruct(index, outputType, name) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt new file mode 100644 index 00000000000000..e4f323b6321541 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt @@ -0,0 +1,63 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BasicInformationClusterCapabilityMinimaStruct( + val caseSessionsPerFabric: Int, + val subscriptionsPerFabric: Int +) { + override fun toString(): String = buildString { + append("BasicInformationClusterCapabilityMinimaStruct {\n") + append("\tcaseSessionsPerFabric : $caseSessionsPerFabric\n") + append("\tsubscriptionsPerFabric : $subscriptionsPerFabric\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC), caseSessionsPerFabric) + put(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC), subscriptionsPerFabric) + endStructure() + } + } + + companion object { + private const val TAG_CASE_SESSIONS_PER_FABRIC = 0 + private const val TAG_SUBSCRIPTIONS_PER_FABRIC = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterCapabilityMinimaStruct { + tlvReader.enterStructure(tag) + val caseSessionsPerFabric = tlvReader.getInt(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC)) + val subscriptionsPerFabric = + tlvReader.getInt(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) + + tlvReader.exitContainer() + + return BasicInformationClusterCapabilityMinimaStruct( + caseSessionsPerFabric, + subscriptionsPerFabric + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt new file mode 100644 index 00000000000000..3678494c7b90fb --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BasicInformationClusterProductAppearanceStruct(val finish: Int, val primaryColor: Int?) { + override fun toString(): String = buildString { + append("BasicInformationClusterProductAppearanceStruct {\n") + append("\tfinish : $finish\n") + append("\tprimaryColor : $primaryColor\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_FINISH), finish) + if (primaryColor != null) { + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } + endStructure() + } + } + + companion object { + private const val TAG_FINISH = 0 + private const val TAG_PRIMARY_COLOR = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterProductAppearanceStruct { + tlvReader.enterStructure(tag) + val finish = tlvReader.getInt(ContextSpecificTag(TAG_FINISH)) + val primaryColor = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + + tlvReader.exitContainer() + + return BasicInformationClusterProductAppearanceStruct(finish, primaryColor) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt new file mode 100644 index 00000000000000..8ab0146b8e95f3 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt @@ -0,0 +1,107 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class BindingClusterTargetStruct( + val node: Optional, + val group: Optional, + val endpoint: Optional, + val cluster: Optional, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("BindingClusterTargetStruct {\n") + append("\tnode : $node\n") + append("\tgroup : $group\n") + append("\tendpoint : $endpoint\n") + append("\tcluster : $cluster\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (node.isPresent) { + val optnode = node.get() + put(ContextSpecificTag(TAG_NODE), optnode) + } + if (group.isPresent) { + val optgroup = group.get() + put(ContextSpecificTag(TAG_GROUP), optgroup) + } + if (endpoint.isPresent) { + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } + if (cluster.isPresent) { + val optcluster = cluster.get() + put(ContextSpecificTag(TAG_CLUSTER), optcluster) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_NODE = 1 + private const val TAG_GROUP = 2 + private const val TAG_ENDPOINT = 3 + private const val TAG_CLUSTER = 4 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): BindingClusterTargetStruct { + tlvReader.enterStructure(tag) + val node = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NODE))) + } else { + Optional.empty() + } + val group = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_GROUP))) + } else { + Optional.empty() + } + val endpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + val cluster = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER))) + } else { + Optional.empty() + } + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return BindingClusterTargetStruct(node, group, endpoint, cluster, fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt new file mode 100644 index 00000000000000..d1426bc0828631 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt @@ -0,0 +1,72 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class BridgedDeviceBasicInformationClusterProductAppearanceStruct( + val finish: Int, + val primaryColor: Int? +) { + override fun toString(): String = buildString { + append("BridgedDeviceBasicInformationClusterProductAppearanceStruct {\n") + append("\tfinish : $finish\n") + append("\tprimaryColor : $primaryColor\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_FINISH), finish) + if (primaryColor != null) { + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } + endStructure() + } + } + + companion object { + private const val TAG_FINISH = 0 + private const val TAG_PRIMARY_COLOR = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): BridgedDeviceBasicInformationClusterProductAppearanceStruct { + tlvReader.enterStructure(tag) + val finish = tlvReader.getInt(ContextSpecificTag(TAG_FINISH)) + val primaryColor = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + + tlvReader.exitContainer() + + return BridgedDeviceBasicInformationClusterProductAppearanceStruct(finish, primaryColor) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CeramicFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CeramicFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..391f4d7ed01f40 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CeramicFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class CeramicFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("CeramicFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): CeramicFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return CeramicFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt new file mode 100644 index 00000000000000..9d10bf6f24e5fa --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt @@ -0,0 +1,105 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class ChannelClusterChannelInfoStruct( + val majorNumber: Int, + val minorNumber: Int, + val name: Optional, + val callSign: Optional, + val affiliateCallSign: Optional +) { + override fun toString(): String = buildString { + append("ChannelClusterChannelInfoStruct {\n") + append("\tmajorNumber : $majorNumber\n") + append("\tminorNumber : $minorNumber\n") + append("\tname : $name\n") + append("\tcallSign : $callSign\n") + append("\taffiliateCallSign : $affiliateCallSign\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_MAJOR_NUMBER), majorNumber) + put(ContextSpecificTag(TAG_MINOR_NUMBER), minorNumber) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + if (callSign.isPresent) { + val optcallSign = callSign.get() + put(ContextSpecificTag(TAG_CALL_SIGN), optcallSign) + } + if (affiliateCallSign.isPresent) { + val optaffiliateCallSign = affiliateCallSign.get() + put(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN), optaffiliateCallSign) + } + endStructure() + } + } + + companion object { + private const val TAG_MAJOR_NUMBER = 0 + private const val TAG_MINOR_NUMBER = 1 + private const val TAG_NAME = 2 + private const val TAG_CALL_SIGN = 3 + private const val TAG_AFFILIATE_CALL_SIGN = 4 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ChannelClusterChannelInfoStruct { + tlvReader.enterStructure(tag) + val majorNumber = tlvReader.getInt(ContextSpecificTag(TAG_MAJOR_NUMBER)) + val minorNumber = tlvReader.getInt(ContextSpecificTag(TAG_MINOR_NUMBER)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val callSign = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CALL_SIGN))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CALL_SIGN))) + } else { + Optional.empty() + } + val affiliateCallSign = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ChannelClusterChannelInfoStruct( + majorNumber, + minorNumber, + name, + callSign, + affiliateCallSign + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt new file mode 100644 index 00000000000000..edc8f9157db120 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt @@ -0,0 +1,86 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class ChannelClusterLineupInfoStruct( + val operatorName: String, + val lineupName: Optional, + val postalCode: Optional, + val lineupInfoType: Int +) { + override fun toString(): String = buildString { + append("ChannelClusterLineupInfoStruct {\n") + append("\toperatorName : $operatorName\n") + append("\tlineupName : $lineupName\n") + append("\tpostalCode : $postalCode\n") + append("\tlineupInfoType : $lineupInfoType\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_OPERATOR_NAME), operatorName) + if (lineupName.isPresent) { + val optlineupName = lineupName.get() + put(ContextSpecificTag(TAG_LINEUP_NAME), optlineupName) + } + if (postalCode.isPresent) { + val optpostalCode = postalCode.get() + put(ContextSpecificTag(TAG_POSTAL_CODE), optpostalCode) + } + put(ContextSpecificTag(TAG_LINEUP_INFO_TYPE), lineupInfoType) + endStructure() + } + } + + companion object { + private const val TAG_OPERATOR_NAME = 0 + private const val TAG_LINEUP_NAME = 1 + private const val TAG_POSTAL_CODE = 2 + private const val TAG_LINEUP_INFO_TYPE = 3 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ChannelClusterLineupInfoStruct { + tlvReader.enterStructure(tag) + val operatorName = tlvReader.getString(ContextSpecificTag(TAG_OPERATOR_NAME)) + val lineupName = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LINEUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LINEUP_NAME))) + } else { + Optional.empty() + } + val postalCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTAL_CODE))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTAL_CODE))) + } else { + Optional.empty() + } + val lineupInfoType = tlvReader.getInt(ContextSpecificTag(TAG_LINEUP_INFO_TYPE)) + + tlvReader.exitContainer() + + return ChannelClusterLineupInfoStruct(operatorName, lineupName, postalCode, lineupInfoType) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt new file mode 100644 index 00000000000000..0e1ebee9f97df2 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ContentLauncherClusterAdditionalInfoStruct(val name: String, val value: String) { + override fun toString(): String = buildString { + append("ContentLauncherClusterAdditionalInfoStruct {\n") + append("\tname : $name\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_NAME = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterAdditionalInfoStruct { + tlvReader.enterStructure(tag) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return ContentLauncherClusterAdditionalInfoStruct(name, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt new file mode 100644 index 00000000000000..5f4719e9c00ef8 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt @@ -0,0 +1,152 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class ContentLauncherClusterBrandingInformationStruct( + val providerName: String, + val background: Optional, + val logo: Optional, + val progressBar: Optional, + val splash: Optional, + val waterMark: Optional +) { + override fun toString(): String = buildString { + append("ContentLauncherClusterBrandingInformationStruct {\n") + append("\tproviderName : $providerName\n") + append("\tbackground : $background\n") + append("\tlogo : $logo\n") + append("\tprogressBar : $progressBar\n") + append("\tsplash : $splash\n") + append("\twaterMark : $waterMark\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PROVIDER_NAME), providerName) + if (background.isPresent) { + val optbackground = background.get() + optbackground.toTlv(ContextSpecificTag(TAG_BACKGROUND), this) + } + if (logo.isPresent) { + val optlogo = logo.get() + optlogo.toTlv(ContextSpecificTag(TAG_LOGO), this) + } + if (progressBar.isPresent) { + val optprogressBar = progressBar.get() + optprogressBar.toTlv(ContextSpecificTag(TAG_PROGRESS_BAR), this) + } + if (splash.isPresent) { + val optsplash = splash.get() + optsplash.toTlv(ContextSpecificTag(TAG_SPLASH), this) + } + if (waterMark.isPresent) { + val optwaterMark = waterMark.get() + optwaterMark.toTlv(ContextSpecificTag(TAG_WATER_MARK), this) + } + endStructure() + } + } + + companion object { + private const val TAG_PROVIDER_NAME = 0 + private const val TAG_BACKGROUND = 1 + private const val TAG_LOGO = 2 + private const val TAG_PROGRESS_BAR = 3 + private const val TAG_SPLASH = 4 + private const val TAG_WATER_MARK = 5 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterBrandingInformationStruct { + tlvReader.enterStructure(tag) + val providerName = tlvReader.getString(ContextSpecificTag(TAG_PROVIDER_NAME)) + val background = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_BACKGROUND))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_BACKGROUND), + tlvReader + ) + ) + } else { + Optional.empty() + } + val logo = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOGO))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_LOGO), + tlvReader + ) + ) + } else { + Optional.empty() + } + val progressBar = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PROGRESS_BAR))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_PROGRESS_BAR), + tlvReader + ) + ) + } else { + Optional.empty() + } + val splash = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPLASH))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_SPLASH), + tlvReader + ) + ) + } else { + Optional.empty() + } + val waterMark = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATER_MARK))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_WATER_MARK), + tlvReader + ) + ) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ContentLauncherClusterBrandingInformationStruct( + providerName, + background, + logo, + progressBar, + splash, + waterMark + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt new file mode 100644 index 00000000000000..9457b03907a4fb --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ContentLauncherClusterContentSearchStruct( + val parameterList: List +) { + override fun toString(): String = buildString { + append("ContentLauncherClusterContentSearchStruct {\n") + append("\tparameterList : $parameterList\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_PARAMETER_LIST)) + for (item in parameterList.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_PARAMETER_LIST = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterContentSearchStruct { + tlvReader.enterStructure(tag) + val parameterList = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PARAMETER_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ContentLauncherClusterContentSearchStruct(parameterList) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt new file mode 100644 index 00000000000000..a38245918bb476 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ContentLauncherClusterDimensionStruct( + val width: Double, + val height: Double, + val metric: Int +) { + override fun toString(): String = buildString { + append("ContentLauncherClusterDimensionStruct {\n") + append("\twidth : $width\n") + append("\theight : $height\n") + append("\tmetric : $metric\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_WIDTH), width) + put(ContextSpecificTag(TAG_HEIGHT), height) + put(ContextSpecificTag(TAG_METRIC), metric) + endStructure() + } + } + + companion object { + private const val TAG_WIDTH = 0 + private const val TAG_HEIGHT = 1 + private const val TAG_METRIC = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterDimensionStruct { + tlvReader.enterStructure(tag) + val width = tlvReader.getDouble(ContextSpecificTag(TAG_WIDTH)) + val height = tlvReader.getDouble(ContextSpecificTag(TAG_HEIGHT)) + val metric = tlvReader.getInt(ContextSpecificTag(TAG_METRIC)) + + tlvReader.exitContainer() + + return ContentLauncherClusterDimensionStruct(width, height, metric) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt new file mode 100644 index 00000000000000..caf0f99848c93c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt @@ -0,0 +1,86 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class ContentLauncherClusterParameterStruct( + val type: Int, + val value: String, + val externalIDList: Optional> +) { + override fun toString(): String = buildString { + append("ContentLauncherClusterParameterStruct {\n") + append("\ttype : $type\n") + append("\tvalue : $value\n") + append("\texternalIDList : $externalIDList\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_TYPE), type) + put(ContextSpecificTag(TAG_VALUE), value) + if (externalIDList.isPresent) { + val optexternalIDList = externalIDList.get() + startList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + for (item in optexternalIDList.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + } + endStructure() + } + } + + companion object { + private const val TAG_TYPE = 0 + private const val TAG_VALUE = 1 + private const val TAG_EXTERNAL_I_D_LIST = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterParameterStruct { + tlvReader.enterStructure(tag) + val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) + val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) + val externalIDList = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ContentLauncherClusterParameterStruct(type, value, externalIDList) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt new file mode 100644 index 00000000000000..d5e686bbb5ac45 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt @@ -0,0 +1,91 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class ContentLauncherClusterStyleInformationStruct( + val imageURL: Optional, + val color: Optional, + val size: Optional +) { + override fun toString(): String = buildString { + append("ContentLauncherClusterStyleInformationStruct {\n") + append("\timageURL : $imageURL\n") + append("\tcolor : $color\n") + append("\tsize : $size\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (imageURL.isPresent) { + val optimageURL = imageURL.get() + put(ContextSpecificTag(TAG_IMAGE_U_R_L), optimageURL) + } + if (color.isPresent) { + val optcolor = color.get() + put(ContextSpecificTag(TAG_COLOR), optcolor) + } + if (size.isPresent) { + val optsize = size.get() + optsize.toTlv(ContextSpecificTag(TAG_SIZE), this) + } + endStructure() + } + } + + companion object { + private const val TAG_IMAGE_U_R_L = 0 + private const val TAG_COLOR = 1 + private const val TAG_SIZE = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterStyleInformationStruct { + tlvReader.enterStructure(tag) + val imageURL = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_U_R_L))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IMAGE_U_R_L))) + } else { + Optional.empty() + } + val color = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) + } else { + Optional.empty() + } + val size = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SIZE))) { + Optional.of( + ContentLauncherClusterDimensionStruct.fromTlv(ContextSpecificTag(TAG_SIZE), tlvReader) + ) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ContentLauncherClusterStyleInformationStruct(imageURL, color, size) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt new file mode 100644 index 00000000000000..75fed36957e726 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class DescriptorClusterDeviceTypeStruct(val deviceType: Long, val revision: Int) { + override fun toString(): String = buildString { + append("DescriptorClusterDeviceTypeStruct {\n") + append("\tdeviceType : $deviceType\n") + append("\trevision : $revision\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) + put(ContextSpecificTag(TAG_REVISION), revision) + endStructure() + } + } + + companion object { + private const val TAG_DEVICE_TYPE = 0 + private const val TAG_REVISION = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DescriptorClusterDeviceTypeStruct { + tlvReader.enterStructure(tag) + val deviceType = tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) + val revision = tlvReader.getInt(ContextSpecificTag(TAG_REVISION)) + + tlvReader.exitContainer() + + return DescriptorClusterDeviceTypeStruct(deviceType, revision) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt new file mode 100644 index 00000000000000..abde881ccffcea --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt @@ -0,0 +1,97 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class DescriptorClusterSemanticTagStruct( + val mfgCode: Int?, + val namespaceID: Int, + val tag: Int, + val label: Optional? +) { + override fun toString(): String = buildString { + append("DescriptorClusterSemanticTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tnamespaceID : $namespaceID\n") + append("\ttag : $tag\n") + append("\tlabel : $label\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (mfgCode != null) { + put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) + } else { + putNull(ContextSpecificTag(TAG_MFG_CODE)) + } + put(ContextSpecificTag(TAG_NAMESPACE_I_D), namespaceID) + put(ContextSpecificTag(TAG_TAG), tag) + if (label != null) { + if (label.isPresent) { + val optlabel = label.get() + put(ContextSpecificTag(TAG_LABEL), optlabel) + } + } else { + putNull(ContextSpecificTag(TAG_LABEL)) + } + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_NAMESPACE_I_D = 1 + private const val TAG_TAG = 2 + private const val TAG_LABEL = 3 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DescriptorClusterSemanticTagStruct { + tlvReader.enterStructure(tag) + val mfgCode = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_MFG_CODE)) + null + } + val namespaceID = tlvReader.getInt(ContextSpecificTag(TAG_NAMESPACE_I_D)) + val tag = tlvReader.getInt(ContextSpecificTag(TAG_TAG)) + val label = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LABEL)) + null + } + + tlvReader.exitContainer() + + return DescriptorClusterSemanticTagStruct(mfgCode, namespaceID, tag, label) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..423d6a554672ce --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class DishwasherModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { + append("DishwasherModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startList(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeOptionStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return DishwasherModeClusterModeOptionStruct(label, mode, modeTags) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..33881f4ac00c8d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { + append("DishwasherModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeTagStruct { + tlvReader.enterStructure(tag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return DishwasherModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt new file mode 100644 index 00000000000000..da3a551267eb09 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class DoorLockClusterCredentialStruct(val credentialType: Int, val credentialIndex: Int) { + override fun toString(): String = buildString { + append("DoorLockClusterCredentialStruct {\n") + append("\tcredentialType : $credentialType\n") + append("\tcredentialIndex : $credentialIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CREDENTIAL_TYPE), credentialType) + put(ContextSpecificTag(TAG_CREDENTIAL_INDEX), credentialIndex) + endStructure() + } + } + + companion object { + private const val TAG_CREDENTIAL_TYPE = 0 + private const val TAG_CREDENTIAL_INDEX = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterCredentialStruct { + tlvReader.enterStructure(tag) + val credentialType = tlvReader.getInt(ContextSpecificTag(TAG_CREDENTIAL_TYPE)) + val credentialIndex = tlvReader.getInt(ContextSpecificTag(TAG_CREDENTIAL_INDEX)) + + tlvReader.exitContainer() + + return DoorLockClusterCredentialStruct(credentialType, credentialIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectrostaticFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectrostaticFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..4997a33f64aebd --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectrostaticFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ElectrostaticFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("ElectrostaticFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ElectrostaticFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return ElectrostaticFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt new file mode 100644 index 00000000000000..09292f726d9467 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class FixedLabelClusterLabelStruct(val label: String, val value: String) { + override fun toString(): String = buildString { + append("FixedLabelClusterLabelStruct {\n") + append("\tlabel : $label\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): FixedLabelClusterLabelStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return FixedLabelClusterLabelStruct(label, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FuelTankMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FuelTankMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..1df5be4e9e2320 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FuelTankMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,63 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class FuelTankMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("FuelTankMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): FuelTankMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return FuelTankMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt new file mode 100644 index 00000000000000..60d10b41112a9d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GeneralCommissioningClusterBasicCommissioningInfo( + val failSafeExpiryLengthSeconds: Int, + val maxCumulativeFailsafeSeconds: Int +) { + override fun toString(): String = buildString { + append("GeneralCommissioningClusterBasicCommissioningInfo {\n") + append("\tfailSafeExpiryLengthSeconds : $failSafeExpiryLengthSeconds\n") + append("\tmaxCumulativeFailsafeSeconds : $maxCumulativeFailsafeSeconds\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS), failSafeExpiryLengthSeconds) + put(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS), maxCumulativeFailsafeSeconds) + endStructure() + } + } + + companion object { + private const val TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS = 0 + private const val TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralCommissioningClusterBasicCommissioningInfo { + tlvReader.enterStructure(tag) + val failSafeExpiryLengthSeconds = + tlvReader.getInt(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS)) + val maxCumulativeFailsafeSeconds = + tlvReader.getInt(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS)) + + tlvReader.exitContainer() + + return GeneralCommissioningClusterBasicCommissioningInfo( + failSafeExpiryLengthSeconds, + maxCumulativeFailsafeSeconds + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt new file mode 100644 index 00000000000000..d4ff313520e65e --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt @@ -0,0 +1,147 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GeneralDiagnosticsClusterNetworkInterface( + val name: String, + val isOperational: Boolean, + val offPremiseServicesReachableIPv4: Boolean?, + val offPremiseServicesReachableIPv6: Boolean?, + val hardwareAddress: ByteArray, + val IPv4Addresses: List, + val IPv6Addresses: List, + val type: Int +) { + override fun toString(): String = buildString { + append("GeneralDiagnosticsClusterNetworkInterface {\n") + append("\tname : $name\n") + append("\tisOperational : $isOperational\n") + append("\toffPremiseServicesReachableIPv4 : $offPremiseServicesReachableIPv4\n") + append("\toffPremiseServicesReachableIPv6 : $offPremiseServicesReachableIPv6\n") + append("\thardwareAddress : $hardwareAddress\n") + append("\tIPv4Addresses : $IPv4Addresses\n") + append("\tIPv6Addresses : $IPv6Addresses\n") + append("\ttype : $type\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_IS_OPERATIONAL), isOperational) + if (offPremiseServicesReachableIPv4 != null) { + put( + ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4), + offPremiseServicesReachableIPv4 + ) + } else { + putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + } + if (offPremiseServicesReachableIPv6 != null) { + put( + ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6), + offPremiseServicesReachableIPv6 + ) + } else { + putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + } + put(ContextSpecificTag(TAG_HARDWARE_ADDRESS), hardwareAddress) + startList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) + for (item in IPv4Addresses.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) + for (item in IPv6Addresses.iterator()) { + put(AnonymousTag, item) + } + endList() + put(ContextSpecificTag(TAG_TYPE), type) + endStructure() + } + } + + companion object { + private const val TAG_NAME = 0 + private const val TAG_IS_OPERATIONAL = 1 + private const val TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4 = 2 + private const val TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6 = 3 + private const val TAG_HARDWARE_ADDRESS = 4 + private const val TAG_I_PV4_ADDRESSES = 5 + private const val TAG_I_PV6_ADDRESSES = 6 + private const val TAG_TYPE = 7 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkInterface { + tlvReader.enterStructure(tag) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val isOperational = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_OPERATIONAL)) + val offPremiseServicesReachableIPv4 = + if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + null + } + val offPremiseServicesReachableIPv6 = + if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + null + } + val hardwareAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_HARDWARE_ADDRESS)) + val IPv4Addresses = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val IPv6Addresses = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) + + tlvReader.exitContainer() + + return GeneralDiagnosticsClusterNetworkInterface( + name, + isOperational, + offPremiseServicesReachableIPv4, + offPremiseServicesReachableIPv6, + hardwareAddress, + IPv4Addresses, + IPv6Addresses, + type + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt new file mode 100644 index 00000000000000..6038b55d345b75 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt @@ -0,0 +1,90 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class GroupKeyManagementClusterGroupInfoMapStruct( + val groupId: Int, + val endpoints: List, + val groupName: Optional, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("GroupKeyManagementClusterGroupInfoMapStruct {\n") + append("\tgroupId : $groupId\n") + append("\tendpoints : $endpoints\n") + append("\tgroupName : $groupName\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_GROUP_ID), groupId) + startList(ContextSpecificTag(TAG_ENDPOINTS)) + for (item in endpoints.iterator()) { + put(AnonymousTag, item) + } + endList() + if (groupName.isPresent) { + val optgroupName = groupName.get() + put(ContextSpecificTag(TAG_GROUP_NAME), optgroupName) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_GROUP_ID = 1 + private const val TAG_ENDPOINTS = 2 + private const val TAG_GROUP_NAME = 3 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupInfoMapStruct { + tlvReader.enterStructure(tag) + val groupId = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_ID)) + val endpoints = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val groupName = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_GROUP_NAME))) + } else { + Optional.empty() + } + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return GroupKeyManagementClusterGroupInfoMapStruct(groupId, endpoints, groupName, fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt new file mode 100644 index 00000000000000..d565d70233abc2 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GroupKeyManagementClusterGroupKeyMapStruct( + val groupId: Int, + val groupKeySetID: Int, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("GroupKeyManagementClusterGroupKeyMapStruct {\n") + append("\tgroupId : $groupId\n") + append("\tgroupKeySetID : $groupKeySetID\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_GROUP_ID), groupId) + put(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D), groupKeySetID) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_GROUP_ID = 1 + private const val TAG_GROUP_KEY_SET_I_D = 2 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeyMapStruct { + tlvReader.enterStructure(tag) + val groupId = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_ID)) + val groupKeySetID = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return GroupKeyManagementClusterGroupKeyMapStruct(groupId, groupKeySetID, fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt new file mode 100644 index 00000000000000..418b6037ae46c9 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt @@ -0,0 +1,159 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class GroupKeyManagementClusterGroupKeySetStruct( + val groupKeySetID: Int, + val groupKeySecurityPolicy: Int, + val epochKey0: ByteArray?, + val epochStartTime0: Long?, + val epochKey1: ByteArray?, + val epochStartTime1: Long?, + val epochKey2: ByteArray?, + val epochStartTime2: Long? +) { + override fun toString(): String = buildString { + append("GroupKeyManagementClusterGroupKeySetStruct {\n") + append("\tgroupKeySetID : $groupKeySetID\n") + append("\tgroupKeySecurityPolicy : $groupKeySecurityPolicy\n") + append("\tepochKey0 : $epochKey0\n") + append("\tepochStartTime0 : $epochStartTime0\n") + append("\tepochKey1 : $epochKey1\n") + append("\tepochStartTime1 : $epochStartTime1\n") + append("\tepochKey2 : $epochKey2\n") + append("\tepochStartTime2 : $epochStartTime2\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D), groupKeySetID) + put(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY), groupKeySecurityPolicy) + if (epochKey0 != null) { + put(ContextSpecificTag(TAG_EPOCH_KEY0), epochKey0) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY0)) + } + if (epochStartTime0 != null) { + put(ContextSpecificTag(TAG_EPOCH_START_TIME0), epochStartTime0) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + } + if (epochKey1 != null) { + put(ContextSpecificTag(TAG_EPOCH_KEY1), epochKey1) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY1)) + } + if (epochStartTime1 != null) { + put(ContextSpecificTag(TAG_EPOCH_START_TIME1), epochStartTime1) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + } + if (epochKey2 != null) { + put(ContextSpecificTag(TAG_EPOCH_KEY2), epochKey2) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY2)) + } + if (epochStartTime2 != null) { + put(ContextSpecificTag(TAG_EPOCH_START_TIME2), epochStartTime2) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + } + endStructure() + } + } + + companion object { + private const val TAG_GROUP_KEY_SET_I_D = 0 + private const val TAG_GROUP_KEY_SECURITY_POLICY = 1 + private const val TAG_EPOCH_KEY0 = 2 + private const val TAG_EPOCH_START_TIME0 = 3 + private const val TAG_EPOCH_KEY1 = 4 + private const val TAG_EPOCH_START_TIME1 = 5 + private const val TAG_EPOCH_KEY2 = 6 + private const val TAG_EPOCH_START_TIME2 = 7 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeySetStruct { + tlvReader.enterStructure(tag) + val groupKeySetID = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) + val groupKeySecurityPolicy = + tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) + val epochKey0 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY0)) + null + } + val epochStartTime0 = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + null + } + val epochKey1 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY1)) + null + } + val epochStartTime1 = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + null + } + val epochKey2 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY2)) + null + } + val epochStartTime2 = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + null + } + + tlvReader.exitContainer() + + return GroupKeyManagementClusterGroupKeySetStruct( + groupKeySetID, + groupKeySecurityPolicy, + epochKey0, + epochStartTime0, + epochKey1, + epochStartTime1, + epochKey2, + epochStartTime2 + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..a86ba8db2dee0a --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class HepaFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("HepaFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): HepaFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return HepaFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt new file mode 100644 index 00000000000000..d380689bed016f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt @@ -0,0 +1,74 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class IcdManagementClusterMonitoringRegistrationStruct( + val checkInNodeID: Long, + val monitoredSubject: Long, + val key: ByteArray, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("IcdManagementClusterMonitoringRegistrationStruct {\n") + append("\tcheckInNodeID : $checkInNodeID\n") + append("\tmonitoredSubject : $monitoredSubject\n") + append("\tkey : $key\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CHECK_IN_NODE_I_D), checkInNodeID) + put(ContextSpecificTag(TAG_MONITORED_SUBJECT), monitoredSubject) + put(ContextSpecificTag(TAG_KEY), key) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_CHECK_IN_NODE_I_D = 1 + private const val TAG_MONITORED_SUBJECT = 2 + private const val TAG_KEY = 3 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): IcdManagementClusterMonitoringRegistrationStruct { + tlvReader.enterStructure(tag) + val checkInNodeID = tlvReader.getLong(ContextSpecificTag(TAG_CHECK_IN_NODE_I_D)) + val monitoredSubject = tlvReader.getLong(ContextSpecificTag(TAG_MONITORED_SUBJECT)) + val key = tlvReader.getByteArray(ContextSpecificTag(TAG_KEY)) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return IcdManagementClusterMonitoringRegistrationStruct( + checkInNodeID, + monitoredSubject, + key, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/InkCartridgeMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/InkCartridgeMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..114ffa845ce245 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/InkCartridgeMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class InkCartridgeMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("InkCartridgeMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): InkCartridgeMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return InkCartridgeMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IonizingFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IonizingFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..d90f06e6504f06 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IonizingFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class IonizingFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("IonizingFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): IonizingFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return IonizingFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..eeab9e95eb7cce --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class LaundryWasherModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { + append("LaundryWasherModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startList(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeOptionStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return LaundryWasherModeClusterModeOptionStruct(label, mode, modeTags) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..eed09912c26a9c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { + append("LaundryWasherModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeTagStruct { + tlvReader.enterStructure(tag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return LaundryWasherModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt new file mode 100644 index 00000000000000..514c05d19f6fdf --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class MediaInputClusterInputInfoStruct( + val index: Int, + val inputType: Int, + val name: String, + val description: String +) { + override fun toString(): String = buildString { + append("MediaInputClusterInputInfoStruct {\n") + append("\tindex : $index\n") + append("\tinputType : $inputType\n") + append("\tname : $name\n") + append("\tdescription : $description\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_INDEX), index) + put(ContextSpecificTag(TAG_INPUT_TYPE), inputType) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_DESCRIPTION), description) + endStructure() + } + } + + companion object { + private const val TAG_INDEX = 0 + private const val TAG_INPUT_TYPE = 1 + private const val TAG_NAME = 2 + private const val TAG_DESCRIPTION = 3 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): MediaInputClusterInputInfoStruct { + tlvReader.enterStructure(tag) + val index = tlvReader.getInt(ContextSpecificTag(TAG_INDEX)) + val inputType = tlvReader.getInt(ContextSpecificTag(TAG_INPUT_TYPE)) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val description = tlvReader.getString(ContextSpecificTag(TAG_DESCRIPTION)) + + tlvReader.exitContainer() + + return MediaInputClusterInputInfoStruct(index, inputType, name, description) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt new file mode 100644 index 00000000000000..d452d083a73112 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: Long, val position: Long?) { + override fun toString(): String = buildString { + append("MediaPlaybackClusterPlaybackPositionStruct {\n") + append("\tupdatedAt : $updatedAt\n") + append("\tposition : $position\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_UPDATED_AT), updatedAt) + if (position != null) { + put(ContextSpecificTag(TAG_POSITION), position) + } else { + putNull(ContextSpecificTag(TAG_POSITION)) + } + endStructure() + } + } + + companion object { + private const val TAG_UPDATED_AT = 0 + private const val TAG_POSITION = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): MediaPlaybackClusterPlaybackPositionStruct { + tlvReader.enterStructure(tag) + val updatedAt = tlvReader.getLong(ContextSpecificTag(TAG_UPDATED_AT)) + val position = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_POSITION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) + null + } + + tlvReader.exitContainer() + + return MediaPlaybackClusterPlaybackPositionStruct(updatedAt, position) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..ac95817519112f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ModeSelectClusterModeOptionStruct( + val label: String, + val mode: Int, + val semanticTags: List +) { + override fun toString(): String = buildString { + append("ModeSelectClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tsemanticTags : $semanticTags\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startList(ContextSpecificTag(TAG_SEMANTIC_TAGS)) + for (item in semanticTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_SEMANTIC_TAGS = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ModeSelectClusterModeOptionStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val semanticTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_SEMANTIC_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ModeSelectClusterModeOptionStruct(label, mode, semanticTags) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt new file mode 100644 index 00000000000000..04c893671659d3 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ModeSelectClusterSemanticTagStruct(val mfgCode: Int, val value: Int) { + override fun toString(): String = buildString { + append("ModeSelectClusterSemanticTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ModeSelectClusterSemanticTagStruct { + tlvReader.enterStructure(tag) + val mfgCode = tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) + val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return ModeSelectClusterSemanticTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt new file mode 100644 index 00000000000000..8b942f2a492dd1 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt @@ -0,0 +1,59 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class NetworkCommissioningClusterNetworkInfoStruct( + val networkID: ByteArray, + val connected: Boolean +) { + override fun toString(): String = buildString { + append("NetworkCommissioningClusterNetworkInfoStruct {\n") + append("\tnetworkID : $networkID\n") + append("\tconnected : $connected\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NETWORK_I_D), networkID) + put(ContextSpecificTag(TAG_CONNECTED), connected) + endStructure() + } + } + + companion object { + private const val TAG_NETWORK_I_D = 0 + private const val TAG_CONNECTED = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): NetworkCommissioningClusterNetworkInfoStruct { + tlvReader.enterStructure(tag) + val networkID = tlvReader.getByteArray(ContextSpecificTag(TAG_NETWORK_I_D)) + val connected = tlvReader.getBoolean(ContextSpecificTag(TAG_CONNECTED)) + + tlvReader.exitContainer() + + return NetworkCommissioningClusterNetworkInfoStruct(networkID, connected) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt new file mode 100644 index 00000000000000..76593b32131477 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt @@ -0,0 +1,101 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class NetworkCommissioningClusterThreadInterfaceScanResultStruct( + val panId: Int, + val extendedPanId: Long, + val networkName: String, + val channel: Int, + val version: Int, + val extendedAddress: ByteArray, + val rssi: Int, + val lqi: Int +) { + override fun toString(): String = buildString { + append("NetworkCommissioningClusterThreadInterfaceScanResultStruct {\n") + append("\tpanId : $panId\n") + append("\textendedPanId : $extendedPanId\n") + append("\tnetworkName : $networkName\n") + append("\tchannel : $channel\n") + append("\tversion : $version\n") + append("\textendedAddress : $extendedAddress\n") + append("\trssi : $rssi\n") + append("\tlqi : $lqi\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PAN_ID), panId) + put(ContextSpecificTag(TAG_EXTENDED_PAN_ID), extendedPanId) + put(ContextSpecificTag(TAG_NETWORK_NAME), networkName) + put(ContextSpecificTag(TAG_CHANNEL), channel) + put(ContextSpecificTag(TAG_VERSION), version) + put(ContextSpecificTag(TAG_EXTENDED_ADDRESS), extendedAddress) + put(ContextSpecificTag(TAG_RSSI), rssi) + put(ContextSpecificTag(TAG_LQI), lqi) + endStructure() + } + } + + companion object { + private const val TAG_PAN_ID = 0 + private const val TAG_EXTENDED_PAN_ID = 1 + private const val TAG_NETWORK_NAME = 2 + private const val TAG_CHANNEL = 3 + private const val TAG_VERSION = 4 + private const val TAG_EXTENDED_ADDRESS = 5 + private const val TAG_RSSI = 6 + private const val TAG_LQI = 7 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): NetworkCommissioningClusterThreadInterfaceScanResultStruct { + tlvReader.enterStructure(tag) + val panId = tlvReader.getInt(ContextSpecificTag(TAG_PAN_ID)) + val extendedPanId = tlvReader.getLong(ContextSpecificTag(TAG_EXTENDED_PAN_ID)) + val networkName = tlvReader.getString(ContextSpecificTag(TAG_NETWORK_NAME)) + val channel = tlvReader.getInt(ContextSpecificTag(TAG_CHANNEL)) + val version = tlvReader.getInt(ContextSpecificTag(TAG_VERSION)) + val extendedAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_EXTENDED_ADDRESS)) + val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) + val lqi = tlvReader.getInt(ContextSpecificTag(TAG_LQI)) + + tlvReader.exitContainer() + + return NetworkCommissioningClusterThreadInterfaceScanResultStruct( + panId, + extendedPanId, + networkName, + channel, + version, + extendedAddress, + rssi, + lqi + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt new file mode 100644 index 00000000000000..d2cf4bcf5b7cb0 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt @@ -0,0 +1,89 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( + val security: Int, + val ssid: ByteArray, + val bssid: ByteArray, + val channel: Int, + val wiFiBand: Int, + val rssi: Int +) { + override fun toString(): String = buildString { + append("NetworkCommissioningClusterWiFiInterfaceScanResultStruct {\n") + append("\tsecurity : $security\n") + append("\tssid : $ssid\n") + append("\tbssid : $bssid\n") + append("\tchannel : $channel\n") + append("\twiFiBand : $wiFiBand\n") + append("\trssi : $rssi\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_SECURITY), security) + put(ContextSpecificTag(TAG_SSID), ssid) + put(ContextSpecificTag(TAG_BSSID), bssid) + put(ContextSpecificTag(TAG_CHANNEL), channel) + put(ContextSpecificTag(TAG_WI_FI_BAND), wiFiBand) + put(ContextSpecificTag(TAG_RSSI), rssi) + endStructure() + } + } + + companion object { + private const val TAG_SECURITY = 0 + private const val TAG_SSID = 1 + private const val TAG_BSSID = 2 + private const val TAG_CHANNEL = 3 + private const val TAG_WI_FI_BAND = 4 + private const val TAG_RSSI = 5 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): NetworkCommissioningClusterWiFiInterfaceScanResultStruct { + tlvReader.enterStructure(tag) + val security = tlvReader.getInt(ContextSpecificTag(TAG_SECURITY)) + val ssid = tlvReader.getByteArray(ContextSpecificTag(TAG_SSID)) + val bssid = tlvReader.getByteArray(ContextSpecificTag(TAG_BSSID)) + val channel = tlvReader.getInt(ContextSpecificTag(TAG_CHANNEL)) + val wiFiBand = tlvReader.getInt(ContextSpecificTag(TAG_WI_FI_BAND)) + val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) + + tlvReader.exitContainer() + + return NetworkCommissioningClusterWiFiInterfaceScanResultStruct( + security, + ssid, + bssid, + channel, + wiFiBand, + rssi + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt new file mode 100644 index 00000000000000..8264e9fa5ee545 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt @@ -0,0 +1,89 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OperationalCredentialsClusterFabricDescriptorStruct( + val rootPublicKey: ByteArray, + val vendorID: Int, + val fabricID: Long, + val nodeID: Long, + val label: String, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("OperationalCredentialsClusterFabricDescriptorStruct {\n") + append("\trootPublicKey : $rootPublicKey\n") + append("\tvendorID : $vendorID\n") + append("\tfabricID : $fabricID\n") + append("\tnodeID : $nodeID\n") + append("\tlabel : $label\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY), rootPublicKey) + put(ContextSpecificTag(TAG_VENDOR_I_D), vendorID) + put(ContextSpecificTag(TAG_FABRIC_I_D), fabricID) + put(ContextSpecificTag(TAG_NODE_I_D), nodeID) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_ROOT_PUBLIC_KEY = 1 + private const val TAG_VENDOR_I_D = 2 + private const val TAG_FABRIC_I_D = 3 + private const val TAG_NODE_I_D = 4 + private const val TAG_LABEL = 5 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OperationalCredentialsClusterFabricDescriptorStruct { + tlvReader.enterStructure(tag) + val rootPublicKey = tlvReader.getByteArray(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY)) + val vendorID = tlvReader.getInt(ContextSpecificTag(TAG_VENDOR_I_D)) + val fabricID = tlvReader.getLong(ContextSpecificTag(TAG_FABRIC_I_D)) + val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return OperationalCredentialsClusterFabricDescriptorStruct( + rootPublicKey, + vendorID, + fabricID, + nodeID, + label, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt new file mode 100644 index 00000000000000..a05f388d1a5e06 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt @@ -0,0 +1,74 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OperationalCredentialsClusterNOCStruct( + val noc: ByteArray, + val icac: ByteArray?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("OperationalCredentialsClusterNOCStruct {\n") + append("\tnoc : $noc\n") + append("\ticac : $icac\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NOC), noc) + if (icac != null) { + put(ContextSpecificTag(TAG_ICAC), icac) + } else { + putNull(ContextSpecificTag(TAG_ICAC)) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_NOC = 1 + private const val TAG_ICAC = 2 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalCredentialsClusterNOCStruct { + tlvReader.enterStructure(tag) + val noc = tlvReader.getByteArray(ContextSpecificTag(TAG_NOC)) + val icac = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_ICAC)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) + null + } + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return OperationalCredentialsClusterNOCStruct(noc, icac, fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt new file mode 100644 index 00000000000000..cdbccac37fe63f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class OperationalStateClusterErrorStateStruct( + val errorStateID: Int, + val errorStateLabel: Optional, + val errorStateDetails: Optional +) { + override fun toString(): String = buildString { + append("OperationalStateClusterErrorStateStruct {\n") + append("\terrorStateID : $errorStateID\n") + append("\terrorStateLabel : $errorStateLabel\n") + append("\terrorStateDetails : $errorStateDetails\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) + if (errorStateLabel.isPresent) { + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } + if (errorStateDetails.isPresent) { + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } + endStructure() + } + } + + companion object { + private const val TAG_ERROR_STATE_I_D = 0 + private const val TAG_ERROR_STATE_LABEL = 1 + private const val TAG_ERROR_STATE_DETAILS = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterErrorStateStruct { + tlvReader.enterStructure(tag) + val errorStateID = tlvReader.getInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) + val errorStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return OperationalStateClusterErrorStateStruct( + errorStateID, + errorStateLabel, + errorStateDetails + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt new file mode 100644 index 00000000000000..1c55ac8f8927c4 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class OperationalStateClusterOperationalStateStruct( + val operationalStateID: Int, + val operationalStateLabel: Optional +) { + override fun toString(): String = buildString { + append("OperationalStateClusterOperationalStateStruct {\n") + append("\toperationalStateID : $operationalStateID\n") + append("\toperationalStateLabel : $operationalStateLabel\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) + if (operationalStateLabel.isPresent) { + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } + endStructure() + } + } + + companion object { + private const val TAG_OPERATIONAL_STATE_I_D = 0 + private const val TAG_OPERATIONAL_STATE_LABEL = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalStateStruct { + tlvReader.enterStructure(tag) + val operationalStateID = tlvReader.getInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) + val operationalStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return OperationalStateClusterOperationalStateStruct( + operationalStateID, + operationalStateLabel + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt new file mode 100644 index 00000000000000..17f95d897b258b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt @@ -0,0 +1,68 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OtaSoftwareUpdateRequestorClusterProviderLocation( + val providerNodeID: Long, + val endpoint: Int, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("OtaSoftwareUpdateRequestorClusterProviderLocation {\n") + append("\tproviderNodeID : $providerNodeID\n") + append("\tendpoint : $endpoint\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PROVIDER_NODE_I_D), providerNodeID) + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_PROVIDER_NODE_I_D = 1 + private const val TAG_ENDPOINT = 2 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): OtaSoftwareUpdateRequestorClusterProviderLocation { + tlvReader.enterStructure(tag) + val providerNodeID = tlvReader.getLong(ContextSpecificTag(TAG_PROVIDER_NODE_I_D)) + val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return OtaSoftwareUpdateRequestorClusterProviderLocation( + providerNodeID, + endpoint, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OzoneFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OzoneFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..52318157e94dc5 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OzoneFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class OzoneFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("OzoneFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OzoneFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return OzoneFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt new file mode 100644 index 00000000000000..6172f21498fdb0 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class PowerSourceClusterBatChargeFaultChangeType(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterBatChargeFaultChangeType {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeType { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterBatChargeFaultChangeType(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt new file mode 100644 index 00000000000000..6ef4a63074b8a2 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class PowerSourceClusterBatFaultChangeType(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterBatFaultChangeType {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeType { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterBatFaultChangeType(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt new file mode 100644 index 00000000000000..86cdc01f28fd41 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class PowerSourceClusterWiredFaultChangeType(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterWiredFaultChangeType {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeType { + tlvReader.enterStructure(tag) + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterWiredFaultChangeType(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..6632b9581bb508 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt @@ -0,0 +1,88 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { + append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startList(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add( + RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( + label, + mode, + modeTags + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..9f806c52fa6fa2 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( + val mfgCode: Optional, + val value: Int +) { + override fun toString(): String = buildString { + append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { + tlvReader.enterStructure(tag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..e3f33a1b7dcac5 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class RvcCleanModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { + append("RvcCleanModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startList(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeOptionStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return RvcCleanModeClusterModeOptionStruct(label, mode, modeTags) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..bc7eb7ed818b41 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { + append("RvcCleanModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeTagStruct { + tlvReader.enterStructure(tag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return RvcCleanModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt new file mode 100644 index 00000000000000..f6b9b8b14456f0 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class RvcOperationalStateClusterErrorStateStruct( + val errorStateID: Int, + val errorStateLabel: Optional, + val errorStateDetails: Optional +) { + override fun toString(): String = buildString { + append("RvcOperationalStateClusterErrorStateStruct {\n") + append("\terrorStateID : $errorStateID\n") + append("\terrorStateLabel : $errorStateLabel\n") + append("\terrorStateDetails : $errorStateDetails\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) + if (errorStateLabel.isPresent) { + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } + if (errorStateDetails.isPresent) { + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } + endStructure() + } + } + + companion object { + private const val TAG_ERROR_STATE_I_D = 0 + private const val TAG_ERROR_STATE_LABEL = 1 + private const val TAG_ERROR_STATE_DETAILS = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterErrorStateStruct { + tlvReader.enterStructure(tag) + val errorStateID = tlvReader.getInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) + val errorStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return RvcOperationalStateClusterErrorStateStruct( + errorStateID, + errorStateLabel, + errorStateDetails + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt new file mode 100644 index 00000000000000..66f2796d71439f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class RvcOperationalStateClusterOperationalStateStruct( + val operationalStateID: Int, + val operationalStateLabel: Optional +) { + override fun toString(): String = buildString { + append("RvcOperationalStateClusterOperationalStateStruct {\n") + append("\toperationalStateID : $operationalStateID\n") + append("\toperationalStateLabel : $operationalStateLabel\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) + if (operationalStateLabel.isPresent) { + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } + endStructure() + } + } + + companion object { + private const val TAG_OPERATIONAL_STATE_I_D = 0 + private const val TAG_OPERATIONAL_STATE_LABEL = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterOperationalStateStruct { + tlvReader.enterStructure(tag) + val operationalStateID = tlvReader.getInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) + val operationalStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return RvcOperationalStateClusterOperationalStateStruct( + operationalStateID, + operationalStateLabel + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..64b272df8e62c2 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class RvcRunModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { + append("RvcRunModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startList(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeOptionStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return RvcRunModeClusterModeOptionStruct(label, mode, modeTags) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..3ad4e9aee5ba6d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { + append("RvcRunModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeTagStruct { + tlvReader.enterStructure(tag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return RvcRunModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt new file mode 100644 index 00000000000000..213d87b9137cf5 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ScenesClusterAttributeValuePair(val attributeID: Long, val attributeValue: Long) { + override fun toString(): String = buildString { + append("ScenesClusterAttributeValuePair {\n") + append("\tattributeID : $attributeID\n") + append("\tattributeValue : $attributeValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ATTRIBUTE_I_D), attributeID) + put(ContextSpecificTag(TAG_ATTRIBUTE_VALUE), attributeValue) + endStructure() + } + } + + companion object { + private const val TAG_ATTRIBUTE_I_D = 0 + private const val TAG_ATTRIBUTE_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ScenesClusterAttributeValuePair { + tlvReader.enterStructure(tag) + val attributeID = tlvReader.getLong(ContextSpecificTag(TAG_ATTRIBUTE_I_D)) + val attributeValue = tlvReader.getLong(ContextSpecificTag(TAG_ATTRIBUTE_VALUE)) + + tlvReader.exitContainer() + + return ScenesClusterAttributeValuePair(attributeID, attributeValue) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt new file mode 100644 index 00000000000000..edc04a2084e2fd --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ScenesClusterExtensionFieldSet( + val clusterID: Long, + val attributeValueList: List +) { + override fun toString(): String = buildString { + append("ScenesClusterExtensionFieldSet {\n") + append("\tclusterID : $clusterID\n") + append("\tattributeValueList : $attributeValueList\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_CLUSTER_I_D), clusterID) + startList(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) + for (item in attributeValueList.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_CLUSTER_I_D = 0 + private const val TAG_ATTRIBUTE_VALUE_LIST = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ScenesClusterExtensionFieldSet { + tlvReader.enterStructure(tag) + val clusterID = tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER_I_D)) + val attributeValueList = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ScenesClusterExtensionFieldSet(clusterID, attributeValueList) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt new file mode 100644 index 00000000000000..5359b9a4b70a2a --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt @@ -0,0 +1,113 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class SoftwareDiagnosticsClusterThreadMetricsStruct( + val id: Long, + val name: Optional, + val stackFreeCurrent: Optional, + val stackFreeMinimum: Optional, + val stackSize: Optional +) { + override fun toString(): String = buildString { + append("SoftwareDiagnosticsClusterThreadMetricsStruct {\n") + append("\tid : $id\n") + append("\tname : $name\n") + append("\tstackFreeCurrent : $stackFreeCurrent\n") + append("\tstackFreeMinimum : $stackFreeMinimum\n") + append("\tstackSize : $stackSize\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ID), id) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + if (stackFreeCurrent.isPresent) { + val optstackFreeCurrent = stackFreeCurrent.get() + put(ContextSpecificTag(TAG_STACK_FREE_CURRENT), optstackFreeCurrent) + } + if (stackFreeMinimum.isPresent) { + val optstackFreeMinimum = stackFreeMinimum.get() + put(ContextSpecificTag(TAG_STACK_FREE_MINIMUM), optstackFreeMinimum) + } + if (stackSize.isPresent) { + val optstackSize = stackSize.get() + put(ContextSpecificTag(TAG_STACK_SIZE), optstackSize) + } + endStructure() + } + } + + companion object { + private const val TAG_ID = 0 + private const val TAG_NAME = 1 + private const val TAG_STACK_FREE_CURRENT = 2 + private const val TAG_STACK_FREE_MINIMUM = 3 + private const val TAG_STACK_SIZE = 4 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterThreadMetricsStruct { + tlvReader.enterStructure(tag) + val id = tlvReader.getLong(ContextSpecificTag(TAG_ID)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val stackFreeCurrent = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) + } else { + Optional.empty() + } + val stackFreeMinimum = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) + } else { + Optional.empty() + } + val stackSize = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_SIZE))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return SoftwareDiagnosticsClusterThreadMetricsStruct( + id, + name, + stackFreeCurrent, + stackFreeMinimum, + stackSize + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt new file mode 100644 index 00000000000000..403134993beaed --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class TargetNavigatorClusterTargetInfoStruct(val identifier: Int, val name: String) { + override fun toString(): String = buildString { + append("TargetNavigatorClusterTargetInfoStruct {\n") + append("\tidentifier : $identifier\n") + append("\tname : $name\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_IDENTIFIER), identifier) + put(ContextSpecificTag(TAG_NAME), name) + endStructure() + } + } + + companion object { + private const val TAG_IDENTIFIER = 0 + private const val TAG_NAME = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): TargetNavigatorClusterTargetInfoStruct { + tlvReader.enterStructure(tag) + val identifier = tlvReader.getInt(ContextSpecificTag(TAG_IDENTIFIER)) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + + tlvReader.exitContainer() + + return TargetNavigatorClusterTargetInfoStruct(identifier, name) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt new file mode 100644 index 00000000000000..cb432fb1e976b4 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt @@ -0,0 +1,88 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ThermostatClusterThermostatScheduleTransition( + val transitionTime: Int, + val heatSetpoint: Int?, + val coolSetpoint: Int? +) { + override fun toString(): String = buildString { + append("ThermostatClusterThermostatScheduleTransition {\n") + append("\ttransitionTime : $transitionTime\n") + append("\theatSetpoint : $heatSetpoint\n") + append("\tcoolSetpoint : $coolSetpoint\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) + if (heatSetpoint != null) { + put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) + } else { + putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } + if (coolSetpoint != null) { + put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + } else { + putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + } + endStructure() + } + } + + companion object { + private const val TAG_TRANSITION_TIME = 0 + private const val TAG_HEAT_SETPOINT = 1 + private const val TAG_COOL_SETPOINT = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ThermostatClusterThermostatScheduleTransition { + tlvReader.enterStructure(tag) + val transitionTime = tlvReader.getInt(ContextSpecificTag(TAG_TRANSITION_TIME)) + val heatSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + null + } + val coolSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_COOL_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + null + } + + tlvReader.exitContainer() + + return ThermostatClusterThermostatScheduleTransition( + transitionTime, + heatSetpoint, + coolSetpoint + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt new file mode 100644 index 00000000000000..4a7066df5d7f25 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt @@ -0,0 +1,157 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterNeighborTableStruct( + val extAddress: Long, + val age: Long, + val rloc16: Int, + val linkFrameCounter: Long, + val mleFrameCounter: Long, + val lqi: Int, + val averageRssi: Int?, + val lastRssi: Int?, + val frameErrorRate: Int, + val messageErrorRate: Int, + val rxOnWhenIdle: Boolean, + val fullThreadDevice: Boolean, + val fullNetworkData: Boolean, + val isChild: Boolean +) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterNeighborTableStruct {\n") + append("\textAddress : $extAddress\n") + append("\tage : $age\n") + append("\trloc16 : $rloc16\n") + append("\tlinkFrameCounter : $linkFrameCounter\n") + append("\tmleFrameCounter : $mleFrameCounter\n") + append("\tlqi : $lqi\n") + append("\taverageRssi : $averageRssi\n") + append("\tlastRssi : $lastRssi\n") + append("\tframeErrorRate : $frameErrorRate\n") + append("\tmessageErrorRate : $messageErrorRate\n") + append("\trxOnWhenIdle : $rxOnWhenIdle\n") + append("\tfullThreadDevice : $fullThreadDevice\n") + append("\tfullNetworkData : $fullNetworkData\n") + append("\tisChild : $isChild\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_EXT_ADDRESS), extAddress) + put(ContextSpecificTag(TAG_AGE), age) + put(ContextSpecificTag(TAG_RLOC16), rloc16) + put(ContextSpecificTag(TAG_LINK_FRAME_COUNTER), linkFrameCounter) + put(ContextSpecificTag(TAG_MLE_FRAME_COUNTER), mleFrameCounter) + put(ContextSpecificTag(TAG_LQI), lqi) + if (averageRssi != null) { + put(ContextSpecificTag(TAG_AVERAGE_RSSI), averageRssi) + } else { + putNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) + } + if (lastRssi != null) { + put(ContextSpecificTag(TAG_LAST_RSSI), lastRssi) + } else { + putNull(ContextSpecificTag(TAG_LAST_RSSI)) + } + put(ContextSpecificTag(TAG_FRAME_ERROR_RATE), frameErrorRate) + put(ContextSpecificTag(TAG_MESSAGE_ERROR_RATE), messageErrorRate) + put(ContextSpecificTag(TAG_RX_ON_WHEN_IDLE), rxOnWhenIdle) + put(ContextSpecificTag(TAG_FULL_THREAD_DEVICE), fullThreadDevice) + put(ContextSpecificTag(TAG_FULL_NETWORK_DATA), fullNetworkData) + put(ContextSpecificTag(TAG_IS_CHILD), isChild) + endStructure() + } + } + + companion object { + private const val TAG_EXT_ADDRESS = 0 + private const val TAG_AGE = 1 + private const val TAG_RLOC16 = 2 + private const val TAG_LINK_FRAME_COUNTER = 3 + private const val TAG_MLE_FRAME_COUNTER = 4 + private const val TAG_LQI = 5 + private const val TAG_AVERAGE_RSSI = 6 + private const val TAG_LAST_RSSI = 7 + private const val TAG_FRAME_ERROR_RATE = 8 + private const val TAG_MESSAGE_ERROR_RATE = 9 + private const val TAG_RX_ON_WHEN_IDLE = 10 + private const val TAG_FULL_THREAD_DEVICE = 11 + private const val TAG_FULL_NETWORK_DATA = 12 + private const val TAG_IS_CHILD = 13 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterNeighborTableStruct { + tlvReader.enterStructure(tag) + val extAddress = tlvReader.getLong(ContextSpecificTag(TAG_EXT_ADDRESS)) + val age = tlvReader.getLong(ContextSpecificTag(TAG_AGE)) + val rloc16 = tlvReader.getInt(ContextSpecificTag(TAG_RLOC16)) + val linkFrameCounter = tlvReader.getLong(ContextSpecificTag(TAG_LINK_FRAME_COUNTER)) + val mleFrameCounter = tlvReader.getLong(ContextSpecificTag(TAG_MLE_FRAME_COUNTER)) + val lqi = tlvReader.getInt(ContextSpecificTag(TAG_LQI)) + val averageRssi = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_AVERAGE_RSSI)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) + null + } + val lastRssi = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_LAST_RSSI)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LAST_RSSI)) + null + } + val frameErrorRate = tlvReader.getInt(ContextSpecificTag(TAG_FRAME_ERROR_RATE)) + val messageErrorRate = tlvReader.getInt(ContextSpecificTag(TAG_MESSAGE_ERROR_RATE)) + val rxOnWhenIdle = tlvReader.getBoolean(ContextSpecificTag(TAG_RX_ON_WHEN_IDLE)) + val fullThreadDevice = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_THREAD_DEVICE)) + val fullNetworkData = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_NETWORK_DATA)) + val isChild = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_CHILD)) + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterNeighborTableStruct( + extAddress, + age, + rloc16, + linkFrameCounter, + mleFrameCounter, + lqi, + averageRssi, + lastRssi, + frameErrorRate, + messageErrorRate, + rxOnWhenIdle, + fullThreadDevice, + fullNetworkData, + isChild + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt new file mode 100644 index 00000000000000..f9764369891073 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt @@ -0,0 +1,130 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( + val activeTimestampPresent: Boolean, + val pendingTimestampPresent: Boolean, + val masterKeyPresent: Boolean, + val networkNamePresent: Boolean, + val extendedPanIdPresent: Boolean, + val meshLocalPrefixPresent: Boolean, + val delayPresent: Boolean, + val panIdPresent: Boolean, + val channelPresent: Boolean, + val pskcPresent: Boolean, + val securityPolicyPresent: Boolean, + val channelMaskPresent: Boolean +) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterOperationalDatasetComponents {\n") + append("\tactiveTimestampPresent : $activeTimestampPresent\n") + append("\tpendingTimestampPresent : $pendingTimestampPresent\n") + append("\tmasterKeyPresent : $masterKeyPresent\n") + append("\tnetworkNamePresent : $networkNamePresent\n") + append("\textendedPanIdPresent : $extendedPanIdPresent\n") + append("\tmeshLocalPrefixPresent : $meshLocalPrefixPresent\n") + append("\tdelayPresent : $delayPresent\n") + append("\tpanIdPresent : $panIdPresent\n") + append("\tchannelPresent : $channelPresent\n") + append("\tpskcPresent : $pskcPresent\n") + append("\tsecurityPolicyPresent : $securityPolicyPresent\n") + append("\tchannelMaskPresent : $channelMaskPresent\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT), activeTimestampPresent) + put(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT), pendingTimestampPresent) + put(ContextSpecificTag(TAG_MASTER_KEY_PRESENT), masterKeyPresent) + put(ContextSpecificTag(TAG_NETWORK_NAME_PRESENT), networkNamePresent) + put(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT), extendedPanIdPresent) + put(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT), meshLocalPrefixPresent) + put(ContextSpecificTag(TAG_DELAY_PRESENT), delayPresent) + put(ContextSpecificTag(TAG_PAN_ID_PRESENT), panIdPresent) + put(ContextSpecificTag(TAG_CHANNEL_PRESENT), channelPresent) + put(ContextSpecificTag(TAG_PSKC_PRESENT), pskcPresent) + put(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT), securityPolicyPresent) + put(ContextSpecificTag(TAG_CHANNEL_MASK_PRESENT), channelMaskPresent) + endStructure() + } + } + + companion object { + private const val TAG_ACTIVE_TIMESTAMP_PRESENT = 0 + private const val TAG_PENDING_TIMESTAMP_PRESENT = 1 + private const val TAG_MASTER_KEY_PRESENT = 2 + private const val TAG_NETWORK_NAME_PRESENT = 3 + private const val TAG_EXTENDED_PAN_ID_PRESENT = 4 + private const val TAG_MESH_LOCAL_PREFIX_PRESENT = 5 + private const val TAG_DELAY_PRESENT = 6 + private const val TAG_PAN_ID_PRESENT = 7 + private const val TAG_CHANNEL_PRESENT = 8 + private const val TAG_PSKC_PRESENT = 9 + private const val TAG_SECURITY_POLICY_PRESENT = 10 + private const val TAG_CHANNEL_MASK_PRESENT = 11 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { + tlvReader.enterStructure(tag) + val activeTimestampPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT)) + val pendingTimestampPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT)) + val masterKeyPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_MASTER_KEY_PRESENT)) + val networkNamePresent = tlvReader.getBoolean(ContextSpecificTag(TAG_NETWORK_NAME_PRESENT)) + val extendedPanIdPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT)) + val meshLocalPrefixPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT)) + val delayPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_DELAY_PRESENT)) + val panIdPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PAN_ID_PRESENT)) + val channelPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_PRESENT)) + val pskcPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PSKC_PRESENT)) + val securityPolicyPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT)) + val channelMaskPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_MASK_PRESENT)) + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( + activeTimestampPresent, + pendingTimestampPresent, + masterKeyPresent, + networkNamePresent, + extendedPanIdPresent, + meshLocalPrefixPresent, + delayPresent, + panIdPresent, + channelPresent, + pskcPresent, + securityPolicyPresent, + channelMaskPresent + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt new file mode 100644 index 00000000000000..8a7c423f84e6ad --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt @@ -0,0 +1,110 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterRouteTableStruct( + val extAddress: Long, + val rloc16: Int, + val routerId: Int, + val nextHop: Int, + val pathCost: Int, + val LQIIn: Int, + val LQIOut: Int, + val age: Int, + val allocated: Boolean, + val linkEstablished: Boolean +) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterRouteTableStruct {\n") + append("\textAddress : $extAddress\n") + append("\trloc16 : $rloc16\n") + append("\trouterId : $routerId\n") + append("\tnextHop : $nextHop\n") + append("\tpathCost : $pathCost\n") + append("\tLQIIn : $LQIIn\n") + append("\tLQIOut : $LQIOut\n") + append("\tage : $age\n") + append("\tallocated : $allocated\n") + append("\tlinkEstablished : $linkEstablished\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_EXT_ADDRESS), extAddress) + put(ContextSpecificTag(TAG_RLOC16), rloc16) + put(ContextSpecificTag(TAG_ROUTER_ID), routerId) + put(ContextSpecificTag(TAG_NEXT_HOP), nextHop) + put(ContextSpecificTag(TAG_PATH_COST), pathCost) + put(ContextSpecificTag(TAG_L_Q_I_IN), LQIIn) + put(ContextSpecificTag(TAG_L_Q_I_OUT), LQIOut) + put(ContextSpecificTag(TAG_AGE), age) + put(ContextSpecificTag(TAG_ALLOCATED), allocated) + put(ContextSpecificTag(TAG_LINK_ESTABLISHED), linkEstablished) + endStructure() + } + } + + companion object { + private const val TAG_EXT_ADDRESS = 0 + private const val TAG_RLOC16 = 1 + private const val TAG_ROUTER_ID = 2 + private const val TAG_NEXT_HOP = 3 + private const val TAG_PATH_COST = 4 + private const val TAG_L_Q_I_IN = 5 + private const val TAG_L_Q_I_OUT = 6 + private const val TAG_AGE = 7 + private const val TAG_ALLOCATED = 8 + private const val TAG_LINK_ESTABLISHED = 9 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterRouteTableStruct { + tlvReader.enterStructure(tag) + val extAddress = tlvReader.getLong(ContextSpecificTag(TAG_EXT_ADDRESS)) + val rloc16 = tlvReader.getInt(ContextSpecificTag(TAG_RLOC16)) + val routerId = tlvReader.getInt(ContextSpecificTag(TAG_ROUTER_ID)) + val nextHop = tlvReader.getInt(ContextSpecificTag(TAG_NEXT_HOP)) + val pathCost = tlvReader.getInt(ContextSpecificTag(TAG_PATH_COST)) + val LQIIn = tlvReader.getInt(ContextSpecificTag(TAG_L_Q_I_IN)) + val LQIOut = tlvReader.getInt(ContextSpecificTag(TAG_L_Q_I_OUT)) + val age = tlvReader.getInt(ContextSpecificTag(TAG_AGE)) + val allocated = tlvReader.getBoolean(ContextSpecificTag(TAG_ALLOCATED)) + val linkEstablished = tlvReader.getBoolean(ContextSpecificTag(TAG_LINK_ESTABLISHED)) + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterRouteTableStruct( + extAddress, + rloc16, + routerId, + nextHop, + pathCost, + LQIIn, + LQIOut, + age, + allocated, + linkEstablished + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt new file mode 100644 index 00000000000000..1474db405b9d43 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: Int, val flags: Int) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterSecurityPolicy {\n") + append("\trotationTime : $rotationTime\n") + append("\tflags : $flags\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_ROTATION_TIME), rotationTime) + put(ContextSpecificTag(TAG_FLAGS), flags) + endStructure() + } + } + + companion object { + private const val TAG_ROTATION_TIME = 0 + private const val TAG_FLAGS = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterSecurityPolicy { + tlvReader.enterStructure(tag) + val rotationTime = tlvReader.getInt(ContextSpecificTag(TAG_ROTATION_TIME)) + val flags = tlvReader.getInt(ContextSpecificTag(TAG_FLAGS)) + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterSecurityPolicy(rotationTime, flags) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt new file mode 100644 index 00000000000000..d770d7a2ac8e03 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt @@ -0,0 +1,74 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class TimeSynchronizationClusterDSTOffsetStruct( + val offset: Long, + val validStarting: Long, + val validUntil: Long? +) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterDSTOffsetStruct {\n") + append("\toffset : $offset\n") + append("\tvalidStarting : $validStarting\n") + append("\tvalidUntil : $validUntil\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_OFFSET), offset) + put(ContextSpecificTag(TAG_VALID_STARTING), validStarting) + if (validUntil != null) { + put(ContextSpecificTag(TAG_VALID_UNTIL), validUntil) + } else { + putNull(ContextSpecificTag(TAG_VALID_UNTIL)) + } + endStructure() + } + } + + companion object { + private const val TAG_OFFSET = 0 + private const val TAG_VALID_STARTING = 1 + private const val TAG_VALID_UNTIL = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTOffsetStruct { + tlvReader.enterStructure(tag) + val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) + val validStarting = tlvReader.getLong(ContextSpecificTag(TAG_VALID_STARTING)) + val validUntil = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_VALID_UNTIL)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) + null + } + + tlvReader.exitContainer() + + return TimeSynchronizationClusterDSTOffsetStruct(offset, validStarting, validUntil) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt new file mode 100644 index 00000000000000..7a2e95c671517a --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt @@ -0,0 +1,62 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct( + val nodeID: Long, + val endpoint: Int +) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct {\n") + append("\tnodeID : $nodeID\n") + append("\tendpoint : $endpoint\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_NODE_I_D), nodeID) + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + endStructure() + } + } + + companion object { + private const val TAG_NODE_I_D = 0 + private const val TAG_ENDPOINT = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { + tlvReader.enterStructure(tag) + val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) + val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) + + tlvReader.exitContainer() + + return TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct(nodeID, endpoint) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt new file mode 100644 index 00000000000000..8a256fd7edfefe --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt @@ -0,0 +1,73 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class TimeSynchronizationClusterTimeZoneStruct( + val offset: Long, + val validAt: Long, + val name: Optional +) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterTimeZoneStruct {\n") + append("\toffset : $offset\n") + append("\tvalidAt : $validAt\n") + append("\tname : $name\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_OFFSET), offset) + put(ContextSpecificTag(TAG_VALID_AT), validAt) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + endStructure() + } + } + + companion object { + private const val TAG_OFFSET = 0 + private const val TAG_VALID_AT = 1 + private const val TAG_NAME = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStruct { + tlvReader.enterStructure(tag) + val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) + val validAt = tlvReader.getLong(ContextSpecificTag(TAG_VALID_AT)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return TimeSynchronizationClusterTimeZoneStruct(offset, validAt, name) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt new file mode 100644 index 00000000000000..db50619ad5da53 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class TimeSynchronizationClusterTrustedTimeSourceStruct( + val fabricIndex: Int, + val nodeID: Long, + val endpoint: Int +) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterTrustedTimeSourceStruct {\n") + append("\tfabricIndex : $fabricIndex\n") + append("\tnodeID : $nodeID\n") + append("\tendpoint : $endpoint\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + put(ContextSpecificTag(TAG_NODE_I_D), nodeID) + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + endStructure() + } + } + + companion object { + private const val TAG_FABRIC_INDEX = 0 + private const val TAG_NODE_I_D = 1 + private const val TAG_ENDPOINT = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTrustedTimeSourceStruct { + tlvReader.enterStructure(tag) + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) + val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) + + tlvReader.exitContainer() + + return TimeSynchronizationClusterTrustedTimeSourceStruct(fabricIndex, nodeID, endpoint) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TonerCartridgeMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TonerCartridgeMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..3633524a987a8c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TonerCartridgeMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class TonerCartridgeMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("TonerCartridgeMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): TonerCartridgeMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return TonerCartridgeMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt new file mode 100644 index 00000000000000..bd34e9f5a90c49 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UnitTestingClusterDoubleNestedStructList(val a: List) { + override fun toString(): String = buildString { + append("UnitTestingClusterDoubleNestedStructList {\n") + append("\ta : $a\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + startList(ContextSpecificTag(TAG_A)) + for (item in a.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_A = 0 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterDoubleNestedStructList { + tlvReader.enterStructure(tag) + val a = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_A)) + while (!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return UnitTestingClusterDoubleNestedStructList(a) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt new file mode 100644 index 00000000000000..7ca3b0b29aab01 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UnitTestingClusterNestedStruct( + val a: Int, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct +) { + override fun toString(): String = buildString { + append("UnitTestingClusterNestedStruct {\n") + append("\ta : $a\n") + append("\tb : $b\n") + append("\tc : $c\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_A), a) + put(ContextSpecificTag(TAG_B), b) + c.toTlv(ContextSpecificTag(TAG_C), this) + endStructure() + } + } + + companion object { + private const val TAG_A = 0 + private const val TAG_B = 1 + private const val TAG_C = 2 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStruct { + tlvReader.enterStructure(tag) + val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) + val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) + val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) + + tlvReader.exitContainer() + + return UnitTestingClusterNestedStruct(a, b, c) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt new file mode 100644 index 00000000000000..b954fe0ec9879b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt @@ -0,0 +1,129 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UnitTestingClusterNestedStructList( + val a: Int, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct, + val d: List, + val e: List, + val f: List, + val g: List +) { + override fun toString(): String = buildString { + append("UnitTestingClusterNestedStructList {\n") + append("\ta : $a\n") + append("\tb : $b\n") + append("\tc : $c\n") + append("\td : $d\n") + append("\te : $e\n") + append("\tf : $f\n") + append("\tg : $g\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_A), a) + put(ContextSpecificTag(TAG_B), b) + c.toTlv(ContextSpecificTag(TAG_C), this) + startList(ContextSpecificTag(TAG_D)) + for (item in d.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + startList(ContextSpecificTag(TAG_E)) + for (item in e.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_F)) + for (item in f.iterator()) { + put(AnonymousTag, item) + } + endList() + startList(ContextSpecificTag(TAG_G)) + for (item in g.iterator()) { + put(AnonymousTag, item) + } + endList() + endStructure() + } + } + + companion object { + private const val TAG_A = 0 + private const val TAG_B = 1 + private const val TAG_C = 2 + private const val TAG_D = 3 + private const val TAG_E = 4 + private const val TAG_F = 5 + private const val TAG_G = 6 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStructList { + tlvReader.enterStructure(tag) + val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) + val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) + val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) + val d = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_D)) + while (!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val e = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_E)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getLong(AnonymousTag)) + } + tlvReader.exitContainer() + } + val f = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_F)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val g = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_G)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return UnitTestingClusterNestedStructList(a, b, c, d, e, f, g) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt new file mode 100644 index 00000000000000..08a4b642e69d45 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt @@ -0,0 +1,308 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class UnitTestingClusterNullablesAndOptionalsStruct( + val nullableInt: Int?, + val optionalInt: Optional, + val nullableOptionalInt: Optional?, + val nullableString: String?, + val optionalString: Optional, + val nullableOptionalString: Optional?, + val nullableStruct: UnitTestingClusterSimpleStruct?, + val optionalStruct: Optional, + val nullableOptionalStruct: Optional?, + val nullableList: List?, + val optionalList: Optional>, + val nullableOptionalList: Optional>? +) { + override fun toString(): String = buildString { + append("UnitTestingClusterNullablesAndOptionalsStruct {\n") + append("\tnullableInt : $nullableInt\n") + append("\toptionalInt : $optionalInt\n") + append("\tnullableOptionalInt : $nullableOptionalInt\n") + append("\tnullableString : $nullableString\n") + append("\toptionalString : $optionalString\n") + append("\tnullableOptionalString : $nullableOptionalString\n") + append("\tnullableStruct : $nullableStruct\n") + append("\toptionalStruct : $optionalStruct\n") + append("\tnullableOptionalStruct : $nullableOptionalStruct\n") + append("\tnullableList : $nullableList\n") + append("\toptionalList : $optionalList\n") + append("\tnullableOptionalList : $nullableOptionalList\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + if (nullableInt != null) { + put(ContextSpecificTag(TAG_NULLABLE_INT), nullableInt) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_INT)) + } + if (optionalInt.isPresent) { + val optoptionalInt = optionalInt.get() + put(ContextSpecificTag(TAG_OPTIONAL_INT), optoptionalInt) + } + if (nullableOptionalInt != null) { + if (nullableOptionalInt.isPresent) { + val optnullableOptionalInt = nullableOptionalInt.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT), optnullableOptionalInt) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + } + if (nullableString != null) { + put(ContextSpecificTag(TAG_NULLABLE_STRING), nullableString) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + } + if (optionalString.isPresent) { + val optoptionalString = optionalString.get() + put(ContextSpecificTag(TAG_OPTIONAL_STRING), optoptionalString) + } + if (nullableOptionalString != null) { + if (nullableOptionalString.isPresent) { + val optnullableOptionalString = nullableOptionalString.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING), optnullableOptionalString) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + } + if (nullableStruct != null) { + nullableStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), this) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + } + if (optionalStruct.isPresent) { + val optoptionalStruct = optionalStruct.get() + optoptionalStruct.toTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), this) + } + if (nullableOptionalStruct != null) { + if (nullableOptionalStruct.isPresent) { + val optnullableOptionalStruct = nullableOptionalStruct.get() + optnullableOptionalStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), this) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + } + if (nullableList != null) { + startList(ContextSpecificTag(TAG_NULLABLE_LIST)) + for (item in nullableList.iterator()) { + put(AnonymousTag, item) + } + endList() + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + } + if (optionalList.isPresent) { + val optoptionalList = optionalList.get() + startList(ContextSpecificTag(TAG_OPTIONAL_LIST)) + for (item in optoptionalList.iterator()) { + put(AnonymousTag, item) + } + endList() + } + if (nullableOptionalList != null) { + if (nullableOptionalList.isPresent) { + val optnullableOptionalList = nullableOptionalList.get() + startList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + for (item in optnullableOptionalList.iterator()) { + put(AnonymousTag, item) + } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + } + endStructure() + } + } + + companion object { + private const val TAG_NULLABLE_INT = 0 + private const val TAG_OPTIONAL_INT = 1 + private const val TAG_NULLABLE_OPTIONAL_INT = 2 + private const val TAG_NULLABLE_STRING = 3 + private const val TAG_OPTIONAL_STRING = 4 + private const val TAG_NULLABLE_OPTIONAL_STRING = 5 + private const val TAG_NULLABLE_STRUCT = 6 + private const val TAG_OPTIONAL_STRUCT = 7 + private const val TAG_NULLABLE_OPTIONAL_STRUCT = 8 + private const val TAG_NULLABLE_LIST = 9 + private const val TAG_OPTIONAL_LIST = 10 + private const val TAG_NULLABLE_OPTIONAL_LIST = 11 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNullablesAndOptionalsStruct { + tlvReader.enterStructure(tag) + val nullableInt = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_INT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_INT)) + null + } + val optionalInt = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_INT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_INT))) + } else { + Optional.empty() + } + val nullableOptionalInt = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + null + } + val nullableString = + if (!tlvReader.isNull()) { + tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_STRING)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + null + } + val optionalString = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPTIONAL_STRING))) + } else { + Optional.empty() + } + val nullableOptionalString = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + null + } + val nullableStruct = + if (!tlvReader.isNull()) { + UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + null + } + val optionalStruct = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRUCT))) { + Optional.of( + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_OPTIONAL_STRUCT), + tlvReader + ) + ) + } else { + Optional.empty() + } + val nullableOptionalStruct = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT))) { + Optional.of( + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), + tlvReader + ) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + null + } + val nullableList = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + null + } + val optionalList = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_OPTIONAL_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + val nullableOptionalList = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + null + } + + tlvReader.exitContainer() + + return UnitTestingClusterNullablesAndOptionalsStruct( + nullableInt, + optionalInt, + nullableOptionalInt, + nullableString, + optionalString, + nullableOptionalString, + nullableStruct, + optionalStruct, + nullableOptionalStruct, + nullableList, + optionalList, + nullableOptionalList + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt new file mode 100644 index 00000000000000..26bf18a07ed214 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt @@ -0,0 +1,89 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UnitTestingClusterSimpleStruct( + val a: Int, + val b: Boolean, + val c: Int, + val d: ByteArray, + val e: String, + val f: Int, + val g: Float, + val h: Double +) { + override fun toString(): String = buildString { + append("UnitTestingClusterSimpleStruct {\n") + append("\ta : $a\n") + append("\tb : $b\n") + append("\tc : $c\n") + append("\td : $d\n") + append("\te : $e\n") + append("\tf : $f\n") + append("\tg : $g\n") + append("\th : $h\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_A), a) + put(ContextSpecificTag(TAG_B), b) + put(ContextSpecificTag(TAG_C), c) + put(ContextSpecificTag(TAG_D), d) + put(ContextSpecificTag(TAG_E), e) + put(ContextSpecificTag(TAG_F), f) + put(ContextSpecificTag(TAG_G), g) + put(ContextSpecificTag(TAG_H), h) + endStructure() + } + } + + companion object { + private const val TAG_A = 0 + private const val TAG_B = 1 + private const val TAG_C = 2 + private const val TAG_D = 3 + private const val TAG_E = 4 + private const val TAG_F = 5 + private const val TAG_G = 6 + private const val TAG_H = 7 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterSimpleStruct { + tlvReader.enterStructure(tag) + val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) + val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) + val c = tlvReader.getInt(ContextSpecificTag(TAG_C)) + val d = tlvReader.getByteArray(ContextSpecificTag(TAG_D)) + val e = tlvReader.getString(ContextSpecificTag(TAG_E)) + val f = tlvReader.getInt(ContextSpecificTag(TAG_F)) + val g = tlvReader.getFloat(ContextSpecificTag(TAG_G)) + val h = tlvReader.getDouble(ContextSpecificTag(TAG_H)) + + tlvReader.exitContainer() + + return UnitTestingClusterSimpleStruct(a, b, c, d, e, f, g, h) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt new file mode 100644 index 00000000000000..6b7273f3172d5d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt @@ -0,0 +1,161 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional + +class UnitTestingClusterTestFabricScoped( + val fabricSensitiveInt8u: Int, + val optionalFabricSensitiveInt8u: Optional, + val nullableFabricSensitiveInt8u: Int?, + val nullableOptionalFabricSensitiveInt8u: Optional?, + val fabricSensitiveCharString: String, + val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, + val fabricSensitiveInt8uList: List, + val fabricIndex: Int +) { + override fun toString(): String = buildString { + append("UnitTestingClusterTestFabricScoped {\n") + append("\tfabricSensitiveInt8u : $fabricSensitiveInt8u\n") + append("\toptionalFabricSensitiveInt8u : $optionalFabricSensitiveInt8u\n") + append("\tnullableFabricSensitiveInt8u : $nullableFabricSensitiveInt8u\n") + append("\tnullableOptionalFabricSensitiveInt8u : $nullableOptionalFabricSensitiveInt8u\n") + append("\tfabricSensitiveCharString : $fabricSensitiveCharString\n") + append("\tfabricSensitiveStruct : $fabricSensitiveStruct\n") + append("\tfabricSensitiveInt8uList : $fabricSensitiveInt8uList\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U), fabricSensitiveInt8u) + if (optionalFabricSensitiveInt8u.isPresent) { + val optoptionalFabricSensitiveInt8u = optionalFabricSensitiveInt8u.get() + put( + ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U), + optoptionalFabricSensitiveInt8u + ) + } + if (nullableFabricSensitiveInt8u != null) { + put(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U), nullableFabricSensitiveInt8u) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } + if (nullableOptionalFabricSensitiveInt8u != null) { + if (nullableOptionalFabricSensitiveInt8u.isPresent) { + val optnullableOptionalFabricSensitiveInt8u = nullableOptionalFabricSensitiveInt8u.get() + put( + ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U), + optnullableOptionalFabricSensitiveInt8u + ) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + } + put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING), fabricSensitiveCharString) + fabricSensitiveStruct.toTlv(ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), this) + startList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) + for (item in fabricSensitiveInt8uList.iterator()) { + put(AnonymousTag, item) + } + endList() + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_FABRIC_SENSITIVE_INT8U = 1 + private const val TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U = 2 + private const val TAG_NULLABLE_FABRIC_SENSITIVE_INT8U = 3 + private const val TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U = 4 + private const val TAG_FABRIC_SENSITIVE_CHAR_STRING = 5 + private const val TAG_FABRIC_SENSITIVE_STRUCT = 6 + private const val TAG_FABRIC_SENSITIVE_INT8U_LIST = 7 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScoped { + tlvReader.enterStructure(tag) + val fabricSensitiveInt8u = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U)) + val optionalFabricSensitiveInt8u = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) + } else { + Optional.empty() + } + val nullableFabricSensitiveInt8u = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + null + } + val nullableOptionalFabricSensitiveInt8u = + if (!tlvReader.isNull()) { + if ( + tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + ) { + Optional.of( + tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + null + } + val fabricSensitiveCharString = + tlvReader.getString(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING)) + val fabricSensitiveStruct = + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), + tlvReader + ) + val fabricSensitiveInt8uList = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return UnitTestingClusterTestFabricScoped( + fabricSensitiveInt8u, + optionalFabricSensitiveInt8u, + nullableFabricSensitiveInt8u, + nullableOptionalFabricSensitiveInt8u, + fabricSensitiveCharString, + fabricSensitiveStruct, + fabricSensitiveInt8uList, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt new file mode 100644 index 00000000000000..6c5df4cb224166 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UnitTestingClusterTestListStructOctet(val member1: Long, val member2: ByteArray) { + override fun toString(): String = buildString { + append("UnitTestingClusterTestListStructOctet {\n") + append("\tmember1 : $member1\n") + append("\tmember2 : $member2\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_MEMBER1), member1) + put(ContextSpecificTag(TAG_MEMBER2), member2) + endStructure() + } + } + + companion object { + private const val TAG_MEMBER1 = 0 + private const val TAG_MEMBER2 = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestListStructOctet { + tlvReader.enterStructure(tag) + val member1 = tlvReader.getLong(ContextSpecificTag(TAG_MEMBER1)) + val member2 = tlvReader.getByteArray(ContextSpecificTag(TAG_MEMBER2)) + + tlvReader.exitContainer() + + return UnitTestingClusterTestListStructOctet(member1, member2) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt new file mode 100644 index 00000000000000..d90396f2a010ea --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UserLabelClusterLabelStruct(val label: String, val value: String) { + override fun toString(): String = buildString { + append("UserLabelClusterLabelStruct {\n") + append("\tlabel : $label\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UserLabelClusterLabelStruct { + tlvReader.enterStructure(tag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return UserLabelClusterLabelStruct(label, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UvFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UvFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..c8f3fbfd0085f7 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UvFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,63 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class UvFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("UvFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv(tag: Tag, tlvReader: TlvReader): UvFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return UvFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterTankMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterTankMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..0d0eadde9869da --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterTankMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class WaterTankMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("WaterTankMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): WaterTankMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return WaterTankMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZeoliteFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZeoliteFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..a76eb3c119b24b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZeoliteFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import chip.tlv.ContextSpecificTag +import chip.tlv.Tag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter + +class ZeoliteFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("ZeoliteFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ZeoliteFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tag) + val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return ZeoliteFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/src/chip/devicecontroller/cluster/TlvReaderExtension.kt b/src/controller/java/src/chip/devicecontroller/cluster/TlvReaderExtension.kt new file mode 100644 index 00000000000000..7f97fb3be1563f --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/cluster/TlvReaderExtension.kt @@ -0,0 +1,44 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package chip.devicecontroller.cluster + +import chip.tlv.NullValue +import chip.tlv.Tag +import chip.tlv.TlvReader + +fun TlvReader.getBoolean(tag: Tag): Boolean { + return getBool(tag) +} + +fun TlvReader.getString(tag: Tag): String { + return getUtf8String(tag) +} + +fun TlvReader.getByteArray(tag: Tag): ByteArray { + return getByteString(tag) +} + +fun TlvReader.isNull(): Boolean { + val value = peekElement().value + return (value is NullValue) +} + +fun TlvReader.isNextTag(tag: Tag): Boolean { + val nextTag = peekElement().tag + return (nextTag == tag) +} diff --git a/src/controller/java/src/chip/devicecontroller/cluster/files.gni b/src/controller/java/src/chip/devicecontroller/cluster/files.gni new file mode 100644 index 00000000000000..c03d2afad86d59 --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/cluster/files.gni @@ -0,0 +1,151 @@ +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +structs_sources = [ + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CeramicFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectrostaticFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FuelTankMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/InkCartridgeMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IonizingFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OzoneFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TonerCartridgeMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UvFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterTankMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZeoliteFilterMonitoringClusterReplacementProductStruct.kt", +] + +eventstructs_sources = [ + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt", +] diff --git a/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt b/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt new file mode 100644 index 00000000000000..a0b83d5dafbff5 --- /dev/null +++ b/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt @@ -0,0 +1,82 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster + +import chip.devicecontroller.cluster.eventstructs.UnitTestingClusterTestEventEvent +import chip.devicecontroller.cluster.eventstructs.UnitTestingClusterTestFabricScopedEventEvent +import chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct +import chip.tlv.AnonymousTag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import org.junit.Test + +class ChipClusterEventStructTest { + @Test + fun testEventEventTlvTest() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val simpleStruct2 = + UnitTestingClusterSimpleStruct(8, false, 9, byteArrayOf(0x02, 0x03), "test2", 4, 5.6f, 7.8) + val struct = + UnitTestingClusterTestEventEvent( + 1, + 2, + true, + simpleStruct, + listOf(simpleStruct, simpleStruct2), + listOf(3, 4, 5) + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = UnitTestingClusterTestEventEvent.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + fun testFabricScopedEventEventTest() { + val struct = UnitTestingClusterTestFabricScopedEventEvent(1) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = + UnitTestingClusterTestFabricScopedEventEvent.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } +} diff --git a/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt b/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt new file mode 100644 index 00000000000000..1e5923f41eac9e --- /dev/null +++ b/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt @@ -0,0 +1,395 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster + +import chip.devicecontroller.cluster.structs.UnitTestingClusterDoubleNestedStructList +import chip.devicecontroller.cluster.structs.UnitTestingClusterNestedStructList +import chip.devicecontroller.cluster.structs.UnitTestingClusterNullablesAndOptionalsStruct +import chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct +import chip.devicecontroller.cluster.structs.UnitTestingClusterTestFabricScoped +import chip.devicecontroller.cluster.structs.UnitTestingClusterTestListStructOctet +import chip.tlv.AnonymousTag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter +import java.util.Optional +import org.junit.Test +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 + +@RunWith(JUnit4::class) +class ChipClusterStructTest { + @Test + fun doubleNestedStructTlvTest() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val simpleStruct2 = + UnitTestingClusterSimpleStruct(8, false, 9, byteArrayOf(0x02, 0x03), "test2", 4, 5.6f, 7.8) + val nestedStructList = + UnitTestingClusterNestedStructList( + 1, + true, + simpleStruct, + listOf(simpleStruct, simpleStruct2), + listOf(1L, 2L), + listOf(byteArrayOf(0x02, 0x03), byteArrayOf(0x03, 0x04)), + listOf(1, 2) + ) + val nestedStructList2 = + UnitTestingClusterNestedStructList( + 2, + false, + simpleStruct2, + listOf(simpleStruct2, simpleStruct), + listOf(3L, 4L), + listOf(byteArrayOf(0x04, 0x05), byteArrayOf(0x06, 0x07)), + listOf(3, 4, 5) + ) + val testStruct = + UnitTestingClusterDoubleNestedStructList(listOf(nestedStructList, nestedStructList2)) + + val tlvWriter = TlvWriter() + testStruct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareTestStruct = + UnitTestingClusterDoubleNestedStructList.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareTestStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + fun nullablesAndOptionalsStructTlvTest1() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterNullablesAndOptionalsStruct( + 1, + Optional.of(2), + Optional.of(3), + "test4", + Optional.of("test5"), + Optional.of("test6"), + simpleStruct, + Optional.of(simpleStruct), + Optional.of(simpleStruct), + listOf(1, 2, 3), + Optional.of(listOf(4, 5, 6)), + Optional.of(listOf(7, 8, 9)) + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = + UnitTestingClusterNullablesAndOptionalsStruct.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + // Optional Check - 1 + fun nullablesAndOptionalsStructTlvTest2() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterNullablesAndOptionalsStruct( + 1, + Optional.empty(), + Optional.empty(), + "test4", + Optional.of("test5"), + Optional.of("test6"), + simpleStruct, + Optional.empty(), + Optional.empty(), + listOf(1, 2, 3), + Optional.of(listOf(4, 5, 6)), + Optional.of(listOf(7, 8, 9)) + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = + UnitTestingClusterNullablesAndOptionalsStruct.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + // Optional Check - 2 + fun nullablesAndOptionalsStructTlvTest3() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterNullablesAndOptionalsStruct( + 1, + Optional.of(2), + Optional.of(3), + "test4", + Optional.empty(), + Optional.empty(), + simpleStruct, + Optional.of(simpleStruct), + Optional.of(simpleStruct), + listOf(1, 2, 3), + Optional.empty(), + Optional.empty() + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = + UnitTestingClusterNullablesAndOptionalsStruct.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + // Nullable check - 1 + fun nullablesAndOptionalsStructTlvTest4() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterNullablesAndOptionalsStruct( + 1, + Optional.empty(), + null, + null, + Optional.of("test5"), + Optional.of("test6"), + simpleStruct, + Optional.empty(), + null, + null, + Optional.of(listOf(4, 5, 6)), + Optional.of(listOf(7, 8, 9)) + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = + UnitTestingClusterNullablesAndOptionalsStruct.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + // Nullable check - 2 + fun nullablesAndOptionalsStructTlvTest5() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterNullablesAndOptionalsStruct( + null, + Optional.of(2), + Optional.of(3), + "test4", + Optional.empty(), + null, + null, + Optional.of(simpleStruct), + Optional.of(simpleStruct), + listOf(1, 2, 3), + Optional.empty(), + null + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = + UnitTestingClusterNullablesAndOptionalsStruct.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + fun testFabricScopedTlvTest1() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterTestFabricScoped( + 1, + Optional.of(2), + 3, + Optional.of(4), + "test1", + simpleStruct, + listOf(1, 2, 3), + 4 + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = UnitTestingClusterTestFabricScoped.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + fun testFabricScopedTlvTest2() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterTestFabricScoped( + 1, + Optional.empty(), + 3, + null, + "test1", + simpleStruct, + listOf(1, 2, 3), + 4 + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = UnitTestingClusterTestFabricScoped.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + fun testFabricScopedTlvTest3() { + val simpleStruct = + UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + val struct = + UnitTestingClusterTestFabricScoped( + 1, + Optional.of(2), + null, + Optional.empty(), + "test1", + simpleStruct, + listOf(1, 2, 3), + 4 + ) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = UnitTestingClusterTestFabricScoped.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } + + @Test + fun testListStructOctetTlvTest() { + val struct = UnitTestingClusterTestListStructOctet(1L, byteArrayOf(0x01, 0x02, 0x03)) + + val tlvWriter = TlvWriter() + struct.toTlv(AnonymousTag, tlvWriter) + + // to TLV ByteArray + val tlv = tlvWriter.getEncoded() + + // Reparse to Struct + val tlvReader = TlvReader(tlv) + val compareStruct = UnitTestingClusterTestListStructOctet.fromTlv(AnonymousTag, tlvReader) + + // For comparing, struct to re-generate to tlv bytearray + val compareTlvWriter = TlvWriter() + compareStruct.toTlv(AnonymousTag, compareTlvWriter) + + assert(compareTlvWriter.getEncoded().contentEquals(tlvWriter.getEncoded())) + } +} From 35998cde84c5a77648b05f1ae7e0362b2b15c1c2 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 8 Aug 2023 18:31:00 -0400 Subject: [PATCH 50/74] Add support for controllers not advertising their operational identities. (#28537) If multiple controllers are running, and some want to enable server interactions while others do not, the ones not enabling server interactions should not advertise. Fixes https://github.com/project-chip/connectedhomeip/issues/28279 --- src/app/server/Dnssd.cpp | 5 ++ src/controller/CHIPDeviceController.cpp | 24 ++++----- .../CHIPDeviceControllerFactory.cpp | 31 ++++++++--- src/controller/CHIPDeviceControllerFactory.h | 1 + src/credentials/FabricTable.cpp | 41 ++++++++------- src/credentials/FabricTable.h | 51 +++++++++++++------ src/credentials/tests/TestFabricTable.cpp | 29 ++++++++--- 7 files changed, 121 insertions(+), 61 deletions(-) diff --git a/src/app/server/Dnssd.cpp b/src/app/server/Dnssd.cpp index 17c9b4a459af9e..86a70a0a8c69e2 100644 --- a/src/app/server/Dnssd.cpp +++ b/src/app/server/Dnssd.cpp @@ -152,6 +152,11 @@ CHIP_ERROR DnssdServer::AdvertiseOperational() for (const FabricInfo & fabricInfo : *mFabricTable) { + if (!fabricInfo.ShouldAdvertiseIdentity()) + { + continue; + } + uint8_t macBuffer[DeviceLayer::ConfigurationManager::kPrimaryMACAddressLength]; MutableByteSpan mac(macBuffer); if (chip::DeviceLayer::ConfigurationMgr().GetPrimaryMACAddress(mac) != CHIP_NO_ERROR) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index babc6688ad45c1..8cb41b167169cc 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -129,15 +129,6 @@ CHIP_ERROR DeviceController::Init(ControllerInitParams params) if (params.operationalKeypair != nullptr || !params.controllerNOC.empty() || !params.controllerRCAC.empty()) { ReturnErrorOnFailure(InitControllerNOCChain(params)); - - if (params.enableServerInteractions) - { - // - // Advertise our operational identity on the network to facilitate discovery by clients that look to - // establish CASE with a controller that is also offering server-side capabilities (e.g an OTA provider). - // - app::DnssdServer::Instance().AdvertiseOperational(); - } } mSystemState = params.systemState->Retain(); @@ -239,6 +230,9 @@ CHIP_ERROR DeviceController::InitControllerNOCChain(const ControllerInitParams & CHIP_ERROR err = CHIP_NO_ERROR; + auto advertiseOperational = + params.enableServerInteractions ? FabricTable::AdvertiseIdentity::Yes : FabricTable::AdvertiseIdentity::No; + // // We permit colliding fabrics when multiple controllers are present on the same logical fabric // since each controller is associated with a unique FabricInfo 'identity' object and consequently, @@ -261,7 +255,7 @@ CHIP_ERROR DeviceController::InitControllerNOCChain(const ControllerInitParams & if (fabricFoundInTable) { err = fabricTable->UpdatePendingFabricWithProvidedOpKey(fabricIndex, nocSpan, icacSpan, externalOperationalKeypair, - hasExternallyOwnedKeypair); + hasExternallyOwnedKeypair, advertiseOperational); } else // CASE 2: New fabric with injected key @@ -269,8 +263,9 @@ CHIP_ERROR DeviceController::InitControllerNOCChain(const ControllerInitParams & err = fabricTable->AddNewPendingTrustedRootCert(rcacSpan); if (err == CHIP_NO_ERROR) { - err = fabricTable->AddNewPendingFabricWithProvidedOpKey( - nocSpan, icacSpan, newFabricVendorId, externalOperationalKeypair, hasExternallyOwnedKeypair, &fabricIndex); + err = fabricTable->AddNewPendingFabricWithProvidedOpKey(nocSpan, icacSpan, newFabricVendorId, + externalOperationalKeypair, hasExternallyOwnedKeypair, + &fabricIndex, advertiseOperational); } } } @@ -283,7 +278,7 @@ CHIP_ERROR DeviceController::InitControllerNOCChain(const ControllerInitParams & { VerifyOrReturnError(fabricTable->HasOperationalKeyForFabric(fabricIndex), CHIP_ERROR_KEY_NOT_FOUND); - err = fabricTable->UpdatePendingFabricWithOperationalKeystore(fabricIndex, nocSpan, icacSpan); + err = fabricTable->UpdatePendingFabricWithOperationalKeystore(fabricIndex, nocSpan, icacSpan, advertiseOperational); } else // CASE 4: New fabric with operational keystore @@ -291,7 +286,8 @@ CHIP_ERROR DeviceController::InitControllerNOCChain(const ControllerInitParams & err = fabricTable->AddNewPendingTrustedRootCert(rcacSpan); if (err == CHIP_NO_ERROR) { - err = fabricTable->AddNewPendingFabricWithOperationalKeystore(nocSpan, icacSpan, newFabricVendorId, &fabricIndex); + err = fabricTable->AddNewPendingFabricWithOperationalKeystore(nocSpan, icacSpan, newFabricVendorId, &fabricIndex, + advertiseOperational); } if (err == CHIP_NO_ERROR) diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index c57cb9a57dd28c..e6392e8440739a 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -256,13 +256,6 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) // Consequently, reach in set the fabric table pointer to point to the right version. // app::DnssdServer::Instance().SetFabricTable(stateParams.fabricTable); - - // - // Start up the DNS-SD server. We are not giving it a - // CommissioningModeProvider, so it will not claim we are in - // commissioning mode. - // - chip::app::DnssdServer::Instance().StartServer(); } stateParams.sessionSetupPool = Platform::New(); @@ -315,6 +308,18 @@ void DeviceControllerFactory::PopulateInitParams(ControllerInitParams & controll controllerParams.enableServerInteractions = params.enableServerInteractions; } +void DeviceControllerFactory::ControllerInitialized(const DeviceController & controller) +{ + if (mEnableServerInteractions && controller.GetFabricIndex() != kUndefinedFabricIndex) + { + // Restart DNS-SD advertising, because initialization of this controller could + // have modified whether a particular fabric identity should be + // advertised. Just calling AdvertiseOperational() is not good enough + // here, since we might be removing advertising. + app::DnssdServer::Instance().StartServer(); + } +} + CHIP_ERROR DeviceControllerFactory::SetupController(SetupParams params, DeviceController & controller) { VerifyOrReturnError(mSystemState != nullptr, CHIP_ERROR_INCORRECT_STATE); @@ -326,6 +331,12 @@ CHIP_ERROR DeviceControllerFactory::SetupController(SetupParams params, DeviceCo PopulateInitParams(controllerParams, params); CHIP_ERROR err = controller.Init(controllerParams); + + if (err == CHIP_NO_ERROR) + { + ControllerInitialized(controller); + } + return err; } @@ -347,6 +358,12 @@ CHIP_ERROR DeviceControllerFactory::SetupCommissioner(SetupParams params, Device commissionerParams.deviceAttestationVerifier = params.deviceAttestationVerifier; CHIP_ERROR err = commissioner.Init(commissionerParams); + + if (err == CHIP_NO_ERROR) + { + ControllerInitialized(commissioner); + } + return err; } diff --git a/src/controller/CHIPDeviceControllerFactory.h b/src/controller/CHIPDeviceControllerFactory.h index 04855d62cfc3d2..ad1376eca9d301 100644 --- a/src/controller/CHIPDeviceControllerFactory.h +++ b/src/controller/CHIPDeviceControllerFactory.h @@ -252,6 +252,7 @@ class DeviceControllerFactory void PopulateInitParams(ControllerInitParams & controllerParams, const SetupParams & params); CHIP_ERROR InitSystemState(FactoryInitParams params); CHIP_ERROR InitSystemState(); + void ControllerInitialized(const DeviceController & controller); uint16_t mListenPort; DeviceControllerSystemState * mSystemState = nullptr; diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index eeb5932f01a48a..8ec4691f9f80fa 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -78,12 +78,13 @@ CHIP_ERROR FabricInfo::Init(const FabricInfo::InitParams & initParams) Reset(); - mNodeId = initParams.nodeId; - mFabricId = initParams.fabricId; - mFabricIndex = initParams.fabricIndex; - mCompressedFabricId = initParams.compressedFabricId; - mRootPublicKey = initParams.rootPublicKey; - mVendorId = static_cast(initParams.vendorId); + mNodeId = initParams.nodeId; + mFabricId = initParams.fabricId; + mFabricIndex = initParams.fabricIndex; + mCompressedFabricId = initParams.compressedFabricId; + mRootPublicKey = initParams.rootPublicKey; + mVendorId = static_cast(initParams.vendorId); + mShouldAdvertiseIdentity = initParams.advertiseIdentity; // Deal with externally injected keys if (initParams.operationalKeypair != nullptr) @@ -105,12 +106,13 @@ void FabricInfo::operator=(FabricInfo && other) { Reset(); - mNodeId = other.mNodeId; - mFabricId = other.mFabricId; - mFabricIndex = other.mFabricIndex; - mCompressedFabricId = other.mCompressedFabricId; - mRootPublicKey = other.mRootPublicKey; - mVendorId = other.mVendorId; + mNodeId = other.mNodeId; + mFabricId = other.mFabricId; + mFabricIndex = other.mFabricIndex; + mCompressedFabricId = other.mCompressedFabricId; + mRootPublicKey = other.mRootPublicKey; + mVendorId = other.mVendorId; + mShouldAdvertiseIdentity = other.mShouldAdvertiseIdentity; SetFabricLabel(other.GetFabricLabel()); @@ -768,7 +770,7 @@ CHIP_ERROR FabricTable::NotifyFabricCommitted(FabricIndex fabricIndex) CHIP_ERROR FabricTable::AddOrUpdateInner(FabricIndex fabricIndex, bool isAddition, Crypto::P256Keypair * existingOpKey, - bool isExistingOpKeyExternallyOwned, uint16_t vendorId) + bool isExistingOpKeyExternallyOwned, uint16_t vendorId, AdvertiseIdentity advertiseIdentity) { // All parameters pre-validated before we get here @@ -867,6 +869,8 @@ FabricTable::AddOrUpdateInner(FabricIndex fabricIndex, bool isAddition, Crypto:: return CHIP_ERROR_INCORRECT_STATE; } + newFabricInfo.advertiseIdentity = (advertiseIdentity == AdvertiseIdentity::Yes); + // Update local copy of fabric data. For add it's a new entry, for update, it's `mPendingFabric` shadow entry. ReturnErrorOnFailure(fabricEntry->Init(newFabricInfo)); @@ -1642,7 +1646,7 @@ CHIP_ERROR FabricTable::FindExistingFabricByNocChaining(FabricIndex pendingFabri CHIP_ERROR FabricTable::AddNewPendingFabricCommon(const ByteSpan & noc, const ByteSpan & icac, uint16_t vendorId, Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned, - FabricIndex * outNewFabricIndex) + AdvertiseIdentity advertiseIdentity, FabricIndex * outNewFabricIndex) { VerifyOrReturnError(mOpCertStore != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(outNewFabricIndex != nullptr, CHIP_ERROR_INVALID_ARGUMENT); @@ -1692,8 +1696,8 @@ CHIP_ERROR FabricTable::AddNewPendingFabricCommon(const ByteSpan & noc, const By ReturnErrorOnFailure(mOpCertStore->AddNewOpCertsForFabric(fabricIndexToUse, noc, icac)); VerifyOrReturnError(SetPendingDataFabricIndex(fabricIndexToUse), CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR err = - AddOrUpdateInner(fabricIndexToUse, /* isAddition = */ true, existingOpKey, isExistingOpKeyExternallyOwned, vendorId); + CHIP_ERROR err = AddOrUpdateInner(fabricIndexToUse, /* isAddition = */ true, existingOpKey, isExistingOpKeyExternallyOwned, + vendorId, advertiseIdentity); if (err != CHIP_NO_ERROR) { // Revert partial state added on error @@ -1712,7 +1716,8 @@ CHIP_ERROR FabricTable::AddNewPendingFabricCommon(const ByteSpan & noc, const By } CHIP_ERROR FabricTable::UpdatePendingFabricCommon(FabricIndex fabricIndex, const ByteSpan & noc, const ByteSpan & icac, - Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned) + Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned, + AdvertiseIdentity advertiseIdentity) { VerifyOrReturnError(mOpCertStore != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_ARGUMENT); @@ -1751,7 +1756,7 @@ CHIP_ERROR FabricTable::UpdatePendingFabricCommon(FabricIndex fabricIndex, const VerifyOrReturnError(SetPendingDataFabricIndex(fabricIndex), CHIP_ERROR_INCORRECT_STATE); CHIP_ERROR err = AddOrUpdateInner(fabricIndex, /* isAddition = */ false, existingOpKey, isExistingOpKeyExternallyOwned, - fabricInfo->GetVendorId()); + fabricInfo->GetVendorId(), advertiseIdentity); if (err != CHIP_NO_ERROR) { // Revert partial state added on error diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 26102984e81130..96b5c415f7e237 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -112,6 +112,8 @@ class DLL_EXPORT FabricInfo bool HasOperationalKey() const { return mOperationalKey != nullptr; } + bool ShouldAdvertiseIdentity() const { return mShouldAdvertiseIdentity; } + friend class FabricTable; private: @@ -125,6 +127,7 @@ class DLL_EXPORT FabricInfo VendorId vendorId = VendorId::NotSpecified; /**< Vendor ID for commissioner of fabric */ Crypto::P256Keypair * operationalKeypair = nullptr; bool hasExternallyOwnedKeypair = false; + bool advertiseIdentity = false; CHIP_ERROR AreValid() const { @@ -204,7 +207,9 @@ class DLL_EXPORT FabricInfo { chip::Platform::Delete(mOperationalKey); } - mOperationalKey = nullptr; + mOperationalKey = nullptr; + mHasExternallyOwnedOperationalKey = false; + mShouldAdvertiseIdentity = true; mFabricIndex = kUndefinedFabricIndex; mNodeId = kUndefinedNodeId; @@ -230,14 +235,16 @@ class DLL_EXPORT FabricInfo // mFabricLabel is 33 bytes, so ends on a 1 mod 4 byte boundary. char mFabricLabel[kFabricLabelMaxLengthInBytes + 1] = { '\0' }; - // mFabricIndex, mVendorId, mHasExternallyOwnedOperationalKey are 4 bytes - // and do not end up with any padding if they come after the 33-byte - // mFabricLabel, so end on a 1 mod 4 byte boundary. + // mFabricIndex, mVendorId, mHasExternallyOwnedOperationalKey, + // mShouldAdvertiseIdentity are 5 bytes and do not include any padding if + // they come after the 33-byte mFabricLabel, so end on a 2 mod 4 byte + // boundary. FabricIndex mFabricIndex = kUndefinedFabricIndex; VendorId mVendorId = VendorId::NotSpecified; bool mHasExternallyOwnedOperationalKey = false; + bool mShouldAdvertiseIdentity = true; - // 3 bytes of padding here, since mOperationalKey needs to be void*-aligned, + // 2 bytes of padding here, since mOperationalKey needs to be void*-aligned, // so has to be at a 0 mod 4 byte location. mutable Crypto::P256Keypair * mOperationalKey = nullptr; @@ -400,6 +407,12 @@ class DLL_EXPORT FabricTable FabricTable(FabricTable const &) = delete; void operator=(FabricTable const &) = delete; + enum class AdvertiseIdentity : uint8_t + { + Yes, + No + }; + // Returns CHIP_ERROR_NOT_FOUND if there is no fabric for that index. CHIP_ERROR Delete(FabricIndex fabricIndex); void DeleteAllFabrics(); @@ -783,9 +796,10 @@ class DLL_EXPORT FabricTable * @retval other CHIP_ERROR_* on internal errors or certificate validation errors. */ CHIP_ERROR AddNewPendingFabricWithOperationalKeystore(const ByteSpan & noc, const ByteSpan & icac, uint16_t vendorId, - FabricIndex * outNewFabricIndex) + FabricIndex * outNewFabricIndex, + AdvertiseIdentity advertiseIdentity = AdvertiseIdentity::Yes) { - return AddNewPendingFabricCommon(noc, icac, vendorId, nullptr, false, outNewFabricIndex); + return AddNewPendingFabricCommon(noc, icac, vendorId, nullptr, false, advertiseIdentity, outNewFabricIndex); }; /** @@ -818,9 +832,11 @@ class DLL_EXPORT FabricTable */ CHIP_ERROR AddNewPendingFabricWithProvidedOpKey(const ByteSpan & noc, const ByteSpan & icac, uint16_t vendorId, Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned, - FabricIndex * outNewFabricIndex) + FabricIndex * outNewFabricIndex, + AdvertiseIdentity advertiseIdentity = AdvertiseIdentity::Yes) { - return AddNewPendingFabricCommon(noc, icac, vendorId, existingOpKey, isExistingOpKeyExternallyOwned, outNewFabricIndex); + return AddNewPendingFabricCommon(noc, icac, vendorId, existingOpKey, isExistingOpKeyExternallyOwned, advertiseIdentity, + outNewFabricIndex); }; /** @@ -852,9 +868,10 @@ class DLL_EXPORT FabricTable * @retval CHIP_ERROR_INVALID_ARGUMENT if any of the arguments are invalid such as too large or out of bounds. * @retval other CHIP_ERROR_* on internal errors or certificate validation errors. */ - CHIP_ERROR UpdatePendingFabricWithOperationalKeystore(FabricIndex fabricIndex, const ByteSpan & noc, const ByteSpan & icac) + CHIP_ERROR UpdatePendingFabricWithOperationalKeystore(FabricIndex fabricIndex, const ByteSpan & noc, const ByteSpan & icac, + AdvertiseIdentity advertiseIdentity = AdvertiseIdentity::Yes) { - return UpdatePendingFabricCommon(fabricIndex, noc, icac, nullptr, false); + return UpdatePendingFabricCommon(fabricIndex, noc, icac, nullptr, false, advertiseIdentity); } /** @@ -886,9 +903,10 @@ class DLL_EXPORT FabricTable */ CHIP_ERROR UpdatePendingFabricWithProvidedOpKey(FabricIndex fabricIndex, const ByteSpan & noc, const ByteSpan & icac, - Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned) + Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned, + AdvertiseIdentity advertiseIdentity = AdvertiseIdentity::Yes) { - return UpdatePendingFabricCommon(fabricIndex, noc, icac, existingOpKey, isExistingOpKeyExternallyOwned); + return UpdatePendingFabricCommon(fabricIndex, noc, icac, existingOpKey, isExistingOpKeyExternallyOwned, advertiseIdentity); } /** @@ -1050,16 +1068,17 @@ class DLL_EXPORT FabricTable // Core validation logic for fabric additions/updates CHIP_ERROR AddOrUpdateInner(FabricIndex fabricIndex, bool isAddition, Crypto::P256Keypair * existingOpKey, - bool isExistingOpKeyExternallyOwned, uint16_t vendorId); + bool isExistingOpKeyExternallyOwned, uint16_t vendorId, AdvertiseIdentity advertiseIdentity); // Common code for fabric addition, for either OperationalKeystore or injected key scenarios. CHIP_ERROR AddNewPendingFabricCommon(const ByteSpan & noc, const ByteSpan & icac, uint16_t vendorId, Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned, - FabricIndex * outNewFabricIndex); + AdvertiseIdentity advertiseIdentity, FabricIndex * outNewFabricIndex); // Common code for fabric updates, for either OperationalKeystore or injected key scenarios. CHIP_ERROR UpdatePendingFabricCommon(FabricIndex fabricIndex, const ByteSpan & noc, const ByteSpan & icac, - Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned); + Crypto::P256Keypair * existingOpKey, bool isExistingOpKeyExternallyOwned, + AdvertiseIdentity advertiseIdentity); // Common code for looking up a fabric given a root public key, a fabric ID and an optional node id scoped to that fabric. const FabricInfo * FindFabricCommon(const Crypto::P256PublicKey & rootPubKey, FabricId fabricId, diff --git a/src/credentials/tests/TestFabricTable.cpp b/src/credentials/tests/TestFabricTable.cpp index 83866b3c8bf78b..96ed242a684310 100644 --- a/src/credentials/tests/TestFabricTable.cpp +++ b/src/credentials/tests/TestFabricTable.cpp @@ -145,7 +145,8 @@ static CHIP_ERROR LoadTestFabric_Node01_02(nlTestSuite * inSuite, FabricTable & /** * Load a single test fabric with with the Root02:ICA02:Node02_01 identity. */ -static CHIP_ERROR LoadTestFabric_Node02_01(nlTestSuite * inSuite, FabricTable & fabricTable, bool doCommit) +static CHIP_ERROR LoadTestFabric_Node02_01(nlTestSuite * inSuite, FabricTable & fabricTable, bool doCommit, + FabricTable::AdvertiseIdentity advertiseIdentity = FabricTable::AdvertiseIdentity::Yes) { Crypto::P256SerializedKeypair opKeysSerialized; FabricIndex fabricIndex; @@ -166,8 +167,9 @@ static CHIP_ERROR LoadTestFabric_Node02_01(nlTestSuite * inSuite, FabricTable & NL_TEST_ASSERT(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcacSpan) == CHIP_NO_ERROR); - CHIP_ERROR err = fabricTable.AddNewPendingFabricWithProvidedOpKey(nocSpan, icacSpan, VendorId::TestVendor1, &opKey_Node02_01, - /*isExistingOpKeyExternallyOwned =*/true, &fabricIndex); + CHIP_ERROR err = + fabricTable.AddNewPendingFabricWithProvidedOpKey(nocSpan, icacSpan, VendorId::TestVendor1, &opKey_Node02_01, + /*isExistingOpKeyExternallyOwned =*/true, &fabricIndex, advertiseIdentity); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); if (doCommit) @@ -821,7 +823,9 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) ByteSpan noc = fabric44CertAuthority.GetNoc(); NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 2); - NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.UpdatePendingFabricWithOperationalKeystore(2, noc, ByteSpan{})); + NL_TEST_ASSERT_SUCCESS( + inSuite, + fabricTable.UpdatePendingFabricWithOperationalKeystore(2, noc, ByteSpan{}, FabricTable::AdvertiseIdentity::No)); NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 2); // No storage yet @@ -839,12 +843,14 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) { NL_TEST_ASSERT(inSuite, iterFabricInfo.GetNodeId() == 55); NL_TEST_ASSERT(inSuite, iterFabricInfo.GetFabricId() == 11); + NL_TEST_ASSERT(inSuite, iterFabricInfo.ShouldAdvertiseIdentity()); saw1 = true; } if (iterFabricInfo.GetFabricIndex() == 2) { NL_TEST_ASSERT(inSuite, iterFabricInfo.GetNodeId() == 1000); NL_TEST_ASSERT(inSuite, iterFabricInfo.GetFabricId() == 44); + NL_TEST_ASSERT(inSuite, !iterFabricInfo.ShouldAdvertiseIdentity()); saw2 = true; } } @@ -1961,6 +1967,7 @@ void TestUpdateNocFailSafe(nlTestSuite * inSuite, void * inContext) { NL_TEST_ASSERT(inSuite, iterFabricInfo.GetNodeId() == 1000); NL_TEST_ASSERT(inSuite, iterFabricInfo.GetFabricId() == 44); + NL_TEST_ASSERT(inSuite, iterFabricInfo.ShouldAdvertiseIdentity()); saw1 = true; } } @@ -2072,6 +2079,7 @@ void TestUpdateNocFailSafe(nlTestSuite * inSuite, void * inContext) { NL_TEST_ASSERT(inSuite, iterFabricInfo.GetNodeId() == 1001); NL_TEST_ASSERT(inSuite, iterFabricInfo.GetFabricId() == 44); + NL_TEST_ASSERT(inSuite, iterFabricInfo.ShouldAdvertiseIdentity()); saw1 = true; } } @@ -2342,7 +2350,9 @@ void TestFabricLookup(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, fabricTableHolder.Init(&testStorage) == CHIP_NO_ERROR); FabricTable & fabricTable = fabricTableHolder.GetFabricTable(); NL_TEST_ASSERT(inSuite, LoadTestFabric_Node01_01(inSuite, fabricTable, /* doCommit = */ true) == CHIP_NO_ERROR); - NL_TEST_ASSERT(inSuite, LoadTestFabric_Node02_01(inSuite, fabricTable, /* doCommit = */ true) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, + LoadTestFabric_Node02_01(inSuite, fabricTable, /* doCommit = */ true, FabricTable::AdvertiseIdentity::No) == + CHIP_NO_ERROR); // Attempt lookup of the Root01 fabric. { @@ -2360,6 +2370,7 @@ void TestFabricLookup(nlTestSuite * inSuite, void * inContext) return; } NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricIndex() == 1); + NL_TEST_ASSERT(inSuite, fabricInfo->ShouldAdvertiseIdentity()); } // Attempt lookup of the Root02 fabric. @@ -2378,6 +2389,7 @@ void TestFabricLookup(nlTestSuite * inSuite, void * inContext) return; } NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricIndex() == 2); + NL_TEST_ASSERT(inSuite, !fabricInfo->ShouldAdvertiseIdentity()); } } @@ -2446,7 +2458,8 @@ void TestAddNocRootCollision(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac)); FabricIndex newFabricIndex = kUndefinedFabricIndex; NL_TEST_ASSERT_SUCCESS(inSuite, - fabricTable.AddNewPendingFabricWithOperationalKeystore(noc, icac, kVendorId, &newFabricIndex)); + fabricTable.AddNewPendingFabricWithOperationalKeystore(noc, icac, kVendorId, &newFabricIndex, + FabricTable::AdvertiseIdentity::No)); NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 1); NL_TEST_ASSERT(inSuite, newFabricIndex == 1); @@ -2457,6 +2470,8 @@ void TestAddNocRootCollision(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); if (fabricInfo != nullptr) { + NL_TEST_ASSERT(inSuite, !fabricInfo->ShouldAdvertiseIdentity()); + Credentials::ChipCertificateSet certificates; NL_TEST_ASSERT_SUCCESS(inSuite, certificates.Init(1)); NL_TEST_ASSERT_SUCCESS(inSuite, @@ -2561,6 +2576,8 @@ void TestAddNocRootCollision(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); if (fabricInfo != nullptr) { + NL_TEST_ASSERT(inSuite, fabricInfo->ShouldAdvertiseIdentity()); + Credentials::ChipCertificateSet certificates; NL_TEST_ASSERT_SUCCESS(inSuite, certificates.Init(1)); NL_TEST_ASSERT_SUCCESS(inSuite, From e1d9749f3ccf75e26dedc5d4bd1887c60c501f66 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 8 Aug 2023 18:47:08 -0400 Subject: [PATCH 51/74] Add a way ask a DeviceCommissioner for its DeviceAttestationVerifier. (#28587) --- src/controller/CHIPDeviceController.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 2d85fdce3068e4..b328ef68d9a47c 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -702,6 +702,8 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, mDeviceAttestationVerifier = deviceAttestationVerifier; } + Credentials::DeviceAttestationVerifier * GetDeviceAttestationVerifier() const { return mDeviceAttestationVerifier; } + Optional GetCommissioningParameters() { return mDefaultCommissioner == nullptr ? NullOptional : MakeOptional(mDefaultCommissioner->GetCommissioningParameters()); From e2cbb33c833a970bd282e1d03d264783c994644b Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Wed, 9 Aug 2023 06:11:14 +0530 Subject: [PATCH 52/74] Modified script Jul 28 (#28361) Co-authored-by: Restyled.io --- .../placeholder/linux/apps/app1/ciTests.json | 32 +- scripts/tests/chiptest/__init__.py | 3 + src/app/tests/suites/certification/PICS.yaml | 328 +- .../suites/certification/Test_TC_ACE_1_6.yaml | 2 +- .../certification/Test_TC_ACFREMON_1_1.yaml | 26 +- .../suites/certification/Test_TC_ACL_2_2.yaml | 4 +- .../Test_TC_ACT_3_1_Simulated.yaml | 562 -- .../certification/Test_TC_BOOL_2_2.yaml | 14 +- .../Test_TC_BOOL_3_1_Simulated.yaml | 356 - .../certification/Test_TC_BRBINFO_1_1.yaml | 25 +- .../certification/Test_TC_CADMIN_1_25.yaml | 2139 +++++ .../certification/Test_TC_CADMIN_1_26.yaml | 2121 +++++ .../suites/certification/Test_TC_CC_1_1.yaml | 24 +- .../Test_TC_CC_2_2_Simulated.yaml | 318 - .../suites/certification/Test_TC_CC_3_1.yaml | 4 +- .../suites/certification/Test_TC_CC_4_3.yaml | 4 +- .../suites/certification/Test_TC_CC_6_1.yaml | 2 +- .../suites/certification/Test_TC_CC_8_1.yaml | 2 +- .../certification/Test_TC_CDOCONC_1_1.yaml | 69 +- .../certification/Test_TC_CMOCONC_1_1.yaml | 61 +- .../certification/Test_TC_CNET_4_17.yaml | 681 -- .../certification/Test_TC_CNET_4_18.yaml | 193 - .../certification/Test_TC_CNET_4_19.yaml | 517 -- .../certification/Test_TC_CNET_4_9.yaml | 4 +- .../suites/certification/Test_TC_DD_1_7.yaml | 6 +- .../certification/Test_TC_DESC_1_1.yaml | 14 +- .../certification/Test_TC_DESC_2_1.yaml | 11 +- .../Test_TC_DESC_2_2_Simulated.yaml | 61 - .../Test_TC_DGETH_3_1_Simulated.yaml | 73 - .../certification/Test_TC_DGGEN_3_1.yaml | 864 -- .../Test_TC_DGSW_3_1_Simulated.yaml | 48 - .../Test_TC_DGTHREAD_3_1_Simulated.yaml | 174 - .../Test_TC_DGTHREAD_3_2_Simulated.yaml | 113 - .../Test_TC_DGTHREAD_3_3_Simulated.yaml | 113 - .../Test_TC_DGWIFI_3_1_Simulated.yaml | 94 - .../certification/Test_TC_DISHM_1_1.yaml | 93 +- .../certification/Test_TC_DISHM_1_2.yaml | 115 +- .../certification/Test_TC_DISHM_2_1.yaml | 219 +- .../certification/Test_TC_DISHM_3_1.yaml | 154 +- .../certification/Test_TC_DISHM_3_2.yaml | 230 +- .../certification/Test_TC_DISHM_3_3.yaml | 288 +- .../certification/Test_TC_DRLK_2_1.yaml | 2 +- .../certification/Test_TC_DRLK_2_2.yaml | 2 +- .../certification/Test_TC_DRLK_2_9.yaml | 148 +- .../Test_TC_DRLK_3_1_Simulated.yaml | 212 - .../certification/Test_TC_DRLK_3_3.yaml | 995 --- .../suites/certification/Test_TC_FAN_3_2.yaml | 8 +- .../suites/certification/Test_TC_FAN_3_3.yaml | 175 - .../suites/certification/Test_TC_FAN_3_5.yaml | 592 -- .../Test_TC_FLABEL_3_1_Simulated.yaml | 33 - .../certification/Test_TC_FLDCONC_1_1.yaml | 61 +- .../Test_TC_FLW_3_1_Simulated.yaml | 415 - .../certification/Test_TC_GRPKEY_1_1.yaml | 232 + .../suites/certification/Test_TC_G_2_4.yaml | 435 + .../Test_TC_G_3_1_Simulated.yaml | 33 - .../certification/Test_TC_HEPAFREMON_1_1.yaml | 30 +- .../certification/Test_TC_IDM_10_1.yaml | 290 + .../certification/Test_TC_IDM_11_1.yaml | 81 + .../suites/certification/Test_TC_IDM_1_2.yaml | 39 +- .../suites/certification/Test_TC_IDM_4_1.yaml | 63 +- .../suites/certification/Test_TC_IDM_4_2.yaml | 754 +- .../suites/certification/Test_TC_IDM_4_3.yaml | 91 +- .../Test_TC_ILL_3_1_Simulated.yaml | 240 - .../Test_TC_I_3_1_Simulated.yaml | 527 -- .../Test_TC_LCFG_3_1_Simulated.yaml | 40 - .../Test_TC_LTIME_1_1_Simulated.yaml | 59 - .../certification/Test_TC_LTIME_2_1.yaml | 938 --- .../Test_TC_LUNIT_1_1_Simulated.yaml | 54 - .../Test_TC_LUNIT_2_1_Simulated.yaml | 48 - .../suites/certification/Test_TC_LVL_8_1.yaml | 314 - .../suites/certification/Test_TC_LWM_1_1.yaml | 88 +- .../suites/certification/Test_TC_LWM_1_2.yaml | 94 +- .../suites/certification/Test_TC_LWM_2_1.yaml | 170 +- .../suites/certification/Test_TC_LWM_3_1.yaml | 132 +- .../suites/certification/Test_TC_LWM_3_2.yaml | 194 +- .../certification/Test_TC_NDOCONC_1_1.yaml | 61 +- .../Test_TC_OCC_2_2_Simulated.yaml | 108 - .../Test_TC_OCC_2_4_Simulated.yaml | 2 +- .../Test_TC_OO_3_1_Simulated.yaml | 374 - .../certification/Test_TC_OPSTATE_2_1.yaml | 5 + .../certification/Test_TC_OPSTATE_2_2.yaml | 5 + .../certification/Test_TC_OPSTATE_2_3.yaml | 5 + .../certification/Test_TC_OPSTATE_2_4.yaml | 17 +- .../certification/Test_TC_OZCONC_1_1.yaml | 61 +- .../Test_TC_PCC_3_1_Simulated.yaml | 494 -- .../certification/Test_TC_PMHCONC_1_1.yaml | 61 +- .../certification/Test_TC_PMICONC_1_1.yaml | 60 +- .../certification/Test_TC_PMKCONC_1_1.yaml | 61 +- .../Test_TC_PRS_3_1_Simulated.yaml | 264 - .../suites/certification/Test_TC_PS_3_1.yaml | 710 +- .../Test_TC_RH_3_1_Simulated.yaml | 399 - .../certification/Test_TC_RNCONC_1_1.yaml | 61 +- .../certification/Test_TC_RVCCLEANM_1_2.yaml | 108 +- .../certification/Test_TC_RVCCLEANM_2_1.yaml | 217 +- .../certification/Test_TC_RVCCLEANM_3_1.yaml | 119 +- .../certification/Test_TC_RVCCLEANM_3_2.yaml | 196 +- .../certification/Test_TC_RVCCLEANM_3_3.yaml | 261 +- .../certification/Test_TC_RVCOPSTATE_1_1.yaml | 36 +- .../certification/Test_TC_RVCRUNM_1_2.yaml | 103 +- .../certification/Test_TC_RVCRUNM_2_1.yaml | 199 +- .../certification/Test_TC_RVCRUNM_3_1.yaml | 131 +- .../certification/Test_TC_RVCRUNM_3_2.yaml | 209 +- .../certification/Test_TC_RVCRUNM_3_3.yaml | 276 +- .../suites/certification/Test_TC_SC_5_3.yaml | 229 +- .../Test_TC_SWTCH_3_1_Simulated.yaml | 369 - .../suites/certification/Test_TC_S_2_1.yaml | 8 +- .../suites/certification/Test_TC_S_2_2.yaml | 257 +- .../suites/certification/Test_TC_S_2_3.yaml | 47 +- .../suites/certification/Test_TC_S_2_4.yaml | 62 +- .../suites/certification/Test_TC_S_3_1.yaml | 608 -- .../certification/Test_TC_TCCM_1_1.yaml | 88 +- .../certification/Test_TC_TCCM_1_2.yaml | 77 +- .../certification/Test_TC_TCCM_2_1.yaml | 152 +- .../certification/Test_TC_TCCM_3_1.yaml | 115 +- .../certification/Test_TC_TCCM_3_2.yaml | 165 +- .../certification/Test_TC_TCCM_3_3.yaml | 194 +- .../certification/Test_TC_TCTL_2_1.yaml | 11 + .../certification/Test_TC_TCTL_2_2.yaml | 25 + .../certification/Test_TC_TIMESYNC_2_15.yaml | 163 - .../Test_TC_TMP_3_1_Simulated.yaml | 659 -- .../certification/Test_TC_TSTAT_1_1.yaml | 356 +- .../certification/Test_TC_TSTAT_3_1.yaml | 979 --- .../Test_TC_TSUIC_3_1_Simulated.yaml | 635 -- .../certification/Test_TC_TVOCCONC_1_1.yaml | 61 +- .../Test_TC_ULABEL_3_1_Simulated.yaml | 40 - .../tests/suites/certification/ci-pics-values | 99 +- src/app/tests/suites/ciTests.json | 4 + src/app/tests/suites/manualTests.json | 36 +- .../chip-tool/zap-generated/test/Commands.h | 7048 +++++++---------- .../zap-generated/test/Commands.h | 5734 ++++++++++---- .../app1/zap-generated/test/Commands.h | 5480 ++----------- .../app2/zap-generated/test/Commands.h | 5480 ++----------- 132 files changed, 18680 insertions(+), 32854 deletions(-) delete mode 100644 src/app/tests/suites/certification/Test_TC_ACT_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_BOOL_3_1_Simulated.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_CC_2_2_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DESC_2_2_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DGETH_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DGGEN_3_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DGSW_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DGTHREAD_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DGTHREAD_3_2_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DGTHREAD_3_3_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DGWIFI_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DRLK_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_FAN_3_3.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_FAN_3_5.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_FLABEL_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_FLW_3_1_Simulated.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_GRPKEY_1_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_G_2_4.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_G_3_1_Simulated.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_IDM_10_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_IDM_11_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_ILL_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_I_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_LCFG_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_LTIME_1_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_LTIME_2_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_LUNIT_1_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_LUNIT_2_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_LVL_8_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_OCC_2_2_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_OO_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_PCC_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_PRS_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_RH_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_SWTCH_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_S_3_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_TIMESYNC_2_15.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_TMP_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_TSTAT_3_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_TSUIC_3_1_Simulated.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_ULABEL_3_1_Simulated.yaml diff --git a/examples/placeholder/linux/apps/app1/ciTests.json b/examples/placeholder/linux/apps/app1/ciTests.json index 6313a9621b7290..66abad400a442f 100644 --- a/examples/placeholder/linux/apps/app1/ciTests.json +++ b/examples/placeholder/linux/apps/app1/ciTests.json @@ -1,28 +1,7 @@ { "Test": [ - "Test_TC_ACT_3_1_Simulated", - "Test_TC_BOOL_3_1_Simulated", - "Test_TC_DESC_2_2_Simulated", - "Test_TC_DGETH_3_1_Simulated", - "Test_TC_DGSW_3_1_Simulated", - "Test_TC_DGWIFI_3_1_Simulated", - "Test_TC_FLW_3_1_Simulated", - "Test_TC_G_3_1_Simulated", - "Test_TC_I_3_1_Simulated", - "Test_TC_PRS_3_1_Simulated", - "Test_TC_PSCFG_3_1_Simulated", - "Test_TC_RH_3_1_Simulated", - "Test_TC_SWTCH_3_1_Simulated", "Test_TC_WNCV_5_1_Simulated", - "Test_TC_LCFG_3_1_Simulated", - "Test_TC_LUNIT_1_1_Simulated", - "Test_TC_LUNIT_2_1_Simulated", - "Test_TC_OCC_2_2_Simulated", "Test_TC_OCC_2_4_Simulated", - "Test_TC_ULABEL_3_1_Simulated", - "Test_TC_FLABEL_3_1_Simulated", - "Test_TC_LTIME_1_1_Simulated", - "Test_TC_ILL_3_1_Simulated", "Test_TC_DGSW_3_2_Simulated", "Test_TC_DGETH_3_2_Simulated", "Test_TC_DGWIFI_3_2_Simulated", @@ -34,18 +13,9 @@ "Test_TC_CC_6_4_Simulated", "Test_TC_CC_7_5_Simulated", "Test_TC_CC_9_4_Simulated", - "Test_TC_DGTHREAD_3_2_Simulated", - "Test_TC_DGTHREAD_3_3_Simulated", "Test_TC_DGTHREAD_3_4_Simulated", "Test_TC_LVL_2_3_Simulated", - "Test_TC_OO_3_1_Simulated", - "Test_TC_OO_3_2_Simulated", - "Test_TC_TSUIC_3_1_Simulated", - "Test_TC_PCC_3_1_Simulated", - "Test_TC_TMP_3_1_Simulated", - "Test_TC_CC_2_2_Simulated", - "Test_TC_DGTHREAD_3_1_Simulated", - "Test_TC_DRLK_3_1_Simulated" + "Test_TC_OO_3_2_Simulated" ], "collection": ["Test"] } diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index c00d1ce6735d91..e3d2f25d2db368 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -171,6 +171,9 @@ def _GetChipReplUnsupportedTests() -> Set[str]: "Test_TC_ACE_1_6.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27910#issuecomment-1632485584 "Test_TC_IDM_1_2.yaml", # chip-repl does not support AnyCommands (19/07/2023) "TestGroupKeyManagementCluster.yaml", # chip-repl does not support EqualityCommands (2023-08-04) + "Test_TC_S_2_2.yaml", # chip-repl does not support scenes cluster commands + "Test_TC_S_2_3.yaml", # chip-repl does not support scenes cluster commands + "Test_TC_S_2_4.yaml", # chip-repl does not support scenes cluster commands } diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index dce34aca81dbcd..6afdb3f929d185 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -336,6 +336,11 @@ PICS: "Does commissionee provide a Firmware Information field in the AttestationResponse?" id: MCORE.DA.ATTESTELEMENT_FW_INFO + # + #IDM + # + - label: "Does the device implement the ICD Management cluster as a server?" + id: ICDM.S - label: "Is the device a Server" id: MCORE.IDM.S @@ -1847,6 +1852,11 @@ PICS: - label: "Does the device implement the DISHM cluster as a server?" id: DISHM.S + - label: + "Id of mode the device will fail to transition to, given its current + state" + id: PIXIT.DISHM.CAN_TEST_MODE_FAILURE + # # server / features # @@ -1890,27 +1900,6 @@ PICS: - label: "Does the device implement the Descriptor cluster as a client?" id: DESC.C - #DESC -- Global Attributes - - label: "Does the device implement the ClusterRevision(DESC) attribute?" - id: DESC.S.Afffd - - - label: "Does the device implement the FeatureMap(DESC) attribute?" - id: DESC.S.Afffc - - - label: "Does the device implement the AttributeList(DESC) attribute?" - id: DESC.S.Afffb - - - label: "Does the device implement the EventList(DESC) attribute?" - id: DESC.S.Afffa - - - label: - "Does the device implement the AcceptedCommandList(DESC) attribute?" - id: DESC.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(DESC) attribute?" - id: DESC.S.Afff8 - # # server / attributes # @@ -1926,6 +1915,9 @@ PICS: - label: "Does the DUT(server) support the PARTSLIST attribute?" id: DESC.S.A0003 + - label: "Does the DUT(server) support the TAGLIST attribute?" + id: DESC.S.A0004 + # # client / attributes # @@ -5946,6 +5938,15 @@ PICS: - label: "Does the device implement the Scene Names feature?" id: S.S.F00 + - label: "Does the device implement the Scene Explicit feature?" + id: S.S.F01 + + - label: "Does the device implement the Scene TableSize feature?" + id: S.S.F02 + + - label: "Does the device implement the Scene FabricScenes feature?" + id: S.S.F03 + # # server / manually # @@ -5988,6 +5989,11 @@ PICS: - label: "Does the device implement sending the CopyScene command?" id: S.C.C42.Tx + - label: + "Does the device process the TransitionTime parameter of the + RecallScene command?" + id: PICS_SC_RECALL_SCENE_TRANSITION_TIME + # # client / manually # @@ -6563,6 +6569,9 @@ PICS: - label: "Supports a System Mode of Auto" id: TSTAT.S.F05 + - label: "Supports a local temperature not exposed" + id: TSTAT.S.F06 + # # server / manually # @@ -8243,28 +8252,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: CDOCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: CDOCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: CDOCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: CDOCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: CDOCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: CDOCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: CDOCONC.S.Afffd - # Carbon Monoxide Concentration Measurement Cluster Test Plan - label: "Does the device implement the Carbon Monoxide Concentration @@ -8339,28 +8326,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: CMOCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: CMOCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: CMOCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: CMOCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: CMOCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: CMOCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: CMOCONC.S.Afffd - # Nitrogen Dioxide Concentration Measurement Cluster Test Plan - label: "Does the device implement the Nitrogen Dioxide Concentration @@ -8435,28 +8400,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: NDOCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: NDOCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: NDOCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: NDOCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: NDOCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: NDOCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: NDOCONC.S.Afffd - # Ozone Concentration Measurement Cluster Test Plan - label: "Does the device implement the Ozone Concentration Measurement Cluster @@ -8531,28 +8474,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: OZCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: OZCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: OZCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: OZCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: OZCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: OZCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: OZCONC.S.Afffd - # PM2.5 Concentration Measurement Cluster Test Plan - label: "Does the device implement the PM2.5 Concentration Measurement Cluster @@ -8627,28 +8548,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: PMICONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: PMICONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: PMICONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: PMICONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: PMICONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: PMICONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: PMICONC.S.Afffd - # Formaldehyde Concentration Measurement Cluster Test Plan - label: "Does the device implement the Formaldehyde Concentration Measurement @@ -8723,28 +8622,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: FLDCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: FLDCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: FLDCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: FLDCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: FLDCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: FLDCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: FLDCONC.S.Afffd - # PM1 Concentration Measurement Cluster Test Plan - label: "Does the device implement the PM1 Concentration Measurement Cluster @@ -8819,28 +8696,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: PMHCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: PMHCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: PMHCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: PMHCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: PMHCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: PMHCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: PMHCONC.S.Afffd - # PM10 Concentration Measurement Cluster Test Plan - label: "Does the device implement the PM10 Concentration Measurement Cluster @@ -8915,28 +8770,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: PMKCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: PMKCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: PMKCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: PMKCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: PMKCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: PMKCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: PMKCONC.S.Afffd - # Total Volatile Organic Compounds Concentration Measurement Cluster Test Plan - label: "Does the device implement the Total Volatile Organic Compounds @@ -9011,28 +8844,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: TVOCCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: TVOCCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: TVOCCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: TVOCCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: TVOCCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: TVOCCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: TVOCCONC.S.Afffd - # Radon Concentration Measurement Cluster Test Plan - label: "Does the device implement the Radon Concentration Measurement Cluster @@ -9107,28 +8918,6 @@ PICS: - label: "Does the DUT(server) implement the LevelValue attribute?" id: RNCONC.S.A000a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList - attribute?" - id: RNCONC.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute?" - id: RNCONC.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: RNCONC.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: RNCONC.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: RNCONC.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: RNCONC.S.Afffd - ## Fan control # Features @@ -9273,43 +9062,6 @@ PICS: command?" id: ICDM.C.C00.Rsp - # - #RVC Clean Mode Select - # - #Feature - - label: - "Does the device support depending on an On/Off cluster implemented on - the same DUT?" - id: RVCCLEANMS.S.F00 - - - label: "Does the device support the extended status feature?" - id: RVCCLEANMS.S.F01 - - - label: - "Does the device implementation deprecate the ChangeToMode command?" - id: RVCCLEANMS.S.F02 - - #Server Attributes - - label: "Does the device implement the StartUpMode attribute?" - id: RVCCLEANMS.S.A0004 - - - label: "Does the device implement the OnMode attribute?" - id: RVCCLEANMS.S.A0005 - - #Server Commands recived - - label: "Does the device implement receiving the ChangeToMode command?" - id: RVCCLEANMS.S.C00.Rsp - - - label: - "Does the device implement receiving the ChangeToModeWithStatus - command?" - id: RVCCLEANMS.S.C01.Rsp - - #server commands generated - - label: - "Does the device implement sending the ChangeToModeResponse command?" - id: RVCCLEANMS.S.C03.Tx - # #Operational State # @@ -9506,6 +9258,11 @@ PICS: - label: "Does the device implement the LWM cluster as a server?" id: LWM.S + - label: + "Id of mode the device will fail to transition to, given its current + state" + id: PIXIT.LWM.CAN_TEST_MODE_FAILURE + # # server / features # @@ -9586,12 +9343,22 @@ PICS: "Does the device implement sending the ChangeToModeResponse command?" id: RVCCLEANM.S.C01.Tx + - label: + "Id of mode the device will fail to transition to, given its current + state" + id: PIXIT.RVCCLEANM.CAN_TEST_MODE_FAILURE + # #Temperature Controlled Cabinet Mode Cluster # - label: "Does the device implement the TCCM cluster as a server?" id: TCCM.S + - label: + "Id of mode the device will fail to transition to, given its current + state" + id: PIXIT.TCCM.CAN_TEST_MODE_FAILURE + #Features - label: "Does the device support depending on an On/Off cluster implemented on @@ -9725,6 +9492,11 @@ PICS: - label: "Does the device implement the RVCRUNM cluster as a server?" id: RVCRUNM.S + - label: + "Id of mode the device will fail to transition to, given its current + state" + id: PIXIT.RVCRUNM.CAN_TEST_MODE_FAILURE + #Features - label: "Does the device support depending on an On/Off cluster implemented on diff --git a/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml b/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml index e4038e0a627e28..877d116305da25 100644 --- a/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml @@ -188,7 +188,7 @@ tests: - name: "ms" value: 1000 - #Issue : https://github.com/project-chip/connectedhomeip/issues/27967 + #Issue : https://github.com/project-chip/connectedhomeip/issues/27982 - label: "Step 7: TH sends a AddGroup Command to the Groups cluster with the GroupID field set to 0x0105 and the GroupName set to an empty string. diff --git a/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml index 6fc09312d09a22..59284c86d30d55 100644 --- a/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml @@ -112,8 +112,8 @@ tests: - label: "Step 4c: Read the optional attribute InPlaceIndicator - (ACFREMON.S.A0002) in AttributeList" - PICS: ACFREMON.S.A0002 + (ACFREMON.S.A0003) in AttributeList" + PICS: ACFREMON.S.A0003 command: "readAttribute" attribute: "AttributeList" response: @@ -121,6 +121,28 @@ tests: type: list contains: [3] + - label: + "Step 4d: Read the optional attribute LastChangedTime + (ACFREMON.S.A0004) in AttributeList" + PICS: ACFREMON.S.A0004 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [4] + + - label: + "Step 4e: Read the optional attribute ReplacementProductList + (ACFREMON.S.F02) in AttributeList" + PICS: ACFREMON.S.F02 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [5] + - label: "Step 5: TH reads EventList attribute from DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml index 24e18d9207082c..a5aa622fe7aa3b 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml @@ -35,7 +35,7 @@ tests: value: nodeId - label: - "Step 2: TH reads DUT Descriptor cluster ServerList attribute from + "Step 2: TH1 reads DUT Descriptor cluster ServerList attribute from Endpoint 0" cluster: "Descriptor" command: "readAttribute" @@ -46,7 +46,7 @@ tests: contains: [31] - label: - "Step 3: TH reads DUT Descriptor cluster ServerList attribute from + "Step 3: TH1 reads DUT Descriptor cluster ServerList attribute from every Endpoint except 0" endpoint: Endpoint_Except_Zero cluster: "Descriptor" diff --git a/src/app/tests/suites/certification/Test_TC_ACT_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_ACT_3_1_Simulated.yaml deleted file mode 100644 index ba30cad1ed39ac..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_ACT_3_1_Simulated.yaml +++ /dev/null @@ -1,562 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 77.2.3. [TC-ACT-3.1] GLobal attributes with client as DUT - -PICS: - - ACT.C - - ACT.C.AM-READ - - ACT.C.AO-READ - - ACT.C.AM-WRITE - - ACT.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Actions" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: ActionList" - PICS: ACT.C.AM-READ - wait: "readAttribute" - attribute: "ActionList" - - - label: "Read attribute: EndpointLists" - PICS: ACT.C.AM-READ - wait: "readAttribute" - attribute: "EndpointLists" - - - label: "Read attribute: SetupURL" - PICS: ACT.C.AO-READ - wait: "readAttribute" - attribute: "SetupURL" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - ./chip-tool actions read feature-map 1 1 - - Verify none of the optional feature of the server-side of the cluster is listed on TH(all-clusters-minnimal-app) Log - - [1666952667.233980][217377:217377] CHIP:IM: Received Read request - [1666952667.234042][217377:217377] CHIP:DMG: ReadRequestMessage = - [1666952667.234055][217377:217377] CHIP:DMG: { - [1666952667.234066][217377:217377] CHIP:DMG: AttributePathIBs = - [1666952667.234080][217377:217377] CHIP:DMG: [ - [1666952667.234092][217377:217377] CHIP:DMG: AttributePathIB = - [1666952667.234106][217377:217377] CHIP:DMG: { - [1666952667.234121][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952667.234135][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952667.234150][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666952667.234162][217377:217377] CHIP:DMG: } - [1666952667.234177][217377:217377] CHIP:DMG: - [1666952667.234189][217377:217377] CHIP:DMG: ], - [1666952667.234205][217377:217377] CHIP:DMG: - [1666952667.234218][217377:217377] CHIP:DMG: isFabricFiltered = true, - [1666952667.234230][217377:217377] CHIP:DMG: InteractionModelRevision = 1 - [1666952667.234242][217377:217377] CHIP:DMG: }, - [1666952667.234299][217377:217377] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952667.234351][217377:217377] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952667.234366][217377:217377] CHIP:DMG: Cluster 25, Attribute fffc is dirty - [1666952667.234378][217377:217377] CHIP:DMG: Reading attribute: Cluster=0x0000_0025 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - [1666952667.234396][217377:217377] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0025 e=1 p=v - [1666952667.234416][217377:217377] CHIP:DMG: AccessControl: allowed - [1666952667.234450][217377:217377] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666952667.234672][217377:217377] CHIP:EM: <<< [E:30993r M:147872011 (Ack:47982410)] (S) Msg TX to 1:000000000001B669 [AE59] --- Type 0001:05 (IM:ReportData) - [1666952667.234702][217377:217377] CHIP:IN: (S) Sending msg 147872011 on secure session with LSID: 63117 - [1666952667.234980][217377:217377] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:60986 | 147872011 | [Interaction Model (1) / Report Data (0x05) / Session = 46893 / Exchange = 30993] - [1666952667.235009][217377:217377] CHIP:DMG: Header Flags = - [1666952667.235021][217377:217377] CHIP:DMG: { - [1666952667.235046][217377:217377] CHIP:DMG: Exchange (0x06) = - [1666952667.235058][217377:217377] CHIP:DMG: { - [1666952667.235072][217377:217377] CHIP:DMG: AckMsg = 47982410 - [1666952667.235084][217377:217377] CHIP:DMG: NeedsAck = true - [1666952667.235127][217377:217377] CHIP:DMG: } - [1666952667.235147][217377:217377] CHIP:DMG: } - [1666952667.235158][217377:217377] CHIP:DMG: - [1666952667.235175][217377:217377] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666952667.235186][217377:217377] CHIP:DMG: { - [1666952667.235197][217377:217377] CHIP:DMG: data = 002db7000b59d0088ab820a8595145a1757b47b8f77026a7a93316c7d5ad7381b9aa5cc8f40b5855924b4832512700a6d52a6435b0ba5340e5cb92b95b512bfae5b4d6393b0a9f - [1666952667.235211][217377:217377] CHIP:DMG: buffer_ptr = 94384713812592 - [1666952667.235222][217377:217377] CHIP:DMG: } - [1666952667.235233][217377:217377] CHIP:DMG: - [1666952667.235262][217377:217377] CHIP:DMG: Decrypted Payload (37 bytes) = - [1666952667.235274][217377:217377] CHIP:DMG: { - [1666952667.235285][217377:217377] CHIP:DMG: data = 1536011535012600e0b2edc537012402012403252504fcff18240200181818290424ff0118 - [1666952667.235297][217377:217377] CHIP:DMG: } - [1666952667.235308][217377:217377] CHIP:DMG: - [1666952667.235365][217377:217377] CHIP:DMG: ReportDataMessage = - [1666952667.235379][217377:217377] CHIP:DMG: { - [1666952667.235391][217377:217377] CHIP:DMG: AttributeReportIBs = - [1666952667.235411][217377:217377] CHIP:DMG: [ - [1666952667.235423][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952667.235442][217377:217377] CHIP:DMG: { - [1666952667.235455][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952667.235471][217377:217377] CHIP:DMG: { - [1666952667.235486][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952667.235499][217377:217377] CHIP:DMG: AttributePathIB = - [1666952667.235514][217377:217377] CHIP:DMG: { - [1666952667.235529][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952667.235545][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952667.235564][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666952667.235580][217377:217377] CHIP:DMG: } - [1666952667.235598][217377:217377] CHIP:DMG: - [1666952667.235614][217377:217377] CHIP:DMG: Data = 0, - [1666952667.235630][217377:217377] CHIP:DMG: }, - [1666952667.235647][217377:217377] CHIP:DMG: - [1666952667.235659][217377:217377] CHIP:DMG: }, - [1666952667.235675][217377:217377] CHIP:DMG: - [1666952667.235687][217377:217377] CHIP:DMG: ], - [1666952667.235706][217377:217377] CHIP:DMG: - [1666952667.235719][217377:217377] CHIP:DMG: SuppressResponse = true, - [1666952667.235732][217377:217377] CHIP:DMG: InteractionModelRevision = 1 - [1666952667.235744][217377:217377] CHIP:DMG: } - - - - ./chip-tool actions read attribute-list 1 1 - - Verify attribute-list attribute contains 7 entries on TH(all-clusters-minimal-app) - - [1666952338.541227][217377:217377] CHIP:DMG: ReportDataMessage = - [1666952338.541262][217377:217377] CHIP:DMG: { - [1666952338.541289][217377:217377] CHIP:DMG: AttributeReportIBs = - [1666952338.541330][217377:217377] CHIP:DMG: [ - [1666952338.541352][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.541390][217377:217377] CHIP:DMG: { - [1666952338.541412][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.541442][217377:217377] CHIP:DMG: { - [1666952338.541470][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.541502][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.541532][217377:217377] CHIP:DMG: { - [1666952338.541563][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.541595][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.541629][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.541659][217377:217377] CHIP:DMG: } - [1666952338.541693][217377:217377] CHIP:DMG: - [1666952338.541720][217377:217377] CHIP:DMG: Data = [ - [1666952338.541748][217377:217377] CHIP:DMG: - [1666952338.541784][217377:217377] CHIP:DMG: ], - [1666952338.541812][217377:217377] CHIP:DMG: }, - [1666952338.541847][217377:217377] CHIP:DMG: - [1666952338.541871][217377:217377] CHIP:DMG: }, - [1666952338.541916][217377:217377] CHIP:DMG: - [1666952338.541948][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.541990][217377:217377] CHIP:DMG: { - [1666952338.542013][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.542043][217377:217377] CHIP:DMG: { - [1666952338.542068][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.542096][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.542125][217377:217377] CHIP:DMG: { - [1666952338.542153][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.542186][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.542225][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.542256][217377:217377] CHIP:DMG: ListIndex = Null, - [1666952338.542286][217377:217377] CHIP:DMG: } - [1666952338.542321][217377:217377] CHIP:DMG: - [1666952338.542353][217377:217377] CHIP:DMG: Data = 0, - [1666952338.542376][217377:217377] CHIP:DMG: }, - [1666952338.542413][217377:217377] CHIP:DMG: - [1666952338.542435][217377:217377] CHIP:DMG: }, - [1666952338.542482][217377:217377] CHIP:DMG: - [1666952338.542503][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.542540][217377:217377] CHIP:DMG: { - [1666952338.542562][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.542590][217377:217377] CHIP:DMG: { - [1666952338.542617][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.542641][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.542673][217377:217377] CHIP:DMG: { - [1666952338.542700][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.542733][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.542763][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.542793][217377:217377] CHIP:DMG: ListIndex = Null, - [1666952338.542826][217377:217377] CHIP:DMG: } - [1666952338.542862][217377:217377] CHIP:DMG: - [1666952338.542890][217377:217377] CHIP:DMG: Data = 1, - [1666952338.542912][217377:217377] CHIP:DMG: }, - [1666952338.542950][217377:217377] CHIP:DMG: - [1666952338.542971][217377:217377] CHIP:DMG: }, - [1666952338.543018][217377:217377] CHIP:DMG: - [1666952338.543039][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.543076][217377:217377] CHIP:DMG: { - [1666952338.543128][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.543161][217377:217377] CHIP:DMG: { - [1666952338.543187][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.543218][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.543250][217377:217377] CHIP:DMG: { - [1666952338.543277][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.543311][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.543346][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.543381][217377:217377] CHIP:DMG: ListIndex = Null, - [1666952338.543410][217377:217377] CHIP:DMG: } - [1666952338.543444][217377:217377] CHIP:DMG: - [1666952338.543473][217377:217377] CHIP:DMG: Data = 65528, - [1666952338.543499][217377:217377] CHIP:DMG: }, - [1666952338.543534][217377:217377] CHIP:DMG: - [1666952338.543556][217377:217377] CHIP:DMG: }, - [1666952338.543603][217377:217377] CHIP:DMG: - [1666952338.543624][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.543666][217377:217377] CHIP:DMG: { - [1666952338.543688][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.543716][217377:217377] CHIP:DMG: { - [1666952338.543743][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.543767][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.543797][217377:217377] CHIP:DMG: { - [1666952338.543826][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.543859][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.543893][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.543929][217377:217377] CHIP:DMG: ListIndex = Null, - [1666952338.543955][217377:217377] CHIP:DMG: } - [1666952338.543990][217377:217377] CHIP:DMG: - [1666952338.544019][217377:217377] CHIP:DMG: Data = 65529, - [1666952338.544042][217377:217377] CHIP:DMG: }, - [1666952338.544077][217377:217377] CHIP:DMG: - [1666952338.544098][217377:217377] CHIP:DMG: }, - [1666952338.544145][217377:217377] CHIP:DMG: - [1666952338.544166][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.544204][217377:217377] CHIP:DMG: { - [1666952338.544225][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.544255][217377:217377] CHIP:DMG: { - [1666952338.544283][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.544311][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.544339][217377:217377] CHIP:DMG: { - [1666952338.544376][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.544405][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.544439][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.544474][217377:217377] CHIP:DMG: ListIndex = Null, - [1666952338.544498][217377:217377] CHIP:DMG: } - [1666952338.544532][217377:217377] CHIP:DMG: - [1666952338.544566][217377:217377] CHIP:DMG: Data = 65531, - [1666952338.544592][217377:217377] CHIP:DMG: }, - [1666952338.544629][217377:217377] CHIP:DMG: - [1666952338.544651][217377:217377] CHIP:DMG: }, - [1666952338.544702][217377:217377] CHIP:DMG: - [1666952338.544717][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.544743][217377:217377] CHIP:DMG: { - [1666952338.544758][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.544777][217377:217377] CHIP:DMG: { - [1666952338.544796][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.544814][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.544834][217377:217377] CHIP:DMG: { - [1666952338.544856][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.544878][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.544901][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.544922][217377:217377] CHIP:DMG: ListIndex = Null, - [1666952338.544945][217377:217377] CHIP:DMG: } - [1666952338.544971][217377:217377] CHIP:DMG: - [1666952338.544991][217377:217377] CHIP:DMG: Data = 65532, - [1666952338.545007][217377:217377] CHIP:DMG: }, - [1666952338.545032][217377:217377] CHIP:DMG: - [1666952338.545047][217377:217377] CHIP:DMG: }, - [1666952338.545081][217377:217377] CHIP:DMG: - [1666952338.545095][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952338.545122][217377:217377] CHIP:DMG: { - [1666952338.545136][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952338.545158][217377:217377] CHIP:DMG: { - [1666952338.545176][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952338.545193][217377:217377] CHIP:DMG: AttributePathIB = - [1666952338.545212][217377:217377] CHIP:DMG: { - [1666952338.545233][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952338.545254][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952338.545278][217377:217377] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666952338.545306][217377:217377] CHIP:DMG: ListIndex = Null, - [1666952338.545328][217377:217377] CHIP:DMG: } - [1666952338.545351][217377:217377] CHIP:DMG: - [1666952338.545374][217377:217377] CHIP:DMG: Data = 65533, - [1666952338.545391][217377:217377] CHIP:DMG: }, - [1666952338.545415][217377:217377] CHIP:DMG: - [1666952338.545429][217377:217377] CHIP:DMG: }, - [1666952338.545454][217377:217377] CHIP:DMG: - [1666952338.545468][217377:217377] CHIP:DMG: ], - [1666952338.545537][217377:217377] CHIP:DMG: - [1666952338.545557][217377:217377] CHIP:DMG: SuppressResponse = true, - [1666952338.545576][217377:217377] CHIP:DMG: InteractionModelRevision = 1 - [1666952338.545592][217377:217377] CHIP:DMG: } - - - ./chip-tool actions read action-list 1 1 - - Verify read command is received on TH(all-clusters-minimal-app) Log - - [1666937311.802976][2651:2651] CHIP:EM: Handling via exchange: 38920r, Delegate: 0xaaaacd7f80e0 - [1666937311.803077][2651:2651] CHIP:IM: Received Read request - [1666937311.803295][2651:2651] CHIP:DMG: ReadRequestMessage = - [1666937311.803549][2651:2651] CHIP:DMG: { - [1666937311.803611][2651:2651] CHIP:DMG: AttributePathIBs = - [1666937311.803678][2651:2651] CHIP:DMG: [ - [1666937311.803739][2651:2651] CHIP:DMG: AttributePathIB = - [1666937311.803841][2651:2651] CHIP:DMG: { - [1666937311.803920][2651:2651] CHIP:DMG: Endpoint = 0x1, - [1666937311.804008][2651:2651] CHIP:DMG: Cluster = 0x25, - [1666937311.804120][2651:2651] CHIP:DMG: Attribute = 0x0000_0000, - [1666937311.804204][2651:2651] CHIP:DMG: } - [1666937311.804282][2651:2651] CHIP:DMG: - [1666937311.804374][2651:2651] CHIP:DMG: ], - [1666937311.804446][2651:2651] CHIP:DMG: - [1666937311.804539][2651:2651] CHIP:DMG: isFabricFiltered = true, - [1666937311.804603][2651:2651] CHIP:DMG: InteractionModelRevision = 1 - [1666937311.804663][2651:2651] CHIP:DMG: }, - [1666937311.804852][2651:2651] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666937311.805117][2651:2651] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666937311.805190][2651:2651] CHIP:DMG: Cluster 25, Attribute 0 is dirty - [1666937311.805274][2651:2651] CHIP:DMG: Reading attribute: Cluster=0x0000_0025 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1666937311.805343][2651:2651] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0025 e=1 p=v - [1666937311.805419][2651:2651] CHIP:DMG: AccessControl: allowed - [1666937311.805533][2651:2651] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666937311.806139][2651:2651] CHIP:EM: <<< [E:38920r M:78085855 (Ack:55508733)] (S) Msg TX to 1:000000000001B669 [A6ED] --- Type 0001:05 (IM:ReportData) - [1666937311.806241][2651:2651] CHIP:IN: (S) Sending msg 78085855 on secure session with LSID: 49558 - [1666937311.806996][2651:2651] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:38538 | 78085855 | [Interaction Model (1) / Report Data (0x05) / Session = 20559 / Exchange = 38920] - [1666937311.807095][2651:2651] CHIP:DMG: Header Flags = - [1666937311.807154][2651:2651] CHIP:DMG: { - [1666937311.807242][2651:2651] CHIP:DMG: Exchange (0x06) = - [1666937311.807300][2651:2651] CHIP:DMG: { - [1666937311.807359][2651:2651] CHIP:DMG: AckMsg = 55508733 - [1666937311.807439][2651:2651] CHIP:DMG: NeedsAck = true - [1666937311.807493][2651:2651] CHIP:DMG: } - [1666937311.807566][2651:2651] CHIP:DMG: } - [1666937311.807645][2651:2651] CHIP:DMG: - [1666937311.807713][2651:2651] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666937311.807768][2651:2651] CHIP:DMG: { - [1666937311.807847][2651:2651] CHIP:DMG: data = 004f5000df7ea7040f921e0e13849a6fa0d777922f58d03152781bd36b6cbf9f22d882cc1c7c6d8afbd1b63303ffb3fb09c08e7160a33fb680d7f74a7696a47c4fe7b213b3cc - [1666937311.807904][2651:2651] CHIP:DMG: buffer_ptr = 187651028908208 - [1666937311.807958][2651:2651] CHIP:DMG: } - [1666937311.808031][2651:2651] CHIP:DMG: - [1666937311.808216][2651:2651] CHIP:DMG: ReportDataMessage = - [1666937311.808282][2651:2651] CHIP:DMG: { - [1666937311.808337][2651:2651] CHIP:DMG: AttributeReportIBs = - [1666937311.808413][2651:2651] CHIP:DMG: [ - [1666937311.808503][2651:2651] CHIP:DMG: AttributeReportIB = - [1666937311.808593][2651:2651] CHIP:DMG: { - [1666937311.808664][2651:2651] CHIP:DMG: AttributeDataIB = - [1666937311.808752][2651:2651] CHIP:DMG: { - [1666937311.808842][2651:2651] CHIP:DMG: DataVersion = 0x8d1127c2, - [1666937311.808924][2651:2651] CHIP:DMG: AttributePathIB = - [1666937311.809007][2651:2651] CHIP:DMG: { - [1666937311.809101][2651:2651] CHIP:DMG: Endpoint = 0x1, - [1666937311.809201][2651:2651] CHIP:DMG: Cluster = 0x25, - [1666937311.809300][2651:2651] CHIP:DMG: Attribute = 0x0000_0000, - [1666937311.809384][2651:2651] CHIP:DMG: } - [1666937311.809481][2651:2651] CHIP:DMG: - [1666937311.809573][2651:2651] CHIP:DMG: Data = [ - [1666937311.809662][2651:2651] CHIP:DMG: - [1666937311.809759][2651:2651] CHIP:DMG: ], - [1666937311.809840][2651:2651] CHIP:DMG: }, - [1666937311.809927][2651:2651] CHIP:DMG: - [1666937311.809998][2651:2651] CHIP:DMG: }, - [1666937311.810080][2651:2651] CHIP:DMG: - [1666937311.810140][2651:2651] CHIP:DMG: ], - - ./chip-tool actions read endpoint-lists 1 1 - - Verify read command is received on TH(all-clusters-minimal-app) - - [1666952448.529080][217377:217377] CHIP:DMG: ReadRequestMessage = - [1666952448.529101][217377:217377] CHIP:DMG: { - [1666952448.529119][217377:217377] CHIP:DMG: AttributePathIBs = - [1666952448.529140][217377:217377] CHIP:DMG: [ - [1666952448.529159][217377:217377] CHIP:DMG: AttributePathIB = - [1666952448.529181][217377:217377] CHIP:DMG: { - [1666952448.529204][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952448.529226][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952448.529249][217377:217377] CHIP:DMG: Attribute = 0x0000_0001, - [1666952448.529269][217377:217377] CHIP:DMG: } - [1666952448.529293][217377:217377] CHIP:DMG: - [1666952448.529312][217377:217377] CHIP:DMG: ], - [1666952448.529337][217377:217377] CHIP:DMG: - [1666952448.529358][217377:217377] CHIP:DMG: isFabricFiltered = true, - [1666952448.529378][217377:217377] CHIP:DMG: InteractionModelRevision = 1 - [1666952448.529396][217377:217377] CHIP:DMG: }, - [1666952448.529481][217377:217377] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952448.529543][217377:217377] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952448.529567][217377:217377] CHIP:DMG: Cluster 25, Attribute 1 is dirty - [1666952448.529586][217377:217377] CHIP:DMG: Reading attribute: Cluster=0x0000_0025 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) - [1666952448.529611][217377:217377] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0025 e=1 p=v - [1666952448.529639][217377:217377] CHIP:DMG: AccessControl: allowed - [1666952448.529683][217377:217377] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666952448.530029][217377:217377] CHIP:EM: <<< [E:12078r M:26716965 (Ack:2683412)] (S) Msg TX to 1:000000000001B669 [AE59] --- Type 0001:05 (IM:ReportData) - [1666952448.530072][217377:217377] CHIP:IN: (S) Sending msg 26716965 on secure session with LSID: 63115 - [1666952448.530509][217377:217377] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:42342 | 26716965 | [Interaction Model (1) / Report Data (0x05) / Session = 61304 / Exchange = 12078] - [1666952448.530552][217377:217377] CHIP:DMG: Header Flags = - [1666952448.530570][217377:217377] CHIP:DMG: { - [1666952448.530612][217377:217377] CHIP:DMG: Exchange (0x06) = - [1666952448.530629][217377:217377] CHIP:DMG: { - [1666952448.530650][217377:217377] CHIP:DMG: AckMsg = 2683412 - [1666952448.530668][217377:217377] CHIP:DMG: NeedsAck = true - [1666952448.530686][217377:217377] CHIP:DMG: } - [1666952448.530716][217377:217377] CHIP:DMG: } - [1666952448.530733][217377:217377] CHIP:DMG: - [1666952448.530759][217377:217377] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666952448.530776][217377:217377] CHIP:DMG: { - [1666952448.530794][217377:217377] CHIP:DMG: data = 0078ef0025ab9701cea6e79a67f3a56ad0dea23004bc0e516962a4b2eb578d9045f381e0f31b8f574047477e5e60aa969bed78d1b51470f9bb8760c4ad7c937f6a9746493426 - [1666952448.530814][217377:217377] CHIP:DMG: buffer_ptr = 94384713812256 - [1666952448.530831][217377:217377] CHIP:DMG: } - [1666952448.530848][217377:217377] CHIP:DMG: - [1666952448.530880][217377:217377] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666952448.530897][217377:217377] CHIP:DMG: { - [1666952448.530915][217377:217377] CHIP:DMG: data = 1536011535012600e0b2edc5370124020124032524040118360218181818290424ff0118 - [1666952448.530934][217377:217377] CHIP:DMG: } - [1666952448.530950][217377:217377] CHIP:DMG: - [1666952448.531025][217377:217377] CHIP:DMG: ReportDataMessage = - [1666952448.531046][217377:217377] CHIP:DMG: { - [1666952448.531064][217377:217377] CHIP:DMG: AttributeReportIBs = - [1666952448.531445][217377:217377] CHIP:DMG: [ - [1666952448.531532][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952448.531565][217377:217377] CHIP:DMG: { - [1666952448.531585][217377:217377] CHIP:DMG: AttributeDataIB = - [1666952448.531607][217377:217377] CHIP:DMG: { - [1666952448.531630][217377:217377] CHIP:DMG: DataVersion = 0xc5edb2e0, - [1666952448.531652][217377:217377] CHIP:DMG: AttributePathIB = - [1666952448.531675][217377:217377] CHIP:DMG: { - [1666952448.531698][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952448.531722][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952448.531746][217377:217377] CHIP:DMG: Attribute = 0x0000_0001, - [1666952448.531768][217377:217377] CHIP:DMG: } - [1666952448.531794][217377:217377] CHIP:DMG: - [1666952448.531816][217377:217377] CHIP:DMG: Data = [ - [1666952448.531839][217377:217377] CHIP:DMG: - [1666952448.531868][217377:217377] CHIP:DMG: ], - [1666952448.531895][217377:217377] CHIP:DMG: }, - [1666952448.531925][217377:217377] CHIP:DMG: - [1666952448.531951][217377:217377] CHIP:DMG: }, - [1666952448.531990][217377:217377] CHIP:DMG: - [1666952448.532014][217377:217377] CHIP:DMG: ], - [1666952448.532047][217377:217377] CHIP:DMG: - [1666952448.532069][217377:217377] CHIP:DMG: SuppressResponse = true, - [1666952448.532092][217377:217377] CHIP:DMG: InteractionModelRevision = 1 - [1666952448.532111][217377:217377] CHIP:DMG: } - [1666952448.532131][217377:217377] CHIP:DMG: - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - Optional attibute - - ./chip-tool actions read setup-url 1 1 - - Verify the Unsupported attribute on the TH(all-clusters-minnimal-app) Log - - [1666952609.343159][217377:217377] CHIP:DMG: ReadRequestMessage = - [1666952609.343185][217377:217377] CHIP:DMG: { - [1666952609.343205][217377:217377] CHIP:DMG: AttributePathIBs = - [1666952609.343228][217377:217377] CHIP:DMG: [ - [1666952609.343248][217377:217377] CHIP:DMG: AttributePathIB = - [1666952609.343272][217377:217377] CHIP:DMG: { - [1666952609.343296][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952609.343319][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952609.343344][217377:217377] CHIP:DMG: Attribute = 0x0000_0002, - [1666952609.343366][217377:217377] CHIP:DMG: } - [1666952609.343396][217377:217377] CHIP:DMG: - [1666952609.343414][217377:217377] CHIP:DMG: ], - [1666952609.343437][217377:217377] CHIP:DMG: - [1666952609.343456][217377:217377] CHIP:DMG: isFabricFiltered = true, - [1666952609.343474][217377:217377] CHIP:DMG: InteractionModelRevision = 1 - [1666952609.343491][217377:217377] CHIP:DMG: }, - [1666952609.343573][217377:217377] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952609.343647][217377:217377] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952609.343671][217377:217377] CHIP:DMG: Cluster 25, Attribute 2 is dirty - [1666952609.343688][217377:217377] CHIP:DMG: Reading attribute: Cluster=0x0000_0025 Endpoint=1 AttributeId=0x0000_0002 (expanded=0) - [1666952609.343733][217377:217377] CHIP:DMG: Sending report (payload has 33 bytes)... - [1666952609.344066][217377:217377] CHIP:EM: <<< [E:37827r M:202875336 (Ack:199155625)] (S) Msg TX to 1:000000000001B669 [AE59] --- Type 0001:05 (IM:ReportData) - [1666952609.344128][217377:217377] CHIP:IN: (S) Sending msg 202875336 on secure session with LSID: 63116 - [1666952609.344547][217377:217377] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:46813 | 202875336 | [Interaction Model (1) / Report Data (0x05) / Session = 20214 / Exchange = 37827] - [1666952609.344601][217377:217377] CHIP:DMG: Header Flags = - [1666952609.344623][217377:217377] CHIP:DMG: { - [1666952609.344664][217377:217377] CHIP:DMG: Exchange (0x06) = - [1666952609.344681][217377:217377] CHIP:DMG: { - [1666952609.344703][217377:217377] CHIP:DMG: AckMsg = 199155625 - [1666952609.344723][217377:217377] CHIP:DMG: NeedsAck = true - [1666952609.344741][217377:217377] CHIP:DMG: } - [1666952609.344770][217377:217377] CHIP:DMG: } - [1666952609.344788][217377:217377] CHIP:DMG: - [1666952609.344816][217377:217377] CHIP:DMG: Encrypted Payload (67 bytes) = - [1666952609.344836][217377:217377] CHIP:DMG: { - [1666952609.344856][217377:217377] CHIP:DMG: data = 00f64e00c8a1170c0f5d4a4d9195a985ad54b3de870e336b0ecfaa7373615ca174138e2959606cb26476c70d8149a1435824f8e4446d9cc896de6c6d7b7275ea265d7c - [1666952609.344878][217377:217377] CHIP:DMG: buffer_ptr = 94384713812256 - [1666952609.344897][217377:217377] CHIP:DMG: } - [1666952609.344915][217377:217377] CHIP:DMG: - [1666952609.344947][217377:217377] CHIP:DMG: Decrypted Payload (33 bytes) = - [1666952609.344967][217377:217377] CHIP:DMG: { - [1666952609.344986][217377:217377] CHIP:DMG: data = 153601153500370024020124032524040218350124008618181818290424ff0118 - [1666952609.345007][217377:217377] CHIP:DMG: } - [1666952609.345024][217377:217377] CHIP:DMG: - [1666952609.345097][217377:217377] CHIP:DMG: ReportDataMessage = - [1666952609.345124][217377:217377] CHIP:DMG: { - [1666952609.345144][217377:217377] CHIP:DMG: AttributeReportIBs = - [1666952609.345174][217377:217377] CHIP:DMG: [ - [1666952609.345193][217377:217377] CHIP:DMG: AttributeReportIB = - [1666952609.345224][217377:217377] CHIP:DMG: { - [1666952609.345244][217377:217377] CHIP:DMG: AttributeStatusIB = - [1666952609.345269][217377:217377] CHIP:DMG: { - [1666952609.345290][217377:217377] CHIP:DMG: AttributePathIB = - [1666952609.345320][217377:217377] CHIP:DMG: { - [1666952609.345346][217377:217377] CHIP:DMG: Endpoint = 0x1, - [1666952609.345373][217377:217377] CHIP:DMG: Cluster = 0x25, - [1666952609.345403][217377:217377] CHIP:DMG: Attribute = 0x0000_0002, - [1666952609.345431][217377:217377] CHIP:DMG: } - [1666952609.345462][217377:217377] CHIP:DMG: - [1666952609.345489][217377:217377] CHIP:DMG: StatusIB = - [1666952609.345519][217377:217377] CHIP:DMG: { - [1666952609.345543][217377:217377] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1666952609.345570][217377:217377] CHIP:DMG: }, - [1666952609.345595][217377:217377] CHIP:DMG: - [1666952609.345617][217377:217377] CHIP:DMG: }, - [1666952609.345647][217377:217377] CHIP:DMG: - [1666952609.345668][217377:217377] CHIP:DMG: }, - [1666952609.345698][217377:217377] CHIP:DMG: - [1666952609.345718][217377:217377] CHIP:DMG: ], - [1666952609.345750][217377:217377] CHIP:DMG: - [1666952609.345771][217377:217377] CHIP:DMG: SuppressResponse = true, - [1666952609.345792][217377:217377] CHIP:DMG: InteractionModelRevision = 1 - [1666952609.345811][217377:217377] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && ACT.C.AO-READ - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && ACT.C.AO-WRITE - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml index 4a916e5aecbb30..2ffa03aca52f0b 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 68.2.2. [TC-BOOL-2.2] Primary functionality with server as DUT +name: 69.2.2. [TC-BOOL-2.2] Primary Functionality with Server as DUT PICS: - BOOL.S @@ -73,7 +73,7 @@ tests: - label: "Step 4a: Set up subscription to StateChange event." PICS: BOOL.M.ManuallyControlled && BOOL.S.E00 && BOOL.S.A0000 verification: | - Need an SDK implementation required + This event is not supported in all clusters app, so there are no reference logs. Run the below command to start interactive mode ./chip-tool interactive start @@ -86,21 +86,23 @@ tests: - label: "Step 4b: Bring the DUT into a state so StateValue is FALSE." PICS: BOOL.M.ManuallyControlled && BOOL.S.E00 && BOOL.S.A0000 verification: | - Verify the StateValue value is FALSE On TH(chip-tool), below is the sample log provided for the raspi platform + Verify the StateValue value is FALSE On TH(chip-tool), if the state-change event is generated disabled: true - label: "Step 4c: TH reads the StateValue attribute from the DUT." PICS: BOOL.M.ManuallyControlled && BOOL.S.E00 && BOOL.S.A0000 verification: | + This event is not supported in all clusters app, so there are no reference logs. + booleanstate read state-value 1 1 - Verify the StateValue value is FALSE On TH(chip-tool), below is the sample log provided for the raspi platform + Verify the StateValue value is FALSE On TH(chip-tool) disabled: true - label: "Step 4d: Bring the DUT into a state so StateValue is TRUE." PICS: BOOL.M.ManuallyControlled && BOOL.S.E00 && BOOL.S.A0000 verification: | - Verify the StateValue value is TRUE On TH(chip-tool), below is the sample log provided for the raspi platform + Verify the StateValue value is TRUE On TH(chip-tool), if the state-change event is generated disabled: true - label: "Step 4e: TH reads the StateValue attribute from the DUT." @@ -108,5 +110,5 @@ tests: verification: | booleanstate read state-value 1 1 - Verify the StateValue value is TRUE On TH(chip-tool), below is the sample log provided for the raspi platform + Verify the StateValue value is TRUE On TH(chip-tool) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_3_1_Simulated.yaml deleted file mode 100644 index dd6ad529382fc8..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_BOOL_3_1_Simulated.yaml +++ /dev/null @@ -1,356 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 68.3.1. [TC-BOOL-3.1] Attributes with Client as DUT - -PICS: - - BOOL.C - - BOOL.C.AM-READ - - BOOL.C.AO-READ - - BOOL.C.AM-WRITE - - BOOL.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Boolean State" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: StateValue" - PICS: BOOL.C.AM-READ - wait: "readAttribute" - attribute: "StateValue" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - ./chip-tool booleanstate read feature-map 1 1 - - Verify none of the optional feature of the server-side of the cluster is listed on TH(all-clusters-minnimal-app) Log - - [1666936223.132263][2546:2546] CHIP:EM: Handling via exchange: 56922r, Delegate: 0xaaaad02b0288 - [1666936223.132365][2546:2546] CHIP:IM: Received Read request - [1666936223.132562][2546:2546] CHIP:DMG: ReadRequestMessage = - [1666936223.132653][2546:2546] CHIP:DMG: { - [1666936223.132709][2546:2546] CHIP:DMG: AttributePathIBs = - [1666936223.132780][2546:2546] CHIP:DMG: [ - [1666936223.132844][2546:2546] CHIP:DMG: AttributePathIB = - [1666936223.132961][2546:2546] CHIP:DMG: { - [1666936223.133043][2546:2546] CHIP:DMG: Endpoint = 0x1, - [1666936223.133153][2546:2546] CHIP:DMG: Cluster = 0x45, - [1666936223.133238][2546:2546] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666936223.133340][2546:2546] CHIP:DMG: } - [1666936223.133421][2546:2546] CHIP:DMG: - [1666936223.133518][2546:2546] CHIP:DMG: ], - [1666936223.133592][2546:2546] CHIP:DMG: - [1666936223.133690][2546:2546] CHIP:DMG: isFabricFiltered = true, - [1666936223.133757][2546:2546] CHIP:DMG: InteractionModelRevision = 1 - [1666936223.133843][2546:2546] CHIP:DMG: }, - [1666936223.134040][2546:2546] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666936223.134302][2546:2546] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666936223.134381][2546:2546] CHIP:DMG: Cluster 45, Attribute fffc is dirty - [1666936223.134437][2546:2546] CHIP:DMG: Reading attribute: Cluster=0x0000_0045 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - [1666936223.134506][2546:2546] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0045 e=1 p=v - [1666936223.134610][2546:2546] CHIP:DMG: AccessControl: allowed - [1666936223.134803][2546:2546] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666936223.135460][2546:2546] CHIP:EM: <<< [E:56922r M:17358809 (Ack:120184015)] (S) Msg TX to 1:000000000001B669 [A6ED] --- Type 0001:05 (IM:ReportData) - [1666936223.135576][2546:2546] CHIP:IN: (S) Sending msg 17358809 on secure session with LSID: 15175 - [1666936223.136334][2546:2546] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:35992 | 17358809 | [Interaction Model (1) / Report Data (0x05) / Session = 13737 / Exchange = 56922] - [1666936223.136444][2546:2546] CHIP:DMG: Header Flags = - [1666936223.136503][2546:2546] CHIP:DMG: { - [1666936223.136592][2546:2546] CHIP:DMG: Exchange (0x06) = - [1666936223.136649][2546:2546] CHIP:DMG: { - [1666936223.136710][2546:2546] CHIP:DMG: AckMsg = 120184015 - [1666936223.136794][2546:2546] CHIP:DMG: NeedsAck = true - [1666936223.136852][2546:2546] CHIP:DMG: } - [1666936223.136926][2546:2546] CHIP:DMG: } - [1666936223.137005][2546:2546] CHIP:DMG: - [1666936223.137077][2546:2546] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666936223.137257][2546:2546] CHIP:DMG: { - [1666936223.137320][2546:2546] CHIP:DMG: data = 00a93500d9df0801fc3a3b7ec6f761c31f328854cd71ec11f2d3486635575b63f02c796af2820a3ea5eda769ed4b44fecdc89d2f050c1d0a325141f9fe1e941a5821abfbc01a45 - [1666936223.137404][2546:2546] CHIP:DMG: buffer_ptr = 187650953656928 - [1666936223.137459][2546:2546] CHIP:DMG: } - [1666936223.137513][2546:2546] CHIP:DMG: - [1666936223.137716][2546:2546] CHIP:DMG: ReportDataMessage = - [1666936223.137810][2546:2546] CHIP:DMG: { - [1666936223.137866][2546:2546] CHIP:DMG: AttributeReportIBs = - [1666936223.137968][2546:2546] CHIP:DMG: [ - [1666936223.138034][2546:2546] CHIP:DMG: AttributeReportIB = - [1666936223.138151][2546:2546] CHIP:DMG: { - [1666936223.138231][2546:2546] CHIP:DMG: AttributeDataIB = - [1666936223.138337][2546:2546] CHIP:DMG: { - [1666936223.138427][2546:2546] CHIP:DMG: DataVersion = 0x1e70d063, - [1666936223.138536][2546:2546] CHIP:DMG: AttributePathIB = - [1666936223.138625][2546:2546] CHIP:DMG: { - [1666936223.138803][2546:2546] CHIP:DMG: Endpoint = 0x1, - [1666936223.138899][2546:2546] CHIP:DMG: Cluster = 0x45, - [1666936223.139021][2546:2546] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666936223.139109][2546:2546] CHIP:DMG: } - [1666936223.139225][2546:2546] CHIP:DMG: - [1666936223.139318][2546:2546] CHIP:DMG: Data = 0, - [1666936223.139424][2546:2546] CHIP:DMG: }, - [1666936223.139514][2546:2546] CHIP:DMG: - [1666936223.139611][2546:2546] CHIP:DMG: }, - [1666936223.139698][2546:2546] CHIP:DMG: - [1666936223.139783][2546:2546] CHIP:DMG: ], - - ./chip-tool booleanstate read attribute-list 1 1 - - Verify none of the optional attributes of the server-side of the cluster is listed on TH(all-clusters-minnimal-app) Log - - [1665059548.735458][9263:9263] CHIP:DMG: ReportDataMessage = - [1665059548.735528][9263:9263] CHIP:DMG: { - [1665059548.735575][9263:9263] CHIP:DMG: AttributeReportIBs = - [1665059548.735699][9263:9263] CHIP:DMG: [ - [1665059548.735763][9263:9263] CHIP:DMG: AttributeReportIB = - [1665059548.735840][9263:9263] CHIP:DMG: { - [1665059548.735906][9263:9263] CHIP:DMG: AttributeDataIB = - [1665059548.735980][9263:9263] CHIP:DMG: { - [1665059548.736051][9263:9263] CHIP:DMG: DataVersion = 0xd0240b6a, - [1665059548.736125][9263:9263] CHIP:DMG: AttributePathIB = - [1665059548.736235][9263:9263] CHIP:DMG: { - [1665059548.736342][9263:9263] CHIP:DMG: Endpoint = 0x1, - [1665059548.736451][9263:9263] CHIP:DMG: Cluster = 0x45, - [1665059548.736536][9263:9263] CHIP:DMG: Attribute = 0x0000_FFFB, - [1665059548.736614][9263:9263] CHIP:DMG: } - [1665059548.736718][9263:9263] CHIP:DMG: - [1665059548.736797][9263:9263] CHIP:DMG: Data = [ - [1665059548.736896][9263:9263] CHIP:DMG: - [1665059548.736981][9263:9263] CHIP:DMG: ], - [1665059548.737053][9263:9263] CHIP:DMG: }, - [1665059548.737151][9263:9263] CHIP:DMG: - [1665059548.737217][9263:9263] CHIP:DMG: }, - [1665059548.737331][9263:9263] CHIP:DMG: - [1665059548.737394][9263:9263] CHIP:DMG: AttributeReportIB = - [1665059548.737499][9263:9263] CHIP:DMG: { - [1665059548.737718][9263:9263] CHIP:DMG: AttributeDataIB = - [1665059548.737821][9263:9263] CHIP:DMG: { - [1665059548.737898][9263:9263] CHIP:DMG: DataVersion = 0xd0240b6a, - [1665059548.737995][9263:9263] CHIP:DMG: AttributePathIB = - [1665059548.738074][9263:9263] CHIP:DMG: { - [1665059548.738185][9263:9263] CHIP:DMG: Endpoint = 0x1, - [1665059548.738269][9263:9263] CHIP:DMG: Cluster = 0x45, - [1665059548.738373][9263:9263] CHIP:DMG: Attribute = 0x0000_FFFB, - [1665059548.738464][9263:9263] CHIP:DMG: ListIndex = Null, - [1665059548.738587][9263:9263] CHIP:DMG: } - [1665059548.738693][9263:9263] CHIP:DMG: - [1665059548.738778][9263:9263] CHIP:DMG: Data = 0, - [1665059548.738874][9263:9263] CHIP:DMG: }, - [1665059548.738950][9263:9263] CHIP:DMG: - [1665059548.739038][9263:9263] CHIP:DMG: }, - [1665059548.739130][9263:9263] CHIP:DMG: - [1665059548.739192][9263:9263] CHIP:DMG: AttributeReportIB = - [1665059548.739295][9263:9263] CHIP:DMG: { - [1665059548.739365][9263:9263] CHIP:DMG: AttributeDataIB = - [1665059548.739438][9263:9263] CHIP:DMG: { - [1665059548.739535][9263:9263] CHIP:DMG: DataVersion = 0xd0240b6a, - [1665059548.739605][9263:9263] CHIP:DMG: AttributePathIB = - [1665059548.739704][9263:9263] CHIP:DMG: { - [1665059548.739785][9263:9263] CHIP:DMG: Endpoint = 0x1, - [1665059548.739891][9263:9263] CHIP:DMG: Cluster = 0x45, - [1665059548.739973][9263:9263] CHIP:DMG: Attribute = 0x0000_FFFB, - [1665059548.740052][9263:9263] CHIP:DMG: ListIndex = Null, - [1665059548.740151][9263:9263] CHIP:DMG: } - [1665059548.740235][9263:9263] CHIP:DMG: - [1665059548.740337][9263:9263] CHIP:DMG: Data = 65528, - [1665059548.740403][9263:9263] CHIP:DMG: }, - [1665059548.740510][9263:9263] CHIP:DMG: - [1665059548.740576][9263:9263] CHIP:DMG: }, - [1665059548.740667][9263:9263] CHIP:DMG: - [1665059548.740722][9263:9263] CHIP:DMG: AttributeReportIB = - [1665059548.740824][9263:9263] CHIP:DMG: { - [1665059548.740891][9263:9263] CHIP:DMG: AttributeDataIB = - [1665059548.740986][9263:9263] CHIP:DMG: { - [1665059548.741063][9263:9263] CHIP:DMG: DataVersion = 0xd0240b6a, - [1665059548.741159][9263:9263] CHIP:DMG: AttributePathIB = - [1665059548.741240][9263:9263] CHIP:DMG: { - [1665059548.741320][9263:9263] CHIP:DMG: Endpoint = 0x1, - [1665059548.741420][9263:9263] CHIP:DMG: Cluster = 0x45, - [1665059548.741493][9263:9263] CHIP:DMG: Attribute = 0x0000_FFFB, - [1665059548.741613][9263:9263] CHIP:DMG: ListIndex = Null, - [1665059548.741769][9263:9263] CHIP:DMG: } - [1665059548.741862][9263:9263] CHIP:DMG: - [1665059548.741954][9263:9263] CHIP:DMG: Data = 65529, - [1665059548.742028][9263:9263] CHIP:DMG: }, - [1665059548.742136][9263:9263] CHIP:DMG: - [1665059548.742198][9263:9263] CHIP:DMG: }, - [1665059548.742311][9263:9263] CHIP:DMG: - [1665059548.742375][9263:9263] CHIP:DMG: AttributeReportIB = - [1665059548.742455][9263:9263] CHIP:DMG: { - [1665059548.742545][9263:9263] CHIP:DMG: AttributeDataIB = - [1665059548.742621][9263:9263] CHIP:DMG: { - [1665059548.742719][9263:9263] CHIP:DMG: DataVersion = 0xd0240b6a, - [1665059548.742794][9263:9263] CHIP:DMG: AttributePathIB = - [1665059548.742865][9263:9263] CHIP:DMG: { - [1665059548.742966][9263:9263] CHIP:DMG: Endpoint = 0x1, - [1665059548.743049][9263:9263] CHIP:DMG: Cluster = 0x45, - [1665059548.743157][9263:9263] CHIP:DMG: Attribute = 0x0000_FFFB, - [1665059548.743236][9263:9263] CHIP:DMG: ListIndex = Null, - [1665059548.743332][9263:9263] CHIP:DMG: } - [1665059548.743426][9263:9263] CHIP:DMG: - [1665059548.743526][9263:9263] CHIP:DMG: Data = 65531, - [1665059548.743601][9263:9263] CHIP:DMG: }, - [1665059548.743710][9263:9263] CHIP:DMG: - [1665059548.743778][9263:9263] CHIP:DMG: }, - [1665059548.743886][9263:9263] CHIP:DMG: - [1665059548.743945][9263:9263] CHIP:DMG: AttributeReportIB = - [1665059548.744023][9263:9263] CHIP:DMG: { - [1665059548.744106][9263:9263] CHIP:DMG: AttributeDataIB = - [1665059548.744172][9263:9263] CHIP:DMG: { - [1665059548.744247][9263:9263] CHIP:DMG: DataVersion = 0xd0240b6a, - [1665059548.744321][9263:9263] CHIP:DMG: AttributePathIB = - [1665059548.744394][9263:9263] CHIP:DMG: { - [1665059548.744497][9263:9263] CHIP:DMG: Endpoint = 0x1, - [1665059548.744581][9263:9263] CHIP:DMG: Cluster = 0x45, - [1665059548.744689][9263:9263] CHIP:DMG: Attribute = 0x0000_FFFB, - [1665059548.744772][9263:9263] CHIP:DMG: ListIndex = Null, - [1665059548.744878][9263:9263] CHIP:DMG: } - [1665059548.744957][9263:9263] CHIP:DMG: - [1665059548.745062][9263:9263] CHIP:DMG: Data = 65532, - [1665059548.745135][9263:9263] CHIP:DMG: }, - [1665059548.745235][9263:9263] CHIP:DMG: - [1665059548.745302][9263:9263] CHIP:DMG: }, - [1665059548.745408][9263:9263] CHIP:DMG: - [1665059548.745468][9263:9263] CHIP:DMG: AttributeReportIB = - [1665059548.745585][9263:9263] CHIP:DMG: { - [1665059548.745678][9263:9263] CHIP:DMG: AttributeDataIB = - [1665059548.745753][9263:9263] CHIP:DMG: { - [1665059548.745851][9263:9263] CHIP:DMG: DataVersion = 0xd0240b6a, - [1665059548.745924][9263:9263] CHIP:DMG: AttributePathIB = - [1665059548.746024][9263:9263] CHIP:DMG: { - [1665059548.746103][9263:9263] CHIP:DMG: Endpoint = 0x1, - [1665059548.746208][9263:9263] CHIP:DMG: Cluster = 0x45, - [1665059548.746292][9263:9263] CHIP:DMG: Attribute = 0x0000_FFFB, - [1665059548.746373][9263:9263] CHIP:DMG: ListIndex = Null, - [1665059548.746473][9263:9263] CHIP:DMG: } - [1665059548.746551][9263:9263] CHIP:DMG: - [1665059548.746654][9263:9263] CHIP:DMG: Data = 65533, - [1665059548.746728][9263:9263] CHIP:DMG: }, - - - ./chip-tool booleanstate read state-value 1 1 - - Verify read command is received on TH (all-clusters-minimal-app) Log - - [1666174757.461171][21506:21506] CHIP:EM: Handling via exchange: 33623r, Delegate: 0xaaaac93380e0 - [1666174757.461271][21506:21506] CHIP:IM: Received Read request - [1666174757.461438][21506:21506] CHIP:DMG: ReadRequestMessage = - [1666174757.461510][21506:21506] CHIP:DMG: { - [1666174757.461565][21506:21506] CHIP:DMG: AttributePathIBs = - [1666174757.461629][21506:21506] CHIP:DMG: [ - [1666174757.461690][21506:21506] CHIP:DMG: AttributePathIB = - [1666174757.461769][21506:21506] CHIP:DMG: { - [1666174757.461855][21506:21506] CHIP:DMG: Endpoint = 0x1, - [1666174757.461999][21506:21506] CHIP:DMG: Cluster = 0x45, - [1666174757.462085][21506:21506] CHIP:DMG: Attribute = 0x0000_0000, - [1666174757.462161][21506:21506] CHIP:DMG: } - [1666174757.462235][21506:21506] CHIP:DMG: - [1666174757.462300][21506:21506] CHIP:DMG: ], - [1666174757.462371][21506:21506] CHIP:DMG: - [1666174757.462440][21506:21506] CHIP:DMG: isFabricFiltered = true, - [1666174757.462504][21506:21506] CHIP:DMG: InteractionModelRevision = 1 - [1666174757.462565][21506:21506] CHIP:DMG: }, - [1666174757.462734][21506:21506] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666174757.462977][21506:21506] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666174757.463049][21506:21506] CHIP:DMG: Cluster 45, Attribute 0 is dirty - [1666174757.463104][21506:21506] CHIP:DMG: Reading attribute: Cluster=0x0000_0045 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1666174757.463172][21506:21506] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0045 e=1 p=v - [1666174757.463248][21506:21506] CHIP:DMG: AccessControl: allowed - [1666174757.463365][21506:21506] CHIP:DMG: Sending report (payload has 35 bytes)... - [1666174757.463975][21506:21506] CHIP:EM: <<< [E:33623r M:221389354 (Ack:15980397)] (S) Msg TX to 1:000000000001B669 [A7EF] --- Type 0001:05 (IM:ReportData) - [1666174757.464087][21506:21506] CHIP:IN: (S) Sending msg 221389354 on secure session with LSID: 55654 - [1666174757.464808][21506:21506] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:35514 | 221389354 | [Interaction Model (1) / Report Data (0x05) / Session = 18738 / Exchange = 33623] - [1666174757.464917][21506:21506] CHIP:DMG: Header Flags = - [1666174757.464974][21506:21506] CHIP:DMG: { - [1666174757.465062][21506:21506] CHIP:DMG: Exchange (0x06) = - [1666174757.465119][21506:21506] CHIP:DMG: { - [1666174757.465178][21506:21506] CHIP:DMG: AckMsg = 15980397 - [1666174757.465228][21506:21506] CHIP:DMG: NeedsAck = true - [1666174757.465288][21506:21506] CHIP:DMG: } - [1666174757.465360][21506:21506] CHIP:DMG: } - [1666174757.465425][21506:21506] CHIP:DMG: - [1666174757.465495][21506:21506] CHIP:DMG: Encrypted Payload (69 bytes) = - [1666174757.465543][21506:21506] CHIP:DMG: { - [1666174757.465597][21506:21506] CHIP:DMG: data = 003249002a22320d70f90c31d24191bdcae9c8e10d0059f5a90bcc5c7c921dffd49596846c3d5131af0f1b0d5dac89dc70bec2a05fcefd34726640374895b32262fac29b72 - [1666174757.465653][21506:21506] CHIP:DMG: buffer_ptr = 187650839759600 - [1666174757.465703][21506:21506] CHIP:DMG: } - [1666174757.465750][21506:21506] CHIP:DMG: - [1666174757.465959][21506:21506] CHIP:DMG: ReportDataMessage = - [1666174757.466032][21506:21506] CHIP:DMG: { - [1666174757.466086][21506:21506] CHIP:DMG: AttributeReportIBs = - [1666174757.466173][21506:21506] CHIP:DMG: [ - [1666174757.466233][21506:21506] CHIP:DMG: AttributeReportIB = - [1666174757.466320][21506:21506] CHIP:DMG: { - [1666174757.466395][21506:21506] CHIP:DMG: AttributeDataIB = - [1666174757.466476][21506:21506] CHIP:DMG: { - [1666174757.466561][21506:21506] CHIP:DMG: DataVersion = 0x83aa29ff, - [1666174757.466644][21506:21506] CHIP:DMG: AttributePathIB = - [1666174757.466729][21506:21506] CHIP:DMG: { - [1666174757.466833][21506:21506] CHIP:DMG: Endpoint = 0x1, - [1666174757.466917][21506:21506] CHIP:DMG: Cluster = 0x45, - [1666174757.467008][21506:21506] CHIP:DMG: Attribute = 0x0000_0000, - [1666174757.467091][21506:21506] CHIP:DMG: } - [1666174757.467181][21506:21506] CHIP:DMG: - [1666174757.467270][21506:21506] CHIP:DMG: Data = false, - [1666174757.467344][21506:21506] CHIP:DMG: }, - [1666174757.467432][21506:21506] CHIP:DMG: - [1666174757.467505][21506:21506] CHIP:DMG: }, - [1666174757.467582][21506:21506] CHIP:DMG: - [1666174757.467643][21506:21506] CHIP:DMG: ], - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - This cluster doesn't have any optional attribute - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml index 1d08f4e1f942fe..563fd45a06511e 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml @@ -34,13 +34,26 @@ tests: - name: "nodeId" value: nodeId + #Issue https://github.com/project-chip/connectedhomeip/issues/26602 - label: "Step 2: TH reads the ClusterRevision from DUT" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 1 - constraints: - type: int16u + verification: | + ./chip-tool bridgeddevicebasicinformation read cluster-revision 1 3 + + Via the TH (chip-tool), verify: + -that the ClusterRevision attribute contains value as 2. + -that value is in the type of uint16. + + [1657695910.794487][15411:15416] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_FFFD DataVersion: 2577979325 + [1657695910.794568][15411:15416] CHIP:TOO: ClusterRevision: 2 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Step 3: TH reads the FeatureMap from DUT" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml new file mode 100644 index 00000000000000..fed38e16e2916d --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml @@ -0,0 +1,2139 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 36.1.25. [TC-CADMIN-1.25] Subscription to the attributes - verify + subscription response [ECM] [DUT - Commissionee] + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Precondition" + verification: | + Reset Devices to factory defaults + disabled: true + + - label: "Step 1: TH_CR1 starts a commissioning process with DUT_CE" + PICS: CADMIN.S + verification: | + On TH_CR1 start interactive mode, + + ./chip-tool interactive start + + In the interactive mode of TH_CR1, start commissioning process, + + pairing code 1 34970112332 --commissioner-name alpha + + + + [1690218999738] [38865:6571482] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 + [1690218999738] [38865:6571482] [CTL] Received CommissioningComplete response, errorCode=0 + [1690218999738] [38865:6571482] [CTL] Successfully finished commissioning step 'SendComplete' + [1690218999738] [38865:6571482] [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1690218999738] [38865:6571482] [CTL] Performing next commissioning step 'Cleanup' + [1690218999738] [38865:6571482] [IN] SecureSession[0x6000012bc000]: MarkForEviction Type:1 LSID:35777 + [1690218999738] [38865:6571482] [SC] SecureSession[0x6000012bc000, LSID:35777]: State change 'kActive' --> 'kPendingEviction' + [1690218999738] [38865:6571482] [IN] SecureSession[0x6000012bc000]: Released - Type:1 LSID:35777 + [1690218999738] [38865:6571482] [CTL] Successfully finished commissioning step 'Cleanup' + [1690218999738] [38865:6571482] [TOO] Device commissioning completed with success + disabled: true + + - label: "Step 2: TH_CR1 subscribes to WindowStatus attribute on DUT_CE" + PICS: CADMIN.S.A0000 + verification: | + In the interactive mode of TH_CR1, subscribe to windowstatus attribute, + + administratorcommissioning subscribe window-status 10 3000 1 0 --keepSubscriptions true --commissioner-name alpha + + On TH_CR1 logs verify for windowstatus subscription notification, + + ReportDataMessage = + [1690219196809] [38865:6571482] [DMG] { + [1690219196809] [38865:6571482] [DMG] SubscriptionId = 0xdade5274, + [1690219196809] [38865:6571482] [DMG] AttributeReportIBs = + [1690219196809] [38865:6571482] [DMG] [ + [1690219196809] [38865:6571482] [DMG] AttributeReportIB = + [1690219196809] [38865:6571482] [DMG] { + [1690219196809] [38865:6571482] [DMG] AttributeDataIB = + [1690219196809] [38865:6571482] [DMG] { + [1690219196809] [38865:6571482] [DMG] DataVersion = 0x1fddccd8, + [1690219196809] [38865:6571482] [DMG] AttributePathIB = + [1690219196809] [38865:6571482] [DMG] { + [1690219196809] [38865:6571482] [DMG] Endpoint = 0x0, + [1690219196809] [38865:6571482] [DMG] Cluster = 0x3c, + [1690219196809] [38865:6571482] [DMG] Attribute = 0x0000_0000, + [1690219196809] [38865:6571482] [DMG] } + [1690219196809] [38865:6571482] [DMG] + [1690219196809] [38865:6571482] [DMG] Data = 0, + [1690219196809] [38865:6571482] [DMG] }, + [1690219196809] [38865:6571482] [DMG] + [1690219196809] [38865:6571482] [DMG] }, + [1690219196809] [38865:6571482] [DMG] + [1690219196809] [38865:6571482] [DMG] ], + [1690219196809] [38865:6571482] [DMG] + [1690219196809] [38865:6571482] [DMG] InteractionModelRevision = 1 + [1690219196809] [38865:6571482] [DMG] } + [1690219196809] [38865:6571482] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629592 + [1690219196809] [38865:6571482] [TOO] WindowStatus: 0 + [1690219196809] [38865:6571482] [DMG] MoveToState ReadClient[0x13b704b90]: Moving to [AwaitingSu] + disabled: true + + - label: "Step 3: TH_CR1 subscribes to AdminFabricIndex attribute on DUT_CE" + PICS: CADMIN.S.A0001 + verification: | + In the interactive mode of TH_CR1, subscribe to adminfabricindex attribute, + + administratorcommissioning subscribe admin-fabric-index 10 3000 1 0 --keepSubscriptions true --commissioner-name alpha + + On TH_CR1 logs verify for adminfabricindex subscription notification, + + ReportDataMessage = + [1690219390537] [38865:6571482] [DMG] { + [1690219390537] [38865:6571482] [DMG] SubscriptionId = 0x35250b41, + [1690219390537] [38865:6571482] [DMG] AttributeReportIBs = + [1690219390537] [38865:6571482] [DMG] [ + [1690219390537] [38865:6571482] [DMG] AttributeReportIB = + [1690219390537] [38865:6571482] [DMG] { + [1690219390537] [38865:6571482] [DMG] AttributeDataIB = + [1690219390537] [38865:6571482] [DMG] { + [1690219390537] [38865:6571482] [DMG] DataVersion = 0x1fddccd8, + [1690219390537] [38865:6571482] [DMG] AttributePathIB = + [1690219390537] [38865:6571482] [DMG] { + [1690219390537] [38865:6571482] [DMG] Endpoint = 0x0, + [1690219390537] [38865:6571482] [DMG] Cluster = 0x3c, + [1690219390537] [38865:6571482] [DMG] Attribute = 0x0000_0001, + [1690219390537] [38865:6571482] [DMG] } + [1690219390537] [38865:6571482] [DMG] + [1690219390537] [38865:6571482] [DMG] Data = NULL + [1690219390537] [38865:6571482] [DMG] }, + [1690219390537] [38865:6571482] [DMG] + [1690219390537] [38865:6571482] [DMG] }, + [1690219390537] [38865:6571482] [DMG] + [1690219390537] [38865:6571482] [DMG] ], + [1690219390537] [38865:6571482] [DMG] + [1690219390537] [38865:6571482] [DMG] InteractionModelRevision = 1 + [1690219390537] [38865:6571482] [DMG] } + [1690219390537] [38865:6571482] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629592 + [1690219390537] [38865:6571482] [TOO] AdminFabricIndex: null + [1690219390537] [38865:6571482] [DMG] MoveToState ReadClient[0x13b605540]: Moving to [AwaitingSu] + disabled: true + + - label: "Step 4: TH_CR1 subscribes to AdminVendorId attribute on DUT_CE" + PICS: CADMIN.S.A0002 + verification: | + In the interactive mode of TH_CR1, subscribe to adminvendorid attribute, + + administratorcommissioning subscribe admin-vendor-id 10 3000 1 0 --keepSubscriptions true --commissioner-name alpha + + On TH_CR1 logs, verify for adminvendorid subscription notification + + ReportDataMessage = + [1690219472644] [38865:6571482] [DMG] { + [1690219472644] [38865:6571482] [DMG] SubscriptionId = 0xd3c6ff91, + [1690219472644] [38865:6571482] [DMG] AttributeReportIBs = + [1690219472644] [38865:6571482] [DMG] [ + [1690219472644] [38865:6571482] [DMG] AttributeReportIB = + [1690219472644] [38865:6571482] [DMG] { + [1690219472644] [38865:6571482] [DMG] AttributeDataIB = + [1690219472644] [38865:6571482] [DMG] { + [1690219472644] [38865:6571482] [DMG] DataVersion = 0x1fddccd8, + [1690219472644] [38865:6571482] [DMG] AttributePathIB = + [1690219472644] [38865:6571482] [DMG] { + [1690219472644] [38865:6571482] [DMG] Endpoint = 0x0, + [1690219472644] [38865:6571482] [DMG] Cluster = 0x3c, + [1690219472644] [38865:6571482] [DMG] Attribute = 0x0000_0002, + [1690219472644] [38865:6571482] [DMG] } + [1690219472644] [38865:6571482] [DMG] + [1690219472644] [38865:6571482] [DMG] Data = NULL + [1690219472644] [38865:6571482] [DMG] }, + [1690219472644] [38865:6571482] [DMG] + [1690219472644] [38865:6571482] [DMG] }, + [1690219472644] [38865:6571482] [DMG] + [1690219472644] [38865:6571482] [DMG] ], + [1690219472644] [38865:6571482] [DMG] + [1690219472644] [38865:6571482] [DMG] InteractionModelRevision = 1 + [1690219472644] [38865:6571482] [DMG] } + [1690219472644] [38865:6571482] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629592 + [1690219472644] [38865:6571482] [TOO] AdminVendorId: null + [1690219472644] [38865:6571482] [DMG] MoveToState ReadClient[0x12b6042d0]: Moving to [AwaitingSu] + disabled: true + + - label: + "Step 5: TH_CR1 opens a commissioning window on DUT_CE using ECM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C00.Rsp + verification: | + In the interactive mode of TH_CR1, send command to open commissioning window using ECM, + + pairing open-commissioning-window 1 1 180 1000 3840 --commissioner-name alpha + + On TH_CR1 logs, verify for pairing window to be successfully opened + + InvokeResponseMessage = + [1690219617069] [38865:6571482] [DMG] { + [1690219617069] [38865:6571482] [DMG] suppressResponse = false, + [1690219617069] [38865:6571482] [DMG] InvokeResponseIBs = + [1690219617069] [38865:6571482] [DMG] [ + [1690219617069] [38865:6571482] [DMG] InvokeResponseIB = + [1690219617069] [38865:6571482] [DMG] { + [1690219617069] [38865:6571482] [DMG] CommandStatusIB = + [1690219617069] [38865:6571482] [DMG] { + [1690219617069] [38865:6571482] [DMG] CommandPathIB = + [1690219617069] [38865:6571482] [DMG] { + [1690219617069] [38865:6571482] [DMG] EndpointId = 0x0, + [1690219617069] [38865:6571482] [DMG] ClusterId = 0x3c, + [1690219617069] [38865:6571482] [DMG] CommandId = 0x0, + [1690219617069] [38865:6571482] [DMG] }, + [1690219617069] [38865:6571482] [DMG] + [1690219617069] [38865:6571482] [DMG] StatusIB = + [1690219617069] [38865:6571482] [DMG] { + [1690219617069] [38865:6571482] [DMG] status = 0x00 (SUCCESS), + [1690219617069] [38865:6571482] [DMG] }, + [1690219617069] [38865:6571482] [DMG] + [1690219617069] [38865:6571482] [DMG] }, + [1690219617069] [38865:6571482] [DMG] + [1690219617069] [38865:6571482] [DMG] }, + [1690219617069] [38865:6571482] [DMG] + [1690219617069] [38865:6571482] [DMG] ], + [1690219617069] [38865:6571482] [DMG] + [1690219617069] [38865:6571482] [DMG] InteractionModelRevision = 1 + [1690219617069] [38865:6571482] [DMG] }, + [1690219617069] [38865:6571482] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1690219617069] [38865:6571482] [CTL] Successfully opened pairing window on the device + [1690219617069] [38865:6571482] [CTL] Manual pairing code: [35092509167] + [1690219617069] [38865:6571482] [CTL] SetupQRCode: [MT:-24J0AFN00I.KG02C00] + [1690219617069] [38865:6571482] [DMG] ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 6: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 1, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR1s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR1s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 1, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR1’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR1’s fabric + + ReportDataMessage = + [1690219617070] [38865:6571482] [DMG] { + [1690219617070] [38865:6571482] [DMG] SubscriptionId = 0xdade5274, + [1690219617070] [38865:6571482] [DMG] AttributeReportIBs = + [1690219617070] [38865:6571482] [DMG] [ + [1690219617070] [38865:6571482] [DMG] AttributeReportIB = + [1690219617070] [38865:6571482] [DMG] { + [1690219617070] [38865:6571482] [DMG] AttributeDataIB = + [1690219617070] [38865:6571482] [DMG] { + [1690219617070] [38865:6571482] [DMG] DataVersion = 0x1fddccdb, + [1690219617070] [38865:6571482] [DMG] AttributePathIB = + [1690219617070] [38865:6571482] [DMG] { + [1690219617070] [38865:6571482] [DMG] Endpoint = 0x0, + [1690219617070] [38865:6571482] [DMG] Cluster = 0x3c, + [1690219617070] [38865:6571482] [DMG] Attribute = 0x0000_0000, + [1690219617070] [38865:6571482] [DMG] } + [1690219617070] [38865:6571482] [DMG] + [1690219617070] [38865:6571482] [DMG] Data = 1, + [1690219617070] [38865:6571482] [DMG] }, + [1690219617070] [38865:6571482] [DMG] + [1690219617070] [38865:6571482] [DMG] }, + [1690219617070] [38865:6571482] [DMG] + [1690219617070] [38865:6571482] [DMG] ], + [1690219617070] [38865:6571482] [DMG] + [1690219617070] [38865:6571482] [DMG] InteractionModelRevision = 1 + [1690219617070] [38865:6571482] [DMG] } + [1690219617070] [38865:6571482] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629595 + [1690219617070] [38865:6571482] [TOO] WindowStatus: 1 + [1690219617070] [38865:6571482] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdade5274 Peer = 01:0000000000000001 + [1690219617071] [38865:6571482] [EM] <<< [E:50737r S:35778 M:151592234 (Ack:264355187)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690219617071] [38865:6571482] [IN] (S) Sending msg 151592234 on secure session with LSID: 35778 + [1690219617074] [38865:6571482] [EM] >>> [E:50738r S:35778 M:264355188] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690219617074] [38865:6571482] [EM] Handling via exchange: 50738r, Delegate: 0x1013c4be0 + [1690219617074] [38865:6571482] [DMG] ReportDataMessage = + [1690219617074] [38865:6571482] [DMG] { + [1690219617074] [38865:6571482] [DMG] SubscriptionId = 0x35250b41, + [1690219617074] [38865:6571482] [DMG] AttributeReportIBs = + [1690219617074] [38865:6571482] [DMG] [ + [1690219617074] [38865:6571482] [DMG] AttributeReportIB = + [1690219617074] [38865:6571482] [DMG] { + [1690219617074] [38865:6571482] [DMG] AttributeDataIB = + [1690219617074] [38865:6571482] [DMG] { + [1690219617074] [38865:6571482] [DMG] DataVersion = 0x1fddccdb, + [1690219617074] [38865:6571482] [DMG] AttributePathIB = + [1690219617074] [38865:6571482] [DMG] { + [1690219617074] [38865:6571482] [DMG] Endpoint = 0x0, + [1690219617074] [38865:6571482] [DMG] Cluster = 0x3c, + [1690219617075] [38865:6571482] [DMG] Attribute = 0x0000_0001, + [1690219617075] [38865:6571482] [DMG] } + [1690219617075] [38865:6571482] [DMG] + [1690219617075] [38865:6571482] [DMG] Data = 1, + [1690219617075] [38865:6571482] [DMG] }, + [1690219617075] [38865:6571482] [DMG] + [1690219617075] [38865:6571482] [DMG] }, + [1690219617075] [38865:6571482] [DMG] + [1690219617075] [38865:6571482] [DMG] ], + [1690219617075] [38865:6571482] [DMG] + [1690219617075] [38865:6571482] [DMG] InteractionModelRevision = 1 + [1690219617075] [38865:6571482] [DMG] } + [1690219617075] [38865:6571482] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629595 + [1690219617075] [38865:6571482] [TOO] AdminFabricIndex: 1 + [1690219617075] [38865:6571482] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x35250b41 Peer = 01:0000000000000001 + [1690219617075] [38865:6571482] [EM] <<< [E:50738r S:35778 M:151592235 (Ack:264355188)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690219617075] [38865:6571482] [IN] (S) Sending msg 151592235 on secure session with LSID: 35778 + [1690219617076] [38865:6571482] [EM] >>> [E:50739r S:35778 M:264355189] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690219617076] [38865:6571482] [EM] Handling via exchange: 50739r, Delegate: 0x1013c4be0 + [1690219617076] [38865:6571482] [DMG] ReportDataMessage = + [1690219617076] [38865:6571482] [DMG] { + [1690219617076] [38865:6571482] [DMG] SubscriptionId = 0xd3c6ff91, + [1690219617076] [38865:6571482] [DMG] AttributeReportIBs = + [1690219617076] [38865:6571482] [DMG] [ + [1690219617076] [38865:6571482] [DMG] AttributeReportIB = + [1690219617076] [38865:6571482] [DMG] { + [1690219617076] [38865:6571482] [DMG] AttributeDataIB = + [1690219617076] [38865:6571482] [DMG] { + [1690219617076] [38865:6571482] [DMG] DataVersion = 0x1fddccdb, + [1690219617076] [38865:6571482] [DMG] AttributePathIB = + [1690219617076] [38865:6571482] [DMG] { + [1690219617076] [38865:6571482] [DMG] Endpoint = 0x0, + [1690219617076] [38865:6571482] [DMG] Cluster = 0x3c, + [1690219617076] [38865:6571482] [DMG] Attribute = 0x0000_0002, + [1690219617076] [38865:6571482] [DMG] } + [1690219617076] [38865:6571482] [DMG] + [1690219617076] [38865:6571482] [DMG] Data = 65521, + [1690219617076] [38865:6571482] [DMG] }, + [1690219617076] [38865:6571482] [DMG] + [1690219617076] [38865:6571482] [DMG] }, + [1690219617076] [38865:6571482] [DMG] + [1690219617076] [38865:6571482] [DMG] ], + [1690219617076] [38865:6571482] [DMG] + [1690219617076] [38865:6571482] [DMG] InteractionModelRevision = 1 + [1690219617076] [38865:6571482] [DMG] } + [1690219617076] [38865:6571482] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629595 + [1690219617076] [38865:6571482] [TOO] AdminVendorId: 65521 + [1690219617076] [38865:6571482] [DMG] Refresh LivenessCheckTime for + disabled: true + + - label: "Step 7: TH_CR2 starts a commissioning process with DUT_CE" + PICS: CADMIN.S + verification: | + On TH_CR2 start interactive mode, + + ./chip-tool interactive start + + In the interactive mode of TH_CR2, start commissioning process using the pairing code obtained from step 5 + + pairing code 1 35092509167 --commissioner-name beta + + + [1690219788079] [38880:6580427] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 + [1690219788079] [38880:6580427] [CTL] Received CommissioningComplete response, errorCode=0 + [1690219788079] [38880:6580427] [CTL] Successfully finished commissioning step 'SendComplete' + [1690219788079] [38880:6580427] [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1690219788079] [38880:6580427] [CTL] Performing next commissioning step 'Cleanup' + [1690219788079] [38880:6580427] [IN] SecureSession[0x60000062c0f0]: MarkForEviction Type:1 LSID:15323 + [1690219788079] [38880:6580427] [SC] SecureSession[0x60000062c0f0, LSID:15323]: State change 'kActive' --> 'kPendingEviction' + [1690219788079] [38880:6580427] [IN] SecureSession[0x60000062c0f0]: Released - Type:1 LSID:15323 + [1690219788079] [38880:6580427] [CTL] Successfully finished commissioning step 'Cleanup' + [1690219788079] [38880:6580427] [TOO] Device commissioning completed with success + [1690219788079] [38880:6580427] [DMG] ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 8: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + Handling via exchange: 50740r, Delegate: 0x1013c4be0 + [1690219788240] [38865:6578589] [DMG] ReportDataMessage = + [1690219788240] [38865:6578589] [DMG] { + [1690219788240] [38865:6578589] [DMG] SubscriptionId = 0xdade5274, + [1690219788240] [38865:6578589] [DMG] AttributeReportIBs = + [1690219788240] [38865:6578589] [DMG] [ + [1690219788240] [38865:6578589] [DMG] AttributeReportIB = + [1690219788240] [38865:6578589] [DMG] { + [1690219788240] [38865:6578589] [DMG] AttributeDataIB = + [1690219788240] [38865:6578589] [DMG] { + [1690219788240] [38865:6578589] [DMG] DataVersion = 0x1fddccde, + [1690219788240] [38865:6578589] [DMG] AttributePathIB = + [1690219788240] [38865:6578589] [DMG] { + [1690219788240] [38865:6578589] [DMG] Endpoint = 0x0, + [1690219788240] [38865:6578589] [DMG] Cluster = 0x3c, + [1690219788240] [38865:6578589] [DMG] Attribute = 0x0000_0000, + [1690219788240] [38865:6578589] [DMG] } + [1690219788240] [38865:6578589] [DMG] + [1690219788240] [38865:6578589] [DMG] Data = 0, + [1690219788240] [38865:6578589] [DMG] }, + [1690219788240] [38865:6578589] [DMG] + [1690219788240] [38865:6578589] [DMG] }, + [1690219788240] [38865:6578589] [DMG] + [1690219788240] [38865:6578589] [DMG] ], + [1690219788240] [38865:6578589] [DMG] + [1690219788240] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690219788240] [38865:6578589] [DMG] } + [1690219788241] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629598 + [1690219788241] [38865:6578589] [TOO] WindowStatus: 0 + [1690219788241] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdade5274 Peer = 01:0000000000000001 + [1690219788241] [38865:6578589] [EM] <<< [E:50740r S:35778 M:151592237 (Ack:264355193)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690219788241] [38865:6578589] [IN] (S) Sending msg 151592237 on secure session with LSID: 35778 + [1690219788241] [38865:6578589] [EM] >>> [E:50741r S:35778 M:264355194] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690219788241] [38865:6578589] [EM] Handling via exchange: 50741r, Delegate: 0x1013c4be0 + [1690219788241] [38865:6578589] [DMG] ReportDataMessage = + [1690219788241] [38865:6578589] [DMG] { + [1690219788241] [38865:6578589] [DMG] SubscriptionId = 0x35250b41, + [1690219788241] [38865:6578589] [DMG] AttributeReportIBs = + [1690219788241] [38865:6578589] [DMG] [ + [1690219788241] [38865:6578589] [DMG] AttributeReportIB = + [1690219788241] [38865:6578589] [DMG] { + [1690219788241] [38865:6578589] [DMG] AttributeDataIB = + [1690219788241] [38865:6578589] [DMG] { + [1690219788241] [38865:6578589] [DMG] DataVersion = 0x1fddccde, + [1690219788241] [38865:6578589] [DMG] AttributePathIB = + [1690219788241] [38865:6578589] [DMG] { + [1690219788241] [38865:6578589] [DMG] Endpoint = 0x0, + [1690219788241] [38865:6578589] [DMG] Cluster = 0x3c, + [1690219788241] [38865:6578589] [DMG] Attribute = 0x0000_0001, + [1690219788241] [38865:6578589] [DMG] } + [1690219788241] [38865:6578589] [DMG] + [1690219788241] [38865:6578589] [DMG] Data = NULL + [1690219788241] [38865:6578589] [DMG] }, + [1690219788241] [38865:6578589] [DMG] + [1690219788241] [38865:6578589] [DMG] }, + [1690219788241] [38865:6578589] [DMG] + [1690219788241] [38865:6578589] [DMG] ], + [1690219788241] [38865:6578589] [DMG] + [1690219788241] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690219788241] [38865:6578589] [DMG] } + [1690219788241] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629598 + [1690219788241] [38865:6578589] [TOO] AdminFabricIndex: null + [1690219788241] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x35250b41 Peer = 01:0000000000000001 + [1690219788242] [38865:6578589] [EM] <<< [E:50741r S:35778 M:151592238 (Ack:264355194)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690219788242] [38865:6578589] [IN] (S) Sending msg 151592238 on secure session with LSID: 35778 + [1690219788242] [38865:6578589] [EM] >>> [E:50742r S:35778 M:264355195] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690219788242] [38865:6578589] [EM] Handling via exchange: 50742r, Delegate: 0x1013c4be0 + [1690219788242] [38865:6578589] [DMG] ReportDataMessage = + [1690219788242] [38865:6578589] [DMG] { + [1690219788242] [38865:6578589] [DMG] SubscriptionId = 0xd3c6ff91, + [1690219788242] [38865:6578589] [DMG] AttributeReportIBs = + [1690219788242] [38865:6578589] [DMG] [ + [1690219788242] [38865:6578589] [DMG] AttributeReportIB = + [1690219788242] [38865:6578589] [DMG] { + [1690219788242] [38865:6578589] [DMG] AttributeDataIB = + [1690219788242] [38865:6578589] [DMG] { + [1690219788242] [38865:6578589] [DMG] DataVersion = 0x1fddccde, + [1690219788242] [38865:6578589] [DMG] AttributePathIB = + [1690219788242] [38865:6578589] [DMG] { + [1690219788242] [38865:6578589] [DMG] Endpoint = 0x0, + [1690219788242] [38865:6578589] [DMG] Cluster = 0x3c, + [1690219788242] [38865:6578589] [DMG] Attribute = 0x0000_0002, + [1690219788242] [38865:6578589] [DMG] } + [1690219788242] [38865:6578589] [DMG] + [1690219788242] [38865:6578589] [DMG] Data = NULL + [1690219788242] [38865:6578589] [DMG] }, + [1690219788242] [38865:6578589] [DMG] + [1690219788242] [38865:6578589] [DMG] }, + [1690219788242] [38865:6578589] [DMG] + [1690219788242] [38865:6578589] [DMG] ], + [1690219788242] [38865:6578589] [DMG] + [1690219788242] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690219788242] [38865:6578589] [DMG] } + [1690219788242] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629598 + [1690219788242] [38865:6578589] [TOO] AdminVendorId: null + [1690219788242] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xd3c6ff91 Peer = 01:0000000000000001 + [1690219788242] [38865:6578589] [EM] <<< [E:50742r S:35778 M:151592239 (Ack:264355195)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: "Step 9: TH_CR2 subscribes to WindowStatus attribute on DUT_CE" + PICS: CADMIN.S.A0000 + verification: | + In the interactive mode of TH_CR2, subscribe to windowstatus attribute, + + administratorcommissioning subscribe window-status 10 3000 1 0 --keepSubscriptions true --commissioner-name beta + + On the TH_CR2 logs, verify for windowstatus subscription notification + + ReportDataMessage = + [1690219925605] [38880:6580427] [DMG] { + [1690219925605] [38880:6580427] [DMG] SubscriptionId = 0xfab5d837, + [1690219925605] [38880:6580427] [DMG] AttributeReportIBs = + [1690219925605] [38880:6580427] [DMG] [ + [1690219925605] [38880:6580427] [DMG] AttributeReportIB = + [1690219925605] [38880:6580427] [DMG] { + [1690219925605] [38880:6580427] [DMG] AttributeDataIB = + [1690219925605] [38880:6580427] [DMG] { + [1690219925605] [38880:6580427] [DMG] DataVersion = 0x1fddccde, + [1690219925605] [38880:6580427] [DMG] AttributePathIB = + [1690219925605] [38880:6580427] [DMG] { + [1690219925605] [38880:6580427] [DMG] Endpoint = 0x0, + [1690219925605] [38880:6580427] [DMG] Cluster = 0x3c, + [1690219925605] [38880:6580427] [DMG] Attribute = 0x0000_0000, + [1690219925605] [38880:6580427] [DMG] } + [1690219925605] [38880:6580427] [DMG] + [1690219925605] [38880:6580427] [DMG] Data = 0, + [1690219925605] [38880:6580427] [DMG] }, + [1690219925605] [38880:6580427] [DMG] + [1690219925605] [38880:6580427] [DMG] }, + [1690219925605] [38880:6580427] [DMG] + [1690219925605] [38880:6580427] [DMG] ], + [1690219925605] [38880:6580427] [DMG] + [1690219925605] [38880:6580427] [DMG] InteractionModelRevision = 1 + [1690219925605] [38880:6580427] [DMG] } + [1690219925605] [38880:6580427] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629598 + [1690219925605] [38880:6580427] [TOO] WindowStatus: 0 + [1690219925605] [38880:6580427] [DMG] MoveToState ReadClient[0x12af05f80]: Moving to [AwaitingSu] + disabled: true + + - label: + "Step 10: TH_CR2 subscribes to AdminFabricIndex attribute on DUT_CE" + PICS: CADMIN.S.A0001 + verification: | + In the interactive mode of TH_CR2, subscribe to adminfabricindex attribute, + + administratorcommissioning subscribe admin-fabric-index 10 3000 1 0 --keepSubscriptions true --commissioner-name beta + + On the TH_CR2 logs, verify for adminfabricindex subscription notification + + ReportDataMessage = + [1690219962624] [38880:6580427] [DMG] { + [1690219962624] [38880:6580427] [DMG] SubscriptionId = 0x5984e13a, + [1690219962624] [38880:6580427] [DMG] AttributeReportIBs = + [1690219962624] [38880:6580427] [DMG] [ + [1690219962624] [38880:6580427] [DMG] AttributeReportIB = + [1690219962624] [38880:6580427] [DMG] { + [1690219962624] [38880:6580427] [DMG] AttributeDataIB = + [1690219962624] [38880:6580427] [DMG] { + [1690219962624] [38880:6580427] [DMG] DataVersion = 0x1fddccde, + [1690219962624] [38880:6580427] [DMG] AttributePathIB = + [1690219962624] [38880:6580427] [DMG] { + [1690219962624] [38880:6580427] [DMG] Endpoint = 0x0, + [1690219962624] [38880:6580427] [DMG] Cluster = 0x3c, + [1690219962624] [38880:6580427] [DMG] Attribute = 0x0000_0001, + [1690219962624] [38880:6580427] [DMG] } + [1690219962624] [38880:6580427] [DMG] + [1690219962624] [38880:6580427] [DMG] Data = NULL + [1690219962624] [38880:6580427] [DMG] }, + [1690219962624] [38880:6580427] [DMG] + [1690219962624] [38880:6580427] [DMG] }, + [1690219962624] [38880:6580427] [DMG] + [1690219962624] [38880:6580427] [DMG] ], + [1690219962624] [38880:6580427] [DMG] + [1690219962624] [38880:6580427] [DMG] InteractionModelRevision = 1 + [1690219962624] [38880:6580427] [DMG] } + [1690219962624] [38880:6580427] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629598 + [1690219962624] [38880:6580427] [TOO] AdminFabricIndex: null + disabled: true + + - label: "Step 11: TH_CR2 subscribes to AdminVendorId attribute on DUT_CE" + PICS: CADMIN.S.A0002 + verification: | + In the interactive mode of TH_CR2, subscribe to adminvendorid attribute, + + administratorcommissioning subscribe admin-vendor-id 10 3000 1 0 --keepSubscriptions true --commissioner-name beta + + On the TH_CR2 logs, verify for adminvendorid subscription notification + + ReportDataMessage = + [1690220032050] [38880:6580427] [DMG] { + [1690220032050] [38880:6580427] [DMG] SubscriptionId = 0x943b5fc3, + [1690220032050] [38880:6580427] [DMG] AttributeReportIBs = + [1690220032050] [38880:6580427] [DMG] [ + [1690220032050] [38880:6580427] [DMG] AttributeReportIB = + [1690220032050] [38880:6580427] [DMG] { + [1690220032050] [38880:6580427] [DMG] AttributeDataIB = + [1690220032050] [38880:6580427] [DMG] { + [1690220032050] [38880:6580427] [DMG] DataVersion = 0x1fddccde, + [1690220032050] [38880:6580427] [DMG] AttributePathIB = + [1690220032050] [38880:6580427] [DMG] { + [1690220032050] [38880:6580427] [DMG] Endpoint = 0x0, + [1690220032050] [38880:6580427] [DMG] Cluster = 0x3c, + [1690220032050] [38880:6580427] [DMG] Attribute = 0x0000_0002, + [1690220032050] [38880:6580427] [DMG] } + [1690220032050] [38880:6580427] [DMG] + [1690220032050] [38880:6580427] [DMG] Data = NULL + [1690220032050] [38880:6580427] [DMG] }, + [1690220032050] [38880:6580427] [DMG] + [1690220032050] [38880:6580427] [DMG] }, + [1690220032050] [38880:6580427] [DMG] + [1690220032050] [38880:6580427] [DMG] ], + [1690220032050] [38880:6580427] [DMG] + [1690220032050] [38880:6580427] [DMG] InteractionModelRevision = 1 + [1690220032050] [38880:6580427] [DMG] } + [1690220032050] [38880:6580427] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629598 + [1690220032050] [38880:6580427] [TOO] AdminVendorId: null + [1690220032050] [38880:6580427] [DMG] MoveToState ReadClient[0x12c8042d0]: Moving to [AwaitingSu] + disabled: true + + - label: + "Step 12: TH_CR1 opens a commissioning window on DUT_CE using ECM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C00.Rsp + verification: | + In the interactive mode of TH_CR1, send command to open commissioning window using ECM, + + pairing open-commissioning-window 1 1 180 1000 3840 --commissioner-name alpha + + On TH_CR1 logs, verify for pairing window to be successfully opened + + + InvokeResponseMessage = + + [1690220086788] [38865:6578589] [DMG] { + [1690220086788] [38865:6578589] [DMG] suppressResponse = false, + [1690220086788] [38865:6578589] [DMG] InvokeResponseIBs = + [1690220086788] [38865:6578589] [DMG] [ + [1690220086788] [38865:6578589] [DMG] InvokeResponseIB = + [1690220086788] [38865:6578589] [DMG] { + [1690220086788] [38865:6578589] [DMG] CommandStatusIB = + [1690220086788] [38865:6578589] [DMG] { + [1690220086788] [38865:6578589] [DMG] CommandPathIB = + [1690220086788] [38865:6578589] [DMG] { + [1690220086788] [38865:6578589] [DMG] EndpointId = 0x0, + [1690220086788] [38865:6578589] [DMG] ClusterId = 0x3c, + [1690220086788] [38865:6578589] [DMG] CommandId = 0x0, + [1690220086788] [38865:6578589] [DMG] }, + [1690220086788] [38865:6578589] [DMG] + [1690220086788] [38865:6578589] [DMG] StatusIB = + [1690220086788] [38865:6578589] [DMG] { + [1690220086788] [38865:6578589] [DMG] status = 0x00 (SUCCESS), + [1690220086788] [38865:6578589] [DMG] }, + [1690220086788] [38865:6578589] [DMG] + [1690220086788] [38865:6578589] [DMG] }, + [1690220086788] [38865:6578589] [DMG] + [1690220086788] [38865:6578589] [DMG] }, + [1690220086788] [38865:6578589] [DMG] + [1690220086788] [38865:6578589] [DMG] ], + [1690220086788] [38865:6578589] [DMG] + [1690220086788] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220086788] [38865:6578589] [DMG] }, + [1690220086788] [38865:6578589] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1690220086788] [38865:6578589] [CTL] Successfully opened pairing window on the device + [1690220086788] [38865:6578589] [CTL] Manual pairing code: [34983924769] + [1690220086788] [38865:6578589] [CTL] SetupQRCode: [MT:-24J0AFN002ZF60MW00] + [1690220086788] [38865:6578589] [DMG] ICR moving to [AwaitingDe] + [1690220086788] [38865:6578589] [EM] <<< [E:27145i S:35778 M:151592246 (Ack:264355202)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 13: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 1, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR1s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR1s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 1, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR1’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR1’s fabric + + ReportDataMessage = + [1690220086789] [38865:6578589] [DMG] { + [1690220086789] [38865:6578589] [DMG] SubscriptionId = 0xdade5274, + [1690220086789] [38865:6578589] [DMG] AttributeReportIBs = + [1690220086789] [38865:6578589] [DMG] [ + [1690220086789] [38865:6578589] [DMG] AttributeReportIB = + [1690220086789] [38865:6578589] [DMG] { + [1690220086789] [38865:6578589] [DMG] AttributeDataIB = + [1690220086789] [38865:6578589] [DMG] { + [1690220086789] [38865:6578589] [DMG] DataVersion = 0x1fddcce1, + [1690220086789] [38865:6578589] [DMG] AttributePathIB = + [1690220086789] [38865:6578589] [DMG] { + [1690220086789] [38865:6578589] [DMG] Endpoint = 0x0, + [1690220086789] [38865:6578589] [DMG] Cluster = 0x3c, + [1690220086789] [38865:6578589] [DMG] Attribute = 0x0000_0000, + [1690220086789] [38865:6578589] [DMG] } + [1690220086789] [38865:6578589] [DMG] + [1690220086789] [38865:6578589] [DMG] Data = 1, + [1690220086789] [38865:6578589] [DMG] }, + [1690220086789] [38865:6578589] [DMG] + [1690220086789] [38865:6578589] [DMG] }, + [1690220086789] [38865:6578589] [DMG] + [1690220086789] [38865:6578589] [DMG] ], + [1690220086789] [38865:6578589] [DMG] + [1690220086789] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220086789] [38865:6578589] [DMG] } + [1690220086789] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629601 + [1690220086789] [38865:6578589] [TOO] WindowStatus: 1 + [1690220086789] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdade5274 Peer = 01:0000000000000001 + [1690220086789] [38865:6578589] [EM] <<< [E:50743r S:35778 M:151592247 (Ack:264355203)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220086789] [38865:6578589] [IN] (S) Sending msg 151592247 on secure session with LSID: 35778 + [1690220086793] [38865:6578589] [EM] >>> [E:50744r S:35778 M:264355204] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220086793] [38865:6578589] [EM] Handling via exchange: 50744r, Delegate: 0x1013c4be0 + [1690220086793] [38865:6578589] [DMG] ReportDataMessage = + [1690220086793] [38865:6578589] [DMG] { + [1690220086793] [38865:6578589] [DMG] SubscriptionId = 0x35250b41, + [1690220086793] [38865:6578589] [DMG] AttributeReportIBs = + [1690220086793] [38865:6578589] [DMG] [ + [1690220086793] [38865:6578589] [DMG] AttributeReportIB = + [1690220086793] [38865:6578589] [DMG] { + [1690220086793] [38865:6578589] [DMG] AttributeDataIB = + [1690220086793] [38865:6578589] [DMG] { + [1690220086793] [38865:6578589] [DMG] DataVersion = 0x1fddcce1, + [1690220086793] [38865:6578589] [DMG] AttributePathIB = + [1690220086794] [38865:6578589] [DMG] { + [1690220086794] [38865:6578589] [DMG] Endpoint = 0x0, + [1690220086794] [38865:6578589] [DMG] Cluster = 0x3c, + [1690220086794] [38865:6578589] [DMG] Attribute = 0x0000_0001, + [1690220086794] [38865:6578589] [DMG] } + [1690220086794] [38865:6578589] [DMG] + [1690220086794] [38865:6578589] [DMG] Data = 1, + [1690220086794] [38865:6578589] [DMG] }, + [1690220086794] [38865:6578589] [DMG] + [1690220086794] [38865:6578589] [DMG] }, + [1690220086794] [38865:6578589] [DMG] + [1690220086794] [38865:6578589] [DMG] ], + [1690220086794] [38865:6578589] [DMG] + [1690220086794] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220086794] [38865:6578589] [DMG] } + [1690220086794] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629601 + [1690220086794] [38865:6578589] [TOO] AdminFabricIndex: 1 + [1690220086794] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x35250b41 Peer = 01:0000000000000001 + [1690220086794] [38865:6578589] [EM] <<< [E:50744r S:35778 M:151592248 (Ack:264355204)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220086794] [38865:6578589] [IN] (S) Sending msg 151592248 on secure session with LSID: 35778 + [1690220086794] [38865:6578589] [EM] >>> [E:50745r S:35778 M:264355205] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220086794] [38865:6578589] [EM] Handling via exchange: 50745r, Delegate: 0x1013c4be0 + [1690220086794] [38865:6578589] [DMG] ReportDataMessage = + [1690220086794] [38865:6578589] [DMG] { + [1690220086794] [38865:6578589] [DMG] SubscriptionId = 0xd3c6ff91, + [1690220086794] [38865:6578589] [DMG] AttributeReportIBs = + [1690220086794] [38865:6578589] [DMG] [ + [1690220086794] [38865:6578589] [DMG] AttributeReportIB = + [1690220086794] [38865:6578589] [DMG] { + [1690220086794] [38865:6578589] [DMG] AttributeDataIB = + [1690220086794] [38865:6578589] [DMG] { + [1690220086794] [38865:6578589] [DMG] DataVersion = 0x1fddcce1, + [1690220086794] [38865:6578589] [DMG] AttributePathIB = + [1690220086794] [38865:6578589] [DMG] { + [1690220086794] [38865:6578589] [DMG] Endpoint = 0x0, + [1690220086794] [38865:6578589] [DMG] Cluster = 0x3c, + [1690220086794] [38865:6578589] [DMG] Attribute = 0x0000_0002, + [1690220086794] [38865:6578589] [DMG] } + [1690220086794] [38865:6578589] [DMG] + [1690220086794] [38865:6578589] [DMG] Data = 65521, + [1690220086794] [38865:6578589] [DMG] }, + [1690220086794] [38865:6578589] [DMG] + [1690220086794] [38865:6578589] [DMG] }, + [1690220086795] [38865:6578589] [DMG] + [1690220086795] [38865:6578589] [DMG] ], + [1690220086795] [38865:6578589] [DMG] + [1690220086795] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220086795] [38865:6578589] [DMG] } + [1690220086795] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629601 + [1690220086795] [38865:6578589] [TOO] AdminVendorId: 65521 + [1690220086795] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xd3c6ff91 Peer = 01:0000000000000001 + [1690220086795] [38865:6578589] [EM] <<< [E:50745r S:35778 M:151592249 (Ack:264355205)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 14: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 1, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR1s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR1s fabric" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 1, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR1’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR1’s fabric + + + ReportDataMessage = + [1690220086799] [38880:6583668] [DMG] { + [1690220086799] [38880:6583668] [DMG] SubscriptionId = 0xfab5d837, + [1690220086799] [38880:6583668] [DMG] AttributeReportIBs = + [1690220086799] [38880:6583668] [DMG] [ + [1690220086799] [38880:6583668] [DMG] AttributeReportIB = + [1690220086799] [38880:6583668] [DMG] { + [1690220086799] [38880:6583668] [DMG] AttributeDataIB = + [1690220086799] [38880:6583668] [DMG] { + [1690220086799] [38880:6583668] [DMG] DataVersion = 0x1fddcce1, + [1690220086799] [38880:6583668] [DMG] AttributePathIB = + [1690220086799] [38880:6583668] [DMG] { + [1690220086799] [38880:6583668] [DMG] Endpoint = 0x0, + [1690220086799] [38880:6583668] [DMG] Cluster = 0x3c, + [1690220086799] [38880:6583668] [DMG] Attribute = 0x0000_0000, + [1690220086799] [38880:6583668] [DMG] } + [1690220086799] [38880:6583668] [DMG] + [1690220086799] [38880:6583668] [DMG] Data = 1, + [1690220086799] [38880:6583668] [DMG] }, + [1690220086799] [38880:6583668] [DMG] + [1690220086799] [38880:6583668] [DMG] }, + [1690220086799] [38880:6583668] [DMG] + [1690220086799] [38880:6583668] [DMG] ], + [1690220086799] [38880:6583668] [DMG] + [1690220086799] [38880:6583668] [DMG] InteractionModelRevision = 1 + [1690220086799] [38880:6583668] [DMG] } + [1690220086800] [38880:6583668] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629601 + [1690220086800] [38880:6583668] [TOO] WindowStatus: 1 + [1690220086800] [38880:6583668] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xfab5d837 Peer = 02:0000000000000001 + [1690220086800] [38880:6583668] [EM] <<< [E:50746r S:15324 M:785247 (Ack:104911015)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220086800] [38880:6583668] [IN] (S) Sending msg 785247 on secure session with LSID: 15324 + [1690220086806] [38880:6583668] [EM] >>> [E:50747r S:15324 M:104911016] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220086806] [38880:6583668] [EM] Handling via exchange: 50747r, Delegate: 0x1035c8be0 + [1690220086806] [38880:6583668] [DMG] ReportDataMessage = + [1690220086806] [38880:6583668] [DMG] { + [1690220086806] [38880:6583668] [DMG] SubscriptionId = 0x5984e13a, + [1690220086806] [38880:6583668] [DMG] AttributeReportIBs = + [1690220086806] [38880:6583668] [DMG] [ + [1690220086806] [38880:6583668] [DMG] AttributeReportIB = + [1690220086806] [38880:6583668] [DMG] { + [1690220086806] [38880:6583668] [DMG] AttributeDataIB = + [1690220086806] [38880:6583668] [DMG] { + [1690220086806] [38880:6583668] [DMG] DataVersion = 0x1fddcce1, + [1690220086806] [38880:6583668] [DMG] AttributePathIB = + [1690220086806] [38880:6583668] [DMG] { + [1690220086806] [38880:6583668] [DMG] Endpoint = 0x0, + [1690220086806] [38880:6583668] [DMG] Cluster = 0x3c, + [1690220086806] [38880:6583668] [DMG] Attribute = 0x0000_0001, + [1690220086807] [38880:6583668] [DMG] } + [1690220086807] [38880:6583668] [DMG] + [1690220086807] [38880:6583668] [DMG] Data = 1, + [1690220086807] [38880:6583668] [DMG] }, + [1690220086807] [38880:6583668] [DMG] + [1690220086807] [38880:6583668] [DMG] }, + [1690220086807] [38880:6583668] [DMG] + [1690220086807] [38880:6583668] [DMG] ], + [1690220086807] [38880:6583668] [DMG] + [1690220086807] [38880:6583668] [DMG] InteractionModelRevision = 1 + [1690220086807] [38880:6583668] [DMG] } + [1690220086807] [38880:6583668] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629601 + [1690220086807] [38880:6583668] [TOO] AdminFabricIndex: 1 + [1690220086807] [38880:6583668] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x5984e13a Peer = 02:0000000000000001 + [1690220086807] [38880:6583668] [EM] <<< [E:50747r S:15324 M:785248 (Ack:104911016)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220086807] [38880:6583668] [IN] (S) Sending msg 785248 on secure session with LSID: 15324 + [1690220086811] [38880:6583668] [EM] >>> [E:50748r S:15324 M:104911017] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220086811] [38880:6583668] [EM] Handling via exchange: 50748r, Delegate: 0x1035c8be0 + [1690220086811] [38880:6583668] [DMG] ReportDataMessage = + [1690220086811] [38880:6583668] [DMG] { + [1690220086811] [38880:6583668] [DMG] SubscriptionId = 0x943b5fc3, + [1690220086811] [38880:6583668] [DMG] AttributeReportIBs = + [1690220086811] [38880:6583668] [DMG] [ + [1690220086811] [38880:6583668] [DMG] AttributeReportIB = + [1690220086811] [38880:6583668] [DMG] { + [1690220086811] [38880:6583668] [DMG] AttributeDataIB = + [1690220086811] [38880:6583668] [DMG] { + [1690220086811] [38880:6583668] [DMG] DataVersion = 0x1fddcce1, + [1690220086811] [38880:6583668] [DMG] AttributePathIB = + [1690220086811] [38880:6583668] [DMG] { + [1690220086811] [38880:6583668] [DMG] Endpoint = 0x0, + [1690220086811] [38880:6583668] [DMG] Cluster = 0x3c, + [1690220086811] [38880:6583668] [DMG] Attribute = 0x0000_0002, + [1690220086811] [38880:6583668] [DMG] } + [1690220086811] [38880:6583668] [DMG] + [1690220086811] [38880:6583668] [DMG] Data = 65521, + [1690220086811] [38880:6583668] [DMG] }, + [1690220086812] [38880:6583668] [DMG] + [1690220086812] [38880:6583668] [DMG] }, + [1690220086812] [38880:6583668] [DMG] + [1690220086812] [38880:6583668] [DMG] ], + [1690220086812] [38880:6583668] [DMG] + [1690220086812] [38880:6583668] [DMG] InteractionModelRevision = 1 + [1690220086812] [38880:6583668] [DMG] } + [1690220086812] [38880:6583668] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629601 + [1690220086812] [38880:6583668] [TOO] AdminVendorId: 65521 + [1690220086812] [38880:6583668] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x943b5fc3 Peer = 02:0000000000000001 + [1690220086812] [38880:6583668] [EM] <<< [E:50748r S:15324 M:785249 (Ack:104911017)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 15: TH_CR1 revokes the commissioning window on DUT_CE using + RevokeCommissioning command" + PICS: CADMIN.S.C02.Rsp + verification: | + In interactive mode of TH_CR1, send command to revoke commissioning window + + administratorcommissioning revoke-commissioning 1 0 --commissioner-name alpha --timedInteractionTimeoutMs 1000 + + Verify TH_CR1 logs for status code 0 (success), + + InvokeResponseMessage = + [1690220246114] [38865:6578589] [DMG] { + [1690220246114] [38865:6578589] [DMG] suppressResponse = false, + [1690220246114] [38865:6578589] [DMG] InvokeResponseIBs = + [1690220246114] [38865:6578589] [DMG] [ + [1690220246114] [38865:6578589] [DMG] InvokeResponseIB = + [1690220246114] [38865:6578589] [DMG] { + [1690220246114] [38865:6578589] [DMG] CommandStatusIB = + [1690220246114] [38865:6578589] [DMG] { + [1690220246114] [38865:6578589] [DMG] CommandPathIB = + [1690220246114] [38865:6578589] [DMG] { + [1690220246114] [38865:6578589] [DMG] EndpointId = 0x0, + [1690220246114] [38865:6578589] [DMG] ClusterId = 0x3c, + [1690220246114] [38865:6578589] [DMG] CommandId = 0x2, + [1690220246114] [38865:6578589] [DMG] }, + [1690220246114] [38865:6578589] [DMG] + [1690220246114] [38865:6578589] [DMG] StatusIB = + [1690220246114] [38865:6578589] [DMG] { + [1690220246114] [38865:6578589] [DMG] status = 0x00 (SUCCESS), + [1690220246114] [38865:6578589] [DMG] }, + [1690220246114] [38865:6578589] [DMG] + [1690220246114] [38865:6578589] [DMG] }, + [1690220246114] [38865:6578589] [DMG] + [1690220246114] [38865:6578589] [DMG] }, + [1690220246114] [38865:6578589] [DMG] + [1690220246114] [38865:6578589] [DMG] ], + [1690220246114] [38865:6578589] [DMG] + [1690220246114] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220246114] [38865:6578589] [DMG] }, + [1690220246114] [38865:6578589] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0002 Status=0x0 + [1690220246114] [38865:6578589] [DMG] ICR moving to [AwaitingDe] + [1690220246114] [38865:6578589] [EM] <<< [E:27146i S:35778 M:151592252 (Ack:264355210)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 16: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + + ReportDataMessage = + [1690220246116] [38865:6578589] [DMG] { + [1690220246116] [38865:6578589] [DMG] SubscriptionId = 0xdade5274, + [1690220246116] [38865:6578589] [DMG] AttributeReportIBs = + [1690220246116] [38865:6578589] [DMG] [ + [1690220246116] [38865:6578589] [DMG] AttributeReportIB = + [1690220246116] [38865:6578589] [DMG] { + [1690220246116] [38865:6578589] [DMG] AttributeDataIB = + [1690220246116] [38865:6578589] [DMG] { + [1690220246116] [38865:6578589] [DMG] DataVersion = 0x1fddcce4, + [1690220246116] [38865:6578589] [DMG] AttributePathIB = + [1690220246116] [38865:6578589] [DMG] { + [1690220246116] [38865:6578589] [DMG] Endpoint = 0x0, + [1690220246116] [38865:6578589] [DMG] Cluster = 0x3c, + [1690220246116] [38865:6578589] [DMG] Attribute = 0x0000_0000, + [1690220246116] [38865:6578589] [DMG] } + [1690220246117] [38865:6578589] [DMG] + [1690220246117] [38865:6578589] [DMG] Data = 0, + [1690220246117] [38865:6578589] [DMG] }, + [1690220246117] [38865:6578589] [DMG] + [1690220246117] [38865:6578589] [DMG] }, + [1690220246117] [38865:6578589] [DMG] + [1690220246117] [38865:6578589] [DMG] ], + [1690220246117] [38865:6578589] [DMG] + [1690220246117] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220246117] [38865:6578589] [DMG] } + [1690220246117] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629604 + [1690220246117] [38865:6578589] [TOO] WindowStatus: 0 + [1690220246117] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdade5274 Peer = 01:0000000000000001 + [1690220246117] [38865:6578589] [EM] <<< [E:50749r S:35778 M:151592253 (Ack:264355211)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220246117] [38865:6578589] [IN] (S) Sending msg 151592253 on secure session with LSID: 35778 + [1690220246120] [38865:6578589] [EM] >>> [E:50750r S:35778 M:264355212] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220246120] [38865:6578589] [EM] Handling via exchange: 50750r, Delegate: 0x1013c4be0 + [1690220246120] [38865:6578589] [DMG] ReportDataMessage = + [1690220246120] [38865:6578589] [DMG] { + [1690220246120] [38865:6578589] [DMG] SubscriptionId = 0x35250b41, + [1690220246120] [38865:6578589] [DMG] AttributeReportIBs = + [1690220246120] [38865:6578589] [DMG] [ + [1690220246120] [38865:6578589] [DMG] AttributeReportIB = + [1690220246120] [38865:6578589] [DMG] { + [1690220246120] [38865:6578589] [DMG] AttributeDataIB = + [1690220246120] [38865:6578589] [DMG] { + [1690220246120] [38865:6578589] [DMG] DataVersion = 0x1fddcce4, + [1690220246120] [38865:6578589] [DMG] AttributePathIB = + [1690220246120] [38865:6578589] [DMG] { + [1690220246120] [38865:6578589] [DMG] Endpoint = 0x0, + [1690220246120] [38865:6578589] [DMG] Cluster = 0x3c, + [1690220246120] [38865:6578589] [DMG] Attribute = 0x0000_0001, + [1690220246120] [38865:6578589] [DMG] } + [1690220246120] [38865:6578589] [DMG] + [1690220246120] [38865:6578589] [DMG] Data = NULL + [1690220246120] [38865:6578589] [DMG] }, + [1690220246120] [38865:6578589] [DMG] + [1690220246120] [38865:6578589] [DMG] }, + [1690220246120] [38865:6578589] [DMG] + [1690220246120] [38865:6578589] [DMG] ], + [1690220246120] [38865:6578589] [DMG] + [1690220246120] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220246120] [38865:6578589] [DMG] } + [1690220246120] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629604 + [1690220246120] [38865:6578589] [TOO] AdminFabricIndex: null + [1690220246120] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x35250b41 Peer = 01:0000000000000001 + [1690220246120] [38865:6578589] [EM] <<< [E:50750r S:35778 M:151592254 (Ack:264355212)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220246120] [38865:6578589] [IN] (S) Sending msg 151592254 on secure session with LSID: 35778 + [1690220246123] [38865:6578589] [EM] >>> [E:50751r S:35778 M:264355213] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220246123] [38865:6578589] [EM] Handling via exchange: 50751r, Delegate: 0x1013c4be0 + [1690220246123] [38865:6578589] [DMG] ReportDataMessage = + [1690220246123] [38865:6578589] [DMG] { + [1690220246123] [38865:6578589] [DMG] SubscriptionId = 0xd3c6ff91, + [1690220246123] [38865:6578589] [DMG] AttributeReportIBs = + [1690220246123] [38865:6578589] [DMG] [ + [1690220246123] [38865:6578589] [DMG] AttributeReportIB = + [1690220246123] [38865:6578589] [DMG] { + [1690220246123] [38865:6578589] [DMG] AttributeDataIB = + [1690220246123] [38865:6578589] [DMG] { + [1690220246123] [38865:6578589] [DMG] DataVersion = 0x1fddcce4, + [1690220246123] [38865:6578589] [DMG] AttributePathIB = + [1690220246123] [38865:6578589] [DMG] { + [1690220246123] [38865:6578589] [DMG] Endpoint = 0x0, + [1690220246123] [38865:6578589] [DMG] Cluster = 0x3c, + [1690220246123] [38865:6578589] [DMG] Attribute = 0x0000_0002, + [1690220246123] [38865:6578589] [DMG] } + [1690220246123] [38865:6578589] [DMG] + [1690220246123] [38865:6578589] [DMG] Data = NULL + [1690220246123] [38865:6578589] [DMG] }, + [1690220246123] [38865:6578589] [DMG] + [1690220246123] [38865:6578589] [DMG] }, + [1690220246123] [38865:6578589] [DMG] + [1690220246123] [38865:6578589] [DMG] ], + [1690220246123] [38865:6578589] [DMG] + [1690220246123] [38865:6578589] [DMG] InteractionModelRevision = 1 + [1690220246123] [38865:6578589] [DMG] } + [1690220246123] [38865:6578589] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629604 + [1690220246123] [38865:6578589] [TOO] AdminVendorId: null + [1690220246123] [38865:6578589] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xd3c6ff91 Peer = 01:0000000000000001 + [1690220246123] [38865:6578589] [EM] <<< [E:50751r S:35778 M:151592255 (Ack:264355213)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 17: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + ReportDataMessage = + [1690220246125] [38880:6584521] [DMG] { + [1690220246125] [38880:6584521] [DMG] SubscriptionId = 0xfab5d837, + [1690220246125] [38880:6584521] [DMG] AttributeReportIBs = + [1690220246125] [38880:6584521] [DMG] [ + [1690220246125] [38880:6584521] [DMG] AttributeReportIB = + [1690220246125] [38880:6584521] [DMG] { + [1690220246125] [38880:6584521] [DMG] AttributeDataIB = + [1690220246125] [38880:6584521] [DMG] { + [1690220246125] [38880:6584521] [DMG] DataVersion = 0x1fddcce4, + [1690220246125] [38880:6584521] [DMG] AttributePathIB = + [1690220246125] [38880:6584521] [DMG] { + [1690220246125] [38880:6584521] [DMG] Endpoint = 0x0, + [1690220246125] [38880:6584521] [DMG] Cluster = 0x3c, + [1690220246125] [38880:6584521] [DMG] Attribute = 0x0000_0000, + [1690220246125] [38880:6584521] [DMG] } + [1690220246125] [38880:6584521] [DMG] + [1690220246125] [38880:6584521] [DMG] Data = 0, + [1690220246125] [38880:6584521] [DMG] }, + [1690220246125] [38880:6584521] [DMG] + [1690220246125] [38880:6584521] [DMG] }, + [1690220246125] [38880:6584521] [DMG] + [1690220246125] [38880:6584521] [DMG] ], + [1690220246125] [38880:6584521] [DMG] + [1690220246125] [38880:6584521] [DMG] InteractionModelRevision = 1 + [1690220246125] [38880:6584521] [DMG] } + [1690220246125] [38880:6584521] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629604 + [1690220246125] [38880:6584521] [TOO] WindowStatus: 0 + [1690220246125] [38880:6584521] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xfab5d837 Peer = 02:0000000000000001 + [1690220246125] [38880:6584521] [EM] <<< [E:50752r S:15324 M:785250 (Ack:104911021)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220246125] [38880:6584521] [IN] (S) Sending msg 785250 on secure session with LSID: 15324 + [1690220246148] [38880:6584521] [EM] >>> [E:50753r S:15324 M:104911022] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220246148] [38880:6584521] [EM] Handling via exchange: 50753r, Delegate: 0x1035c8be0 + [1690220246148] [38880:6584521] [DMG] ReportDataMessage = + [1690220246148] [38880:6584521] [DMG] { + [1690220246148] [38880:6584521] [DMG] SubscriptionId = 0x5984e13a, + [1690220246148] [38880:6584521] [DMG] AttributeReportIBs = + [1690220246148] [38880:6584521] [DMG] [ + [1690220246148] [38880:6584521] [DMG] AttributeReportIB = + [1690220246148] [38880:6584521] [DMG] { + [1690220246148] [38880:6584521] [DMG] AttributeDataIB = + [1690220246148] [38880:6584521] [DMG] { + [1690220246148] [38880:6584521] [DMG] DataVersion = 0x1fddcce4, + [1690220246148] [38880:6584521] [DMG] AttributePathIB = + [1690220246148] [38880:6584521] [DMG] { + [1690220246148] [38880:6584521] [DMG] Endpoint = 0x0, + [1690220246148] [38880:6584521] [DMG] Cluster = 0x3c, + [1690220246148] [38880:6584521] [DMG] Attribute = 0x0000_0001, + [1690220246148] [38880:6584521] [DMG] } + [1690220246148] [38880:6584521] [DMG] + [1690220246148] [38880:6584521] [DMG] Data = NULL + [1690220246148] [38880:6584521] [DMG] }, + [1690220246148] [38880:6584521] [DMG] + [1690220246148] [38880:6584521] [DMG] }, + [1690220246148] [38880:6584521] [DMG] + [1690220246148] [38880:6584521] [DMG] ], + [1690220246148] [38880:6584521] [DMG] + [1690220246148] [38880:6584521] [DMG] InteractionModelRevision = 1 + [1690220246148] [38880:6584521] [DMG] } + [1690220246149] [38880:6584521] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629604 + [1690220246149] [38880:6584521] [TOO] AdminFabricIndex: null + [1690220246149] [38880:6584521] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x5984e13a Peer = 02:0000000000000001 + [1690220246149] [38880:6584521] [EM] <<< [E:50753r S:15324 M:785251 (Ack:104911022)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220246149] [38880:6584521] [IN] (S) Sending msg 785251 on secure session with LSID: 15324 + [1690220246155] [38880:6584521] [EM] >>> [E:50754r S:15324 M:104911023] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220246155] [38880:6584521] [EM] Handling via exchange: 50754r, Delegate: 0x1035c8be0 + [1690220246155] [38880:6584521] [DMG] ReportDataMessage = + [1690220246155] [38880:6584521] [DMG] { + [1690220246155] [38880:6584521] [DMG] SubscriptionId = 0x943b5fc3, + [1690220246155] [38880:6584521] [DMG] AttributeReportIBs = + [1690220246155] [38880:6584521] [DMG] [ + [1690220246155] [38880:6584521] [DMG] AttributeReportIB = + [1690220246155] [38880:6584521] [DMG] { + [1690220246155] [38880:6584521] [DMG] AttributeDataIB = + [1690220246155] [38880:6584521] [DMG] { + [1690220246155] [38880:6584521] [DMG] DataVersion = 0x1fddcce4, + [1690220246155] [38880:6584521] [DMG] AttributePathIB = + [1690220246155] [38880:6584521] [DMG] { + [1690220246155] [38880:6584521] [DMG] Endpoint = 0x0, + [1690220246155] [38880:6584521] [DMG] Cluster = 0x3c, + [1690220246155] [38880:6584521] [DMG] Attribute = 0x0000_0002, + [1690220246155] [38880:6584521] [DMG] } + [1690220246155] [38880:6584521] [DMG] + [1690220246155] [38880:6584521] [DMG] Data = NULL + [1690220246155] [38880:6584521] [DMG] }, + [1690220246155] [38880:6584521] [DMG] + [1690220246155] [38880:6584521] [DMG] }, + [1690220246155] [38880:6584521] [DMG] + [1690220246155] [38880:6584521] [DMG] ], + [1690220246155] [38880:6584521] [DMG] + [1690220246155] [38880:6584521] [DMG] InteractionModelRevision = 1 + [1690220246155] [38880:6584521] [DMG] } + [1690220246155] [38880:6584521] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629604 + [1690220246155] [38880:6584521] [TOO] AdminVendorId: null + [1690220246155] [38880:6584521] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x943b5fc3 Peer = 02:0000000000000001 + [1690220246155] [38880:6584521] [EM] <<< [E:50754r S:15324 M:785252 (Ack:104911023)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 18: TH_CR2 opens a commissioning window on DUT_CE using ECM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C00.Rsp + verification: | + In interactive mode of TH_CR2, send command to open commissioning window using ECM + + pairing open-commissioning-window 1 1 180 1000 3840 --commissioner-name beta + + On TH_CR2 logs, verify for commissioning window to be open + + InvokeResponseMessage = + [1690220435293] [38880:6589609] [DMG] { + [1690220435293] [38880:6589609] [DMG] suppressResponse = false, + [1690220435293] [38880:6589609] [DMG] InvokeResponseIBs = + [1690220435293] [38880:6589609] [DMG] [ + [1690220435293] [38880:6589609] [DMG] InvokeResponseIB = + [1690220435293] [38880:6589609] [DMG] { + [1690220435293] [38880:6589609] [DMG] CommandStatusIB = + [1690220435293] [38880:6589609] [DMG] { + [1690220435293] [38880:6589609] [DMG] CommandPathIB = + [1690220435293] [38880:6589609] [DMG] { + [1690220435293] [38880:6589609] [DMG] EndpointId = 0x0, + [1690220435293] [38880:6589609] [DMG] ClusterId = 0x3c, + [1690220435293] [38880:6589609] [DMG] CommandId = 0x0, + [1690220435293] [38880:6589609] [DMG] }, + [1690220435293] [38880:6589609] [DMG] + [1690220435293] [38880:6589609] [DMG] StatusIB = + [1690220435293] [38880:6589609] [DMG] { + [1690220435293] [38880:6589609] [DMG] status = 0x00 (SUCCESS), + [1690220435293] [38880:6589609] [DMG] }, + [1690220435293] [38880:6589609] [DMG] + [1690220435293] [38880:6589609] [DMG] }, + [1690220435293] [38880:6589609] [DMG] + [1690220435293] [38880:6589609] [DMG] }, + [1690220435293] [38880:6589609] [DMG] + [1690220435293] [38880:6589609] [DMG] ], + [1690220435293] [38880:6589609] [DMG] + [1690220435293] [38880:6589609] [DMG] InteractionModelRevision = 1 + [1690220435293] [38880:6589609] [DMG] }, + [1690220435293] [38880:6589609] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1690220435293] [38880:6589609] [CTL] Successfully opened pairing window on the device + [1690220435293] [38880:6589609] [CTL] Manual pairing code: [35064347684] + [1690220435293] [38880:6589609] [CTL] SetupQRCode: [MT:-24J0AFN00Y.YD0SO10] + [1690220435293] [38880:6589609] [DMG] ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 19: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 1, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 1, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690220515981] [38865:6587066] [DMG] { + [1690220515981] [38865:6587066] [DMG] SubscriptionId = 0xdade5274, + [1690220515981] [38865:6587066] [DMG] AttributeReportIBs = + [1690220515981] [38865:6587066] [DMG] [ + [1690220515981] [38865:6587066] [DMG] AttributeReportIB = + [1690220515981] [38865:6587066] [DMG] { + [1690220515981] [38865:6587066] [DMG] AttributeDataIB = + [1690220515981] [38865:6587066] [DMG] { + [1690220515981] [38865:6587066] [DMG] DataVersion = 0x1fddcced, + [1690220515981] [38865:6587066] [DMG] AttributePathIB = + [1690220515981] [38865:6587066] [DMG] { + [1690220515981] [38865:6587066] [DMG] Endpoint = 0x0, + [1690220515981] [38865:6587066] [DMG] Cluster = 0x3c, + [1690220515981] [38865:6587066] [DMG] Attribute = 0x0000_0000, + [1690220515981] [38865:6587066] [DMG] } + [1690220515981] [38865:6587066] [DMG] + [1690220515981] [38865:6587066] [DMG] Data = 1, + [1690220515981] [38865:6587066] [DMG] }, + [1690220515981] [38865:6587066] [DMG] + [1690220515981] [38865:6587066] [DMG] }, + [1690220515981] [38865:6587066] [DMG] + [1690220515981] [38865:6587066] [DMG] ], + [1690220515981] [38865:6587066] [DMG] + [1690220515981] [38865:6587066] [DMG] InteractionModelRevision = 1 + [1690220515981] [38865:6587066] [DMG] } + [1690220515981] [38865:6587066] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629613 + [1690220515981] [38865:6587066] [TOO] WindowStatus: 1 + [1690220515981] [38865:6587066] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdade5274 Peer = 01:0000000000000001 + [1690220515982] [38865:6587066] [EM] <<< [E:50767r S:35778 M:151592262 (Ack:264355229)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220515982] [38865:6587066] [IN] (S) Sending msg 151592262 on secure session with LSID: 35778 + [1690220515991] [38865:6587066] [EM] >>> [E:50768r S:35778 M:264355230] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220515991] [38865:6587066] [EM] Handling via exchange: 50768r, Delegate: 0x1013c4be0 + [1690220515991] [38865:6587066] [DMG] ReportDataMessage = + [1690220515991] [38865:6587066] [DMG] { + [1690220515991] [38865:6587066] [DMG] SubscriptionId = 0x35250b41, + [1690220515991] [38865:6587066] [DMG] AttributeReportIBs = + [1690220515991] [38865:6587066] [DMG] [ + [1690220515991] [38865:6587066] [DMG] AttributeReportIB = + [1690220515992] [38865:6587066] [DMG] { + [1690220515992] [38865:6587066] [DMG] AttributeDataIB = + [1690220515992] [38865:6587066] [DMG] { + [1690220515992] [38865:6587066] [DMG] DataVersion = 0x1fddcced, + [1690220515992] [38865:6587066] [DMG] AttributePathIB = + [1690220515992] [38865:6587066] [DMG] { + [1690220515992] [38865:6587066] [DMG] Endpoint = 0x0, + [1690220515992] [38865:6587066] [DMG] Cluster = 0x3c, + [1690220515992] [38865:6587066] [DMG] Attribute = 0x0000_0001, + [1690220515992] [38865:6587066] [DMG] } + [1690220515992] [38865:6587066] [DMG] + [1690220515992] [38865:6587066] [DMG] Data = 2, + [1690220515992] [38865:6587066] [DMG] }, + [1690220515992] [38865:6587066] [DMG] + [1690220515992] [38865:6587066] [DMG] }, + [1690220515992] [38865:6587066] [DMG] + [1690220515992] [38865:6587066] [DMG] ], + [1690220515992] [38865:6587066] [DMG] + [1690220515992] [38865:6587066] [DMG] InteractionModelRevision = 1 + [1690220515992] [38865:6587066] [DMG] } + [1690220515992] [38865:6587066] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629613 + [1690220515992] [38865:6587066] [TOO] AdminFabricIndex: 2 + [1690220515992] [38865:6587066] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x35250b41 Peer = 01:0000000000000001 + [1690220515992] [38865:6587066] [EM] <<< [E:50768r S:35778 M:151592263 (Ack:264355230)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220515993] [38865:6587066] [IN] (S) Sending msg 151592263 on secure session with LSID: 35778 + [1690220515993] [38865:6587066] [EM] >>> [E:50769r S:35778 M:264355231] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220515993] [38865:6587066] [EM] Handling via exchange: 50769r, Delegate: 0x1013c4be0 + [1690220515993] [38865:6587066] [DMG] ReportDataMessage = + [1690220515993] [38865:6587066] [DMG] { + [1690220515993] [38865:6587066] [DMG] SubscriptionId = 0xd3c6ff91, + [1690220515993] [38865:6587066] [DMG] AttributeReportIBs = + [1690220515993] [38865:6587066] [DMG] [ + [1690220515993] [38865:6587066] [DMG] AttributeReportIB = + [1690220515993] [38865:6587066] [DMG] { + [1690220515993] [38865:6587066] [DMG] AttributeDataIB = + [1690220515993] [38865:6587066] [DMG] { + [1690220515994] [38865:6587066] [DMG] DataVersion = 0x1fddcced, + [1690220515994] [38865:6587066] [DMG] AttributePathIB = + [1690220515994] [38865:6587066] [DMG] { + [1690220515994] [38865:6587066] [DMG] Endpoint = 0x0, + [1690220515994] [38865:6587066] [DMG] Cluster = 0x3c, + [1690220515994] [38865:6587066] [DMG] Attribute = 0x0000_0002, + [1690220515994] [38865:6587066] [DMG] } + [1690220515994] [38865:6587066] [DMG] + [1690220515994] [38865:6587066] [DMG] Data = 65521, + [1690220515994] [38865:6587066] [DMG] }, + [1690220515994] [38865:6587066] [DMG] + [1690220515994] [38865:6587066] [DMG] }, + [1690220515994] [38865:6587066] [DMG] + [1690220515994] [38865:6587066] [DMG] ], + [1690220515994] [38865:6587066] [DMG] + [1690220515994] [38865:6587066] [DMG] InteractionModelRevision = 1 + [1690220515994] [38865:6587066] [DMG] } + [1690220515994] [38865:6587066] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629613 + [1690220515994] [38865:6587066] [TOO] AdminVendorId: 65521 + [1690220515994] [38865:6587066] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xd3c6ff91 Peer = 01:0000000000000001 + [1690220515994] [38865:6587066] [EM] <<< [E:50769r S:35778 M:151592264 (Ack:264355231)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 20: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 1, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 1, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690220515997] [38880:6590520] [DMG] { + [1690220515997] [38880:6590520] [DMG] SubscriptionId = 0xfab5d837, + [1690220515997] [38880:6590520] [DMG] AttributeReportIBs = + [1690220515997] [38880:6590520] [DMG] [ + [1690220515997] [38880:6590520] [DMG] AttributeReportIB = + [1690220515997] [38880:6590520] [DMG] { + [1690220515997] [38880:6590520] [DMG] AttributeDataIB = + [1690220515997] [38880:6590520] [DMG] { + [1690220515997] [38880:6590520] [DMG] DataVersion = 0x1fddcced, + [1690220515997] [38880:6590520] [DMG] AttributePathIB = + [1690220515997] [38880:6590520] [DMG] { + [1690220515997] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220515997] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220515997] [38880:6590520] [DMG] Attribute = 0x0000_0000, + [1690220515997] [38880:6590520] [DMG] } + [1690220515997] [38880:6590520] [DMG] + [1690220515997] [38880:6590520] [DMG] Data = 1, + [1690220515997] [38880:6590520] [DMG] }, + [1690220515997] [38880:6590520] [DMG] + [1690220515997] [38880:6590520] [DMG] }, + [1690220515997] [38880:6590520] [DMG] + [1690220515997] [38880:6590520] [DMG] ], + [1690220515997] [38880:6590520] [DMG] + [1690220515997] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220515997] [38880:6590520] [DMG] } + [1690220515997] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629613 + [1690220515997] [38880:6590520] [TOO] WindowStatus: 1 + [1690220515997] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xfab5d837 Peer = 02:0000000000000001 + [1690220515997] [38880:6590520] [EM] <<< [E:50770r S:15324 M:785276 (Ack:104911049)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220515997] [38880:6590520] [IN] (S) Sending msg 785276 on secure session with LSID: 15324 + [1690220516007] [38880:6590520] [EM] >>> [E:50770r S:15324 M:104911050 (Ack:785276)] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220516007] [38880:6590520] [EM] Found matching exchange: 50770r, Delegate: 0x0 + [1690220516007] [38880:6590520] [EM] Rxd Ack; Removing MessageCounter:785276 from Retrans Table on exchange 50770r + [1690220516013] [38880:6590520] [EM] >>> [E:50771r S:15324 M:104911051] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220516013] [38880:6590520] [EM] Handling via exchange: 50771r, Delegate: 0x1035c8be0 + [1690220516013] [38880:6590520] [DMG] ReportDataMessage = + [1690220516013] [38880:6590520] [DMG] { + [1690220516013] [38880:6590520] [DMG] SubscriptionId = 0x5984e13a, + [1690220516013] [38880:6590520] [DMG] AttributeReportIBs = + [1690220516013] [38880:6590520] [DMG] [ + [1690220516013] [38880:6590520] [DMG] AttributeReportIB = + [1690220516013] [38880:6590520] [DMG] { + [1690220516013] [38880:6590520] [DMG] AttributeDataIB = + [1690220516013] [38880:6590520] [DMG] { + [1690220516013] [38880:6590520] [DMG] DataVersion = 0x1fddcced, + [1690220516013] [38880:6590520] [DMG] AttributePathIB = + [1690220516013] [38880:6590520] [DMG] { + [1690220516013] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220516013] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220516013] [38880:6590520] [DMG] Attribute = 0x0000_0001, + [1690220516013] [38880:6590520] [DMG] } + [1690220516013] [38880:6590520] [DMG] + [1690220516013] [38880:6590520] [DMG] Data = 2, + [1690220516013] [38880:6590520] [DMG] }, + [1690220516013] [38880:6590520] [DMG] + [1690220516013] [38880:6590520] [DMG] }, + [1690220516013] [38880:6590520] [DMG] + [1690220516013] [38880:6590520] [DMG] ], + [1690220516013] [38880:6590520] [DMG] + [1690220516013] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220516013] [38880:6590520] [DMG] } + [1690220516013] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629613 + [1690220516013] [38880:6590520] [TOO] AdminFabricIndex: 2 + [1690220516013] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x5984e13a Peer = 02:0000000000000001 + [1690220516013] [38880:6590520] [EM] <<< [E:50771r S:15324 M:785277 (Ack:104911051)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220516013] [38880:6590520] [IN] (S) Sending msg 785277 on secure session with LSID: 15324 + [1690220516020] [38880:6590520] [EM] >>> [E:50772r S:15324 M:104911052] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220516020] [38880:6590520] [EM] Handling via exchange: 50772r, Delegate: 0x1035c8be0 + [1690220516020] [38880:6590520] [DMG] ReportDataMessage = + [1690220516020] [38880:6590520] [DMG] { + [1690220516020] [38880:6590520] [DMG] SubscriptionId = 0x943b5fc3, + [1690220516020] [38880:6590520] [DMG] AttributeReportIBs = + [1690220516020] [38880:6590520] [DMG] [ + [1690220516020] [38880:6590520] [DMG] AttributeReportIB = + [1690220516020] [38880:6590520] [DMG] { + [1690220516020] [38880:6590520] [DMG] AttributeDataIB = + [1690220516020] [38880:6590520] [DMG] { + [1690220516020] [38880:6590520] [DMG] DataVersion = 0x1fddcced, + [1690220516020] [38880:6590520] [DMG] AttributePathIB = + [1690220516020] [38880:6590520] [DMG] { + [1690220516020] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220516020] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220516020] [38880:6590520] [DMG] Attribute = 0x0000_0002, + [1690220516020] [38880:6590520] [DMG] } + [1690220516020] [38880:6590520] [DMG] + [1690220516020] [38880:6590520] [DMG] Data = 65521, + [1690220516020] [38880:6590520] [DMG] }, + [1690220516020] [38880:6590520] [DMG] + [1690220516020] [38880:6590520] [DMG] }, + [1690220516020] [38880:6590520] [DMG] + [1690220516020] [38880:6590520] [DMG] ], + [1690220516020] [38880:6590520] [DMG] + [1690220516020] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220516020] [38880:6590520] [DMG] } + [1690220516020] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629613 + [1690220516020] [38880:6590520] [TOO] AdminVendorId: 65521 + [1690220516020] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x943b5fc3 Peer = 02:0000000000000001 + [1690220516020] [38880:6590520] [EM] <<< [E:50772r S:15324 M:785278 (Ack:104911052)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 21: Wait for the expiration of PIXIT.CADMIN.CwDuration seconds + that is set in step 18" + verification: | + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 18 + disabled: true + + - label: + "Step 22: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + [1690220692636] [38865:6590605] [EM] >>> [E:50773r S:35778 M:264355235] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220692636] [38865:6590605] [EM] Handling via exchange: 50773r, Delegate: 0x1013c4be0 + [1690220692636] [38865:6590605] [DMG] ReportDataMessage = + [1690220692636] [38865:6590605] [DMG] { + [1690220692636] [38865:6590605] [DMG] SubscriptionId = 0xdade5274, + [1690220692636] [38865:6590605] [DMG] AttributeReportIBs = + [1690220692636] [38865:6590605] [DMG] [ + [1690220692636] [38865:6590605] [DMG] AttributeReportIB = + [1690220692636] [38865:6590605] [DMG] { + [1690220692636] [38865:6590605] [DMG] AttributeDataIB = + [1690220692636] [38865:6590605] [DMG] { + [1690220692636] [38865:6590605] [DMG] DataVersion = 0x1fddccf0, + [1690220692636] [38865:6590605] [DMG] AttributePathIB = + [1690220692636] [38865:6590605] [DMG] { + [1690220692636] [38865:6590605] [DMG] Endpoint = 0x0, + [1690220692636] [38865:6590605] [DMG] Cluster = 0x3c, + [1690220692636] [38865:6590605] [DMG] Attribute = 0x0000_0000, + [1690220692636] [38865:6590605] [DMG] } + [1690220692636] [38865:6590605] [DMG] + [1690220692636] [38865:6590605] [DMG] Data = 0, + [1690220692636] [38865:6590605] [DMG] }, + [1690220692636] [38865:6590605] [DMG] + [1690220692636] [38865:6590605] [DMG] }, + [1690220692636] [38865:6590605] [DMG] + [1690220692636] [38865:6590605] [DMG] ], + [1690220692636] [38865:6590605] [DMG] + [1690220692636] [38865:6590605] [DMG] InteractionModelRevision = 1 + [1690220692636] [38865:6590605] [DMG] } + [1690220692636] [38865:6590605] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629616 + [1690220692636] [38865:6590605] [TOO] WindowStatus: 0 + [1690220692636] [38865:6590605] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdade5274 Peer = 01:0000000000000001 + [1690220692636] [38865:6590605] [EM] <<< [E:50773r S:35778 M:151592265 (Ack:264355235)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220692636] [38865:6590605] [IN] (S) Sending msg 151592265 on secure session with LSID: 35778 + [1690220692637] [38865:6590605] [EM] >>> [E:50774r S:35778 M:264355236] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220692637] [38865:6590605] [EM] Handling via exchange: 50774r, Delegate: 0x1013c4be0 + [1690220692637] [38865:6590605] [DMG] ReportDataMessage = + [1690220692637] [38865:6590605] [DMG] { + [1690220692637] [38865:6590605] [DMG] SubscriptionId = 0x35250b41, + [1690220692637] [38865:6590605] [DMG] AttributeReportIBs = + [1690220692637] [38865:6590605] [DMG] [ + [1690220692637] [38865:6590605] [DMG] AttributeReportIB = + [1690220692637] [38865:6590605] [DMG] { + [1690220692637] [38865:6590605] [DMG] AttributeDataIB = + [1690220692637] [38865:6590605] [DMG] { + [1690220692637] [38865:6590605] [DMG] DataVersion = 0x1fddccf0, + [1690220692637] [38865:6590605] [DMG] AttributePathIB = + [1690220692637] [38865:6590605] [DMG] { + [1690220692637] [38865:6590605] [DMG] Endpoint = 0x0, + [1690220692637] [38865:6590605] [DMG] Cluster = 0x3c, + [1690220692637] [38865:6590605] [DMG] Attribute = 0x0000_0001, + [1690220692637] [38865:6590605] [DMG] } + [1690220692637] [38865:6590605] [DMG] + [1690220692637] [38865:6590605] [DMG] Data = NULL + [1690220692637] [38865:6590605] [DMG] }, + [1690220692637] [38865:6590605] [DMG] + [1690220692637] [38865:6590605] [DMG] }, + [1690220692637] [38865:6590605] [DMG] + [1690220692637] [38865:6590605] [DMG] ], + [1690220692637] [38865:6590605] [DMG] + [1690220692637] [38865:6590605] [DMG] InteractionModelRevision = 1 + [1690220692637] [38865:6590605] [DMG] } + [1690220692637] [38865:6590605] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629616 + [1690220692637] [38865:6590605] [TOO] AdminFabricIndex: null + [1690220692637] [38865:6590605] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x35250b41 Peer = 01:0000000000000001 + [1690220692637] [38865:6590605] [EM] <<< [E:50774r S:35778 M:151592266 (Ack:264355236)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220692637] [38865:6590605] [IN] (S) Sending msg 151592266 on secure session with LSID: 35778 + [1690220692641] [38865:6590605] [EM] >>> [E:50775r S:35778 M:264355237] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220692641] [38865:6590605] [EM] Handling via exchange: 50775r, Delegate: 0x1013c4be0 + [1690220692641] [38865:6590605] [DMG] ReportDataMessage = + [1690220692641] [38865:6590605] [DMG] { + [1690220692641] [38865:6590605] [DMG] SubscriptionId = 0xd3c6ff91, + [1690220692641] [38865:6590605] [DMG] AttributeReportIBs = + [1690220692641] [38865:6590605] [DMG] [ + [1690220692641] [38865:6590605] [DMG] AttributeReportIB = + [1690220692641] [38865:6590605] [DMG] { + [1690220692641] [38865:6590605] [DMG] AttributeDataIB = + [1690220692641] [38865:6590605] [DMG] { + [1690220692641] [38865:6590605] [DMG] DataVersion = 0x1fddccf0, + [1690220692641] [38865:6590605] [DMG] AttributePathIB = + [1690220692641] [38865:6590605] [DMG] { + [1690220692641] [38865:6590605] [DMG] Endpoint = 0x0, + [1690220692641] [38865:6590605] [DMG] Cluster = 0x3c, + [1690220692641] [38865:6590605] [DMG] Attribute = 0x0000_0002, + [1690220692641] [38865:6590605] [DMG] } + [1690220692641] [38865:6590605] [DMG] + [1690220692641] [38865:6590605] [DMG] Data = NULL + [1690220692641] [38865:6590605] [DMG] }, + [1690220692641] [38865:6590605] [DMG] + [1690220692641] [38865:6590605] [DMG] }, + [1690220692641] [38865:6590605] [DMG] + [1690220692641] [38865:6590605] [DMG] ], + [1690220692641] [38865:6590605] [DMG] + [1690220692641] [38865:6590605] [DMG] InteractionModelRevision = 1 + [1690220692641] [38865:6590605] [DMG] } + [1690220692641] [38865:6590605] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629616 + [1690220692641] [38865:6590605] [TOO] AdminVendorId: null + [1690220692641] [38865:6590605] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xd3c6ff91 Peer = 01:0000000000000001 + [1690220692641] [38865:6590605] [EM] <<< [E:50775r S:35778 M:151592267 (Ack:264355237)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220692641] [38865:6590605] [IN] (S) Sending msg 151592267 on secure session with LSID: 35778 + [1690220692658] [38865:6590605] [EM] >>> [E:50773r S:35778 M:264355238 (Ack:151592265)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220692658] [38865:6590605] [EM] Found matching exchange: 50773r, Delegate: 0x0 + [1690220692658] [38865:6590605] [EM] Rxd Ack; Removing MessageCounter:151592265 from Retrans Table on exchange 50773r + [1690220692665] [38865:6590605] [EM] >>> [E:50774r S:35778 M:264355239 (Ack:151592266)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220692665] [38865:6590605] [EM] Found matching exchange: 50774r, Delegate: 0x0 + [1690220692665] [38865:6590605] [EM] Rxd Ack; Removing MessageCounter:151592266 from Retrans Table on exchange 50774r + [1690220692672] [38865:6590605] [EM] >>> [E:50775r S:35778 M:264355240 (Ack:151592267)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220692672] [38865:6590605] [EM] Found matching exchange: 50775r, Delegate: 0x0 + [1690220692672] [38865:6590605] [EM] Rxd Ack; Removing MessageCounter:151592267 from Retrans Table on exchange 50775r + disabled: true + + - label: + "Step 23: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + [1690220692641] [38880:6590520] [EM] >>> [E:50776r S:15324 M:104911055] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220692641] [38880:6590520] [EM] Handling via exchange: 50776r, Delegate: 0x1035c8be0 + [1690220692641] [38880:6590520] [DMG] ReportDataMessage = + [1690220692641] [38880:6590520] [DMG] { + [1690220692641] [38880:6590520] [DMG] SubscriptionId = 0xfab5d837, + [1690220692641] [38880:6590520] [DMG] AttributeReportIBs = + [1690220692641] [38880:6590520] [DMG] [ + [1690220692641] [38880:6590520] [DMG] AttributeReportIB = + [1690220692641] [38880:6590520] [DMG] { + [1690220692641] [38880:6590520] [DMG] AttributeDataIB = + [1690220692641] [38880:6590520] [DMG] { + [1690220692641] [38880:6590520] [DMG] DataVersion = 0x1fddccf0, + [1690220692641] [38880:6590520] [DMG] AttributePathIB = + [1690220692641] [38880:6590520] [DMG] { + [1690220692641] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220692641] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220692641] [38880:6590520] [DMG] Attribute = 0x0000_0000, + [1690220692641] [38880:6590520] [DMG] } + [1690220692641] [38880:6590520] [DMG] + [1690220692641] [38880:6590520] [DMG] Data = 0, + [1690220692641] [38880:6590520] [DMG] }, + [1690220692641] [38880:6590520] [DMG] + [1690220692641] [38880:6590520] [DMG] }, + [1690220692641] [38880:6590520] [DMG] + [1690220692641] [38880:6590520] [DMG] ], + [1690220692641] [38880:6590520] [DMG] + [1690220692641] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220692641] [38880:6590520] [DMG] } + [1690220692641] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629616 + [1690220692641] [38880:6590520] [TOO] WindowStatus: 0 + [1690220692641] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xfab5d837 Peer = 02:0000000000000001 + [1690220692641] [38880:6590520] [EM] <<< [E:50776r S:15324 M:785279 (Ack:104911055)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220692641] [38880:6590520] [IN] (S) Sending msg 785279 on secure session with LSID: 15324 + [1690220692663] [38880:6590520] [EM] >>> [E:50777r S:15324 M:104911056] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220692663] [38880:6590520] [EM] Handling via exchange: 50777r, Delegate: 0x1035c8be0 + [1690220692663] [38880:6590520] [DMG] ReportDataMessage = + [1690220692663] [38880:6590520] [DMG] { + [1690220692663] [38880:6590520] [DMG] SubscriptionId = 0x5984e13a, + [1690220692663] [38880:6590520] [DMG] AttributeReportIBs = + [1690220692663] [38880:6590520] [DMG] [ + [1690220692663] [38880:6590520] [DMG] AttributeReportIB = + [1690220692663] [38880:6590520] [DMG] { + [1690220692663] [38880:6590520] [DMG] AttributeDataIB = + [1690220692663] [38880:6590520] [DMG] { + [1690220692663] [38880:6590520] [DMG] DataVersion = 0x1fddccf0, + [1690220692663] [38880:6590520] [DMG] AttributePathIB = + [1690220692663] [38880:6590520] [DMG] { + [1690220692663] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220692663] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220692663] [38880:6590520] [DMG] Attribute = 0x0000_0001, + [1690220692663] [38880:6590520] [DMG] } + [1690220692663] [38880:6590520] [DMG] + [1690220692663] [38880:6590520] [DMG] Data = NULL + [1690220692663] [38880:6590520] [DMG] }, + [1690220692663] [38880:6590520] [DMG] + [1690220692663] [38880:6590520] [DMG] }, + [1690220692663] [38880:6590520] [DMG] + [1690220692663] [38880:6590520] [DMG] ], + [1690220692663] [38880:6590520] [DMG] + [1690220692663] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220692663] [38880:6590520] [DMG] } + [1690220692664] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629616 + [1690220692664] [38880:6590520] [TOO] AdminFabricIndex: null + [1690220692664] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x5984e13a Peer = 02:0000000000000001 + [1690220692664] [38880:6590520] [EM] <<< [E:50777r S:15324 M:785280 (Ack:104911056)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220692664] [38880:6590520] [IN] (S) Sending msg 785280 on secure session with LSID: 15324 + [1690220692667] [38880:6590520] [EM] >>> [E:50778r S:15324 M:104911057] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220692667] [38880:6590520] [EM] Handling via exchange: 50778r, Delegate: 0x1035c8be0 + [1690220692667] [38880:6590520] [DMG] ReportDataMessage = + [1690220692667] [38880:6590520] [DMG] { + [1690220692667] [38880:6590520] [DMG] SubscriptionId = 0x943b5fc3, + [1690220692667] [38880:6590520] [DMG] AttributeReportIBs = + [1690220692667] [38880:6590520] [DMG] [ + [1690220692667] [38880:6590520] [DMG] AttributeReportIB = + [1690220692667] [38880:6590520] [DMG] { + [1690220692667] [38880:6590520] [DMG] AttributeDataIB = + [1690220692667] [38880:6590520] [DMG] { + [1690220692667] [38880:6590520] [DMG] DataVersion = 0x1fddccf0, + [1690220692667] [38880:6590520] [DMG] AttributePathIB = + [1690220692667] [38880:6590520] [DMG] { + [1690220692667] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220692667] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220692667] [38880:6590520] [DMG] Attribute = 0x0000_0002, + [1690220692667] [38880:6590520] [DMG] } + [1690220692667] [38880:6590520] [DMG] + [1690220692667] [38880:6590520] [DMG] Data = NULL + [1690220692667] [38880:6590520] [DMG] }, + [1690220692667] [38880:6590520] [DMG] + [1690220692667] [38880:6590520] [DMG] }, + [1690220692667] [38880:6590520] [DMG] + [1690220692667] [38880:6590520] [DMG] ], + [1690220692667] [38880:6590520] [DMG] + [1690220692667] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220692667] [38880:6590520] [DMG] } + [1690220692668] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629616 + [1690220692668] [38880:6590520] [TOO] AdminVendorId: null + [1690220692668] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x943b5fc3 Peer = 02:0000000000000001 + [1690220692668] [38880:6590520] [EM] <<< [E:50778r S:15324 M:785281 (Ack:104911057)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220692668] [38880:6590520] [IN] (S) Sending msg 785281 on secure session with LSID: 15324 + [1690220692679] [38880:6590520] [EM] >>> [E:50776r S:15324 M:104911058 (Ack:785279)] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220692679] [38880:6590520] [EM] Found matching exchange: 50776r, Delegate: 0x0 + [1690220692679] [38880:6590520] [EM] Rxd Ack; Removing MessageCounter:785279 from Retrans Table on exchange 50776r + [1690220692682] [38880:6590520] [EM] >>> [E:50777r S:15324 M:104911059 (Ack:785280)] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220692682] [38880:6590520] [EM] Found matching exchange: 50777r, Delegate: 0x0 + [1690220692682] [38880:6590520] [EM] Rxd Ack; Removing MessageCounter:785280 from Retrans Table on exchange 50777r + [1690220692720] [38880:6590520] [EM] >>> [E:50778r S:15324 M:104911060 (Ack:785281)] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220692720] [38880:6590520] [EM] Found matching exchange: 50778r, Delegate: 0x0 + [1690220692720] [38880:6590520] [EM] Rxd Ack; Removing MessageCounter:785281 from Retrans Table on exchange 50778r + disabled: true + + - label: + "Step 24: TH_CR2 opens a commissioning window on DUT_CE using ECM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C00.Rsp + verification: | + In interactive mode of TH_CR2, send command to open commissioning window using ECM + + pairing open-commissioning-window 1 1 180 1000 3840 --commissioner-name beta + + On TH_CR2 logs, verify for commissioning window to be open + + InvokeResponseMessage = + [1690220763945] [38880:6590520] [DMG] { + [1690220763945] [38880:6590520] [DMG] suppressResponse = false, + [1690220763945] [38880:6590520] [DMG] InvokeResponseIBs = + [1690220763945] [38880:6590520] [DMG] [ + [1690220763945] [38880:6590520] [DMG] InvokeResponseIB = + [1690220763945] [38880:6590520] [DMG] { + [1690220763945] [38880:6590520] [DMG] CommandStatusIB = + [1690220763945] [38880:6590520] [DMG] { + [1690220763945] [38880:6590520] [DMG] CommandPathIB = + [1690220763945] [38880:6590520] [DMG] { + [1690220763945] [38880:6590520] [DMG] EndpointId = 0x0, + [1690220763945] [38880:6590520] [DMG] ClusterId = 0x3c, + [1690220763945] [38880:6590520] [DMG] CommandId = 0x0, + [1690220763945] [38880:6590520] [DMG] }, + [1690220763945] [38880:6590520] [DMG] + [1690220763945] [38880:6590520] [DMG] StatusIB = + [1690220763945] [38880:6590520] [DMG] { + [1690220763945] [38880:6590520] [DMG] status = 0x00 (SUCCESS), + [1690220763945] [38880:6590520] [DMG] }, + [1690220763945] [38880:6590520] [DMG] + [1690220763945] [38880:6590520] [DMG] }, + [1690220763945] [38880:6590520] [DMG] + [1690220763945] [38880:6590520] [DMG] }, + [1690220763945] [38880:6590520] [DMG] + [1690220763945] [38880:6590520] [DMG] ], + [1690220763945] [38880:6590520] [DMG] + [1690220763945] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220763945] [38880:6590520] [DMG] }, + [1690220763945] [38880:6590520] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1690220763945] [38880:6590520] [CTL] Successfully opened pairing window on the device + [1690220763945] [38880:6590520] [CTL] Manual pairing code: [35598021029] + [1690220763945] [38880:6590520] [CTL] SetupQRCode: [MT:-24J0AFN00-CRP1PR00] + disabled: true + + - label: + "Step 25: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 1, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 1, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + + [1690220763948] [38865:6590605] [EM] >>> [E:50779r S:35778 M:264355241] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220763948] [38865:6590605] [EM] Handling via exchange: 50779r, Delegate: 0x1013c4be0 + [1690220763948] [38865:6590605] [DMG] ReportDataMessage = + [1690220763948] [38865:6590605] [DMG] { + [1690220763948] [38865:6590605] [DMG] SubscriptionId = 0xdade5274, + [1690220763948] [38865:6590605] [DMG] AttributeReportIBs = + [1690220763948] [38865:6590605] [DMG] [ + [1690220763948] [38865:6590605] [DMG] AttributeReportIB = + [1690220763948] [38865:6590605] [DMG] { + [1690220763948] [38865:6590605] [DMG] AttributeDataIB = + [1690220763948] [38865:6590605] [DMG] { + [1690220763948] [38865:6590605] [DMG] DataVersion = 0x1fddccf3, + [1690220763948] [38865:6590605] [DMG] AttributePathIB = + [1690220763948] [38865:6590605] [DMG] { + [1690220763948] [38865:6590605] [DMG] Endpoint = 0x0, + [1690220763948] [38865:6590605] [DMG] Cluster = 0x3c, + [1690220763948] [38865:6590605] [DMG] Attribute = 0x0000_0000, + [1690220763948] [38865:6590605] [DMG] } + [1690220763948] [38865:6590605] [DMG] + [1690220763948] [38865:6590605] [DMG] Data = 1, + [1690220763948] [38865:6590605] [DMG] }, + [1690220763948] [38865:6590605] [DMG] + [1690220763948] [38865:6590605] [DMG] }, + [1690220763948] [38865:6590605] [DMG] + [1690220763948] [38865:6590605] [DMG] ], + [1690220763948] [38865:6590605] [DMG] + [1690220763948] [38865:6590605] [DMG] InteractionModelRevision = 1 + [1690220763948] [38865:6590605] [DMG] } + [1690220763948] [38865:6590605] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629619 + [1690220763948] [38865:6590605] [TOO] WindowStatus: 1 + [1690220763948] [38865:6590605] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdade5274 Peer = 01:0000000000000001 + [1690220763949] [38865:6590605] [EM] <<< [E:50779r S:35778 M:151592268 (Ack:264355241)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220763949] [38865:6590605] [IN] (S) Sending msg 151592268 on secure session with LSID: 35778 + [1690220763955] [38865:6590605] [EM] >>> [E:50780r S:35778 M:264355242] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220763955] [38865:6590605] [EM] Handling via exchange: 50780r, Delegate: 0x1013c4be0 + [1690220763955] [38865:6590605] [DMG] ReportDataMessage = + [1690220763955] [38865:6590605] [DMG] { + [1690220763955] [38865:6590605] [DMG] SubscriptionId = 0x35250b41, + [1690220763955] [38865:6590605] [DMG] AttributeReportIBs = + [1690220763955] [38865:6590605] [DMG] [ + [1690220763955] [38865:6590605] [DMG] AttributeReportIB = + [1690220763955] [38865:6590605] [DMG] { + [1690220763955] [38865:6590605] [DMG] AttributeDataIB = + [1690220763955] [38865:6590605] [DMG] { + [1690220763955] [38865:6590605] [DMG] DataVersion = 0x1fddccf3, + [1690220763955] [38865:6590605] [DMG] AttributePathIB = + [1690220763955] [38865:6590605] [DMG] { + [1690220763955] [38865:6590605] [DMG] Endpoint = 0x0, + [1690220763955] [38865:6590605] [DMG] Cluster = 0x3c, + [1690220763955] [38865:6590605] [DMG] Attribute = 0x0000_0001, + [1690220763955] [38865:6590605] [DMG] } + [1690220763955] [38865:6590605] [DMG] + [1690220763955] [38865:6590605] [DMG] Data = 2, + [1690220763955] [38865:6590605] [DMG] }, + [1690220763955] [38865:6590605] [DMG] + [1690220763955] [38865:6590605] [DMG] }, + [1690220763955] [38865:6590605] [DMG] + [1690220763955] [38865:6590605] [DMG] ], + [1690220763955] [38865:6590605] [DMG] + [1690220763955] [38865:6590605] [DMG] InteractionModelRevision = 1 + [1690220763955] [38865:6590605] [DMG] } + [1690220763955] [38865:6590605] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629619 + [1690220763955] [38865:6590605] [TOO] AdminFabricIndex: 2 + [1690220763955] [38865:6590605] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x35250b41 Peer = 01:0000000000000001 + [1690220763956] [38865:6590605] [EM] <<< [E:50780r S:35778 M:151592269 (Ack:264355242)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220763956] [38865:6590605] [IN] (S) Sending msg 151592269 on secure session with LSID: 35778 + [1690220763956] [38865:6590605] [EM] >>> [E:50781r S:35778 M:264355243] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690220763956] [38865:6590605] [EM] Handling via exchange: 50781r, Delegate: 0x1013c4be0 + [1690220763956] [38865:6590605] [DMG] ReportDataMessage = + [1690220763956] [38865:6590605] [DMG] { + [1690220763956] [38865:6590605] [DMG] SubscriptionId = 0xd3c6ff91, + [1690220763956] [38865:6590605] [DMG] AttributeReportIBs = + [1690220763957] [38865:6590605] [DMG] [ + [1690220763957] [38865:6590605] [DMG] AttributeReportIB = + [1690220763957] [38865:6590605] [DMG] { + [1690220763957] [38865:6590605] [DMG] AttributeDataIB = + [1690220763957] [38865:6590605] [DMG] { + [1690220763957] [38865:6590605] [DMG] DataVersion = 0x1fddccf3, + [1690220763957] [38865:6590605] [DMG] AttributePathIB = + [1690220763957] [38865:6590605] [DMG] { + [1690220763957] [38865:6590605] [DMG] Endpoint = 0x0, + [1690220763957] [38865:6590605] [DMG] Cluster = 0x3c, + [1690220763957] [38865:6590605] [DMG] Attribute = 0x0000_0002, + [1690220763957] [38865:6590605] [DMG] } + [1690220763957] [38865:6590605] [DMG] + [1690220763957] [38865:6590605] [DMG] Data = 65521, + [1690220763957] [38865:6590605] [DMG] }, + [1690220763957] [38865:6590605] [DMG] + [1690220763957] [38865:6590605] [DMG] }, + [1690220763957] [38865:6590605] [DMG] + [1690220763957] [38865:6590605] [DMG] ], + [1690220763957] [38865:6590605] [DMG] + [1690220763957] [38865:6590605] [DMG] InteractionModelRevision = 1 + [1690220763957] [38865:6590605] [DMG] } + [1690220763957] [38865:6590605] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629619 + [1690220763957] [38865:6590605] [TOO] AdminVendorId: 65521 + [1690220763957] [38865:6590605] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xd3c6ff91 Peer = 01:0000000000000001 + [1690220763957] [38865:6590605] [EM] <<< [E:50781r S:35778 M:151592270 (Ack:264355243)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690220763957] [38865:6590605] [IN] (S) Sending msg 151592270 on secure session with LSID: 35778 + [1690220763962] [38865:6590605] [EM] >>> [E:50779r S:35778 M:264355244 (Ack:151592268)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220763962] [38865:6590605] [EM] Found matching exchange: 50779r, Delegate: 0x0 + [1690220763962] [38865:6590605] [EM] Rxd Ack; Removing MessageCounter:151592268 from Retrans Table on exchange 50779r + [1690220763976] [38865:6590605] [EM] >>> [E:50780r S:35778 M:264355245 (Ack:151592269)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220763976] [38865:6590605] [EM] Found matching exchange: 50780r, Delegate: 0x0 + [1690220763976] [38865:6590605] [EM] Rxd Ack; Removing MessageCounter:151592269 from Retrans Table on exchange 50780r + [1690220763981] [38865:6593769] [EM] >>> [E:50781r S:35778 M:264355246 (Ack:151592270)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220763981] [38865:6593769] [EM] Found matching exchange: 50781r, Delegate: 0x0 + [1690220763981] [38865:6593769] [EM] Rxd Ack; Removing MessageCounter:151592270 from Retrans Table on exchange 50781r + disabled: true + + - label: + "Step 26: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 1, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 1, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690220763955] [38880:6590520] [DMG] { + [1690220763955] [38880:6590520] [DMG] SubscriptionId = 0xfab5d837, + [1690220763955] [38880:6590520] [DMG] AttributeReportIBs = + [1690220763955] [38880:6590520] [DMG] [ + [1690220763955] [38880:6590520] [DMG] AttributeReportIB = + [1690220763955] [38880:6590520] [DMG] { + [1690220763955] [38880:6590520] [DMG] AttributeDataIB = + [1690220763955] [38880:6590520] [DMG] { + [1690220763955] [38880:6590520] [DMG] DataVersion = 0x1fddccf3, + [1690220763955] [38880:6590520] [DMG] AttributePathIB = + [1690220763955] [38880:6590520] [DMG] { + [1690220763955] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220763955] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220763955] [38880:6590520] [DMG] Attribute = 0x0000_0000, + [1690220763955] [38880:6590520] [DMG] } + [1690220763955] [38880:6590520] [DMG] + [1690220763955] [38880:6590520] [DMG] Data = 1, + [1690220763955] [38880:6590520] [DMG] }, + [1690220763955] [38880:6590520] [DMG] + [1690220763955] [38880:6590520] [DMG] }, + [1690220763955] [38880:6590520] [DMG] + [1690220763955] [38880:6590520] [DMG] ], + [1690220763955] [38880:6590520] [DMG] + [1690220763955] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220763955] [38880:6590520] [DMG] } + [1690220763955] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 534629619 + [1690220763955] [38880:6590520] [TOO] WindowStatus: 1 + [1690220763956] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xfab5d837 Peer = 02:0000000000000001 + [1690220763956] [38880:6590520] [EM] <<< [E:50782r S:15324 M:785289 (Ack:104911065)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220763956] [38880:6590520] [IN] (S) Sending msg 785289 on secure session with LSID: 15324 + [1690220763972] [38880:6590520] [EM] >>> [E:50783r S:15324 M:104911066] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220763972] [38880:6590520] [EM] Handling via exchange: 50783r, Delegate: 0x1035c8be0 + [1690220763972] [38880:6590520] [DMG] ReportDataMessage = + [1690220763972] [38880:6590520] [DMG] { + [1690220763972] [38880:6590520] [DMG] SubscriptionId = 0x5984e13a, + [1690220763972] [38880:6590520] [DMG] AttributeReportIBs = + [1690220763973] [38880:6590520] [DMG] [ + [1690220763973] [38880:6590520] [DMG] AttributeReportIB = + [1690220763973] [38880:6590520] [DMG] { + [1690220763973] [38880:6590520] [DMG] AttributeDataIB = + [1690220763973] [38880:6590520] [DMG] { + [1690220763973] [38880:6590520] [DMG] DataVersion = 0x1fddccf3, + [1690220763973] [38880:6590520] [DMG] AttributePathIB = + [1690220763973] [38880:6590520] [DMG] { + [1690220763973] [38880:6590520] [DMG] Endpoint = 0x0, + [1690220763973] [38880:6590520] [DMG] Cluster = 0x3c, + [1690220763973] [38880:6590520] [DMG] Attribute = 0x0000_0001, + [1690220763973] [38880:6590520] [DMG] } + [1690220763973] [38880:6590520] [DMG] + [1690220763973] [38880:6590520] [DMG] Data = 2, + [1690220763973] [38880:6590520] [DMG] }, + [1690220763973] [38880:6590520] [DMG] + [1690220763973] [38880:6590520] [DMG] }, + [1690220763973] [38880:6590520] [DMG] + [1690220763973] [38880:6590520] [DMG] ], + [1690220763973] [38880:6590520] [DMG] + [1690220763973] [38880:6590520] [DMG] InteractionModelRevision = 1 + [1690220763973] [38880:6590520] [DMG] } + [1690220763973] [38880:6590520] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 534629619 + [1690220763973] [38880:6590520] [TOO] AdminFabricIndex: 2 + [1690220763973] [38880:6590520] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x5984e13a Peer = 02:0000000000000001 + [1690220763973] [38880:6590520] [EM] <<< [E:50783r S:15324 M:785290 (Ack:104911066)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690220763973] [38880:6590520] [IN] (S) Sending msg 785290 on secure session with LSID: 15324 + [1690220763976] [38880:6593761] [EM] >>> [E:50782r S:15324 M:104911067 (Ack:785289)] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690220763976] [38880:6593761] [EM] Found matching exchange: 50782r, Delegate: 0x0 + [1690220763976] [38880:6593761] [EM] Rxd Ack; Removing MessageCounter:785289 from Retrans Table on exchange 50782r + [1690220763976] [38880:6593761] [EM] >>> [E:50784r S:15324 M:104911068] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690220763976] [38880:6593761] [EM] Handling via exchange: 50784r, Delegate: 0x1035c8be0 + [1690220763976] [38880:6593761] [DMG] ReportDataMessage = + [1690220763976] [38880:6593761] [DMG] { + [1690220763977] [38880:6593761] [DMG] SubscriptionId = 0x943b5fc3, + [1690220763977] [38880:6593761] [DMG] AttributeReportIBs = + [1690220763977] [38880:6593761] [DMG] [ + [1690220763977] [38880:6593761] [DMG] AttributeReportIB = + [1690220763977] [38880:6593761] [DMG] { + [1690220763977] [38880:6593761] [DMG] AttributeDataIB = + [1690220763977] [38880:6593761] [DMG] { + [1690220763977] [38880:6593761] [DMG] DataVersion = 0x1fddccf3, + [1690220763977] [38880:6593761] [DMG] AttributePathIB = + [1690220763977] [38880:6593761] [DMG] { + [1690220763977] [38880:6593761] [DMG] Endpoint = 0x0, + [1690220763977] [38880:6593761] [DMG] Cluster = 0x3c, + [1690220763977] [38880:6593761] [DMG] Attribute = 0x0000_0002, + [1690220763977] [38880:6593761] [DMG] } + [1690220763977] [38880:6593761] [DMG] + [1690220763977] [38880:6593761] [DMG] Data = 65521, + [1690220763977] [38880:6593761] [DMG] }, + [1690220763977] [38880:6593761] [DMG] + [1690220763977] [38880:6593761] [DMG] }, + [1690220763977] [38880:6593761] [DMG] + [1690220763977] [38880:6593761] [DMG] ], + [1690220763977] [38880:6593761] [DMG] + [1690220763977] [38880:6593761] [DMG] InteractionModelRevision = 1 + [1690220763977] [38880:6593761] [DMG] } + [1690220763977] [38880:6593761] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 534629619 + [1690220763977] [38880:6593761] [TOO] AdminVendorId: 65521 + [1690220763977] [38880:6593761] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x943b5fc3 Peer = 02:0000000000000001 + [1690220763977] [38880:6593761] [EM] <<< [E:50784r S:15324 M:785291 (Ack:104911068)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 27: Before expiration of PIXIT.CADMIN.CwDuration seconds set in + step 24, TH_CR1 sends RemoveFabric command to DUT_CE with FabricIndex + set to the fabric index of TH_CR2s fabric" + PICS: OPCREDS.S.C0a.Rsp + verification: | + Before expiration of PIXIT.CADMIN.CwDuration seconds set in step 24, from interactive mode of TH_CR1 send RemoveFabric command with FabricIndex set to the fabric index of TH_CR2’s fabric + + operationalcredentials remove-fabric 2 1 0 --commissioner-name alpha --timedInteractionTimeoutMs 1000 + + On TH_CR1 logs, verify for NOCResponse with statuscode 0 and fabric index equal to fabric index of TH_CR2's fabric + + InvokeResponseMessage = + [1690220880388] [38865:6593769] [DMG] { + [1690220880388] [38865:6593769] [DMG] suppressResponse = false, + [1690220880388] [38865:6593769] [DMG] InvokeResponseIBs = + [1690220880388] [38865:6593769] [DMG] [ + [1690220880388] [38865:6593769] [DMG] InvokeResponseIB = + [1690220880388] [38865:6593769] [DMG] { + [1690220880388] [38865:6593769] [DMG] CommandDataIB = + [1690220880388] [38865:6593769] [DMG] { + [1690220880388] [38865:6593769] [DMG] CommandPathIB = + [1690220880388] [38865:6593769] [DMG] { + [1690220880388] [38865:6593769] [DMG] EndpointId = 0x0, + [1690220880388] [38865:6593769] [DMG] ClusterId = 0x3e, + [1690220880388] [38865:6593769] [DMG] CommandId = 0x8, + [1690220880388] [38865:6593769] [DMG] }, + [1690220880388] [38865:6593769] [DMG] + [1690220880388] [38865:6593769] [DMG] CommandFields = + [1690220880388] [38865:6593769] [DMG] { + [1690220880388] [38865:6593769] [DMG] 0x0 = 0, + [1690220880388] [38865:6593769] [DMG] 0x1 = 2, + [1690220880388] [38865:6593769] [DMG] }, + [1690220880388] [38865:6593769] [DMG] }, + [1690220880388] [38865:6593769] [DMG] + [1690220880388] [38865:6593769] [DMG] }, + [1690220880388] [38865:6593769] [DMG] + [1690220880388] [38865:6593769] [DMG] ], + [1690220880388] [38865:6593769] [DMG] + [1690220880388] [38865:6593769] [DMG] InteractionModelRevision = 1 + [1690220880388] [38865:6593769] [DMG] }, + [1690220880388] [38865:6593769] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 + [1690220880388] [38865:6593769] [TOO] Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 + [1690220880388] [38865:6593769] [TOO] NOCResponse: { + [1690220880388] [38865:6593769] [TOO] statusCode: 0 + [1690220880388] [38865:6593769] [TOO] fabricIndex: 2 + [1690220880388] [38865:6593769] [TOO] } + [1690220880388] [38865:6593769] [DMG] ICR moving to [AwaitingDe] + [1690220880389] [38865:6593769] [EM] <<< [E:27147i S:35778 M:151592272 (Ack:264355248)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 28: Verify TH_CR1 receives subscription notifications which show + AdminFabricIndex value to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show AdminFabricIndex value to be null + + ReportDataMessage = + [1690221347664] [38912:6599713] [DMG] { + [1690221347664] [38912:6599713] [DMG] SubscriptionId = 0x7dc4ea87, + [1690221347664] [38912:6599713] [DMG] AttributeReportIBs = + [1690221347664] [38912:6599713] [DMG] [ + [1690221347664] [38912:6599713] [DMG] AttributeReportIB = + [1690221347664] [38912:6599713] [DMG] { + [1690221347664] [38912:6599713] [DMG] AttributeDataIB = + [1690221347664] [38912:6599713] [DMG] { + [1690221347664] [38912:6599713] [DMG] DataVersion = 0x1404feca, + [1690221347664] [38912:6599713] [DMG] AttributePathIB = + [1690221347665] [38912:6599713] [DMG] { + [1690221347665] [38912:6599713] [DMG] Endpoint = 0x0, + [1690221347665] [38912:6599713] [DMG] Cluster = 0x3c, + [1690221347665] [38912:6599713] [DMG] Attribute = 0x0000_0001, + [1690221347665] [38912:6599713] [DMG] } + [1690221347665] [38912:6599713] [DMG] + [1690221347665] [38912:6599713] [DMG] Data = NULL + [1690221347665] [38912:6599713] [DMG] }, + [1690221347665] [38912:6599713] [DMG] + [1690221347665] [38912:6599713] [DMG] }, + [1690221347665] [38912:6599713] [DMG] + [1690221347665] [38912:6599713] [DMG] ], + [1690221347665] [38912:6599713] [DMG] + [1690221347665] [38912:6599713] [DMG] InteractionModelRevision = 1 + [1690221347665] [38912:6599713] [DMG] } + [1690221347665] [38912:6599713] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 335871690 + [1690221347665] [38912:6599713] [TOO] AdminFabricIndex: null + [1690221347665] [38912:6599713] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x7dc4ea87 Peer = 01:0000000000000001 + [1690221347666] [38912:6599713] [EM] <<< [E:41212r S:64671 M:91208151 (Ack:135000952)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: "Step 29: TH_CR1 reads WindowStatus attribute from DUT_CE" + PICS: CADMIN.S.A0000 + verification: | + In interactive mode of TH_CR1, read windowstatus attribute, + + administratorcommissioning read window-status 1 0 --commissioner-name alpha + + Verify TH_CR1 logs for windowstatus to be 1 + + ReportDataMessage = + [1690221400622] [38912:6600376] [DMG] { + [1690221400622] [38912:6600376] [DMG] AttributeReportIBs = + [1690221400622] [38912:6600376] [DMG] [ + [1690221400622] [38912:6600376] [DMG] AttributeReportIB = + [1690221400622] [38912:6600376] [DMG] { + [1690221400622] [38912:6600376] [DMG] AttributeDataIB = + [1690221400622] [38912:6600376] [DMG] { + [1690221400622] [38912:6600376] [DMG] DataVersion = 0x1404feca, + [1690221400622] [38912:6600376] [DMG] AttributePathIB = + [1690221400622] [38912:6600376] [DMG] { + [1690221400622] [38912:6600376] [DMG] Endpoint = 0x0, + [1690221400622] [38912:6600376] [DMG] Cluster = 0x3c, + [1690221400622] [38912:6600376] [DMG] Attribute = 0x0000_0000, + [1690221400622] [38912:6600376] [DMG] } + [1690221400622] [38912:6600376] [DMG] + [1690221400622] [38912:6600376] [DMG] Data = 1, + [1690221400622] [38912:6600376] [DMG] }, + [1690221400622] [38912:6600376] [DMG] + [1690221400622] [38912:6600376] [DMG] }, + [1690221400622] [38912:6600376] [DMG] + [1690221400622] [38912:6600376] [DMG] ], + [1690221400622] [38912:6600376] [DMG] + [1690221400622] [38912:6600376] [DMG] SuppressResponse = true, + [1690221400622] [38912:6600376] [DMG] InteractionModelRevision = 1 + [1690221400622] [38912:6600376] [DMG] } + [1690221400622] [38912:6600376] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 335871690 + [1690221400622] [38912:6600376] [TOO] WindowStatus: 1 + [1690221400622] [38912:6600376] [EM] <<< [E:30395i S:64671 M:91208153 (Ack:135000954)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: "Step 30: TH_CR1 reads AdminVendorID attribute from DUT_CE" + PICS: CADMIN.S.A0002 + verification: | + In interactive mode of TH_CR1, read adminvendorid attribute, + + administratorcommissioning read admin-vendor-id 1 0 --commissioner-name alpha + + On TH_CR1 logs, verify the value of adminvendorid to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690221461458] [38912:6600376] [DMG] { + [1690221461458] [38912:6600376] [DMG] AttributeReportIBs = + [1690221461458] [38912:6600376] [DMG] [ + [1690221461458] [38912:6600376] [DMG] AttributeReportIB = + [1690221461458] [38912:6600376] [DMG] { + [1690221461458] [38912:6600376] [DMG] AttributeDataIB = + [1690221461458] [38912:6600376] [DMG] { + [1690221461458] [38912:6600376] [DMG] DataVersion = 0x1404feca, + [1690221461458] [38912:6600376] [DMG] AttributePathIB = + [1690221461458] [38912:6600376] [DMG] { + [1690221461458] [38912:6600376] [DMG] Endpoint = 0x0, + [1690221461458] [38912:6600376] [DMG] Cluster = 0x3c, + [1690221461458] [38912:6600376] [DMG] Attribute = 0x0000_0002, + [1690221461458] [38912:6600376] [DMG] } + [1690221461458] [38912:6600376] [DMG] + [1690221461458] [38912:6600376] [DMG] Data = 65521, + [1690221461458] [38912:6600376] [DMG] }, + [1690221461458] [38912:6600376] [DMG] + [1690221461458] [38912:6600376] [DMG] }, + [1690221461458] [38912:6600376] [DMG] + [1690221461458] [38912:6600376] [DMG] ], + [1690221461458] [38912:6600376] [DMG] + [1690221461458] [38912:6600376] [DMG] SuppressResponse = true, + [1690221461458] [38912:6600376] [DMG] InteractionModelRevision = 1 + [1690221461458] [38912:6600376] [DMG] } + [1690221461458] [38912:6600376] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 335871690 + [1690221461458] [38912:6600376] [TOO] AdminVendorId: 65521 + [1690221461458] [38912:6600376] [EM] <<< [E:30396i S:64671 M:91208155 (Ack:135000955)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690221461458] [38912:6600376] [IN] (S) Sending msg 91208155 on secure session with LSID: 64671 + [1690221461458] [38912:6600376] [EM] Flushed pending ack for MessageCounter:135000955 on exchange 30396i + >>> + disabled: true + + - label: + "Step 31: Wait for the expiration of PIXIT.CADMIN.CwDuration seconds + that is set in step 24" + verification: | + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 24 + disabled: true + + - label: + "Step 32: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminVendorId to be null + + [1690221509585] [38912:6600376] [EM] >>> [E:41213r S:64671 M:135000956] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690221509585] [38912:6600376] [EM] Handling via exchange: 41213r, Delegate: 0x101e84be0 + [1690221509586] [38912:6600376] [DMG] ReportDataMessage = + [1690221509586] [38912:6600376] [DMG] { + [1690221509586] [38912:6600376] [DMG] SubscriptionId = 0xdd7ad0b4, + [1690221509586] [38912:6600376] [DMG] AttributeReportIBs = + [1690221509586] [38912:6600376] [DMG] [ + [1690221509586] [38912:6600376] [DMG] AttributeReportIB = + [1690221509586] [38912:6600376] [DMG] { + [1690221509586] [38912:6600376] [DMG] AttributeDataIB = + [1690221509586] [38912:6600376] [DMG] { + [1690221509586] [38912:6600376] [DMG] DataVersion = 0x1404fecc, + [1690221509586] [38912:6600376] [DMG] AttributePathIB = + [1690221509586] [38912:6600376] [DMG] { + [1690221509586] [38912:6600376] [DMG] Endpoint = 0x0, + [1690221509586] [38912:6600376] [DMG] Cluster = 0x3c, + [1690221509586] [38912:6600376] [DMG] Attribute = 0x0000_0000, + [1690221509586] [38912:6600376] [DMG] } + [1690221509586] [38912:6600376] [DMG] + [1690221509586] [38912:6600376] [DMG] Data = 0, + [1690221509586] [38912:6600376] [DMG] }, + [1690221509586] [38912:6600376] [DMG] + [1690221509586] [38912:6600376] [DMG] }, + [1690221509586] [38912:6600376] [DMG] + [1690221509586] [38912:6600376] [DMG] ], + [1690221509586] [38912:6600376] [DMG] + [1690221509586] [38912:6600376] [DMG] InteractionModelRevision = 1 + [1690221509586] [38912:6600376] [DMG] } + [1690221509586] [38912:6600376] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 335871692 + [1690221509586] [38912:6600376] [TOO] WindowStatus: 0 + [1690221509586] [38912:6600376] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdd7ad0b4 Peer = 01:0000000000000001 + [1690221509587] [38912:6600376] [EM] <<< [E:41213r S:64671 M:91208156 (Ack:135000956)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690221509587] [38912:6600376] [IN] (S) Sending msg 91208156 on secure session with LSID: 64671 + [1690221509587] [38912:6600376] [EM] >>> [E:41214r S:64671 M:135000957] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690221509587] [38912:6600376] [EM] Handling via exchange: 41214r, Delegate: 0x101e84be0 + [1690221509588] [38912:6600376] [DMG] ReportDataMessage = + [1690221509588] [38912:6600376] [DMG] { + [1690221509588] [38912:6600376] [DMG] SubscriptionId = 0xe3771580, + [1690221509588] [38912:6600376] [DMG] AttributeReportIBs = + [1690221509588] [38912:6600376] [DMG] [ + [1690221509588] [38912:6600376] [DMG] AttributeReportIB = + [1690221509588] [38912:6600376] [DMG] { + [1690221509588] [38912:6600376] [DMG] AttributeDataIB = + [1690221509588] [38912:6600376] [DMG] { + [1690221509588] [38912:6600376] [DMG] DataVersion = 0x1404fecc, + [1690221509588] [38912:6600376] [DMG] AttributePathIB = + [1690221509588] [38912:6600376] [DMG] { + [1690221509588] [38912:6600376] [DMG] Endpoint = 0x0, + [1690221509588] [38912:6600376] [DMG] Cluster = 0x3c, + [1690221509588] [38912:6600376] [DMG] Attribute = 0x0000_0002, + [1690221509588] [38912:6600376] [DMG] } + [1690221509588] [38912:6600376] [DMG] + [1690221509588] [38912:6600376] [DMG] Data = NULL + [1690221509588] [38912:6600376] [DMG] }, + [1690221509588] [38912:6600376] [DMG] + [1690221509588] [38912:6600376] [DMG] }, + [1690221509588] [38912:6600376] [DMG] + [1690221509588] [38912:6600376] [DMG] ], + [1690221509588] [38912:6600376] [DMG] + [1690221509588] [38912:6600376] [DMG] InteractionModelRevision = 1 + [1690221509588] [38912:6600376] [DMG] } + [1690221509588] [38912:6600376] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 335871692 + [1690221509588] [38912:6600376] [TOO] AdminVendorId: null + [1690221509588] [38912:6600376] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xe3771580 Peer = 01:0000000000000001 + [1690221509588] [38912:6600376] [EM] <<< [E:41214r S:64671 M:91208157 (Ack:135000957)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690221509589] [38912:6600376] [IN] (S) Sending msg 91208157 on secure session with LSID: 64671 + [1690221509616] [38912:6600376] [EM] >>> [E:41213r S:64671 M:135000958 (Ack:91208156)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690221509616] [38912:6600376] [EM] Found matching exchange: 41213r, Delegate: 0x0 + [1690221509616] [38912:6600376] [EM] Rxd Ack; Removing MessageCounter:91208156 from Retrans Table on exchange 41213r + [1690221509619] [38912:6600376] [EM] >>> [E:41214r S:64671 M:135000959 (Ack:91208157)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690221509619] [38912:6600376] [EM] Found matching exchange: 41214r, Delegate: 0x0 + [1690221509619] [38912:6600376] [EM] Rxd Ack; Removing MessageCounter:91208157 from Retrans Table on exchange 41214r + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml new file mode 100644 index 00000000000000..a923be83b413ba --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml @@ -0,0 +1,2121 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 36.1.26. [TC-CADMIN-1.26] Subscription to the attributes - verify + subscription response [BCM] [DUT - Commissionee] + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Precondition" + verification: | + Reset Devices to factory defaults + disabled: true + + - label: "Step 1: TH_CR1 starts a commissioning process with DUT_CE" + PICS: CADMIN.S + verification: | + On TH_CR1 start interactive mode, + + ./chip-tool interactive start + + In the interactive mode of TH_CR1, start commissioning process, + + pairing code 1 34970112332 --commissioner-name alpha + + [1690221652862] [38924:6603872] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 + [1690221652862] [38924:6603872] [CTL] Received CommissioningComplete response, errorCode=0 + [1690221652862] [38924:6603872] [CTL] Successfully finished commissioning step 'SendComplete' + [1690221652862] [38924:6603872] [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1690221652862] [38924:6603872] [CTL] Performing next commissioning step 'Cleanup' + [1690221652862] [38924:6603872] [IN] SecureSession[0x6000021501e0]: MarkForEviction Type:1 LSID:947 + [1690221652862] [38924:6603872] [SC] SecureSession[0x6000021501e0, LSID:947]: State change 'kActive' --> 'kPendingEviction' + [1690221652862] [38924:6603872] [IN] SecureSession[0x6000021501e0]: Released - Type:1 LSID:947 + [1690221652862] [38924:6603872] [CTL] Successfully finished commissioning step 'Cleanup' + [1690221652863] [38924:6603872] [TOO] Device commissioning completed with success + disabled: true + + - label: "Step 2: TH_CR1 subscribes to WindowStatus attribute on DUT_CE" + PICS: CADMIN.S.A0000 + verification: | + In the interactive mode of TH_CR1, subscribe to windowstatus attribute, + + administratorcommissioning subscribe window-status 10 3000 1 0 --keepSubscriptions true --commissioner-name alpha + + On TH_CR1 logs verify for windowstatus subscription notification, + + + ReportDataMessage = + [1690221695853] [38924:6603872] [DMG] { + [1690221695853] [38924:6603872] [DMG] SubscriptionId = 0xacfb278e, + [1690221695853] [38924:6603872] [DMG] AttributeReportIBs = + [1690221695853] [38924:6603872] [DMG] [ + [1690221695853] [38924:6603872] [DMG] AttributeReportIB = + [1690221695853] [38924:6603872] [DMG] { + [1690221695853] [38924:6603872] [DMG] AttributeDataIB = + [1690221695853] [38924:6603872] [DMG] { + [1690221695853] [38924:6603872] [DMG] DataVersion = 0xed5d129c, + [1690221695853] [38924:6603872] [DMG] AttributePathIB = + [1690221695853] [38924:6603872] [DMG] { + [1690221695853] [38924:6603872] [DMG] Endpoint = 0x0, + [1690221695853] [38924:6603872] [DMG] Cluster = 0x3c, + [1690221695853] [38924:6603872] [DMG] Attribute = 0x0000_0000, + [1690221695853] [38924:6603872] [DMG] } + [1690221695853] [38924:6603872] [DMG] + [1690221695853] [38924:6603872] [DMG] Data = 0, + [1690221695853] [38924:6603872] [DMG] }, + [1690221695853] [38924:6603872] [DMG] + [1690221695853] [38924:6603872] [DMG] }, + [1690221695853] [38924:6603872] [DMG] + [1690221695853] [38924:6603872] [DMG] ], + [1690221695853] [38924:6603872] [DMG] + [1690221695853] [38924:6603872] [DMG] InteractionModelRevision = 1 + [1690221695853] [38924:6603872] [DMG] } + [1690221695854] [38924:6603872] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299804 + [1690221695854] [38924:6603872] [TOO] WindowStatus: 0 + [1690221695854] [38924:6603872] [DMG] MoveToState ReadClient[0x13d005930]: Moving to [AwaitingSu] + disabled: true + + - label: "Step 3: TH_CR1 subscribes to AdminFabricIndex attribute on DUT_CE" + PICS: CADMIN.S.A0001 + verification: | + In the interactive mode of TH_CR1, subscribe to adminfabricindex attribute, + + administratorcommissioning subscribe admin-fabric-index 10 3000 1 0 --keepSubscriptions true --commissioner-name alpha + + On TH_CR1 logs verify for adminfabricindex subscription notification, + + + ReportDataMessage = + [1690221746097] [38924:6605744] [DMG] { + [1690221746097] [38924:6605744] [DMG] SubscriptionId = 0xfdf9f50f, + [1690221746097] [38924:6605744] [DMG] AttributeReportIBs = + [1690221746097] [38924:6605744] [DMG] [ + [1690221746097] [38924:6605744] [DMG] AttributeReportIB = + [1690221746097] [38924:6605744] [DMG] { + [1690221746097] [38924:6605744] [DMG] AttributeDataIB = + [1690221746097] [38924:6605744] [DMG] { + [1690221746097] [38924:6605744] [DMG] DataVersion = 0xed5d129c, + [1690221746097] [38924:6605744] [DMG] AttributePathIB = + [1690221746097] [38924:6605744] [DMG] { + [1690221746097] [38924:6605744] [DMG] Endpoint = 0x0, + [1690221746097] [38924:6605744] [DMG] Cluster = 0x3c, + [1690221746097] [38924:6605744] [DMG] Attribute = 0x0000_0001, + [1690221746097] [38924:6605744] [DMG] } + [1690221746097] [38924:6605744] [DMG] + [1690221746097] [38924:6605744] [DMG] Data = NULL + [1690221746097] [38924:6605744] [DMG] }, + [1690221746097] [38924:6605744] [DMG] + [1690221746097] [38924:6605744] [DMG] }, + [1690221746097] [38924:6605744] [DMG] + [1690221746097] [38924:6605744] [DMG] ], + [1690221746097] [38924:6605744] [DMG] + [1690221746097] [38924:6605744] [DMG] InteractionModelRevision = 1 + [1690221746097] [38924:6605744] [DMG] } + [1690221746098] [38924:6605744] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299804 + [1690221746098] [38924:6605744] [TOO] AdminFabricIndex: null + [1690221746098] [38924:6605744] [DMG] MoveToState ReadClient[0x12ae06a20]: Moving to [AwaitingSu] + disabled: true + + - label: "Step 4: TH_CR1 subscribes to AdminVendorId attribute on DUT_CE" + PICS: CADMIN.S.A0002 + verification: | + In the interactive mode of TH_CR1, subscribe to adminvendorid attribute, + + administratorcommissioning subscribe admin-vendor-id 10 3000 1 0 --keepSubscriptions true --commissioner-name alpha + + On TH_CR1 logs, verify for adminvendorid subscription notification + + + + ReportDataMessage = + [1690221782311] [38924:6605744] [DMG] { + [1690221782311] [38924:6605744] [DMG] SubscriptionId = 0xee00906f, + [1690221782311] [38924:6605744] [DMG] AttributeReportIBs = + [1690221782311] [38924:6605744] [DMG] [ + [1690221782311] [38924:6605744] [DMG] AttributeReportIB = + [1690221782311] [38924:6605744] [DMG] { + [1690221782311] [38924:6605744] [DMG] AttributeDataIB = + [1690221782311] [38924:6605744] [DMG] { + [1690221782311] [38924:6605744] [DMG] DataVersion = 0xed5d129c, + [1690221782311] [38924:6605744] [DMG] AttributePathIB = + [1690221782311] [38924:6605744] [DMG] { + [1690221782311] [38924:6605744] [DMG] Endpoint = 0x0, + [1690221782311] [38924:6605744] [DMG] Cluster = 0x3c, + [1690221782311] [38924:6605744] [DMG] Attribute = 0x0000_0002, + [1690221782311] [38924:6605744] [DMG] } + [1690221782311] [38924:6605744] [DMG] + [1690221782311] [38924:6605744] [DMG] Data = NULL + [1690221782311] [38924:6605744] [DMG] }, + [1690221782312] [38924:6605744] [DMG] + [1690221782312] [38924:6605744] [DMG] }, + [1690221782312] [38924:6605744] [DMG] + [1690221782312] [38924:6605744] [DMG] ], + [1690221782312] [38924:6605744] [DMG] + [1690221782312] [38924:6605744] [DMG] InteractionModelRevision = 1 + [1690221782312] [38924:6605744] [DMG] } + [1690221782312] [38924:6605744] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299804 + [1690221782312] [38924:6605744] [TOO] AdminVendorId: null + [1690221782312] [38924:6605744] [DMG] MoveToState ReadClient[0x12ae06380]: Moving to [AwaitingSu] + disabled: true + + - label: + "Step 5: TH_CR1 opens a commissioning window on DUT_CE using BCM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C01.Rsp + verification: | + In the interactive mode of TH_CR1, send command to open commissioning window using BCM, + + administratorcommissioning open-basic-commissioning-window 180 1 0 --commissioner-name alpha --timedInteractionTimeoutMs 1000 + + + On TH_CR1 logs, verify for pairing window to be successfully opened + + InvokeResponseMessage = + [1690221880347] [38924:6605744] [DMG] { + [1690221880348] [38924:6605744] [DMG] suppressResponse = false, + [1690221880348] [38924:6605744] [DMG] InvokeResponseIBs = + [1690221880348] [38924:6605744] [DMG] [ + [1690221880348] [38924:6605744] [DMG] InvokeResponseIB = + [1690221880348] [38924:6605744] [DMG] { + [1690221880348] [38924:6605744] [DMG] CommandStatusIB = + [1690221880348] [38924:6605744] [DMG] { + [1690221880348] [38924:6605744] [DMG] CommandPathIB = + [1690221880348] [38924:6605744] [DMG] { + [1690221880348] [38924:6605744] [DMG] EndpointId = 0x0, + [1690221880348] [38924:6605744] [DMG] ClusterId = 0x3c, + [1690221880348] [38924:6605744] [DMG] CommandId = 0x1, + [1690221880348] [38924:6605744] [DMG] }, + [1690221880348] [38924:6605744] [DMG] + [1690221880348] [38924:6605744] [DMG] StatusIB = + [1690221880348] [38924:6605744] [DMG] { + [1690221880348] [38924:6605744] [DMG] status = 0x00 (SUCCESS), + [1690221880348] [38924:6605744] [DMG] }, + [1690221880348] [38924:6605744] [DMG] + [1690221880348] [38924:6605744] [DMG] }, + [1690221880348] [38924:6605744] [DMG] + [1690221880348] [38924:6605744] [DMG] }, + [1690221880348] [38924:6605744] [DMG] + [1690221880348] [38924:6605744] [DMG] ], + [1690221880348] [38924:6605744] [DMG] + [1690221880348] [38924:6605744] [DMG] InteractionModelRevision = 1 + [1690221880348] [38924:6605744] [DMG] }, + [1690221880348] [38924:6605744] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1690221880348] [38924:6605744] [DMG] ICR moving to [AwaitingDe] + [1690221880348] [38924:6605744] [EM] <<< [E:2299i S:948 M:8871629 (Ack:208014002)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 6: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 2, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR1s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR1s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 2, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR1’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR1’s fabric + + ReportDataMessage = + [1690221880349] [38924:6605744] [DMG] { + [1690221880349] [38924:6605744] [DMG] SubscriptionId = 0xacfb278e, + [1690221880349] [38924:6605744] [DMG] AttributeReportIBs = + [1690221880349] [38924:6605744] [DMG] [ + [1690221880349] [38924:6605744] [DMG] AttributeReportIB = + [1690221880349] [38924:6605744] [DMG] { + [1690221880349] [38924:6605744] [DMG] AttributeDataIB = + [1690221880349] [38924:6605744] [DMG] { + [1690221880349] [38924:6605744] [DMG] DataVersion = 0xed5d129f, + [1690221880349] [38924:6605744] [DMG] AttributePathIB = + [1690221880349] [38924:6605744] [DMG] { + [1690221880349] [38924:6605744] [DMG] Endpoint = 0x0, + [1690221880349] [38924:6605744] [DMG] Cluster = 0x3c, + [1690221880349] [38924:6605744] [DMG] Attribute = 0x0000_0000, + [1690221880349] [38924:6605744] [DMG] } + [1690221880349] [38924:6605744] [DMG] + [1690221880349] [38924:6605744] [DMG] Data = 2, + [1690221880349] [38924:6605744] [DMG] }, + [1690221880349] [38924:6605744] [DMG] + [1690221880349] [38924:6605744] [DMG] }, + [1690221880349] [38924:6605744] [DMG] + [1690221880349] [38924:6605744] [DMG] ], + [1690221880349] [38924:6605744] [DMG] + [1690221880349] [38924:6605744] [DMG] InteractionModelRevision = 1 + [1690221880349] [38924:6605744] [DMG] } + [1690221880349] [38924:6605744] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299807 + [1690221880349] [38924:6605744] [TOO] WindowStatus: 2 + [1690221880349] [38924:6605744] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xacfb278e Peer = 01:0000000000000001 + [1690221880349] [38924:6605744] [EM] <<< [E:20748r S:948 M:8871630 (Ack:208014003)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690221880349] [38924:6605744] [IN] (S) Sending msg 8871630 on secure session with LSID: 948 + [1690221880352] [38924:6605744] [EM] >>> [E:20749r S:948 M:208014004] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690221880352] [38924:6605744] [EM] Handling via exchange: 20749r, Delegate: 0x105234be0 + [1690221880352] [38924:6605744] [DMG] ReportDataMessage = + [1690221880352] [38924:6605744] [DMG] { + [1690221880352] [38924:6605744] [DMG] SubscriptionId = 0xfdf9f50f, + [1690221880352] [38924:6605744] [DMG] AttributeReportIBs = + [1690221880352] [38924:6605744] [DMG] [ + [1690221880352] [38924:6605744] [DMG] AttributeReportIB = + [1690221880352] [38924:6605744] [DMG] { + [1690221880352] [38924:6605744] [DMG] AttributeDataIB = + [1690221880352] [38924:6605744] [DMG] { + [1690221880352] [38924:6605744] [DMG] DataVersion = 0xed5d129f, + [1690221880352] [38924:6605744] [DMG] AttributePathIB = + [1690221880352] [38924:6605744] [DMG] { + [1690221880352] [38924:6605744] [DMG] Endpoint = 0x0, + [1690221880352] [38924:6605744] [DMG] Cluster = 0x3c, + [1690221880352] [38924:6605744] [DMG] Attribute = 0x0000_0001, + [1690221880352] [38924:6605744] [DMG] } + [1690221880352] [38924:6605744] [DMG] + [1690221880352] [38924:6605744] [DMG] Data = 1, + [1690221880352] [38924:6605744] [DMG] }, + [1690221880352] [38924:6605744] [DMG] + [1690221880352] [38924:6605744] [DMG] }, + [1690221880352] [38924:6605744] [DMG] + [1690221880352] [38924:6605744] [DMG] ], + [1690221880352] [38924:6605744] [DMG] + [1690221880352] [38924:6605744] [DMG] InteractionModelRevision = 1 + [1690221880352] [38924:6605744] [DMG] } + [1690221880352] [38924:6605744] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299807 + [1690221880352] [38924:6605744] [TOO] AdminFabricIndex: 1 + [1690221880352] [38924:6605744] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xfdf9f50f Peer = 01:0000000000000001 + [1690221880352] [38924:6605744] [EM] <<< [E:20749r S:948 M:8871631 (Ack:208014004)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690221880352] [38924:6605744] [IN] (S) Sending msg 8871631 on secure session with LSID: 948 + [1690221880354] [38924:6605744] [EM] >>> [E:20750r S:948 M:208014005] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690221880354] [38924:6605744] [EM] Handling via exchange: 20750r, Delegate: 0x105234be0 + [1690221880354] [38924:6605744] [DMG] ReportDataMessage = + [1690221880354] [38924:6605744] [DMG] { + [1690221880354] [38924:6605744] [DMG] SubscriptionId = 0xee00906f, + [1690221880354] [38924:6605744] [DMG] AttributeReportIBs = + [1690221880354] [38924:6605744] [DMG] [ + [1690221880354] [38924:6605744] [DMG] AttributeReportIB = + [1690221880354] [38924:6605744] [DMG] { + [1690221880354] [38924:6605744] [DMG] AttributeDataIB = + [1690221880354] [38924:6605744] [DMG] { + [1690221880354] [38924:6605744] [DMG] DataVersion = 0xed5d129f, + [1690221880354] [38924:6605744] [DMG] AttributePathIB = + [1690221880354] [38924:6605744] [DMG] { + [1690221880354] [38924:6605744] [DMG] Endpoint = 0x0, + [1690221880354] [38924:6605744] [DMG] Cluster = 0x3c, + [1690221880354] [38924:6605744] [DMG] Attribute = 0x0000_0002, + [1690221880354] [38924:6605744] [DMG] } + [1690221880354] [38924:6605744] [DMG] + [1690221880354] [38924:6605744] [DMG] Data = 65521, + [1690221880354] [38924:6605744] [DMG] }, + [1690221880354] [38924:6605744] [DMG] + [1690221880354] [38924:6605744] [DMG] }, + [1690221880354] [38924:6605744] [DMG] + [1690221880354] [38924:6605744] [DMG] ], + [1690221880354] [38924:6605744] [DMG] + [1690221880354] [38924:6605744] [DMG] InteractionModelRevision = 1 + [1690221880354] [38924:6605744] [DMG] } + [1690221880354] [38924:6605744] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299807 + [1690221880354] [38924:6605744] [TOO] AdminVendorId: 65521 + [1690221880354] [38924:6605744] [DMG] Refresh LivenessCheckTime f + disabled: true + + - label: "Step 7: TH_CR2 starts a commissioning process with DUT_CE" + PICS: CADMIN.S + verification: | + On TH_CR2 start interactive mode, + + ./chip-tool interactive start + + In the interactive mode of TH_CR2, start commissioning process + + + pairing code 1 34970112332 --commissioner-name beta + + + [1690221962385] [38923:6603855] [DMG] }, + [1690221962385] [38923:6603855] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 + [1690221962385] [38923:6603855] [CTL] Received CommissioningComplete response, errorCode=0 + [1690221962385] [38923:6603855] [CTL] Successfully finished commissioning step 'SendComplete' + [1690221962385] [38923:6603855] [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' + [1690221962385] [38923:6603855] [CTL] Performing next commissioning step 'Cleanup' + [1690221962385] [38923:6603855] [IN] SecureSession[0x600002f90000]: MarkForEviction Type:1 LSID:46404 + [1690221962386] [38923:6603855] [SC] SecureSession[0x600002f90000, LSID:46404]: State change 'kActive' --> 'kPendingEviction' + [1690221962386] [38923:6603855] [IN] SecureSession[0x600002f90000]: Released - Type:1 LSID:46404 + [1690221962386] [38923:6603855] [CTL] Successfully finished commissioning step 'Cleanup' + [1690221962386] [38923:6603855] [TOO] Device commissioning completed with success + disabled: true + + - label: + "Step 8: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + ReportDataMessage = + [1690221962546] [38924:6607510] [DMG] { + [1690221962546] [38924:6607510] [DMG] SubscriptionId = 0xacfb278e, + [1690221962546] [38924:6607510] [DMG] AttributeReportIBs = + [1690221962546] [38924:6607510] [DMG] [ + [1690221962546] [38924:6607510] [DMG] AttributeReportIB = + [1690221962546] [38924:6607510] [DMG] { + [1690221962546] [38924:6607510] [DMG] AttributeDataIB = + [1690221962546] [38924:6607510] [DMG] { + [1690221962546] [38924:6607510] [DMG] DataVersion = 0xed5d12a2, + [1690221962546] [38924:6607510] [DMG] AttributePathIB = + [1690221962546] [38924:6607510] [DMG] { + [1690221962546] [38924:6607510] [DMG] Endpoint = 0x0, + [1690221962546] [38924:6607510] [DMG] Cluster = 0x3c, + [1690221962546] [38924:6607510] [DMG] Attribute = 0x0000_0000, + [1690221962546] [38924:6607510] [DMG] } + [1690221962546] [38924:6607510] [DMG] + [1690221962546] [38924:6607510] [DMG] Data = 0, + [1690221962546] [38924:6607510] [DMG] }, + [1690221962546] [38924:6607510] [DMG] + [1690221962546] [38924:6607510] [DMG] }, + [1690221962546] [38924:6607510] [DMG] + [1690221962546] [38924:6607510] [DMG] ], + [1690221962546] [38924:6607510] [DMG] + [1690221962546] [38924:6607510] [DMG] InteractionModelRevision = 1 + [1690221962546] [38924:6607510] [DMG] } + [1690221962546] [38924:6607510] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299810 + [1690221962546] [38924:6607510] [TOO] WindowStatus: 0 + [1690221962546] [38924:6607510] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xacfb278e Peer = 01:0000000000000001 + [1690221962546] [38924:6607510] [EM] <<< [E:20751r S:948 M:8871633 (Ack:208014009)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690221962546] [38924:6607510] [IN] (S) Sending msg 8871633 on secure session with LSID: 948 + [1690221962549] [38924:6607510] [EM] >>> [E:20752r S:948 M:208014010] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690221962550] [38924:6607510] [EM] Handling via exchange: 20752r, Delegate: 0x105234be0 + [1690221962550] [38924:6607510] [DMG] ReportDataMessage = + [1690221962550] [38924:6607510] [DMG] { + [1690221962550] [38924:6607510] [DMG] SubscriptionId = 0xfdf9f50f, + [1690221962550] [38924:6607510] [DMG] AttributeReportIBs = + [1690221962550] [38924:6607510] [DMG] [ + [1690221962550] [38924:6607510] [DMG] AttributeReportIB = + [1690221962550] [38924:6607510] [DMG] { + [1690221962550] [38924:6607510] [DMG] AttributeDataIB = + [1690221962550] [38924:6607510] [DMG] { + [1690221962550] [38924:6607510] [DMG] DataVersion = 0xed5d12a2, + [1690221962550] [38924:6607510] [DMG] AttributePathIB = + [1690221962550] [38924:6607510] [DMG] { + [1690221962550] [38924:6607510] [DMG] Endpoint = 0x0, + [1690221962550] [38924:6607510] [DMG] Cluster = 0x3c, + [1690221962550] [38924:6607510] [DMG] Attribute = 0x0000_0001, + [1690221962550] [38924:6607510] [DMG] } + [1690221962550] [38924:6607510] [DMG] + [1690221962550] [38924:6607510] [DMG] Data = NULL + [1690221962550] [38924:6607510] [DMG] }, + [1690221962550] [38924:6607510] [DMG] + [1690221962550] [38924:6607510] [DMG] }, + [1690221962550] [38924:6607510] [DMG] + [1690221962550] [38924:6607510] [DMG] ], + [1690221962550] [38924:6607510] [DMG] + [1690221962550] [38924:6607510] [DMG] InteractionModelRevision = 1 + [1690221962550] [38924:6607510] [DMG] } + [1690221962550] [38924:6607510] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299810 + [1690221962550] [38924:6607510] [TOO] AdminFabricIndex: null + [1690221962550] [38924:6607510] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xfdf9f50f Peer = 01:0000000000000001 + [1690221962550] [38924:6607510] [EM] <<< [E:20752r S:948 M:8871634 (Ack:208014010)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690221962550] [38924:6607510] [IN] (S) Sending msg 8871634 on secure session with LSID: 948 + [1690221962550] [38924:6607510] [EM] >>> [E:20753r S:948 M:208014011] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690221962550] [38924:6607510] [EM] Handling via exchange: 20753r, Delegate: 0x105234be0 + [1690221962551] [38924:6607510] [DMG] ReportDataMessage = + [1690221962551] [38924:6607510] [DMG] { + [1690221962551] [38924:6607510] [DMG] SubscriptionId = 0xee00906f, + [1690221962551] [38924:6607510] [DMG] AttributeReportIBs = + [1690221962551] [38924:6607510] [DMG] [ + [1690221962551] [38924:6607510] [DMG] AttributeReportIB = + [1690221962551] [38924:6607510] [DMG] { + [1690221962551] [38924:6607510] [DMG] AttributeDataIB = + [1690221962551] [38924:6607510] [DMG] { + [1690221962551] [38924:6607510] [DMG] DataVersion = 0xed5d12a2, + [1690221962551] [38924:6607510] [DMG] AttributePathIB = + [1690221962551] [38924:6607510] [DMG] { + [1690221962551] [38924:6607510] [DMG] Endpoint = 0x0, + [1690221962551] [38924:6607510] [DMG] Cluster = 0x3c, + [1690221962551] [38924:6607510] [DMG] Attribute = 0x0000_0002, + [1690221962551] [38924:6607510] [DMG] } + [1690221962551] [38924:6607510] [DMG] + [1690221962551] [38924:6607510] [DMG] Data = NULL + [1690221962551] [38924:6607510] [DMG] }, + [1690221962551] [38924:6607510] [DMG] + [1690221962551] [38924:6607510] [DMG] }, + [1690221962551] [38924:6607510] [DMG] + [1690221962551] [38924:6607510] [DMG] ], + [1690221962551] [38924:6607510] [DMG] + [1690221962551] [38924:6607510] [DMG] InteractionModelRevision = 1 + [1690221962551] [38924:6607510] [DMG] } + [1690221962551] [38924:6607510] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299810 + [1690221962551] [38924:6607510] [TOO] AdminVendorId: null + [1690221962551] [38924:6607510] [DMG] Refresh LivenessCheckTime for 3004224 + disabled: true + + - label: "Step 9: TH_CR2 subscribes to WindowStatus attribute on DUT_CE" + PICS: CADMIN.S.A0000 + verification: | + In the interactive mode of TH_CR2, subscribe to windowstatus attribute, + + administratorcommissioning subscribe window-status 10 3000 1 0 --keepSubscriptions true --commissioner-name beta + + On the TH_CR2 logs, verify for windowstatus subscription notification + + + ReportDataMessage = + [1690222029258] [38923:6603855] [DMG] { + [1690222029258] [38923:6603855] [DMG] SubscriptionId = 0x225d94ef, + [1690222029258] [38923:6603855] [DMG] AttributeReportIBs = + [1690222029258] [38923:6603855] [DMG] [ + [1690222029258] [38923:6603855] [DMG] AttributeReportIB = + [1690222029258] [38923:6603855] [DMG] { + [1690222029258] [38923:6603855] [DMG] AttributeDataIB = + [1690222029258] [38923:6603855] [DMG] { + [1690222029258] [38923:6603855] [DMG] DataVersion = 0xed5d12a2, + [1690222029258] [38923:6603855] [DMG] AttributePathIB = + [1690222029258] [38923:6603855] [DMG] { + [1690222029258] [38923:6603855] [DMG] Endpoint = 0x0, + [1690222029258] [38923:6603855] [DMG] Cluster = 0x3c, + [1690222029258] [38923:6603855] [DMG] Attribute = 0x0000_0000, + [1690222029258] [38923:6603855] [DMG] } + [1690222029258] [38923:6603855] [DMG] + [1690222029258] [38923:6603855] [DMG] Data = 0, + [1690222029258] [38923:6603855] [DMG] }, + [1690222029258] [38923:6603855] [DMG] + [1690222029258] [38923:6603855] [DMG] }, + [1690222029258] [38923:6603855] [DMG] + [1690222029258] [38923:6603855] [DMG] ], + [1690222029258] [38923:6603855] [DMG] + [1690222029258] [38923:6603855] [DMG] InteractionModelRevision = 1 + [1690222029258] [38923:6603855] [DMG] } + [1690222029258] [38923:6603855] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299810 + [1690222029258] [38923:6603855] [TOO] WindowStatus: 0 + [1690222029258] [38923:6603855] [DMG] MoveToState ReadClient[0x141f07820]: Moving to [AwaitingSu] + disabled: true + + - label: + "Step 10: TH_CR2 subscribes to AdminFabricIndex attribute on DUT_CE" + PICS: CADMIN.S.A0001 + verification: | + In the interactive mode of TH_CR2, subscribe to adminfabricindex attribute, + + administratorcommissioning subscribe admin-fabric-index 10 3000 1 0 --keepSubscriptions true --commissioner-name beta + + On the TH_CR2 logs, verify for adminfabricindex subscription notification + + + ReportDataMessage = + [1690222061226] [38923:6603855] [DMG] { + [1690222061226] [38923:6603855] [DMG] SubscriptionId = 0x86a3ec94, + [1690222061226] [38923:6603855] [DMG] AttributeReportIBs = + [1690222061226] [38923:6603855] [DMG] [ + [1690222061226] [38923:6603855] [DMG] AttributeReportIB = + [1690222061226] [38923:6603855] [DMG] { + [1690222061226] [38923:6603855] [DMG] AttributeDataIB = + [1690222061226] [38923:6603855] [DMG] { + [1690222061226] [38923:6603855] [DMG] DataVersion = 0xed5d12a2, + [1690222061226] [38923:6603855] [DMG] AttributePathIB = + [1690222061226] [38923:6603855] [DMG] { + [1690222061226] [38923:6603855] [DMG] Endpoint = 0x0, + [1690222061226] [38923:6603855] [DMG] Cluster = 0x3c, + [1690222061226] [38923:6603855] [DMG] Attribute = 0x0000_0001, + [1690222061226] [38923:6603855] [DMG] } + [1690222061226] [38923:6603855] [DMG] + [1690222061226] [38923:6603855] [DMG] Data = NULL + [1690222061226] [38923:6603855] [DMG] }, + [1690222061226] [38923:6603855] [DMG] + [1690222061226] [38923:6603855] [DMG] }, + [1690222061226] [38923:6603855] [DMG] + [1690222061226] [38923:6603855] [DMG] ], + [1690222061226] [38923:6603855] [DMG] + [1690222061226] [38923:6603855] [DMG] InteractionModelRevision = 1 + [1690222061226] [38923:6603855] [DMG] } + [1690222061226] [38923:6603855] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299810 + [1690222061226] [38923:6603855] [TOO] AdminFabricIndex: null + [1690222061226] [38923:6603855] [DMG] MoveToState ReadClient[0x1431042e0]: Moving to [AwaitingSu] + [1690222061226] [38923:6603855] [EM] <<< [E:24082i S:46406 M:27652515 (Ack:25511782)] (S) Msg TX to 1 + disabled: true + + - label: "Step 11: TH_CR2 subscribes to AdminVendorId attribute on DUT_CE" + PICS: CADMIN.S.A0002 + verification: | + In the interactive mode of TH_CR2, subscribe to adminvendorid attribute, + + administratorcommissioning subscribe admin-vendor-id 10 3000 1 0 --keepSubscriptions true --commissioner-name beta + + On the TH_CR2 logs, verify for adminvendorid subscription notification + + + ReportDataMessage = + [1690222096808] [38923:6603855] [DMG] { + [1690222096808] [38923:6603855] [DMG] SubscriptionId = 0x9ce33771, + [1690222096808] [38923:6603855] [DMG] AttributeReportIBs = + [1690222096808] [38923:6603855] [DMG] [ + [1690222096808] [38923:6603855] [DMG] AttributeReportIB = + [1690222096808] [38923:6603855] [DMG] { + [1690222096808] [38923:6603855] [DMG] AttributeDataIB = + [1690222096808] [38923:6603855] [DMG] { + [1690222096808] [38923:6603855] [DMG] DataVersion = 0xed5d12a2, + [1690222096808] [38923:6603855] [DMG] AttributePathIB = + [1690222096808] [38923:6603855] [DMG] { + [1690222096808] [38923:6603855] [DMG] Endpoint = 0x0, + [1690222096808] [38923:6603855] [DMG] Cluster = 0x3c, + [1690222096808] [38923:6603855] [DMG] Attribute = 0x0000_0002, + [1690222096808] [38923:6603855] [DMG] } + [1690222096809] [38923:6603855] [DMG] + [1690222096809] [38923:6603855] [DMG] Data = NULL + [1690222096809] [38923:6603855] [DMG] }, + [1690222096809] [38923:6603855] [DMG] + [1690222096809] [38923:6603855] [DMG] }, + [1690222096809] [38923:6603855] [DMG] + [1690222096809] [38923:6603855] [DMG] ], + [1690222096809] [38923:6603855] [DMG] + [1690222096809] [38923:6603855] [DMG] InteractionModelRevision = 1 + [1690222096809] [38923:6603855] [DMG] } + [1690222096809] [38923:6603855] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299810 + [1690222096809] [38923:6603855] [TOO] AdminVendorId: null + [1690222096809] [38923:6603855] [DMG] MoveToState ReadClient[0x141f07eb0]: Moving to [AwaitingSu] + [1690222096809] [38923:6603855] [EM] <<< [E:24083i S:46406 M:27652518 (Ack:25511784)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 12: TH_CR1 opens a commissioning window on DUT_CE using BCM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C01.Rsp + verification: | + In the interactive mode of TH_CR1, send command to open commissioning window using BCM, + + + administratorcommissioning open-basic-commissioning-window 180 1 0 --commissioner-name alpha --timedInteractionTimeoutMs 1000 + + On TH_CR1 logs, verify for success response + + + InvokeResponseMessage = + [1690222161322] [38924:6608668] [DMG] { + [1690222161322] [38924:6608668] [DMG] suppressResponse = false, + [1690222161322] [38924:6608668] [DMG] InvokeResponseIBs = + [1690222161322] [38924:6608668] [DMG] [ + [1690222161322] [38924:6608668] [DMG] InvokeResponseIB = + [1690222161322] [38924:6608668] [DMG] { + [1690222161322] [38924:6608668] [DMG] CommandStatusIB = + [1690222161322] [38924:6608668] [DMG] { + [1690222161322] [38924:6608668] [DMG] CommandPathIB = + [1690222161322] [38924:6608668] [DMG] { + [1690222161322] [38924:6608668] [DMG] EndpointId = 0x0, + [1690222161322] [38924:6608668] [DMG] ClusterId = 0x3c, + [1690222161322] [38924:6608668] [DMG] CommandId = 0x1, + [1690222161322] [38924:6608668] [DMG] }, + [1690222161322] [38924:6608668] [DMG] + [1690222161322] [38924:6608668] [DMG] StatusIB = + [1690222161322] [38924:6608668] [DMG] { + [1690222161322] [38924:6608668] [DMG] status = 0x00 (SUCCESS), + [1690222161322] [38924:6608668] [DMG] }, + [1690222161322] [38924:6608668] [DMG] + [1690222161322] [38924:6608668] [DMG] }, + [1690222161322] [38924:6608668] [DMG] + [1690222161322] [38924:6608668] [DMG] }, + [1690222161322] [38924:6608668] [DMG] + [1690222161322] [38924:6608668] [DMG] ], + [1690222161322] [38924:6608668] [DMG] + [1690222161322] [38924:6608668] [DMG] InteractionModelRevision = 1 + [1690222161322] [38924:6608668] [DMG] }, + [1690222161322] [38924:6608668] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1690222161322] [38924:6608668] [DMG] ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 13: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 2, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR1s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR1s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 2, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR1’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR1’s fabric + + ReportDataMessage = + [1690222337066] [38924:6614288] [DMG] { + [1690222337066] [38924:6614288] [DMG] SubscriptionId = 0xdba23243, + [1690222337066] [38924:6614288] [DMG] AttributeReportIBs = + [1690222337066] [38924:6614288] [DMG] [ + [1690222337066] [38924:6614288] [DMG] AttributeReportIB = + [1690222337066] [38924:6614288] [DMG] { + [1690222337066] [38924:6614288] [DMG] AttributeDataIB = + [1690222337066] [38924:6614288] [DMG] { + [1690222337066] [38924:6614288] [DMG] DataVersion = 0xed5d12ab, + [1690222337066] [38924:6614288] [DMG] AttributePathIB = + [1690222337066] [38924:6614288] [DMG] { + [1690222337066] [38924:6614288] [DMG] Endpoint = 0x0, + [1690222337067] [38924:6614288] [DMG] Cluster = 0x3c, + [1690222337067] [38924:6614288] [DMG] Attribute = 0x0000_0000, + [1690222337067] [38924:6614288] [DMG] } + [1690222337067] [38924:6614288] [DMG] + [1690222337067] [38924:6614288] [DMG] Data = 2, + [1690222337067] [38924:6614288] [DMG] }, + [1690222337067] [38924:6614288] [DMG] + [1690222337067] [38924:6614288] [DMG] }, + [1690222337067] [38924:6614288] [DMG] + [1690222337067] [38924:6614288] [DMG] ], + [1690222337067] [38924:6614288] [DMG] + [1690222337067] [38924:6614288] [DMG] InteractionModelRevision = 1 + [1690222337067] [38924:6614288] [DMG] } + [1690222337067] [38924:6614288] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299819 + [1690222337067] [38924:6614288] [TOO] WindowStatus: 2 + [1690222337067] [38924:6614288] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdba23243 Peer = 01:0000000000000001 + [1690222337067] [38924:6614288] [EM] <<< [E:20766r S:948 M:8871656 (Ack:208014028)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222337067] [38924:6614288] [IN] (S) Sending msg 8871656 on secure session with LSID: 948 + [1690222337075] [38924:6614288] [EM] >>> [E:20767r S:948 M:208014029] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222337075] [38924:6614288] [EM] Handling via exchange: 20767r, Delegate: 0x105234be0 + [1690222337075] [38924:6614288] [DMG] ReportDataMessage = + [1690222337075] [38924:6614288] [DMG] { + [1690222337075] [38924:6614288] [DMG] SubscriptionId = 0x3621ba48, + [1690222337075] [38924:6614288] [DMG] AttributeReportIBs = + [1690222337075] [38924:6614288] [DMG] [ + [1690222337075] [38924:6614288] [DMG] AttributeReportIB = + [1690222337075] [38924:6614288] [DMG] { + [1690222337075] [38924:6614288] [DMG] AttributeDataIB = + [1690222337075] [38924:6614288] [DMG] { + [1690222337075] [38924:6614288] [DMG] DataVersion = 0xed5d12ab, + [1690222337075] [38924:6614288] [DMG] AttributePathIB = + [1690222337075] [38924:6614288] [DMG] { + [1690222337075] [38924:6614288] [DMG] Endpoint = 0x0, + [1690222337075] [38924:6614288] [DMG] Cluster = 0x3c, + [1690222337075] [38924:6614288] [DMG] Attribute = 0x0000_0002, + [1690222337075] [38924:6614288] [DMG] } + [1690222337075] [38924:6614288] [DMG] + [1690222337075] [38924:6614288] [DMG] Data = 65521, + [1690222337075] [38924:6614288] [DMG] }, + [1690222337075] [38924:6614288] [DMG] + [1690222337075] [38924:6614288] [DMG] }, + [1690222337075] [38924:6614288] [DMG] + [1690222337075] [38924:6614288] [DMG] ], + [1690222337075] [38924:6614288] [DMG] + [1690222337075] [38924:6614288] [DMG] InteractionModelRevision = 1 + [1690222337075] [38924:6614288] [DMG] } + [1690222337075] [38924:6614288] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299819 + [1690222337075] [38924:6614288] [TOO] AdminVendorId: 65521 + [1690222337075] [38924:6614288] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x3621ba48 Peer = 01:0000000000000001 + [1690222337076] [38924:6614288] [EM] <<< [E:20767r S:948 M:8871657 (Ack:208014029)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222337076] [38924:6614288] [IN] (S) Sending msg 8871657 on secure session with LSID: 948 + [1690222337102] [38924:6614288] [EM] >>> [E:20766r S:948 M:208014030 (Ack:8871656)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222337102] [38924:6614288] [EM] Found matching exchange: 20766r, Delegate: 0x0 + [1690222337102] [38924:6614288] [EM] Rxd Ack; Removing MessageCounter:8871656 from Retrans Table on exchange 20766r + [1690222337102] [38924:6614288] [EM] >>> [E:20767r S:948 M:208014031 (Ack:8871657)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222337102] [38924:6614288] [EM] Found matching exchange: 20767r, Delegate: 0x0 + [1690222337102] [38924:6614288] [EM] Rxd Ack; Removing MessageCounter:8871657 from Retrans Table on exchange 20767r + [1690222337955] [38924:6614165] [EM] >>> [E:20768r S:948 M:208014032] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222337955] [38924:6614165] [EM] Handling via exchange: 20768r, Delegate: 0x105234be0 + [1690222337955] [38924:6614165] [DMG] ReportDataMessage = + [1690222337955] [38924:6614165] [DMG] { + [1690222337955] [38924:6614165] [DMG] SubscriptionId = 0x4daaefab, + [1690222337955] [38924:6614165] [DMG] AttributeReportIBs = + [1690222337955] [38924:6614165] [DMG] [ + [1690222337955] [38924:6614165] [DMG] AttributeReportIB = + [1690222337955] [38924:6614165] [DMG] { + [1690222337955] [38924:6614165] [DMG] AttributeDataIB = + [1690222337955] [38924:6614165] [DMG] { + [1690222337955] [38924:6614165] [DMG] DataVersion = 0xed5d12ab, + [1690222337955] [38924:6614165] [DMG] AttributePathIB = + [1690222337955] [38924:6614165] [DMG] { + [1690222337955] [38924:6614165] [DMG] Endpoint = 0x0, + [1690222337955] [38924:6614165] [DMG] Cluster = 0x3c, + [1690222337955] [38924:6614165] [DMG] Attribute = 0x0000_0001, + [1690222337955] [38924:6614165] [DMG] } + [1690222337955] [38924:6614165] [DMG] + [1690222337955] [38924:6614165] [DMG] Data = 1, + [1690222337955] [38924:6614165] [DMG] }, + [1690222337955] [38924:6614165] [DMG] + [1690222337955] [38924:6614165] [DMG] }, + [1690222337955] [38924:6614165] [DMG] + [1690222337955] [38924:6614165] [DMG] ], + [1690222337955] [38924:6614165] [DMG] + [1690222337955] [38924:6614165] [DMG] InteractionModelRevision = 1 + [1690222337955] [38924:6614165] [DMG] } + [1690222337955] [38924:6614165] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299819 + [1690222337955] [38924:6614165] [TOO] AdminFabricIndex: 1 + [1690222337955] [38924:6614165] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x4daaefab Peer = 01:0000000000000001 + [1690222337955] [38924:6614165] [EM] <<< [E:20768r S:948 M:8871658 (Ack:208014032)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 14: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 2, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR1s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR1s fabric" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 2, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR1’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR1’s fabric + + ReportDataMessage = + [1690222337060] [38923:6611953] [DMG] { + [1690222337060] [38923:6611953] [DMG] SubscriptionId = 0x225d94ef, + [1690222337060] [38923:6611953] [DMG] AttributeReportIBs = + [1690222337060] [38923:6611953] [DMG] [ + [1690222337060] [38923:6611953] [DMG] AttributeReportIB = + [1690222337060] [38923:6611953] [DMG] { + [1690222337060] [38923:6611953] [DMG] AttributeDataIB = + [1690222337060] [38923:6611953] [DMG] { + [1690222337060] [38923:6611953] [DMG] DataVersion = 0xed5d12ab, + [1690222337060] [38923:6611953] [DMG] AttributePathIB = + [1690222337060] [38923:6611953] [DMG] { + [1690222337060] [38923:6611953] [DMG] Endpoint = 0x0, + [1690222337060] [38923:6611953] [DMG] Cluster = 0x3c, + [1690222337060] [38923:6611953] [DMG] Attribute = 0x0000_0000, + [1690222337060] [38923:6611953] [DMG] } + [1690222337060] [38923:6611953] [DMG] + [1690222337060] [38923:6611953] [DMG] Data = 2, + [1690222337060] [38923:6611953] [DMG] }, + [1690222337060] [38923:6611953] [DMG] + [1690222337060] [38923:6611953] [DMG] }, + [1690222337060] [38923:6611953] [DMG] + [1690222337060] [38923:6611953] [DMG] ], + [1690222337060] [38923:6611953] [DMG] + [1690222337060] [38923:6611953] [DMG] InteractionModelRevision = 1 + [1690222337060] [38923:6611953] [DMG] } + [1690222337060] [38923:6611953] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299819 + [1690222337060] [38923:6611953] [TOO] WindowStatus: 2 + [1690222337060] [38923:6611953] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x225d94ef Peer = 02:0000000000000001 + [1690222337060] [38923:6611953] [EM] <<< [E:20763r S:46405 M:159263157 (Ack:256936833)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690222337060] [38923:6611953] [IN] (S) Sending msg 159263157 on secure session with LSID: 46405 + [1690222337062] [38923:6611953] [EM] >>> [E:20764r S:46406 M:25511800] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222337062] [38923:6611953] [EM] Handling via exchange: 20764r, Delegate: 0x101824be0 + [1690222337063] [38923:6611953] [DMG] ReportDataMessage = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] SubscriptionId = 0x86a3ec94, + [1690222337063] [38923:6611953] [DMG] AttributeReportIBs = + [1690222337063] [38923:6611953] [DMG] [ + [1690222337063] [38923:6611953] [DMG] AttributeReportIB = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] AttributeDataIB = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] DataVersion = 0xed5d12ab, + [1690222337063] [38923:6611953] [DMG] AttributePathIB = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] Endpoint = 0x0, + [1690222337063] [38923:6611953] [DMG] Cluster = 0x3c, + [1690222337063] [38923:6611953] [DMG] Attribute = 0x0000_0001, + [1690222337063] [38923:6611953] [DMG] } + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] Data = 1, + [1690222337063] [38923:6611953] [DMG] }, + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] }, + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] ], + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] InteractionModelRevision = 1 + [1690222337063] [38923:6611953] [DMG] } + [1690222337063] [38923:6611953] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299819 + [1690222337063] [38923:6611953] [TOO] AdminFabricIndex: 1 + [1690222337063] [38923:6611953] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x86a3ec94 Peer = 01:0000000000000001 + [1690222337063] [38923:6611953] [EM] <<< [E:20764r S:46406 M:27652527 (Ack:25511800)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222337063] [38923:6611953] [IN] (S) Sending msg 27652527 on secure session with LSID: 46406 + [1690222337063] [38923:6611953] [EM] >>> [E:20765r S:46406 M:25511801] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222337063] [38923:6611953] [EM] Handling via exchange: 20765r, Delegate: 0x101824be0 + [1690222337063] [38923:6611953] [DMG] ReportDataMessage = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] SubscriptionId = 0x9ce33771, + [1690222337063] [38923:6611953] [DMG] AttributeReportIBs = + [1690222337063] [38923:6611953] [DMG] [ + [1690222337063] [38923:6611953] [DMG] AttributeReportIB = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] AttributeDataIB = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] DataVersion = 0xed5d12ab, + [1690222337063] [38923:6611953] [DMG] AttributePathIB = + [1690222337063] [38923:6611953] [DMG] { + [1690222337063] [38923:6611953] [DMG] Endpoint = 0x0, + [1690222337063] [38923:6611953] [DMG] Cluster = 0x3c, + [1690222337063] [38923:6611953] [DMG] Attribute = 0x0000_0002, + [1690222337063] [38923:6611953] [DMG] } + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] Data = 65521, + [1690222337063] [38923:6611953] [DMG] }, + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] }, + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] ], + [1690222337063] [38923:6611953] [DMG] + [1690222337063] [38923:6611953] [DMG] InteractionModelRevision = 1 + [1690222337063] [38923:6611953] [DMG] } + [1690222337063] [38923:6611953] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299819 + [1690222337063] [38923:6611953] [TOO] AdminVendorId: 65521 + [1690222337063] [38923:6611953] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x9ce33771 Peer = 01:0000000000000001 + [1690222337063] [38923:6611953] [EM] <<< [E:20765r S:46406 M:27652528 (Ack:25511801)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 15: TH_CR1 revokes the commissioning window on DUT_CE using + RevokeCommissioning command" + PICS: CADMIN.S.C02.Rsp + verification: | + In interactive mode of TH_CR1, send command to revoke commissioning window + + administratorcommissioning revoke-commissioning 1 0 --commissioner-name alpha --timedInteractionTimeoutMs 1000 + + Verify TH_CR1 logs for status code 0 (success), + + + InvokeResponseMessage = + [1690222259687] [38924:6613195] [DMG] { + [1690222259687] [38924:6613195] [DMG] suppressResponse = false, + [1690222259687] [38924:6613195] [DMG] InvokeResponseIBs = + [1690222259687] [38924:6613195] [DMG] [ + [1690222259687] [38924:6613195] [DMG] InvokeResponseIB = + [1690222259688] [38924:6613195] [DMG] { + [1690222259688] [38924:6613195] [DMG] CommandStatusIB = + [1690222259688] [38924:6613195] [DMG] { + [1690222259688] [38924:6613195] [DMG] CommandPathIB = + [1690222259688] [38924:6613195] [DMG] { + [1690222259688] [38924:6613195] [DMG] EndpointId = 0x0, + [1690222259688] [38924:6613195] [DMG] ClusterId = 0x3c, + [1690222259688] [38924:6613195] [DMG] CommandId = 0x2, + [1690222259688] [38924:6613195] [DMG] }, + [1690222259688] [38924:6613195] [DMG] + [1690222259688] [38924:6613195] [DMG] StatusIB = + [1690222259688] [38924:6613195] [DMG] { + [1690222259688] [38924:6613195] [DMG] status = 0x00 (SUCCESS), + [1690222259688] [38924:6613195] [DMG] }, + [1690222259688] [38924:6613195] [DMG] + [1690222259688] [38924:6613195] [DMG] }, + [1690222259688] [38924:6613195] [DMG] + [1690222259688] [38924:6613195] [DMG] }, + [1690222259688] [38924:6613195] [DMG] + [1690222259688] [38924:6613195] [DMG] ], + [1690222259688] [38924:6613195] [DMG] + [1690222259688] [38924:6613195] [DMG] InteractionModelRevision = 1 + [1690222259688] [38924:6613195] [DMG] }, + [1690222259688] [38924:6613195] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0002 Status=0x0 + [1690222259688] [38924:6613195] [DMG] ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 16: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + ReportDataMessage = + [1690222392514] [38924:6615100] [DMG] { + [1690222392514] [38924:6615100] [DMG] SubscriptionId = 0xdba23243, + [1690222392514] [38924:6615100] [DMG] AttributeReportIBs = + [1690222392514] [38924:6615100] [DMG] [ + [1690222392514] [38924:6615100] [DMG] AttributeReportIB = + [1690222392514] [38924:6615100] [DMG] { + [1690222392514] [38924:6615100] [DMG] AttributeDataIB = + [1690222392514] [38924:6615100] [DMG] { + [1690222392514] [38924:6615100] [DMG] DataVersion = 0xed5d12ae, + [1690222392514] [38924:6615100] [DMG] AttributePathIB = + [1690222392514] [38924:6615100] [DMG] { + [1690222392514] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222392514] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222392514] [38924:6615100] [DMG] Attribute = 0x0000_0000, + [1690222392514] [38924:6615100] [DMG] } + [1690222392514] [38924:6615100] [DMG] + [1690222392514] [38924:6615100] [DMG] Data = 0, + [1690222392514] [38924:6615100] [DMG] }, + [1690222392514] [38924:6615100] [DMG] + [1690222392514] [38924:6615100] [DMG] }, + [1690222392514] [38924:6615100] [DMG] + [1690222392514] [38924:6615100] [DMG] ], + [1690222392514] [38924:6615100] [DMG] + [1690222392514] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222392514] [38924:6615100] [DMG] } + [1690222392514] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299822 + [1690222392514] [38924:6615100] [TOO] WindowStatus: 0 + [1690222392514] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdba23243 Peer = 01:0000000000000001 + [1690222392514] [38924:6615100] [EM] <<< [E:20772r S:948 M:8871662 (Ack:208014036)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222392514] [38924:6615100] [IN] (S) Sending msg 8871662 on secure session with LSID: 948 + [1690222392537] [38924:6615100] [EM] >>> [E:20773r S:948 M:208014037] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222392537] [38924:6615100] [EM] Handling via exchange: 20773r, Delegate: 0x105234be0 + [1690222392537] [38924:6615100] [DMG] ReportDataMessage = + [1690222392537] [38924:6615100] [DMG] { + [1690222392537] [38924:6615100] [DMG] SubscriptionId = 0x3621ba48, + [1690222392537] [38924:6615100] [DMG] AttributeReportIBs = + [1690222392537] [38924:6615100] [DMG] [ + [1690222392537] [38924:6615100] [DMG] AttributeReportIB = + [1690222392537] [38924:6615100] [DMG] { + [1690222392537] [38924:6615100] [DMG] AttributeDataIB = + [1690222392537] [38924:6615100] [DMG] { + [1690222392537] [38924:6615100] [DMG] DataVersion = 0xed5d12ae, + [1690222392537] [38924:6615100] [DMG] AttributePathIB = + [1690222392537] [38924:6615100] [DMG] { + [1690222392537] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222392537] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222392537] [38924:6615100] [DMG] Attribute = 0x0000_0002, + [1690222392537] [38924:6615100] [DMG] } + [1690222392537] [38924:6615100] [DMG] + [1690222392537] [38924:6615100] [DMG] Data = NULL + [1690222392537] [38924:6615100] [DMG] }, + [1690222392537] [38924:6615100] [DMG] + [1690222392537] [38924:6615100] [DMG] }, + [1690222392537] [38924:6615100] [DMG] + [1690222392537] [38924:6615100] [DMG] ], + [1690222392537] [38924:6615100] [DMG] + [1690222392537] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222392537] [38924:6615100] [DMG] } + [1690222392537] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299822 + [1690222392537] [38924:6615100] [TOO] AdminVendorId: null + [1690222392537] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x3621ba48 Peer = 01:0000000000000001 + [1690222392538] [38924:6615100] [EM] <<< [E:20773r S:948 M:8871663 (Ack:208014037)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222392538] [38924:6615100] [IN] (S) Sending msg 8871663 on secure session with LSID: 948 + [1690222392540] [38924:6615100] [EM] >>> [E:20774r S:948 M:208014038] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222392540] [38924:6615100] [EM] Handling via exchange: 20774r, Delegate: 0x105234be0 + [1690222392540] [38924:6615100] [DMG] ReportDataMessage = + [1690222392540] [38924:6615100] [DMG] { + [1690222392540] [38924:6615100] [DMG] SubscriptionId = 0x4daaefab, + [1690222392540] [38924:6615100] [DMG] AttributeReportIBs = + [1690222392541] [38924:6615100] [DMG] [ + [1690222392541] [38924:6615100] [DMG] AttributeReportIB = + [1690222392541] [38924:6615100] [DMG] { + [1690222392541] [38924:6615100] [DMG] AttributeDataIB = + [1690222392541] [38924:6615100] [DMG] { + [1690222392541] [38924:6615100] [DMG] DataVersion = 0xed5d12ae, + [1690222392541] [38924:6615100] [DMG] AttributePathIB = + [1690222392541] [38924:6615100] [DMG] { + [1690222392541] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222392541] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222392541] [38924:6615100] [DMG] Attribute = 0x0000_0001, + [1690222392541] [38924:6615100] [DMG] } + [1690222392541] [38924:6615100] [DMG] + [1690222392541] [38924:6615100] [DMG] Data = NULL + [1690222392541] [38924:6615100] [DMG] }, + [1690222392541] [38924:6615100] [DMG] + [1690222392541] [38924:6615100] [DMG] }, + [1690222392541] [38924:6615100] [DMG] + [1690222392541] [38924:6615100] [DMG] ], + [1690222392541] [38924:6615100] [DMG] + [1690222392541] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222392541] [38924:6615100] [DMG] } + [1690222392541] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299822 + [1690222392541] [38924:6615100] [TOO] AdminFabricIndex: null + [1690222392541] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x4daaefab Peer = 01:0000000000000001 + [1690222392541] [38924:6615100] [EM] <<< [E:20774r S:948 M:8871664 (Ack:208014038)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 17: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + ReportDataMessage = + [1690222392505] [38923:6614289] [DMG] { + [1690222392505] [38923:6614289] [DMG] SubscriptionId = 0x225d94ef, + [1690222392505] [38923:6614289] [DMG] AttributeReportIBs = + [1690222392505] [38923:6614289] [DMG] [ + [1690222392505] [38923:6614289] [DMG] AttributeReportIB = + [1690222392505] [38923:6614289] [DMG] { + [1690222392505] [38923:6614289] [DMG] AttributeDataIB = + [1690222392505] [38923:6614289] [DMG] { + [1690222392505] [38923:6614289] [DMG] DataVersion = 0xed5d12ae, + [1690222392505] [38923:6614289] [DMG] AttributePathIB = + [1690222392505] [38923:6614289] [DMG] { + [1690222392505] [38923:6614289] [DMG] Endpoint = 0x0, + [1690222392505] [38923:6614289] [DMG] Cluster = 0x3c, + [1690222392505] [38923:6614289] [DMG] Attribute = 0x0000_0000, + [1690222392505] [38923:6614289] [DMG] } + [1690222392505] [38923:6614289] [DMG] + [1690222392505] [38923:6614289] [DMG] Data = 0, + [1690222392505] [38923:6614289] [DMG] }, + [1690222392505] [38923:6614289] [DMG] + [1690222392505] [38923:6614289] [DMG] }, + [1690222392505] [38923:6614289] [DMG] + [1690222392505] [38923:6614289] [DMG] ], + [1690222392505] [38923:6614289] [DMG] + [1690222392505] [38923:6614289] [DMG] InteractionModelRevision = 1 + [1690222392505] [38923:6614289] [DMG] } + [1690222392505] [38923:6614289] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299822 + [1690222392505] [38923:6614289] [TOO] WindowStatus: 0 + [1690222392505] [38923:6614289] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x225d94ef Peer = 02:0000000000000001 + [1690222392505] [38923:6614289] [EM] <<< [E:20769r S:46405 M:159263158 (Ack:256936835)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690222392505] [38923:6614289] [IN] (S) Sending msg 159263158 on secure session with LSID: 46405 + [1690222392506] [38923:6614289] [EM] >>> [E:20770r S:46406 M:25511804] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222392506] [38923:6614289] [EM] Handling via exchange: 20770r, Delegate: 0x101824be0 + [1690222392506] [38923:6614289] [DMG] ReportDataMessage = + [1690222392506] [38923:6614289] [DMG] { + [1690222392506] [38923:6614289] [DMG] SubscriptionId = 0x86a3ec94, + [1690222392506] [38923:6614289] [DMG] AttributeReportIBs = + [1690222392506] [38923:6614289] [DMG] [ + [1690222392506] [38923:6614289] [DMG] AttributeReportIB = + [1690222392506] [38923:6614289] [DMG] { + [1690222392506] [38923:6614289] [DMG] AttributeDataIB = + [1690222392506] [38923:6614289] [DMG] { + [1690222392506] [38923:6614289] [DMG] DataVersion = 0xed5d12ae, + [1690222392506] [38923:6614289] [DMG] AttributePathIB = + [1690222392506] [38923:6614289] [DMG] { + [1690222392506] [38923:6614289] [DMG] Endpoint = 0x0, + [1690222392506] [38923:6614289] [DMG] Cluster = 0x3c, + [1690222392506] [38923:6614289] [DMG] Attribute = 0x0000_0001, + [1690222392506] [38923:6614289] [DMG] } + [1690222392506] [38923:6614289] [DMG] + [1690222392506] [38923:6614289] [DMG] Data = NULL + [1690222392506] [38923:6614289] [DMG] }, + [1690222392506] [38923:6614289] [DMG] + [1690222392506] [38923:6614289] [DMG] }, + [1690222392506] [38923:6614289] [DMG] + [1690222392506] [38923:6614289] [DMG] ], + [1690222392506] [38923:6614289] [DMG] + [1690222392506] [38923:6614289] [DMG] InteractionModelRevision = 1 + [1690222392506] [38923:6614289] [DMG] } + [1690222392506] [38923:6614289] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299822 + [1690222392506] [38923:6614289] [TOO] AdminFabricIndex: null + [1690222392506] [38923:6614289] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x86a3ec94 Peer = 01:0000000000000001 + [1690222392506] [38923:6614289] [EM] <<< [E:20770r S:46406 M:27652529 (Ack:25511804)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222392506] [38923:6614289] [IN] (S) Sending msg 27652529 on secure session with LSID: 46406 + [1690222392509] [38923:6615102] [EM] >>> [E:20771r S:46406 M:25511805] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222392509] [38923:6615102] [EM] Handling via exchange: 20771r, Delegate: 0x101824be0 + [1690222392509] [38923:6615102] [DMG] ReportDataMessage = + [1690222392509] [38923:6615102] [DMG] { + [1690222392509] [38923:6615102] [DMG] SubscriptionId = 0x9ce33771, + [1690222392509] [38923:6615102] [DMG] AttributeReportIBs = + [1690222392509] [38923:6615102] [DMG] [ + [1690222392509] [38923:6615102] [DMG] AttributeReportIB = + [1690222392509] [38923:6615102] [DMG] { + [1690222392509] [38923:6615102] [DMG] AttributeDataIB = + [1690222392509] [38923:6615102] [DMG] { + [1690222392509] [38923:6615102] [DMG] DataVersion = 0xed5d12ae, + [1690222392510] [38923:6615102] [DMG] AttributePathIB = + [1690222392510] [38923:6615102] [DMG] { + [1690222392510] [38923:6615102] [DMG] Endpoint = 0x0, + [1690222392510] [38923:6615102] [DMG] Cluster = 0x3c, + [1690222392510] [38923:6615102] [DMG] Attribute = 0x0000_0002, + [1690222392510] [38923:6615102] [DMG] } + [1690222392510] [38923:6615102] [DMG] + [1690222392510] [38923:6615102] [DMG] Data = NULL + [1690222392510] [38923:6615102] [DMG] }, + [1690222392510] [38923:6615102] [DMG] + [1690222392510] [38923:6615102] [DMG] }, + [1690222392510] [38923:6615102] [DMG] + [1690222392510] [38923:6615102] [DMG] ], + [1690222392510] [38923:6615102] [DMG] + [1690222392510] [38923:6615102] [DMG] InteractionModelRevision = 1 + [1690222392510] [38923:6615102] [DMG] } + [1690222392510] [38923:6615102] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299822 + [1690222392510] [38923:6615102] [TOO] AdminVendorId: null + [1690222392510] [38923:6615102] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x9ce33771 Peer = 01:0000000000000001 + [1690222392510] [38923:6615102] [EM] <<< [E:20771r S:46406 M:27652530 (Ack:25511805)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 18: TH_CR2 opens a commissioning window on DUT_CE using BCM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C01.Rsp + verification: | + In interactive mode of TH_CR2, send command to open commissioning window using BCM + + administratorcommissioning open-basic-commissioning-window 180 1 0 --commissioner-name beta --timedInteractionTimeoutMs 1000 + + On TH_CR2 logs, verify for commissioning window to be open + + + InvokeResponseMessage = + [1690222451910] [38923:6615102] [DMG] { + [1690222451910] [38923:6615102] [DMG] suppressResponse = false, + [1690222451910] [38923:6615102] [DMG] InvokeResponseIBs = + [1690222451910] [38923:6615102] [DMG] [ + [1690222451910] [38923:6615102] [DMG] InvokeResponseIB = + [1690222451910] [38923:6615102] [DMG] { + [1690222451910] [38923:6615102] [DMG] CommandStatusIB = + [1690222451910] [38923:6615102] [DMG] { + [1690222451910] [38923:6615102] [DMG] CommandPathIB = + [1690222451910] [38923:6615102] [DMG] { + [1690222451910] [38923:6615102] [DMG] EndpointId = 0x0, + [1690222451910] [38923:6615102] [DMG] ClusterId = 0x3c, + [1690222451910] [38923:6615102] [DMG] CommandId = 0x1, + [1690222451910] [38923:6615102] [DMG] }, + [1690222451910] [38923:6615102] [DMG] + [1690222451910] [38923:6615102] [DMG] StatusIB = + [1690222451910] [38923:6615102] [DMG] { + [1690222451910] [38923:6615102] [DMG] status = 0x00 (SUCCESS), + [1690222451910] [38923:6615102] [DMG] }, + [1690222451910] [38923:6615102] [DMG] + [1690222451910] [38923:6615102] [DMG] }, + [1690222451910] [38923:6615102] [DMG] + [1690222451910] [38923:6615102] [DMG] }, + [1690222451910] [38923:6615102] [DMG] + [1690222451910] [38923:6615102] [DMG] ], + [1690222451910] [38923:6615102] [DMG] + [1690222451910] [38923:6615102] [DMG] InteractionModelRevision = 1 + [1690222451910] [38923:6615102] [DMG] }, + [1690222451910] [38923:6615102] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1690222451910] [38923:6615102] [DMG] ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 19: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 2, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 2, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690222451921] [38924:6615100] [DMG] { + [1690222451921] [38924:6615100] [DMG] SubscriptionId = 0xdba23243, + [1690222451921] [38924:6615100] [DMG] AttributeReportIBs = + [1690222451921] [38924:6615100] [DMG] [ + [1690222451921] [38924:6615100] [DMG] AttributeReportIB = + [1690222451921] [38924:6615100] [DMG] { + [1690222451921] [38924:6615100] [DMG] AttributeDataIB = + [1690222451921] [38924:6615100] [DMG] { + [1690222451921] [38924:6615100] [DMG] DataVersion = 0xed5d12b1, + [1690222451921] [38924:6615100] [DMG] AttributePathIB = + [1690222451921] [38924:6615100] [DMG] { + [1690222451921] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222451921] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222451921] [38924:6615100] [DMG] Attribute = 0x0000_0000, + [1690222451921] [38924:6615100] [DMG] } + [1690222451921] [38924:6615100] [DMG] + [1690222451921] [38924:6615100] [DMG] Data = 2, + [1690222451921] [38924:6615100] [DMG] }, + [1690222451921] [38924:6615100] [DMG] + [1690222451921] [38924:6615100] [DMG] }, + [1690222451921] [38924:6615100] [DMG] + [1690222451921] [38924:6615100] [DMG] ], + [1690222451921] [38924:6615100] [DMG] + [1690222451921] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222451921] [38924:6615100] [DMG] } + [1690222451922] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299825 + [1690222451922] [38924:6615100] [TOO] WindowStatus: 2 + [1690222451922] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdba23243 Peer = 01:0000000000000001 + [1690222451922] [38924:6615100] [EM] <<< [E:20778r S:948 M:8871665 (Ack:208014042)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222451922] [38924:6615100] [IN] (S) Sending msg 8871665 on secure session with LSID: 948 + [1690222451929] [38924:6615100] [EM] >>> [E:20779r S:948 M:208014043] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222451929] [38924:6615100] [EM] Handling via exchange: 20779r, Delegate: 0x105234be0 + [1690222451929] [38924:6615100] [DMG] ReportDataMessage = + [1690222451929] [38924:6615100] [DMG] { + [1690222451929] [38924:6615100] [DMG] SubscriptionId = 0x3621ba48, + [1690222451929] [38924:6615100] [DMG] AttributeReportIBs = + [1690222451929] [38924:6615100] [DMG] [ + [1690222451929] [38924:6615100] [DMG] AttributeReportIB = + [1690222451929] [38924:6615100] [DMG] { + [1690222451929] [38924:6615100] [DMG] AttributeDataIB = + [1690222451929] [38924:6615100] [DMG] { + [1690222451929] [38924:6615100] [DMG] DataVersion = 0xed5d12b1, + [1690222451929] [38924:6615100] [DMG] AttributePathIB = + [1690222451929] [38924:6615100] [DMG] { + [1690222451929] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222451929] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222451929] [38924:6615100] [DMG] Attribute = 0x0000_0002, + [1690222451929] [38924:6615100] [DMG] } + [1690222451929] [38924:6615100] [DMG] + [1690222451929] [38924:6615100] [DMG] Data = 65521, + [1690222451929] [38924:6615100] [DMG] }, + [1690222451929] [38924:6615100] [DMG] + [1690222451929] [38924:6615100] [DMG] }, + [1690222451929] [38924:6615100] [DMG] + [1690222451929] [38924:6615100] [DMG] ], + [1690222451929] [38924:6615100] [DMG] + [1690222451929] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222451929] [38924:6615100] [DMG] } + [1690222451929] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299825 + [1690222451929] [38924:6615100] [TOO] AdminVendorId: 65521 + [1690222451929] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x3621ba48 Peer = 01:0000000000000001 + [1690222451930] [38924:6615100] [EM] <<< [E:20779r S:948 M:8871666 (Ack:208014043)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222451930] [38924:6615100] [IN] (S) Sending msg 8871666 on secure session with LSID: 948 + [1690222451938] [38924:6615100] [EM] >>> [E:20780r S:948 M:208014044] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222451938] [38924:6615100] [EM] Handling via exchange: 20780r, Delegate: 0x105234be0 + [1690222451938] [38924:6615100] [DMG] ReportDataMessage = + [1690222451938] [38924:6615100] [DMG] { + [1690222451938] [38924:6615100] [DMG] SubscriptionId = 0x4daaefab, + [1690222451938] [38924:6615100] [DMG] AttributeReportIBs = + [1690222451938] [38924:6615100] [DMG] [ + [1690222451938] [38924:6615100] [DMG] AttributeReportIB = + [1690222451938] [38924:6615100] [DMG] { + [1690222451938] [38924:6615100] [DMG] AttributeDataIB = + [1690222451938] [38924:6615100] [DMG] { + [1690222451938] [38924:6615100] [DMG] DataVersion = 0xed5d12b1, + [1690222451938] [38924:6615100] [DMG] AttributePathIB = + [1690222451938] [38924:6615100] [DMG] { + [1690222451938] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222451938] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222451938] [38924:6615100] [DMG] Attribute = 0x0000_0001, + [1690222451938] [38924:6615100] [DMG] } + [1690222451938] [38924:6615100] [DMG] + [1690222451938] [38924:6615100] [DMG] Data = 2, + [1690222451938] [38924:6615100] [DMG] }, + [1690222451938] [38924:6615100] [DMG] + [1690222451938] [38924:6615100] [DMG] }, + [1690222451938] [38924:6615100] [DMG] + [1690222451938] [38924:6615100] [DMG] ], + [1690222451938] [38924:6615100] [DMG] + [1690222451938] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222451938] [38924:6615100] [DMG] } + [1690222451938] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299825 + [1690222451938] [38924:6615100] [TOO] AdminFabricIndex: 2 + [1690222451938] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x4daaefab Peer = 01:0000000000000001 + [1690222451938] [38924:6615100] [EM] <<< [E:20780r S:948 M:8871667 (Ack:208014044)] + disabled: true + + - label: + "Step 20: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 2, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 2, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690222451914] [38923:6615102] [DMG] { + [1690222451914] [38923:6615102] [DMG] SubscriptionId = 0x225d94ef, + [1690222451914] [38923:6615102] [DMG] AttributeReportIBs = + [1690222451914] [38923:6615102] [DMG] [ + [1690222451914] [38923:6615102] [DMG] AttributeReportIB = + [1690222451914] [38923:6615102] [DMG] { + [1690222451914] [38923:6615102] [DMG] AttributeDataIB = + [1690222451914] [38923:6615102] [DMG] { + [1690222451914] [38923:6615102] [DMG] DataVersion = 0xed5d12b1, + [1690222451914] [38923:6615102] [DMG] AttributePathIB = + [1690222451914] [38923:6615102] [DMG] { + [1690222451914] [38923:6615102] [DMG] Endpoint = 0x0, + [1690222451914] [38923:6615102] [DMG] Cluster = 0x3c, + [1690222451914] [38923:6615102] [DMG] Attribute = 0x0000_0000, + [1690222451914] [38923:6615102] [DMG] } + [1690222451914] [38923:6615102] [DMG] + [1690222451914] [38923:6615102] [DMG] Data = 2, + [1690222451914] [38923:6615102] [DMG] }, + [1690222451914] [38923:6615102] [DMG] + [1690222451914] [38923:6615102] [DMG] }, + [1690222451914] [38923:6615102] [DMG] + [1690222451914] [38923:6615102] [DMG] ], + [1690222451914] [38923:6615102] [DMG] + [1690222451914] [38923:6615102] [DMG] InteractionModelRevision = 1 + [1690222451914] [38923:6615102] [DMG] } + [1690222451914] [38923:6615102] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299825 + [1690222451914] [38923:6615102] [TOO] WindowStatus: 2 + [1690222451914] [38923:6615102] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x225d94ef Peer = 02:0000000000000001 + [1690222451914] [38923:6615102] [EM] <<< [E:20775r S:46405 M:159263162 (Ack:256936839)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690222451914] [38923:6615102] [IN] (S) Sending msg 159263162 on secure session with LSID: 46405 + [1690222451917] [38923:6615102] [EM] >>> [E:20776r S:46406 M:25511808] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222451917] [38923:6615102] [EM] Handling via exchange: 20776r, Delegate: 0x101824be0 + [1690222451917] [38923:6615102] [DMG] ReportDataMessage = + [1690222451917] [38923:6615102] [DMG] { + [1690222451917] [38923:6615102] [DMG] SubscriptionId = 0x86a3ec94, + [1690222451917] [38923:6615102] [DMG] AttributeReportIBs = + [1690222451917] [38923:6615102] [DMG] [ + [1690222451917] [38923:6615102] [DMG] AttributeReportIB = + [1690222451917] [38923:6615102] [DMG] { + [1690222451917] [38923:6615102] [DMG] AttributeDataIB = + [1690222451917] [38923:6615102] [DMG] { + [1690222451917] [38923:6615102] [DMG] DataVersion = 0xed5d12b1, + [1690222451917] [38923:6615102] [DMG] AttributePathIB = + [1690222451917] [38923:6615102] [DMG] { + [1690222451917] [38923:6615102] [DMG] Endpoint = 0x0, + [1690222451917] [38923:6615102] [DMG] Cluster = 0x3c, + [1690222451917] [38923:6615102] [DMG] Attribute = 0x0000_0001, + [1690222451917] [38923:6615102] [DMG] } + [1690222451917] [38923:6615102] [DMG] + [1690222451917] [38923:6615102] [DMG] Data = 2, + [1690222451917] [38923:6615102] [DMG] }, + [1690222451917] [38923:6615102] [DMG] + [1690222451917] [38923:6615102] [DMG] }, + [1690222451917] [38923:6615102] [DMG] + [1690222451917] [38923:6615102] [DMG] ], + [1690222451917] [38923:6615102] [DMG] + [1690222451917] [38923:6615102] [DMG] InteractionModelRevision = 1 + [1690222451917] [38923:6615102] [DMG] } + [1690222451917] [38923:6615102] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299825 + [1690222451917] [38923:6615102] [TOO] AdminFabricIndex: 2 + [1690222451917] [38923:6615102] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x86a3ec94 Peer = 01:0000000000000001 + [1690222451917] [38923:6615102] [EM] <<< [E:20776r S:46406 M:27652531 (Ack:25511808)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222451917] [38923:6615102] [IN] (S) Sending msg 27652531 on secure session with LSID: 46406 + [1690222451918] [38923:6615102] [EM] >>> [E:20777r S:46406 M:25511809] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222451918] [38923:6615102] [EM] Handling via exchange: 20777r, Delegate: 0x101824be0 + [1690222451918] [38923:6615102] [DMG] ReportDataMessage = + [1690222451918] [38923:6615102] [DMG] { + [1690222451918] [38923:6615102] [DMG] SubscriptionId = 0x9ce33771, + [1690222451918] [38923:6615102] [DMG] AttributeReportIBs = + [1690222451918] [38923:6615102] [DMG] [ + [1690222451918] [38923:6615102] [DMG] AttributeReportIB = + [1690222451918] [38923:6615102] [DMG] { + [1690222451918] [38923:6615102] [DMG] AttributeDataIB = + [1690222451918] [38923:6615102] [DMG] { + [1690222451918] [38923:6615102] [DMG] DataVersion = 0xed5d12b1, + [1690222451918] [38923:6615102] [DMG] AttributePathIB = + [1690222451918] [38923:6615102] [DMG] { + [1690222451918] [38923:6615102] [DMG] Endpoint = 0x0, + [1690222451918] [38923:6615102] [DMG] Cluster = 0x3c, + [1690222451918] [38923:6615102] [DMG] Attribute = 0x0000_0002, + [1690222451918] [38923:6615102] [DMG] } + [1690222451918] [38923:6615102] [DMG] + [1690222451918] [38923:6615102] [DMG] Data = 65521, + [1690222451918] [38923:6615102] [DMG] }, + [1690222451918] [38923:6615102] [DMG] + [1690222451918] [38923:6615102] [DMG] }, + [1690222451918] [38923:6615102] [DMG] + [1690222451918] [38923:6615102] [DMG] ], + [1690222451918] [38923:6615102] [DMG] + [1690222451918] [38923:6615102] [DMG] InteractionModelRevision = 1 + [1690222451918] [38923:6615102] [DMG] } + [1690222451918] [38923:6615102] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299825 + [1690222451918] [38923:6615102] [TOO] AdminVendorId: 65521 + [1690222451918] [38923:6615102] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x9ce33771 Peer = 01:0000000000000001 + [1690222451919] [38923:6615102] [EM] <<< [E:20777r S:46406 M:27652532 (Ack:25511809)] + disabled: true + + - label: + "Step 21: Wait for the expiration of PIXIT.CADMIN.CwDuration seconds + that is set in step 18" + verification: | + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 18 + disabled: true + + - label: + "Step 22: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + [1690222631903] [38924:6615100] [EM] >>> [E:20784r S:948 M:208014048] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222631903] [38924:6615100] [EM] Handling via exchange: 20784r, Delegate: 0x105234be0 + [1690222631903] [38924:6615100] [DMG] ReportDataMessage = + [1690222631903] [38924:6615100] [DMG] { + [1690222631903] [38924:6615100] [DMG] SubscriptionId = 0xdba23243, + [1690222631903] [38924:6615100] [DMG] AttributeReportIBs = + [1690222631903] [38924:6615100] [DMG] [ + [1690222631903] [38924:6615100] [DMG] AttributeReportIB = + [1690222631903] [38924:6615100] [DMG] { + [1690222631903] [38924:6615100] [DMG] AttributeDataIB = + [1690222631903] [38924:6615100] [DMG] { + [1690222631903] [38924:6615100] [DMG] DataVersion = 0xed5d12b4, + [1690222631903] [38924:6615100] [DMG] AttributePathIB = + [1690222631903] [38924:6615100] [DMG] { + [1690222631903] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222631903] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222631903] [38924:6615100] [DMG] Attribute = 0x0000_0000, + [1690222631903] [38924:6615100] [DMG] } + [1690222631903] [38924:6615100] [DMG] + [1690222631903] [38924:6615100] [DMG] Data = 0, + [1690222631903] [38924:6615100] [DMG] }, + [1690222631903] [38924:6615100] [DMG] + [1690222631903] [38924:6615100] [DMG] }, + [1690222631903] [38924:6615100] [DMG] + [1690222631903] [38924:6615100] [DMG] ], + [1690222631903] [38924:6615100] [DMG] + [1690222631903] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222631903] [38924:6615100] [DMG] } + [1690222631903] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299828 + [1690222631903] [38924:6615100] [TOO] WindowStatus: 0 + [1690222631903] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdba23243 Peer = 01:0000000000000001 + [1690222631904] [38924:6615100] [EM] <<< [E:20784r S:948 M:8871668 (Ack:208014048)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222631904] [38924:6615100] [IN] (S) Sending msg 8871668 on secure session with LSID: 948 + [1690222631928] [38924:6615100] [EM] >>> [E:20785r S:948 M:208014049] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222631928] [38924:6615100] [EM] Handling via exchange: 20785r, Delegate: 0x105234be0 + [1690222631928] [38924:6615100] [DMG] ReportDataMessage = + [1690222631928] [38924:6615100] [DMG] { + [1690222631928] [38924:6615100] [DMG] SubscriptionId = 0x3621ba48, + [1690222631928] [38924:6615100] [DMG] AttributeReportIBs = + [1690222631928] [38924:6615100] [DMG] [ + [1690222631928] [38924:6615100] [DMG] AttributeReportIB = + [1690222631928] [38924:6615100] [DMG] { + [1690222631928] [38924:6615100] [DMG] AttributeDataIB = + [1690222631928] [38924:6615100] [DMG] { + [1690222631928] [38924:6615100] [DMG] DataVersion = 0xed5d12b4, + [1690222631928] [38924:6615100] [DMG] AttributePathIB = + [1690222631928] [38924:6615100] [DMG] { + [1690222631928] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222631928] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222631928] [38924:6615100] [DMG] Attribute = 0x0000_0002, + [1690222631928] [38924:6615100] [DMG] } + [1690222631928] [38924:6615100] [DMG] + [1690222631928] [38924:6615100] [DMG] Data = NULL + [1690222631928] [38924:6615100] [DMG] }, + [1690222631928] [38924:6615100] [DMG] + [1690222631928] [38924:6615100] [DMG] }, + [1690222631928] [38924:6615100] [DMG] + [1690222631928] [38924:6615100] [DMG] ], + [1690222631928] [38924:6615100] [DMG] + [1690222631928] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222631928] [38924:6615100] [DMG] } + [1690222631928] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299828 + [1690222631928] [38924:6615100] [TOO] AdminVendorId: null + [1690222631929] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x3621ba48 Peer = 01:0000000000000001 + [1690222631929] [38924:6615100] [EM] <<< [E:20785r S:948 M:8871669 (Ack:208014049)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222631929] [38924:6615100] [IN] (S) Sending msg 8871669 on secure session with LSID: 948 + [1690222631930] [38924:6615100] [EM] >>> [E:20786r S:948 M:208014050] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222631930] [38924:6615100] [EM] Handling via exchange: 20786r, Delegate: 0x105234be0 + [1690222631930] [38924:6615100] [DMG] ReportDataMessage = + [1690222631930] [38924:6615100] [DMG] { + [1690222631930] [38924:6615100] [DMG] SubscriptionId = 0x4daaefab, + [1690222631930] [38924:6615100] [DMG] AttributeReportIBs = + [1690222631930] [38924:6615100] [DMG] [ + [1690222631930] [38924:6615100] [DMG] AttributeReportIB = + [1690222631930] [38924:6615100] [DMG] { + [1690222631930] [38924:6615100] [DMG] AttributeDataIB = + [1690222631930] [38924:6615100] [DMG] { + [1690222631930] [38924:6615100] [DMG] DataVersion = 0xed5d12b4, + [1690222631931] [38924:6615100] [DMG] AttributePathIB = + [1690222631931] [38924:6615100] [DMG] { + [1690222631931] [38924:6615100] [DMG] Endpoint = 0x0, + [1690222631931] [38924:6615100] [DMG] Cluster = 0x3c, + [1690222631931] [38924:6615100] [DMG] Attribute = 0x0000_0001, + [1690222631931] [38924:6615100] [DMG] } + [1690222631931] [38924:6615100] [DMG] + [1690222631931] [38924:6615100] [DMG] Data = NULL + [1690222631931] [38924:6615100] [DMG] }, + [1690222631931] [38924:6615100] [DMG] + [1690222631931] [38924:6615100] [DMG] }, + [1690222631931] [38924:6615100] [DMG] + [1690222631931] [38924:6615100] [DMG] ], + [1690222631931] [38924:6615100] [DMG] + [1690222631931] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690222631931] [38924:6615100] [DMG] } + [1690222631931] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299828 + [1690222631931] [38924:6615100] [TOO] AdminFabricIndex: null + [1690222631931] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x4daaefab Peer = 01:0000000000000001 + [1690222631931] [38924:6615100] [EM] <<< [E:20786r S:948 M:8871670 (Ack:208014050)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222631931] [38924:6615100] [IN] (S) Sending msg 8871670 on secure session with LSID: 948 + [1690222631935] [38924:6615100] [EM] >>> [E:20784r S:948 M:208014051 (Ack:8871668)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222631935] [38924:6615100] [EM] Found matching exchange: 20784r, Delegate: 0x0 + [1690222631935] [38924:6615100] [EM] Rxd Ack; Removing MessageCounter:8871668 from Retrans Table on exchange 20784r + [1690222631943] [38924:6615100] [EM] >>> [E:20785r S:948 M:208014052 (Ack:8871669)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222631943] [38924:6615100] [EM] Found matching exchange: 20785r, Delegate: 0x0 + [1690222631943] [38924:6615100] [EM] Rxd Ack; Removing MessageCounter:8871669 from Retrans Table on exchange 20785r + [1690222631948] [38924:6615100] [EM] >>> [E:20786r S:948 M:208014053 (Ack:8871670)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222631948] [38924:6615100] [EM] Found matching exchange: 20786r, Delegate: 0x0 + [1690222631948] [38924:6615100] [EM] Rxd Ack; Removing MessageCounter:8871670 from Retrans Table on exchange 20786r + disabled: true + + - label: + "Step 23: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 0, AdminFabricIndex value to be null, + AdminVendorId to be null" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 0, AdminFabricIndex value to be null, AdminVendorId to be null + + [1690222631896] [38923:6615905] [EM] >>> [E:20781r S:46405 M:256936841] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0001:05 (IM:ReportData) + [1690222631896] [38923:6615905] [EM] Handling via exchange: 20781r, Delegate: 0x101824be0 + [1690222631896] [38923:6615905] [DMG] ReportDataMessage = + [1690222631896] [38923:6615905] [DMG] { + [1690222631896] [38923:6615905] [DMG] SubscriptionId = 0x225d94ef, + [1690222631896] [38923:6615905] [DMG] AttributeReportIBs = + [1690222631896] [38923:6615905] [DMG] [ + [1690222631896] [38923:6615905] [DMG] AttributeReportIB = + [1690222631896] [38923:6615905] [DMG] { + [1690222631896] [38923:6615905] [DMG] AttributeDataIB = + [1690222631896] [38923:6615905] [DMG] { + [1690222631896] [38923:6615905] [DMG] DataVersion = 0xed5d12b4, + [1690222631896] [38923:6615905] [DMG] AttributePathIB = + [1690222631896] [38923:6615905] [DMG] { + [1690222631896] [38923:6615905] [DMG] Endpoint = 0x0, + [1690222631896] [38923:6615905] [DMG] Cluster = 0x3c, + [1690222631896] [38923:6615905] [DMG] Attribute = 0x0000_0000, + [1690222631896] [38923:6615905] [DMG] } + [1690222631896] [38923:6615905] [DMG] + [1690222631896] [38923:6615905] [DMG] Data = 0, + [1690222631896] [38923:6615905] [DMG] }, + [1690222631896] [38923:6615905] [DMG] + [1690222631896] [38923:6615905] [DMG] }, + [1690222631896] [38923:6615905] [DMG] + [1690222631896] [38923:6615905] [DMG] ], + [1690222631896] [38923:6615905] [DMG] + [1690222631896] [38923:6615905] [DMG] InteractionModelRevision = 1 + [1690222631896] [38923:6615905] [DMG] } + [1690222631897] [38923:6615905] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299828 + [1690222631897] [38923:6615905] [TOO] WindowStatus: 0 + [1690222631897] [38923:6615905] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x225d94ef Peer = 02:0000000000000001 + [1690222631897] [38923:6615905] [EM] <<< [E:20781r S:46405 M:159263163 (Ack:256936841)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690222631897] [38923:6615905] [IN] (S) Sending msg 159263163 on secure session with LSID: 46405 + [1690222631898] [38923:6615905] [EM] >>> [E:20782r S:46406 M:25511812] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222631898] [38923:6615905] [EM] Handling via exchange: 20782r, Delegate: 0x101824be0 + [1690222631898] [38923:6615905] [DMG] ReportDataMessage = + [1690222631898] [38923:6615905] [DMG] { + [1690222631898] [38923:6615905] [DMG] SubscriptionId = 0x86a3ec94, + [1690222631898] [38923:6615905] [DMG] AttributeReportIBs = + [1690222631898] [38923:6615905] [DMG] [ + [1690222631898] [38923:6615905] [DMG] AttributeReportIB = + [1690222631898] [38923:6615905] [DMG] { + [1690222631898] [38923:6615905] [DMG] AttributeDataIB = + [1690222631898] [38923:6615905] [DMG] { + [1690222631898] [38923:6615905] [DMG] DataVersion = 0xed5d12b4, + [1690222631898] [38923:6615905] [DMG] AttributePathIB = + [1690222631898] [38923:6615905] [DMG] { + [1690222631898] [38923:6615905] [DMG] Endpoint = 0x0, + [1690222631898] [38923:6615905] [DMG] Cluster = 0x3c, + [1690222631898] [38923:6615905] [DMG] Attribute = 0x0000_0001, + [1690222631898] [38923:6615905] [DMG] } + [1690222631898] [38923:6615905] [DMG] + [1690222631898] [38923:6615905] [DMG] Data = NULL + [1690222631898] [38923:6615905] [DMG] }, + [1690222631898] [38923:6615905] [DMG] + [1690222631898] [38923:6615905] [DMG] }, + [1690222631898] [38923:6615905] [DMG] + [1690222631898] [38923:6615905] [DMG] ], + [1690222631898] [38923:6615905] [DMG] + [1690222631899] [38923:6615905] [DMG] InteractionModelRevision = 1 + [1690222631899] [38923:6615905] [DMG] } + [1690222631899] [38923:6615905] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299828 + [1690222631899] [38923:6615905] [TOO] AdminFabricIndex: null + [1690222631899] [38923:6615905] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x86a3ec94 Peer = 01:0000000000000001 + [1690222631899] [38923:6615905] [EM] <<< [E:20782r S:46406 M:27652533 (Ack:25511812)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222631899] [38923:6615905] [IN] (S) Sending msg 27652533 on secure session with LSID: 46406 + [1690222631900] [38923:6615905] [EM] >>> [E:20783r S:46406 M:25511813] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690222631900] [38923:6615905] [EM] Handling via exchange: 20783r, Delegate: 0x101824be0 + [1690222631900] [38923:6615905] [DMG] ReportDataMessage = + [1690222631900] [38923:6615905] [DMG] { + [1690222631900] [38923:6615905] [DMG] SubscriptionId = 0x9ce33771, + [1690222631900] [38923:6615905] [DMG] AttributeReportIBs = + [1690222631900] [38923:6615905] [DMG] [ + [1690222631900] [38923:6615905] [DMG] AttributeReportIB = + [1690222631900] [38923:6615905] [DMG] { + [1690222631900] [38923:6615905] [DMG] AttributeDataIB = + [1690222631900] [38923:6615905] [DMG] { + [1690222631900] [38923:6615905] [DMG] DataVersion = 0xed5d12b4, + [1690222631900] [38923:6615905] [DMG] AttributePathIB = + [1690222631900] [38923:6615905] [DMG] { + [1690222631900] [38923:6615905] [DMG] Endpoint = 0x0, + [1690222631900] [38923:6615905] [DMG] Cluster = 0x3c, + [1690222631900] [38923:6615905] [DMG] Attribute = 0x0000_0002, + [1690222631900] [38923:6615905] [DMG] } + [1690222631900] [38923:6615905] [DMG] + [1690222631900] [38923:6615905] [DMG] Data = NULL + [1690222631900] [38923:6615905] [DMG] }, + [1690222631900] [38923:6615905] [DMG] + [1690222631900] [38923:6615905] [DMG] }, + [1690222631900] [38923:6615905] [DMG] + [1690222631900] [38923:6615905] [DMG] ], + [1690222631900] [38923:6615905] [DMG] + [1690222631900] [38923:6615905] [DMG] InteractionModelRevision = 1 + [1690222631900] [38923:6615905] [DMG] } + [1690222631900] [38923:6615905] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299828 + [1690222631900] [38923:6615905] [TOO] AdminVendorId: null + [1690222631900] [38923:6615905] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x9ce33771 Peer = 01:0000000000000001 + [1690222631901] [38923:6615905] [EM] <<< [E:20783r S:46406 M:27652534 (Ack:25511813)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690222631901] [38923:6615905] [IN] (S) Sending msg 27652534 on secure session with LSID: 46406 + [1690222631905] [38923:6615905] [EM] >>> [E:20781r S:46405 M:256936842 (Ack:159263163)] (S) Msg RX from 2:0000000000000001 [40B2] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222631905] [38923:6615905] [EM] Found matching exchange: 20781r, Delegate: 0x0 + [1690222631905] [38923:6615905] [EM] Rxd Ack; Removing MessageCounter:159263163 from Retrans Table on exchange 20781r + [1690222631926] [38923:6615905] [EM] >>> [E:20782r S:46406 M:25511814 (Ack:27652533)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222631926] [38923:6615905] [EM] Found matching exchange: 20782r, Delegate: 0x0 + [1690222631926] [38923:6615905] [EM] Rxd Ack; Removing MessageCounter:27652533 from Retrans Table on exchange 20782r + [1690222631932] [38923:6615905] [EM] >>> [E:20783r S:46406 M:25511815 (Ack:27652534)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690222631932] [38923:6615905] [EM] Found matching exchange: 20783r, Delegate: 0x0 + [1690222631932] [38923:6615905] [EM] Rxd Ack; Removing MessageCounter:27652534 from Retrans Table on exchange 20783r + disabled: true + + - label: + "Step 24: TH_CR2 opens a commissioning window on DUT_CE using BCM with + commissioning timeout of PIXIT.CADMIN.CwDuration seconds" + PICS: CADMIN.S.C01.Rsp + verification: | + In interactive mode of TH_CR2, send command to open commissioning window using ECM + + administratorcommissioning open-basic-commissioning-window 180 1 0 --commissioner-name beta --timedInteractionTimeoutMs 1000 + + On TH_CR2 logs, verify for success response + + + InvokeResponseMessage = + [1690223534922] [38923:6627404] [DMG] { + [1690223534922] [38923:6627404] [DMG] suppressResponse = false, + [1690223534922] [38923:6627404] [DMG] InvokeResponseIBs = + [1690223534922] [38923:6627404] [DMG] [ + [1690223534922] [38923:6627404] [DMG] InvokeResponseIB = + [1690223534922] [38923:6627404] [DMG] { + [1690223534922] [38923:6627404] [DMG] CommandStatusIB = + [1690223534922] [38923:6627404] [DMG] { + [1690223534922] [38923:6627404] [DMG] CommandPathIB = + [1690223534922] [38923:6627404] [DMG] { + [1690223534922] [38923:6627404] [DMG] EndpointId = 0x0, + [1690223534922] [38923:6627404] [DMG] ClusterId = 0x3c, + [1690223534922] [38923:6627404] [DMG] CommandId = 0x1, + [1690223534922] [38923:6627404] [DMG] }, + [1690223534922] [38923:6627404] [DMG] + [1690223534922] [38923:6627404] [DMG] StatusIB = + [1690223534922] [38923:6627404] [DMG] { + [1690223534922] [38923:6627404] [DMG] status = 0x00 (SUCCESS), + [1690223534922] [38923:6627404] [DMG] }, + [1690223534922] [38923:6627404] [DMG] + [1690223534922] [38923:6627404] [DMG] }, + [1690223534922] [38923:6627404] [DMG] + [1690223534922] [38923:6627404] [DMG] }, + [1690223534922] [38923:6627404] [DMG] + [1690223534922] [38923:6627404] [DMG] ], + [1690223534922] [38923:6627404] [DMG] + [1690223534922] [38923:6627404] [DMG] InteractionModelRevision = 1 + [1690223534922] [38923:6627404] [DMG] }, + [1690223534922] [38923:6627404] [DMG] Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1690223534922] [38923:6627404] [DMG] ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 25: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 2, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 2, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690223534931] [38924:6615100] [DMG] { + [1690223534931] [38924:6615100] [DMG] SubscriptionId = 0xdba23243, + [1690223534931] [38924:6615100] [DMG] AttributeReportIBs = + [1690223534931] [38924:6615100] [DMG] [ + [1690223534931] [38924:6615100] [DMG] AttributeReportIB = + [1690223534931] [38924:6615100] [DMG] { + [1690223534931] [38924:6615100] [DMG] AttributeDataIB = + [1690223534931] [38924:6615100] [DMG] { + [1690223534931] [38924:6615100] [DMG] DataVersion = 0xed5d12b7, + [1690223534931] [38924:6615100] [DMG] AttributePathIB = + [1690223534931] [38924:6615100] [DMG] { + [1690223534931] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223534931] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223534932] [38924:6615100] [DMG] Attribute = 0x0000_0000, + [1690223534932] [38924:6615100] [DMG] } + [1690223534932] [38924:6615100] [DMG] + [1690223534932] [38924:6615100] [DMG] Data = 2, + [1690223534932] [38924:6615100] [DMG] }, + [1690223534932] [38924:6615100] [DMG] + [1690223534932] [38924:6615100] [DMG] }, + [1690223534932] [38924:6615100] [DMG] + [1690223534932] [38924:6615100] [DMG] ], + [1690223534932] [38924:6615100] [DMG] + [1690223534932] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223534932] [38924:6615100] [DMG] } + [1690223534932] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299831 + [1690223534932] [38924:6615100] [TOO] WindowStatus: 2 + [1690223534932] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdba23243 Peer = 01:0000000000000001 + [1690223534932] [38924:6615100] [EM] <<< [E:20790r S:948 M:8871671 (Ack:208014054)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690223534932] [38924:6615100] [IN] (S) Sending msg 8871671 on secure session with LSID: 948 + [1690223534939] [38924:6615100] [EM] >>> [E:20791r S:948 M:208014055] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690223534939] [38924:6615100] [EM] Handling via exchange: 20791r, Delegate: 0x105234be0 + [1690223534939] [38924:6615100] [DMG] ReportDataMessage = + [1690223534939] [38924:6615100] [DMG] { + [1690223534939] [38924:6615100] [DMG] SubscriptionId = 0x3621ba48, + [1690223534939] [38924:6615100] [DMG] AttributeReportIBs = + [1690223534939] [38924:6615100] [DMG] [ + [1690223534939] [38924:6615100] [DMG] AttributeReportIB = + [1690223534939] [38924:6615100] [DMG] { + [1690223534939] [38924:6615100] [DMG] AttributeDataIB = + [1690223534939] [38924:6615100] [DMG] { + [1690223534939] [38924:6615100] [DMG] DataVersion = 0xed5d12b7, + [1690223534939] [38924:6615100] [DMG] AttributePathIB = + [1690223534939] [38924:6615100] [DMG] { + [1690223534939] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223534939] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223534939] [38924:6615100] [DMG] Attribute = 0x0000_0002, + [1690223534939] [38924:6615100] [DMG] } + [1690223534939] [38924:6615100] [DMG] + [1690223534939] [38924:6615100] [DMG] Data = 65521, + [1690223534939] [38924:6615100] [DMG] }, + [1690223534939] [38924:6615100] [DMG] + [1690223534939] [38924:6615100] [DMG] }, + [1690223534939] [38924:6615100] [DMG] + [1690223534939] [38924:6615100] [DMG] ], + [1690223534939] [38924:6615100] [DMG] + [1690223534939] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223534939] [38924:6615100] [DMG] } + [1690223534939] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299831 + [1690223534939] [38924:6615100] [TOO] AdminVendorId: 65521 + [1690223534939] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x3621ba48 Peer = 01:0000000000000001 + [1690223534939] [38924:6615100] [EM] <<< [E:20791r S:948 M:8871672 (Ack:208014055)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690223534939] [38924:6615100] [IN] (S) Sending msg 8871672 on secure session with LSID: 948 + [1690223534944] [38924:6615100] [EM] >>> [E:20792r S:948 M:208014056] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690223534944] [38924:6615100] [EM] Handling via exchange: 20792r, Delegate: 0x105234be0 + [1690223534944] [38924:6615100] [DMG] ReportDataMessage = + [1690223534944] [38924:6615100] [DMG] { + [1690223534944] [38924:6615100] [DMG] SubscriptionId = 0x4daaefab, + [1690223534944] [38924:6615100] [DMG] AttributeReportIBs = + [1690223534944] [38924:6615100] [DMG] [ + [1690223534944] [38924:6615100] [DMG] AttributeReportIB = + [1690223534944] [38924:6615100] [DMG] { + [1690223534944] [38924:6615100] [DMG] AttributeDataIB = + [1690223534944] [38924:6615100] [DMG] { + [1690223534944] [38924:6615100] [DMG] DataVersion = 0xed5d12b7, + [1690223534944] [38924:6615100] [DMG] AttributePathIB = + [1690223534944] [38924:6615100] [DMG] { + [1690223534944] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223534944] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223534944] [38924:6615100] [DMG] Attribute = 0x0000_0001, + [1690223534944] [38924:6615100] [DMG] } + [1690223534944] [38924:6615100] [DMG] + [1690223534944] [38924:6615100] [DMG] Data = 2, + [1690223534944] [38924:6615100] [DMG] }, + [1690223534944] [38924:6615100] [DMG] + [1690223534944] [38924:6615100] [DMG] }, + [1690223534944] [38924:6615100] [DMG] + [1690223534944] [38924:6615100] [DMG] ], + [1690223534945] [38924:6615100] [DMG] + [1690223534945] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223534945] [38924:6615100] [DMG] } + [1690223534945] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299831 + [1690223534945] [38924:6615100] [TOO] AdminFabricIndex: 2 + [1690223534945] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x4daaefab Peer = 01:0000000000000001 + [1690223534945] [38924:6615100] [EM] <<< [E:20792r S:948 M:8871673 (Ack:208014056)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690223534945] [38924:6615100] [IN] (S) Sending msg 8871673 on secure session with LSID: 948 + [1690223534952] [38924:6615100] [EM] >>> [E:20790r S:948 M:208014057 (Ack:8871671)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690223534952] [38924:6615100] [EM] Found matching exchange: 20790r, Delegate: 0x0 + [1690223534952] [38924:6615100] [EM] Rxd Ack; Removing MessageCounter:8871671 from Retrans Table on exchange 20790r + [1690223534956] [38924:6627407] [EM] >>> [E:20791r S:948 M:208014058 (Ack:8871672)] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 26: Verify TH_CR2 receives subscription notifications which show + WindowStatus value to be 2, AdminFabricIndex value to be the same as + the Fabric Index of the Fabrics attribute list entry corresponding to + TH_CR2s fabric, AdminVendorId to be the same as the Vendor ID field of + Fabrics attribute list entry corresponding to TH_CR2s fabric" + verification: | + Verify TH_CR2 logs for subscription notifications which show WindowStatus value to be 2, AdminFabricIndex value to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric, AdminVendorId to be the same as the Vendor ID field of Fabrics attribute list entry corresponding to TH_CR2’s fabric + + ReportDataMessage = + [1690223534924] [38923:6627404] [DMG] { + [1690223534924] [38923:6627404] [DMG] SubscriptionId = 0x225d94ef, + [1690223534924] [38923:6627404] [DMG] AttributeReportIBs = + [1690223534924] [38923:6627404] [DMG] [ + [1690223534924] [38923:6627404] [DMG] AttributeReportIB = + [1690223534924] [38923:6627404] [DMG] { + [1690223534924] [38923:6627404] [DMG] AttributeDataIB = + [1690223534924] [38923:6627404] [DMG] { + [1690223534924] [38923:6627404] [DMG] DataVersion = 0xed5d12b7, + [1690223534924] [38923:6627404] [DMG] AttributePathIB = + [1690223534924] [38923:6627404] [DMG] { + [1690223534924] [38923:6627404] [DMG] Endpoint = 0x0, + [1690223534924] [38923:6627404] [DMG] Cluster = 0x3c, + [1690223534924] [38923:6627404] [DMG] Attribute = 0x0000_0000, + [1690223534924] [38923:6627404] [DMG] } + [1690223534924] [38923:6627404] [DMG] + [1690223534924] [38923:6627404] [DMG] Data = 2, + [1690223534924] [38923:6627404] [DMG] }, + [1690223534924] [38923:6627404] [DMG] + [1690223534924] [38923:6627404] [DMG] }, + [1690223534924] [38923:6627404] [DMG] + [1690223534924] [38923:6627404] [DMG] ], + [1690223534924] [38923:6627404] [DMG] + [1690223534924] [38923:6627404] [DMG] InteractionModelRevision = 1 + [1690223534924] [38923:6627404] [DMG] } + [1690223534925] [38923:6627404] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299831 + [1690223534925] [38923:6627404] [TOO] WindowStatus: 2 + [1690223534925] [38923:6627404] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x225d94ef Peer = 02:0000000000000001 + [1690223534925] [38923:6627404] [EM] <<< [E:20787r S:46405 M:159263167 (Ack:256936845)] (S) Msg TX to 2:0000000000000001 [40B2] --- Type 0001:01 (IM:StatusResponse) + [1690223534925] [38923:6627404] [IN] (S) Sending msg 159263167 on secure session with LSID: 46405 + [1690223534927] [38923:6627404] [EM] >>> [E:20788r S:46406 M:25511816] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690223534927] [38923:6627404] [EM] Handling via exchange: 20788r, Delegate: 0x101824be0 + [1690223534927] [38923:6627404] [DMG] ReportDataMessage = + [1690223534927] [38923:6627404] [DMG] { + [1690223534927] [38923:6627404] [DMG] SubscriptionId = 0x86a3ec94, + [1690223534927] [38923:6627404] [DMG] AttributeReportIBs = + [1690223534927] [38923:6627404] [DMG] [ + [1690223534927] [38923:6627404] [DMG] AttributeReportIB = + [1690223534927] [38923:6627404] [DMG] { + [1690223534927] [38923:6627404] [DMG] AttributeDataIB = + [1690223534927] [38923:6627404] [DMG] { + [1690223534927] [38923:6627404] [DMG] DataVersion = 0xed5d12b7, + [1690223534927] [38923:6627404] [DMG] AttributePathIB = + [1690223534927] [38923:6627404] [DMG] { + [1690223534927] [38923:6627404] [DMG] Endpoint = 0x0, + [1690223534927] [38923:6627404] [DMG] Cluster = 0x3c, + [1690223534927] [38923:6627404] [DMG] Attribute = 0x0000_0001, + [1690223534927] [38923:6627404] [DMG] } + [1690223534927] [38923:6627404] [DMG] + [1690223534927] [38923:6627404] [DMG] Data = 2, + [1690223534928] [38923:6627404] [DMG] }, + [1690223534928] [38923:6627404] [DMG] + [1690223534928] [38923:6627404] [DMG] }, + [1690223534928] [38923:6627404] [DMG] + [1690223534928] [38923:6627404] [DMG] ], + [1690223534928] [38923:6627404] [DMG] + [1690223534928] [38923:6627404] [DMG] InteractionModelRevision = 1 + [1690223534928] [38923:6627404] [DMG] } + [1690223534928] [38923:6627404] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299831 + [1690223534928] [38923:6627404] [TOO] AdminFabricIndex: 2 + [1690223534928] [38923:6627404] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x86a3ec94 Peer = 01:0000000000000001 + [1690223534928] [38923:6627404] [EM] <<< [E:20788r S:46406 M:27652535 (Ack:25511816)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690223534928] [38923:6627404] [IN] (S) Sending msg 27652535 on secure session with LSID: 46406 + [1690223534928] [38923:6627404] [EM] >>> [E:20789r S:46406 M:25511817] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690223534928] [38923:6627404] [EM] Handling via exchange: 20789r, Delegate: 0x101824be0 + [1690223534928] [38923:6627404] [DMG] ReportDataMessage = + [1690223534928] [38923:6627404] [DMG] { + [1690223534928] [38923:6627404] [DMG] SubscriptionId = 0x9ce33771, + [1690223534928] [38923:6627404] [DMG] AttributeReportIBs = + [1690223534928] [38923:6627404] [DMG] [ + [1690223534928] [38923:6627404] [DMG] AttributeReportIB = + [1690223534928] [38923:6627404] [DMG] { + [1690223534928] [38923:6627404] [DMG] AttributeDataIB = + [1690223534928] [38923:6627404] [DMG] { + [1690223534928] [38923:6627404] [DMG] DataVersion = 0xed5d12b7, + [1690223534929] [38923:6627404] [DMG] AttributePathIB = + [1690223534929] [38923:6627404] [DMG] { + [1690223534929] [38923:6627404] [DMG] Endpoint = 0x0, + [1690223534929] [38923:6627404] [DMG] Cluster = 0x3c, + [1690223534929] [38923:6627404] [DMG] Attribute = 0x0000_0002, + [1690223534929] [38923:6627404] [DMG] } + [1690223534929] [38923:6627404] [DMG] + [1690223534929] [38923:6627404] [DMG] Data = 65521, + [1690223534929] [38923:6627404] [DMG] }, + [1690223534929] [38923:6627404] [DMG] + [1690223534929] [38923:6627404] [DMG] }, + [1690223534929] [38923:6627404] [DMG] + [1690223534929] [38923:6627404] [DMG] ], + [1690223534929] [38923:6627404] [DMG] + [1690223534929] [38923:6627404] [DMG] InteractionModelRevision = 1 + [1690223534929] [38923:6627404] [DMG] } + [1690223534929] [38923:6627404] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299831 + [1690223534929] [38923:6627404] [TOO] AdminVendorId: 65521 + [1690223534929] [38923:6627404] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x9ce33771 Peer = 01:0000000000000001 + [1690223534929] [38923:6627404] [EM] <<< [E:20789r S:46406 M:27652536 (Ack:25511817)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: + "Step 27: Before expiration of PIXIT.CADMIN.CwDuration seconds set in + step 24, TH_CR1 sends RemoveFabric command to DUT_CE with FabricIndex + set to the fabric index of TH_CR2s fabric" + PICS: OPCREDS.S.C0a.Rsp + verification: | + Before expiration of PIXIT.CADMIN.CwDuration seconds set in step 24, from interactive mode of TH_CR1 send RemoveFabric command with FabricIndex set to the fabric index of TH_CR2’s fabric + + operationalcredentials remove-fabric 2 1 0 --commissioner-name alpha --timedInteractionTimeoutMs 1000 + + On TH_CR1 logs, verify for NOCResponse with statuscode 0 and fabric index equal to fabric index of TH_CR2's fabric + + + + InvokeResponseMessage = + [1690223865565] [38924:6615100] [DMG] { + [1690223865565] [38924:6615100] [DMG] suppressResponse = false, + [1690223865565] [38924:6615100] [DMG] InvokeResponseIBs = + [1690223865565] [38924:6615100] [DMG] [ + [1690223865565] [38924:6615100] [DMG] InvokeResponseIB = + [1690223865565] [38924:6615100] [DMG] { + [1690223865565] [38924:6615100] [DMG] CommandDataIB = + [1690223865565] [38924:6615100] [DMG] { + [1690223865565] [38924:6615100] [DMG] CommandPathIB = + [1690223865565] [38924:6615100] [DMG] { + [1690223865565] [38924:6615100] [DMG] EndpointId = 0x0, + [1690223865565] [38924:6615100] [DMG] ClusterId = 0x3e, + [1690223865566] [38924:6615100] [DMG] CommandId = 0x8, + [1690223865566] [38924:6615100] [DMG] }, + [1690223865566] [38924:6615100] [DMG] + [1690223865566] [38924:6615100] [DMG] CommandFields = + [1690223865566] [38924:6615100] [DMG] { + [1690223865566] [38924:6615100] [DMG] 0x0 = 0, + [1690223865566] [38924:6615100] [DMG] 0x1 = 2, + [1690223865566] [38924:6615100] [DMG] }, + [1690223865566] [38924:6615100] [DMG] }, + [1690223865566] [38924:6615100] [DMG] + [1690223865566] [38924:6615100] [DMG] }, + [1690223865566] [38924:6615100] [DMG] + [1690223865566] [38924:6615100] [DMG] ], + [1690223865566] [38924:6615100] [DMG] + [1690223865566] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223865566] [38924:6615100] [DMG] }, + [1690223865566] [38924:6615100] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 + [1690223865566] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 + [1690223865566] [38924:6615100] [TOO] NOCResponse: { + [1690223865566] [38924:6615100] [TOO] statusCode: 0 + [1690223865566] [38924:6615100] [TOO] fabricIndex: 2 + [1690223865566] [38924:6615100] [TOO] } + [1690223865566] [38924:6615100] [DMG] ICR moving to [AwaitingDe] + [1690223865566] [38924:6615100] [EM] <<< [E:2308i S:948 M:8871682 (Ack:208014074)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 28: Verify TH_CR1 receives subscription notifications which show + AdminFabricIndex value to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show AdminFabricIndex value to be null + + + ReportDataMessage = + [1690223865568] [38924:6615100] [DMG] { + [1690223865568] [38924:6615100] [DMG] SubscriptionId = 0x4daaefab, + [1690223865568] [38924:6615100] [DMG] AttributeReportIBs = + [1690223865568] [38924:6615100] [DMG] [ + [1690223865568] [38924:6615100] [DMG] AttributeReportIB = + [1690223865568] [38924:6615100] [DMG] { + [1690223865568] [38924:6615100] [DMG] AttributeDataIB = + [1690223865568] [38924:6615100] [DMG] { + [1690223865568] [38924:6615100] [DMG] DataVersion = 0xed5d12be, + [1690223865568] [38924:6615100] [DMG] AttributePathIB = + [1690223865568] [38924:6615100] [DMG] { + [1690223865568] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223865568] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223865568] [38924:6615100] [DMG] Attribute = 0x0000_0001, + [1690223865568] [38924:6615100] [DMG] } + [1690223865568] [38924:6615100] [DMG] + [1690223865568] [38924:6615100] [DMG] Data = NULL + [1690223865568] [38924:6615100] [DMG] }, + [1690223865568] [38924:6615100] [DMG] + [1690223865568] [38924:6615100] [DMG] }, + [1690223865568] [38924:6615100] [DMG] + [1690223865568] [38924:6615100] [DMG] ], + [1690223865568] [38924:6615100] [DMG] + [1690223865568] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223865568] [38924:6615100] [DMG] } + [1690223865568] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 3982299838 + [1690223865568] [38924:6615100] [TOO] AdminFabricIndex: null + [1690223865568] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x4daaefab Peer = 01:0000000000000001 + [1690223865568] [38924:6615100] [EM] <<< [E:20807r S:948 M:8871683 (Ack:208014075)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true + + - label: "Step 29: TH_CR1 reads WindowStatus attribute from DUT_CE" + PICS: CADMIN.S.A0000 + verification: | + In interactive mode of TH_CR1, read windowstatus attribute, + + administratorcommissioning read window-status 1 0 --commissioner-name alpha + + Verify TH_CR1 logs for windowstatus to be 1 + + + ReportDataMessage = + [1690223928167] [38924:6615100] [DMG] { + [1690223928167] [38924:6615100] [DMG] AttributeReportIBs = + [1690223928167] [38924:6615100] [DMG] [ + [1690223928167] [38924:6615100] [DMG] AttributeReportIB = + [1690223928167] [38924:6615100] [DMG] { + [1690223928167] [38924:6615100] [DMG] AttributeDataIB = + [1690223928167] [38924:6615100] [DMG] { + [1690223928167] [38924:6615100] [DMG] DataVersion = 0xed5d12be, + [1690223928167] [38924:6615100] [DMG] AttributePathIB = + [1690223928167] [38924:6615100] [DMG] { + [1690223928167] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223928167] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223928167] [38924:6615100] [DMG] Attribute = 0x0000_0000, + [1690223928167] [38924:6615100] [DMG] } + [1690223928167] [38924:6615100] [DMG] + [1690223928167] [38924:6615100] [DMG] Data = 2, + [1690223928167] [38924:6615100] [DMG] }, + [1690223928167] [38924:6615100] [DMG] + [1690223928167] [38924:6615100] [DMG] }, + [1690223928167] [38924:6615100] [DMG] + [1690223928167] [38924:6615100] [DMG] ], + [1690223928167] [38924:6615100] [DMG] + [1690223928167] [38924:6615100] [DMG] SuppressResponse = true, + [1690223928167] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223928167] [38924:6615100] [DMG] } + [1690223928167] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299838 + [1690223928167] [38924:6615100] [TOO] WindowStatus: 2 + [1690223928167] [38924:6615100] [EM] <<< [E:2309i S:948 M:8871685 (Ack:208014077)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: "Step 30: TH_CR1 reads AdminVendorID attribute from DUT_CE" + PICS: CADMIN.S.A0002 + verification: | + In interactive mode of TH_CR1, read adminvendorid attribute, + + administratorcommissioning read admin-vendor-id 1 0 --commissioner-name alpha + + On TH_CR1 logs, verify the value of adminvendorid to be the same as the Fabric Index of the Fabrics attribute list entry corresponding to TH_CR2’s fabric + + + ReportDataMessage = + [1690223970283] [38924:6615100] [DMG] { + [1690223970283] [38924:6615100] [DMG] AttributeReportIBs = + [1690223970283] [38924:6615100] [DMG] [ + [1690223970283] [38924:6615100] [DMG] AttributeReportIB = + [1690223970283] [38924:6615100] [DMG] { + [1690223970283] [38924:6615100] [DMG] AttributeDataIB = + [1690223970283] [38924:6615100] [DMG] { + [1690223970283] [38924:6615100] [DMG] DataVersion = 0xed5d12be, + [1690223970283] [38924:6615100] [DMG] AttributePathIB = + [1690223970283] [38924:6615100] [DMG] { + [1690223970283] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223970283] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223970283] [38924:6615100] [DMG] Attribute = 0x0000_0002, + [1690223970283] [38924:6615100] [DMG] } + [1690223970283] [38924:6615100] [DMG] + [1690223970283] [38924:6615100] [DMG] Data = 65521, + [1690223970283] [38924:6615100] [DMG] }, + [1690223970283] [38924:6615100] [DMG] + [1690223970283] [38924:6615100] [DMG] }, + [1690223970283] [38924:6615100] [DMG] + [1690223970283] [38924:6615100] [DMG] ], + [1690223970283] [38924:6615100] [DMG] + [1690223970283] [38924:6615100] [DMG] SuppressResponse = true, + [1690223970283] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223970283] [38924:6615100] [DMG] } + [1690223970283] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299838 + [1690223970283] [38924:6615100] [TOO] AdminVendorId: 65521 + [1690223970283] [38924:6615100] [EM] <<< [E:2310i S:948 M:8871687 (Ack:208014078)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 31: Wait for the expiration of PIXIT.CADMIN.CwDuration seconds + that is set in step 24" + verification: | + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 24 + disabled: true + + - label: + "Step 32: Verify TH_CR1 receives subscription notifications which show + WindowStatus value to be 0, AdminVendorId to be null" + verification: | + Verify TH_CR1 logs for subscription notifications which show WindowStatus value to be 0, AdminVendorId to be null + + ReportDataMessage = + [1690223990049] [38924:6615100] [DMG] { + [1690223990049] [38924:6615100] [DMG] SubscriptionId = 0xdba23243, + [1690223990049] [38924:6615100] [DMG] AttributeReportIBs = + [1690223990049] [38924:6615100] [DMG] [ + [1690223990049] [38924:6615100] [DMG] AttributeReportIB = + [1690223990049] [38924:6615100] [DMG] { + [1690223990049] [38924:6615100] [DMG] AttributeDataIB = + [1690223990049] [38924:6615100] [DMG] { + [1690223990049] [38924:6615100] [DMG] DataVersion = 0xed5d12c0, + [1690223990049] [38924:6615100] [DMG] AttributePathIB = + [1690223990049] [38924:6615100] [DMG] { + [1690223990049] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223990049] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223990049] [38924:6615100] [DMG] Attribute = 0x0000_0000, + [1690223990050] [38924:6615100] [DMG] } + [1690223990050] [38924:6615100] [DMG] + [1690223990050] [38924:6615100] [DMG] Data = 0, + [1690223990050] [38924:6615100] [DMG] }, + [1690223990050] [38924:6615100] [DMG] + [1690223990050] [38924:6615100] [DMG] }, + [1690223990050] [38924:6615100] [DMG] + [1690223990050] [38924:6615100] [DMG] ], + [1690223990050] [38924:6615100] [DMG] + [1690223990050] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223990050] [38924:6615100] [DMG] } + [1690223990050] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 3982299840 + [1690223990050] [38924:6615100] [TOO] WindowStatus: 0 + [1690223990050] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0xdba23243 Peer = 01:0000000000000001 + [1690223990051] [38924:6615100] [EM] <<< [E:20809r S:948 M:8871688 (Ack:208014079)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + [1690223990051] [38924:6615100] [IN] (S) Sending msg 8871688 on secure session with LSID: 948 + [1690223990051] [38924:6615100] [EM] >>> [E:20810r S:948 M:208014080] (S) Msg RX from 1:0000000000000001 [4A14] --- Type 0001:05 (IM:ReportData) + [1690223990051] [38924:6615100] [EM] Handling via exchange: 20810r, Delegate: 0x105234be0 + [1690223990051] [38924:6615100] [DMG] ReportDataMessage = + [1690223990051] [38924:6615100] [DMG] { + [1690223990051] [38924:6615100] [DMG] SubscriptionId = 0x3621ba48, + [1690223990051] [38924:6615100] [DMG] AttributeReportIBs = + [1690223990051] [38924:6615100] [DMG] [ + [1690223990051] [38924:6615100] [DMG] AttributeReportIB = + [1690223990051] [38924:6615100] [DMG] { + [1690223990051] [38924:6615100] [DMG] AttributeDataIB = + [1690223990051] [38924:6615100] [DMG] { + [1690223990051] [38924:6615100] [DMG] DataVersion = 0xed5d12c0, + [1690223990051] [38924:6615100] [DMG] AttributePathIB = + [1690223990051] [38924:6615100] [DMG] { + [1690223990051] [38924:6615100] [DMG] Endpoint = 0x0, + [1690223990051] [38924:6615100] [DMG] Cluster = 0x3c, + [1690223990051] [38924:6615100] [DMG] Attribute = 0x0000_0002, + [1690223990051] [38924:6615100] [DMG] } + [1690223990051] [38924:6615100] [DMG] + [1690223990051] [38924:6615100] [DMG] Data = NULL + [1690223990051] [38924:6615100] [DMG] }, + [1690223990051] [38924:6615100] [DMG] + [1690223990051] [38924:6615100] [DMG] }, + [1690223990051] [38924:6615100] [DMG] + [1690223990051] [38924:6615100] [DMG] ], + [1690223990051] [38924:6615100] [DMG] + [1690223990051] [38924:6615100] [DMG] InteractionModelRevision = 1 + [1690223990051] [38924:6615100] [DMG] } + [1690223990052] [38924:6615100] [TOO] Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 3982299840 + [1690223990052] [38924:6615100] [TOO] AdminVendorId: null + [1690223990052] [38924:6615100] [DMG] Refresh LivenessCheckTime for 3004224 milliseconds with SubscriptionId = 0x3621ba48 Peer = 01:0000000000000001 + [1690223990052] [38924:6615100] [EM] <<< [E:20810r S:948 M:8871689 (Ack:208014080)] (S) Msg TX to 1:0000000000000001 [4A14] --- Type 0001:01 (IM:StatusResponse) + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index b297d4a4b1fc89..990b1b942a77a3 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -31,13 +31,25 @@ tests: - name: "nodeId" value: nodeId + #Issue: https://github.com/project-chip/connectedhomeip/issues/26598 - label: "Step 2: read the global attribute: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 5 - constraints: - type: int16u + verification: | + ./chip-tool colorcontrol read cluster-revision 1 1 + + Verify "ClusterRevision" value is of unit16 and reflects the highest revision number, in RPI the value of ClusterRevision is 6 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1649660967.485745][7940:7945] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_FFFD DataVersion: 4087274515 + [1649660967.485839][7940:7945] CHIP:TOO: ClusterRevision:5 + [1649660967.485946][7940:7945] CHIP:EM: Sending Standalone Ack for MessageCounter:1573389 on exchange 13361i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Step 3a: Read the global attribute: FeatureMap" PICS: ( !CC.S.F00 && !CC.S.F01 && !CC.S.F02 && !CC.S.F03 && !CC.S.F04 ) diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_2_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_2_Simulated.yaml deleted file mode 100644 index 1b487bc296e03f..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CC_2_2_Simulated.yaml +++ /dev/null @@ -1,318 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 25.2.2. [TC-CC-2.2] Attributes with client as DUT - -PICS: - - CC.C - -config: - nodeId: 0x12344321 - cluster: "Color Control" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads from the TH the (0x0000) CurrentHue attribute" - PICS: CC.C.A0000 - wait: "readAttribute" - attribute: "CurrentHue" - - - label: "DUT reads from the TH the (0x0001) CurrentSaturation attribute" - PICS: CC.C.A0001 - wait: "readAttribute" - attribute: "CurrentSaturation" - - - label: - "DUT reads from the TH the Optional (0x0002) RemainingTime attribute" - PICS: CC.C.A0002 - wait: "readAttribute" - attribute: "RemainingTime" - - - label: "DUT reads from the TH the (0x0003) CurrentX attribute" - PICS: CC.C.A0003 - wait: "readAttribute" - attribute: "CurrentX" - - - label: "DUT reads from the TH the (0x0004) CurrentY attribute" - PICS: CC.C.A0004 - wait: "readAttribute" - attribute: "CurrentY" - - - label: - "DUT reads from the TH the Optional (0x0005) DriftCompensation - attribute" - PICS: CC.C.A0005 - wait: "readAttribute" - attribute: "DriftCompensation" - - - label: - "DUT reads from the TH the Optional (0x0006) CompensationText - attribute" - PICS: CC.C.A0006 - wait: "readAttribute" - attribute: "CompensationText" - - - label: - "DUT reads from the TH the (0x0007) ColorTemperatureMireds attribute" - PICS: CC.C.A0007 - wait: "readAttribute" - attribute: "ColorTemperatureMireds" - - - label: "DUT reads from the TH the (0x0008) ColorMode attribute" - PICS: CC.C.A0008 - wait: "readAttribute" - attribute: "ColorMode" - - - label: "DUT reads from the TH the (0x000f) Options attribute" - PICS: CC.C.A000f - wait: "readAttribute" - attribute: "Options" - - - label: "DUT reads from the TH the (0x4000) EnhancedCurrentHue attribute" - PICS: CC.C.A4000 - wait: "readAttribute" - attribute: "EnhancedCurrentHue" - - - label: "DUT reads from the TH the (0x4001) EnhancedColorMode attribute" - PICS: CC.C.A4001 - wait: "readAttribute" - attribute: "EnhancedColorMode" - - - label: "DUT reads from the TH the (0x4002) ColorLoopActive attribute" - PICS: CC.C.A4002 - wait: "readAttribute" - attribute: "ColorLoopActive" - - - label: "DUT reads from the TH the (0x4003) ColorLoopDirection attribute" - PICS: CC.C.A4003 - wait: "readAttribute" - attribute: "ColorLoopDirection" - - - label: "DUT reads from the TH the (0x4004) ColorLoopTime attribute" - PICS: CC.C.A4004 - wait: "readAttribute" - attribute: "ColorLoopTime" - - - label: - "DUT reads from the TH the (0x4005) ColorLoopStartEnhancedHue - attribute" - PICS: CC.C.A4005 - wait: "readAttribute" - attribute: "ColorLoopStartEnhancedHue" - - - label: - "DUT reads from the TH the (0x4006) ColorLoopStoredEnhancedHue - attribute" - PICS: CC.C.A4006 - wait: "readAttribute" - attribute: "ColorLoopStoredEnhancedHue" - - - label: "DUT reads from the TH the (0x400a) ColorCapabilities attribute" - PICS: CC.C.A400a - wait: "readAttribute" - attribute: "ColorCapabilities" - - - label: - "DUT reads from the TH the (0x400b) ColorTempPhysicalMinMireds - attribute" - PICS: CC.C.A400b - wait: "readAttribute" - attribute: "ColorTempPhysicalMinMireds" - - - label: - "DUT reads from the TH the (0x400c) ColorTempPhysicalMaxMireds - attribute" - PICS: CC.C.A400c - wait: "readAttribute" - attribute: "ColorTempPhysicalMaxMireds" - - - label: - "DUT reads from the TH the (0x400d) CoupleColorTempToLevelMinMireds - attribute" - PICS: CC.C.A400d - wait: "readAttribute" - attribute: "CoupleColorTempToLevelMinMireds" - - - label: - "DUT reads from the TH the (0x4010) StartUpColorTemperatureMireds - attribute" - PICS: CC.C.A4010 - wait: "readAttribute" - attribute: "StartUpColorTemperatureMireds" - - - label: "DUT reads from the TH the (0x0010) NumberOfPrimaries attribute" - PICS: CC.C.A0010 - wait: "readAttribute" - attribute: "NumberOfPrimaries" - - - label: "DUT reads from the TH the (0x0011) Primary1X attribute" - PICS: CC.C.A0011 - wait: "readAttribute" - attribute: "Primary1X" - - - label: "DUT reads from the TH the (0x0012) Primary1Y attribute" - PICS: CC.C.A0012 - wait: "readAttribute" - attribute: "Primary1Y" - - - label: "DUT reads from the TH the (0x0013) Primary1Intensity attribute" - PICS: CC.C.A0013 - wait: "readAttribute" - attribute: "Primary1Intensity" - - - label: "DUT reads from the TH the (0x0015) Primary2X attribute" - PICS: CC.C.A0015 - wait: "readAttribute" - attribute: "Primary2X" - - - label: "DUT reads from the TH the (0x0016) Primary2Y attribute" - PICS: CC.C.A0016 - wait: "readAttribute" - attribute: "Primary2Y" - - - label: "DUT reads from the TH the (0x0017) Primary2Intensity attribute" - PICS: CC.C.A0017 - wait: "readAttribute" - attribute: "Primary2Intensity" - - - label: "DUT reads from the TH the (0x0019) Primary3X attribute" - PICS: CC.C.A0019 - wait: "readAttribute" - attribute: "Primary3X" - - - label: "DUT reads from the TH the (0x001a) Primary3Y attribute" - PICS: CC.C.A001a - wait: "readAttribute" - attribute: "Primary3Y" - - - label: "DUT reads from the TH the (0x001b) Primary3Intensity attribute" - PICS: CC.C.A001b - wait: "readAttribute" - attribute: "Primary3Intensity" - - - label: "DUT reads from the TH the (0x0020) Primary4X attribute" - PICS: CC.C.A0020 - wait: "readAttribute" - attribute: "Primary4X" - - - label: "DUT reads from the TH the (0x0021) Primary4Y attribute" - PICS: CC.C.A0021 - wait: "readAttribute" - attribute: "Primary4Y" - - - label: "DUT reads from the TH the (0x0022) Primary4Intensity attribute" - PICS: CC.C.A0022 - wait: "readAttribute" - attribute: "Primary4Intensity" - - - label: "DUT reads from the TH the (0x0024) Primary5X attribute" - PICS: CC.C.A0024 - wait: "readAttribute" - attribute: "Primary5X" - - - label: "DUT reads from the TH the (0x0025) Primary5Y attribute" - PICS: CC.C.A0025 - wait: "readAttribute" - attribute: "Primary5Y" - - - label: "DUT reads from the TH the (0x0026) Primary5Intensity attribute" - PICS: CC.C.A0026 - wait: "readAttribute" - attribute: "Primary5Intensity" - - - label: "DUT reads from the TH the (0x0028) Primary6X attribute" - PICS: CC.C.A0028 - wait: "readAttribute" - attribute: "Primary6X" - - - label: "DUT reads from the TH the (0x0029) Primary6Y attribute" - PICS: CC.C.A0029 - wait: "readAttribute" - attribute: "Primary6Y" - - - label: "DUT reads from the TH the (0x002a) Primary6Intensity attribute" - PICS: CC.C.A002a - wait: "readAttribute" - attribute: "Primary6Intensity" - - - label: "DUT reads from the TH the Optional (0x0030) WhitePointX attribute" - PICS: CC.C.A0030 - wait: "readAttribute" - attribute: "WhitePointX" - - - label: "DUT reads from the TH the Optional (0x0031) WhitePointY attribute" - PICS: CC.C.A0031 - wait: "readAttribute" - attribute: "WhitePointY" - - - label: - "DUT reads from the TH the Optional (0x0032) ColorPointRX attribute" - PICS: CC.C.A0032 - wait: "readAttribute" - attribute: "ColorPointRX" - - - label: - "DUT reads from the TH the Optional (0x0033) ColorPointRY attribute" - PICS: CC.C.A0033 - wait: "readAttribute" - attribute: "ColorPointRY" - - - label: - "DUT reads from the TH the Optional (0x0034) ColorPointRIntensity - attribute" - PICS: CC.C.A0034 - wait: "readAttribute" - attribute: "ColorPointRIntensity" - - - label: - "DUT reads from the TH the Optional (0x0036) ColorPointGX attribute" - PICS: CC.C.A0036 - wait: "readAttribute" - attribute: "ColorPointGX" - - - label: - "DUT reads from the TH the Optional (0x0037) ColorPointGY attribute" - PICS: CC.C.A0037 - wait: "readAttribute" - attribute: "ColorPointGY" - - - label: - "DUT reads from the TH the Optional (0x0038) ColorPointGIntensity - attribute" - PICS: CC.C.A0038 - wait: "readAttribute" - attribute: "ColorPointGIntensity" - - - label: - "DUT reads from the TH the Optional (0x003a) ColorPointBX attribute" - PICS: CC.C.A003a - wait: "readAttribute" - attribute: "ColorPointBX" - - - label: - "DUT reads from the TH the Optional (0x003b) ColorPointBY attribute" - PICS: CC.C.A003b - wait: "readAttribute" - attribute: "ColorPointBY" - - - label: - "DUT reads from the TH the Optional (0x003c) ColorPointBIntensity - attribute" - PICS: CC.C.A003c - wait: "readAttribute" - attribute: "ColorPointBIntensity" diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml index 72074fef588ca0..ed4cf48f1dea58 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml @@ -152,7 +152,7 @@ tests: - name: "ms" value: 5000 - - label: "TStep 2f: H reads CurrentHue attribute from DUT" + - label: "Step 2f: H reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" @@ -336,7 +336,7 @@ tests: value: 100 - label: - "TStep 4b: H sends MoveToHue command to DUT with Hue=120, + "Step 4b: H sends MoveToHue command to DUT with Hue=120, Direction=0x02 (up) and TransitionTime=300 (30s)" PICS: CC.S.F00 && CC.S.C00.Rsp command: "MoveToHue" diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml index 2a223b88134b8f..8a6a953fb25af8 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml @@ -228,7 +228,7 @@ tests: - name: "ms" value: 10000 - - label: "TStep 3c: H reads CurrentSaturation attribute from DUT" + - label: "Step 3c: H reads CurrentSaturation attribute from DUT" PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" @@ -317,7 +317,7 @@ tests: minValue: 0 maxValue: 2 - - label: "TStep 4b: H reads EnhancedColorMode attribute from DUT" + - label: "Step 4b: H reads EnhancedColorMode attribute from DUT" PICS: CC.S.F00 && CC.S.A4001 command: "readAttribute" attribute: "EnhancedColorMode" diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml index a072ad1f75ecc9..746355f0f442f1 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml @@ -48,7 +48,7 @@ tests: cluster: "On/Off" command: "On" - - label: "TStep 1a: H reads ColorTempPhysicalMinMireds attribute from DUT" + - label: "Step 1a: H reads ColorTempPhysicalMinMireds attribute from DUT" PICS: CC.S.F04 && CC.S.A400b command: "readAttribute" attribute: "ColorTempPhysicalMinMireds" diff --git a/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml index 8dc61902cdfbb1..2492c644355dfc 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml @@ -44,7 +44,7 @@ tests: command: "On" - label: - "TStep 2a: H sends MoveToHue command to DUT with Hue=200, + "Step 2a: H sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and TransitionTime=0 (immediately)." PICS: CC.S.C00.Rsp command: "MoveToHue" diff --git a/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml index 807729d36aa952..097b390ed16acc 100644 --- a/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: CDOCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !CDOCONC.S.F00 && !CDOCONC.S.F01 && !CDOCONC.S.F02 && !CDOCONC.S.F03 + && !CDOCONC.S.F04 && !CDOCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given CDOCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && CDOCONC.S.F00 + PICS: CDOCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && !CDOCONC.S.F00 + PICS: " !CDOCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && CDOCONC.S.F01 + PICS: CDOCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && !CDOCONC.S.F01 + PICS: " !CDOCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && CDOCONC.S.F02 + PICS: CDOCONC.S.F02 && CDOCONC.S.F01 response: constraints: type: bitmap32 @@ -113,18 +112,18 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && !CDOCONC.S.F02 + PICS: " !CDOCONC.S.F02 && !CDOCONC.S.F01" response: constraints: type: bitmap32 - hasMasksClear: [0x4] + hasMasksClear: [0x4, 0x2] - label: "Step 3h: Given CDOCONC.S.F03(CRI) ensure featuremap has the correct bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && CDOCONC.S.F03 + PICS: CDOCONC.S.F03 && CDOCONC.S.F01 response: constraints: type: bitmap32 @@ -135,18 +134,18 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && !CDOCONC.S.F03 + PICS: " !CDOCONC.S.F03 && !CDOCONC.S.F01" response: constraints: type: bitmap32 - hasMasksClear: [0x8] + hasMasksClear: [0x8, 0x2] - label: "Step 3j: Given CDOCONC.S.F04(PEA) ensure featuremap has the correct bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && CDOCONC.S.F04 + PICS: CDOCONC.S.F04 && CDOCONC.S.F00 response: constraints: type: bitmap32 @@ -157,18 +156,18 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && !CDOCONC.S.F04 + PICS: " !CDOCONC.S.F04 && !CDOCONC.S.F00" response: constraints: type: bitmap32 - hasMasksClear: [0x10] + hasMasksClear: [0x10, 0x1] - label: "Step 3l: Given CDOCONC.S.F05(AVG) ensure featuremap has the correct bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && CDOCONC.S.F05 + PICS: CDOCONC.S.F05 && CDOCONC.S.F00 response: constraints: type: bitmap32 @@ -179,16 +178,16 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CDOCONC.S.Afffc && !CDOCONC.S.F05 + PICS: " !CDOCONC.S.F05 && !CDOCONC.S.F00" response: constraints: type: bitmap32 - hasMasksClear: [0x20] + hasMasksClear: [0x20, 0x1] - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && CDOCONC.S.A0007 && CDOCONC.S.F00 + PICS: CDOCONC.S.A0007 && CDOCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when CDOCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && !CDOCONC.S.A0007 + PICS: " !CDOCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && CDOCONC.S.F00 + PICS: CDOCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when CDOCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && !CDOCONC.S.F00 + PICS: " !CDOCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && CDOCONC.S.F04 + PICS: CDOCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when CDOCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && !CDOCONC.S.F04 + PICS: " !CDOCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && CDOCONC.S.F05 + PICS: CDOCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: CDOCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && !CDOCONC.S.F05 + PICS: " !CDOCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && CDOCONC.S.F01 + PICS: CDOCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: CDOCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CDOCONC.S.Afffb && !CDOCONC.S.F01 + PICS: " !CDOCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: CDOCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: CDOCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml index 725034a1575c82..3c80b3bbe7fccf 100644 --- a/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: CMOCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !CMOCONC.S.F00 && !CMOCONC.S.F01 && !CMOCONC.S.F02 && !CMOCONC.S.F03 + && !CMOCONC.S.F04 && !CMOCONC.S.F05 " command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && CMOCONC.S.F00 + PICS: CMOCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && !CMOCONC.S.F00 + PICS: " !CMOCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && CMOCONC.S.F01 + PICS: CMOCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && !CMOCONC.S.F01 + PICS: " !CMOCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && CMOCONC.S.F02 + PICS: CMOCONC.S.F02 && CMOCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && !CMOCONC.S.F02 + PICS: " !CMOCONC.S.F02 && !CMOCONC.S.F01" response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && CMOCONC.S.F03 + PICS: CMOCONC.S.F03 && CMOCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && !CMOCONC.S.F03 + PICS: " !CMOCONC.S.F03 && !CMOCONC.S.F01" response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && CMOCONC.S.F04 + PICS: CMOCONC.S.F04 && CMOCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && !CMOCONC.S.F04 + PICS: " !CMOCONC.S.F04 && !CMOCONC.S.F00" response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && CMOCONC.S.F05 + PICS: CMOCONC.S.F05 && CMOCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: CMOCONC.S.Afffc && !CMOCONC.S.F05 + PICS: " !CMOCONC.S.F05 && !CMOCONC.S.F00 " response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && CMOCONC.S.A0007 && CMOCONC.S.F00 + PICS: CMOCONC.S.A0007 && CMOCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when CMOCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && !CMOCONC.S.A0007 + PICS: " !CMOCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && CMOCONC.S.F00 + PICS: CMOCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when CMOCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && !CMOCONC.S.F00 + PICS: " !CMOCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && CMOCONC.S.F04 + PICS: CMOCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when CMOCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && !CMOCONC.S.F04 + PICS: " !CMOCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && CMOCONC.S.F05 + PICS: CMOCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: CMOCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && !CMOCONC.S.F05 + PICS: " !CMOCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && CMOCONC.S.F01 + PICS: CMOCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: CMOCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: CMOCONC.S.Afffb && !CMOCONC.S.F01 + PICS: " !CMOCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: CMOCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: CMOCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml deleted file mode 100644 index a014fb35013667..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml +++ /dev/null @@ -1,681 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 12.4.15. [TC-CNET-4.17] [WiFi] Verification for attributes check - [DUT-Client] - -PICS: - - CNET.C.F00 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "Commission TH and DUT over BLE to setup the Wi-Fi" - verification: | - - disabled: true - - - label: "Step 1: DUT reads the MaxNetworks attribute from the TH" - PICS: CNET.C.A0000 - verification: | - ./chip-tool networkcommissioning read max-networks 1 0 --trace_decode 1 - - Verify MaxNetworks attribute response on TH(all-clusters-app) log: - - [1667208272.085200][14293:14293] CHIP:EM: Handling via exchange: 31335r, Delegate: 0xaaaaaff382d8 - [1667208272.085299][14293:14293] CHIP:IM: Received Read request - [1667208272.085469][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208272.085536][14293:14293] CHIP:DMG: { - [1667208272.085591][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208272.085656][14293:14293] CHIP:DMG: [ - [1667208272.085717][14293:14293] CHIP:DMG: AttributePathIB = - [1667208272.085795][14293:14293] CHIP:DMG: { - [1667208272.085875][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208272.085965][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208272.086053][14293:14293] CHIP:DMG: Attribute = 0x0000_0000, - [1667208272.086129][14293:14293] CHIP:DMG: } - [1667208272.086305][14293:14293] CHIP:DMG: - [1667208272.086375][14293:14293] CHIP:DMG: ], - [1667208272.086446][14293:14293] CHIP:DMG: - [1667208272.086558][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208272.086623][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208272.086683][14293:14293] CHIP:DMG: }, - [1667208272.086838][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208272.087061][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208272.087133][14293:14293] CHIP:DMG: Cluster 31, Attribute 0 is dirty - [1667208272.087187][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0000 (expanded=0) - [1667208272.087411][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208272.087490][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208272.087693][14293:14293] CHIP:DMG: Sending report (payload has 36 bytes)... - [1667208272.088306][14293:14293] CHIP:EM: <<< [E:31335r M:207979142 (Ack:102020621)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208272.088408][14293:14293] CHIP:IN: (S) Sending msg 207979142 on secure session with LSID: 36091 - [1667208272.089216][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:51656 | 207979142 | [Interaction Model (1) / Report Data (0x05) / Session = 62189 / Exchange = 31335] - [1667208272.089312][14293:14293] CHIP:DMG: Header Flags = - [1667208272.089370][14293:14293] CHIP:DMG: { - [1667208272.089455][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208272.089511][14293:14293] CHIP:DMG: { - [1667208272.089571][14293:14293] CHIP:DMG: AckMsg = 102020621 - [1667208272.089698][14293:14293] CHIP:DMG: NeedsAck = true - [1667208272.089751][14293:14293] CHIP:DMG: } - [1667208272.089825][14293:14293] CHIP:DMG: } - [1667208272.089880][14293:14293] CHIP:DMG: - [1667208272.089947][14293:14293] CHIP:DMG: Encrypted Payload (70 bytes) = - [1667208272.090003][14293:14293] CHIP:DMG: { - [1667208272.090058][14293:14293] CHIP:DMG: data = 00edf2008682650ca88b35a87ab9790201216607af689478e5c56dad2629043281e44b91b4ac9e365e70b2ddd2a03df4d99b2f61bdd43e79d8cd1ebac7435b1d5f00ede22d15 - [1667208272.090116][14293:14293] CHIP:DMG: buffer_ptr = 187650247915488 - [1667208272.090169][14293:14293] CHIP:DMG: } - [1667208272.090220][14293:14293] CHIP:DMG: - [1667208272.090295][14293:14293] CHIP:DMG: Decrypted Payload (36 bytes) = - [1667208272.090351][14293:14293] CHIP:DMG: { - [1667208272.090405][14293:14293] CHIP:DMG: data = 153601153501260083a6a084370124020024033124040018240201181818290424ff0118 - [1667208272.090489][14293:14293] CHIP:DMG: } - [1667208272.090613][14293:14293] CHIP:DMG: - [1667208272.090767][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208272.090833][14293:14293] CHIP:DMG: { - [1667208272.090958][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208272.091047][14293:14293] CHIP:DMG: [ - [1667208272.091111][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208272.091200][14293:14293] CHIP:DMG: { - [1667208272.091274][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208272.091356][14293:14293] CHIP:DMG: { - [1667208272.091508][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208272.091585][14293:14293] CHIP:DMG: AttributePathIB = - [1667208272.091679][14293:14293] CHIP:DMG: { - [1667208272.091772][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208272.091871][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208272.091961][14293:14293] CHIP:DMG: Attribute = 0x0000_0000, - [1667208272.092109][14293:14293] CHIP:DMG: } - [1667208272.092212][14293:14293] CHIP:DMG: - [1667208272.092308][14293:14293] CHIP:DMG: Data = 1, - [1667208272.092394][14293:14293] CHIP:DMG: }, - [1667208272.092489][14293:14293] CHIP:DMG: - [1667208272.092558][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 2: DUT reads the Networks attribute from the TH" - PICS: CNET.C.A0001 - verification: | - ./chip-tool networkcommissioning read networks 1 0 --trace_decode 1 - - Verify Networks attribute response on TH(all-clusters-app) log: - - [1667208308.741069][14293:14293] CHIP:EM: Handling via exchange: 43353r, Delegate: 0xaaaaaff382d8 - [1667208308.741175][14293:14293] CHIP:IM: Received Read request - [1667208308.741369][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208308.741460][14293:14293] CHIP:DMG: { - [1667208308.741516][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208308.741582][14293:14293] CHIP:DMG: [ - [1667208308.741667][14293:14293] CHIP:DMG: AttributePathIB = - [1667208308.741840][14293:14293] CHIP:DMG: { - [1667208308.741921][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208308.742024][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208308.742187][14293:14293] CHIP:DMG: Attribute = 0x0000_0001, - [1667208308.742319][14293:14293] CHIP:DMG: } - [1667208308.742512][14293:14293] CHIP:DMG: - [1667208308.742609][14293:14293] CHIP:DMG: ], - [1667208308.742684][14293:14293] CHIP:DMG: - [1667208308.742830][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208308.742954][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208308.743093][14293:14293] CHIP:DMG: }, - [1667208308.743284][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208308.743587][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208308.743666][14293:14293] CHIP:DMG: Cluster 31, Attribute 1 is dirty - [1667208308.743746][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0001 (expanded=0) - [1667208308.743815][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208308.743892][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208308.745831][14293:14293] CHIP:DMG: Sending report (payload has 73 bytes)... - [1667208308.746713][14293:14293] CHIP:EM: <<< [E:43353r M:155711130 (Ack:201136820)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208308.746838][14293:14293] CHIP:IN: (S) Sending msg 155711130 on secure session with LSID: 36092 - [1667208308.747599][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:52150 | 155711130 | [Interaction Model (1) / Report Data (0x05) / Session = 40348 / Exchange = 43353] - [1667208308.747711][14293:14293] CHIP:DMG: Header Flags = - [1667208308.747768][14293:14293] CHIP:DMG: { - [1667208308.747856][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208308.747913][14293:14293] CHIP:DMG: { - [1667208308.747974][14293:14293] CHIP:DMG: AckMsg = 201136820 - [1667208308.748053][14293:14293] CHIP:DMG: NeedsAck = true - [1667208308.748108][14293:14293] CHIP:DMG: } - [1667208308.748180][14293:14293] CHIP:DMG: } - [1667208308.748264][14293:14293] CHIP:DMG: - [1667208308.748333][14293:14293] CHIP:DMG: Encrypted Payload (107 bytes) = - [1667208308.748389][14293:14293] CHIP:DMG: { - [1667208308.748465][14293:14293] CHIP:DMG: data = 009c9d009af64709fd692537184757531ff033e57fff8702ca85430f673c4c8802c45aefde3185456e10531518fbd5f20b65eb97c3e838cb25b721f6f888c8193a57321ca2a250076c3193de634943ed81438452b3634c9eaad965089bb493bbf863758b04303f072253e7 - [1667208308.748528][14293:14293] CHIP:DMG: buffer_ptr = 187650247918064 - [1667208308.748580][14293:14293] CHIP:DMG: } - [1667208308.748659][14293:14293] CHIP:DMG: - [1667208308.748734][14293:14293] CHIP:DMG: Decrypted Payload (73 bytes) = - [1667208308.748790][14293:14293] CHIP:DMG: { - [1667208308.748868][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240401183602181818153501260083a6a0843701240200240331240401340518350230000465746830290118181818290424ff0118 - [1667208308.748924][14293:14293] CHIP:DMG: } - [1667208308.748976][14293:14293] CHIP:DMG: - [1667208308.749223][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208308.749291][14293:14293] CHIP:DMG: { - [1667208308.749345][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208308.749440][14293:14293] CHIP:DMG: [ - [1667208308.749526][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208308.749608][14293:14293] CHIP:DMG: { - [1667208308.749695][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208308.749785][14293:14293] CHIP:DMG: { - [1667208308.749889][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208308.749979][14293:14293] CHIP:DMG: AttributePathIB = - [1667208308.750094][14293:14293] CHIP:DMG: { - [1667208308.750191][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208308.750316][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208308.750437][14293:14293] CHIP:DMG: Attribute = 0x0000_0001, - [1667208308.750555][14293:14293] CHIP:DMG: } - [1667208308.750682][14293:14293] CHIP:DMG: - [1667208308.750770][14293:14293] CHIP:DMG: Data = [ - [1667208308.750884][14293:14293] CHIP:DMG: - [1667208308.750982][14293:14293] CHIP:DMG: ], - [1667208308.751090][14293:14293] CHIP:DMG: }, - [1667208308.751200][14293:14293] CHIP:DMG: - [1667208308.751275][14293:14293] CHIP:DMG: }, - [1667208308.751401][14293:14293] CHIP:DMG: - [1667208308.751471][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208308.751584][14293:14293] CHIP:DMG: { - [1667208308.751666][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208308.751765][14293:14293] CHIP:DMG: { - [1667208308.751856][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208308.751962][14293:14293] CHIP:DMG: AttributePathIB = - [1667208308.752053][14293:14293] CHIP:DMG: { - [1667208308.752159][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208308.752264][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208308.752376][14293:14293] CHIP:DMG: Attribute = 0x0000_0001, - [1667208308.752493][14293:14293] CHIP:DMG: ListIndex = Null, - [1667208308.752596][14293:14293] CHIP:DMG: } - [1667208308.752712][14293:14293] CHIP:DMG: - [1667208308.752794][14293:14293] CHIP:DMG: Data = - [1667208308.752909][14293:14293] CHIP:DMG: { - [1667208308.752998][14293:14293] CHIP:DMG: 0x0 = [ - [1667208308.753108][14293:14293] CHIP:DMG: 0x65, 0x74, 0x68, 0x30, - [1667208308.753240][14293:14293] CHIP:DMG: ] (4 bytes) - [1667208308.753335][14293:14293] CHIP:DMG: 0x1 = true, - [1667208308.753456][14293:14293] CHIP:DMG: }, - [1667208308.753544][14293:14293] CHIP:DMG: }, - [1667208308.753658][14293:14293] CHIP:DMG: - disabled: true - - - label: "Step 3: DUT reads ScanMaxTimeSeconds attribute from the TH" - PICS: CNET.C.A0002 - verification: | - ./chip-tool networkcommissioning read scan-max-time-seconds 1 0 --trace_decode 1 - - Verify ScanMaxTimeSeconds attribute response on TH(all-clusters-app) log: - - [1667208358.868821][14293:14293] CHIP:EM: Handling via exchange: 17173r, Delegate: 0xaaaaaff382d8 - [1667208358.868931][14293:14293] CHIP:IM: Received Read request - [1667208358.869170][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208358.869237][14293:14293] CHIP:DMG: { - [1667208358.869291][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208358.869370][14293:14293] CHIP:DMG: [ - [1667208358.869433][14293:14293] CHIP:DMG: AttributePathIB = - [1667208358.869511][14293:14293] CHIP:DMG: { - [1667208358.869593][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208358.869686][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208358.869775][14293:14293] CHIP:DMG: Attribute = 0x0000_0002, - [1667208358.869850][14293:14293] CHIP:DMG: } - [1667208358.869926][14293:14293] CHIP:DMG: - [1667208358.870064][14293:14293] CHIP:DMG: ], - [1667208358.870143][14293:14293] CHIP:DMG: - [1667208358.870210][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208358.870343][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208358.870407][14293:14293] CHIP:DMG: }, - [1667208358.870595][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208358.870832][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208358.870903][14293:14293] CHIP:DMG: Cluster 31, Attribute 2 is dirty - [1667208358.870958][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0002 (expanded=0) - [1667208358.871103][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=v - [1667208358.871189][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208358.871303][14293:14293] CHIP:DMG: Sending report (payload has 36 bytes)... - [1667208358.871854][14293:14293] CHIP:EM: <<< [E:17173r M:175083412 (Ack:257131767)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208358.871956][14293:14293] CHIP:IN: (S) Sending msg 175083412 on secure session with LSID: 36093 - [1667208358.872780][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:41082 | 175083412 | [Interaction Model (1) / Report Data (0x05) / Session = 43326 / Exchange = 17173] - [1667208358.873041][14293:14293] CHIP:DMG: Header Flags = - [1667208358.873159][14293:14293] CHIP:DMG: { - [1667208358.873252][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208358.873310][14293:14293] CHIP:DMG: { - [1667208358.873369][14293:14293] CHIP:DMG: AckMsg = 257131767 - [1667208358.873425][14293:14293] CHIP:DMG: NeedsAck = true - [1667208358.873478][14293:14293] CHIP:DMG: } - [1667208358.873550][14293:14293] CHIP:DMG: } - [1667208358.873605][14293:14293] CHIP:DMG: - [1667208358.873672][14293:14293] CHIP:DMG: Encrypted Payload (70 bytes) = - [1667208358.873727][14293:14293] CHIP:DMG: { - [1667208358.873781][14293:14293] CHIP:DMG: data = 003ea900948f6f0a64576cb350999ca4bfe0f2c004599f0e32405a5fb661b2d77968c18d24e8ca5bed619834ff7141e03479eb4aa7dfeeb71e0ac45551af4e607392c200306a - [1667208358.873849][14293:14293] CHIP:DMG: buffer_ptr = 187650247916560 - [1667208358.873902][14293:14293] CHIP:DMG: } - [1667208358.873954][14293:14293] CHIP:DMG: - [1667208358.874026][14293:14293] CHIP:DMG: Decrypted Payload (36 bytes) = - [1667208358.874082][14293:14293] CHIP:DMG: { - [1667208358.874195][14293:14293] CHIP:DMG: data = 153601153501260083a6a084370124020024033124040218240200181818290424ff0118 - [1667208358.874255][14293:14293] CHIP:DMG: } - [1667208358.874306][14293:14293] CHIP:DMG: - [1667208358.874455][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208358.874660][14293:14293] CHIP:DMG: { - [1667208358.874714][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208358.874846][14293:14293] CHIP:DMG: [ - [1667208358.874910][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208358.874997][14293:14293] CHIP:DMG: { - [1667208358.875069][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208358.875156][14293:14293] CHIP:DMG: { - [1667208358.875392][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208358.875546][14293:14293] CHIP:DMG: AttributePathIB = - [1667208358.875633][14293:14293] CHIP:DMG: { - [1667208358.875728][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208358.875827][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208358.875926][14293:14293] CHIP:DMG: Attribute = 0x0000_0002, - [1667208358.876076][14293:14293] CHIP:DMG: } - [1667208358.876180][14293:14293] CHIP:DMG: - [1667208358.876270][14293:14293] CHIP:DMG: Data = 10, - [1667208358.876349][14293:14293] CHIP:DMG: }, - [1667208358.876442][14293:14293] CHIP:DMG: - [1667208358.876513][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 4: DUT reads ConnectMaxTimeSeconds attribute from the TH" - PICS: CNET.C.A0003 - verification: | - ./chip-tool networkcommissioning read connect-max-time-seconds 1 0 --trace_decode 1 - - Verify ConnectMaxTimeSeconds attribute response on TH(all-clusters-app) log: - - [1667208410.708719][14293:14293] CHIP:EM: Handling via exchange: 52668r, Delegate: 0xaaaaaff382d8 - [1667208410.708835][14293:14293] CHIP:IM: Received Read request - [1667208410.709030][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208410.709096][14293:14293] CHIP:DMG: { - [1667208410.709174][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208410.709242][14293:14293] CHIP:DMG: [ - [1667208410.709303][14293:14293] CHIP:DMG: AttributePathIB = - [1667208410.709385][14293:14293] CHIP:DMG: { - [1667208410.709484][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208410.709575][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208410.709676][14293:14293] CHIP:DMG: Attribute = 0x0000_0003, - [1667208410.709759][14293:14293] CHIP:DMG: } - [1667208410.709856][14293:14293] CHIP:DMG: - [1667208410.709927][14293:14293] CHIP:DMG: ], - [1667208410.710019][14293:14293] CHIP:DMG: - [1667208410.710087][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208410.710152][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208410.710232][14293:14293] CHIP:DMG: }, - [1667208410.710419][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208410.710816][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208410.710911][14293:14293] CHIP:DMG: Cluster 31, Attribute 3 is dirty - [1667208410.710967][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0003 (expanded=0) - [1667208410.711033][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=v - [1667208410.711109][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208410.711245][14293:14293] CHIP:DMG: Sending report (payload has 36 bytes)... - [1667208410.711825][14293:14293] CHIP:EM: <<< [E:52668r M:204757753 (Ack:51978211)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208410.711925][14293:14293] CHIP:IN: (S) Sending msg 204757753 on secure session with LSID: 36094 - [1667208410.712576][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:48829 | 204757753 | [Interaction Model (1) / Report Data (0x05) / Session = 43814 / Exchange = 52668] - [1667208410.712671][14293:14293] CHIP:DMG: Header Flags = - [1667208410.712728][14293:14293] CHIP:DMG: { - [1667208410.712812][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208410.712868][14293:14293] CHIP:DMG: { - [1667208410.712927][14293:14293] CHIP:DMG: AckMsg = 51978211 - [1667208410.712982][14293:14293] CHIP:DMG: NeedsAck = true - [1667208410.713035][14293:14293] CHIP:DMG: } - [1667208410.713106][14293:14293] CHIP:DMG: } - [1667208410.713160][14293:14293] CHIP:DMG: - [1667208410.713219][14293:14293] CHIP:DMG: Encrypted Payload (70 bytes) = - [1667208410.713266][14293:14293] CHIP:DMG: { - [1667208410.713337][14293:14293] CHIP:DMG: data = 0026ab00f95a340cdd7df02341572cbef90c9a4badc623b39e13ff0fe25d3e7649550df3a5deca3b8dbb139bd27f8ee1e519d7659c3e00f890959a903cd9c9672a1cb799e59c - [1667208410.713389][14293:14293] CHIP:DMG: buffer_ptr = 187650247919616 - [1667208410.713446][14293:14293] CHIP:DMG: } - [1667208410.713498][14293:14293] CHIP:DMG: - [1667208410.713573][14293:14293] CHIP:DMG: Decrypted Payload (36 bytes) = - [1667208410.713657][14293:14293] CHIP:DMG: { - [1667208410.713713][14293:14293] CHIP:DMG: data = 153601153501260083a6a084370124020024033124040318240200181818290424ff0118 - [1667208410.713768][14293:14293] CHIP:DMG: } - [1667208410.713819][14293:14293] CHIP:DMG: - [1667208410.713984][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208410.714078][14293:14293] CHIP:DMG: { - [1667208410.714133][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208410.714239][14293:14293] CHIP:DMG: [ - [1667208410.714303][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208410.714389][14293:14293] CHIP:DMG: { - [1667208410.714533][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208410.714625][14293:14293] CHIP:DMG: { - [1667208410.714735][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208410.714825][14293:14293] CHIP:DMG: AttributePathIB = - [1667208410.714928][14293:14293] CHIP:DMG: { - [1667208410.715023][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208410.715144][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208410.715262][14293:14293] CHIP:DMG: Attribute = 0x0000_0003, - [1667208410.715349][14293:14293] CHIP:DMG: } - [1667208410.715460][14293:14293] CHIP:DMG: - [1667208410.715558][14293:14293] CHIP:DMG: Data = 20, - [1667208410.715820][14293:14293] CHIP:DMG: }, - [1667208410.715914][14293:14293] CHIP:DMG: - [1667208410.715987][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 5: DUT reads InterfaceEnabled attribute from the TH" - PICS: CNET.C.A0004 - verification: | - ./chip-tool networkcommissioning read interface-enabled 1 0 --trace_decode 1 - - Verify InterfaceEnabled attribute response on TH(all-clusters-app) log: - - [1667208443.008116][14293:14293] CHIP:EM: Handling via exchange: 58556r, Delegate: 0xaaaaaff382d8 - [1667208443.008243][14293:14293] CHIP:IM: Received Read request - [1667208443.008440][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208443.008508][14293:14293] CHIP:DMG: { - [1667208443.008563][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208443.008628][14293:14293] CHIP:DMG: [ - [1667208443.008713][14293:14293] CHIP:DMG: AttributePathIB = - [1667208443.008809][14293:14293] CHIP:DMG: { - [1667208443.008883][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208443.008967][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208443.009074][14293:14293] CHIP:DMG: Attribute = 0x0000_0004, - [1667208443.009158][14293:14293] CHIP:DMG: } - [1667208443.009256][14293:14293] CHIP:DMG: - [1667208443.009328][14293:14293] CHIP:DMG: ], - [1667208443.009421][14293:14293] CHIP:DMG: - [1667208443.009491][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208443.009567][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208443.009650][14293:14293] CHIP:DMG: }, - [1667208443.009833][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208443.010086][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208443.010157][14293:14293] CHIP:DMG: Cluster 31, Attribute 4 is dirty - [1667208443.010235][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0004 (expanded=0) - [1667208443.010305][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=v - [1667208443.010382][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208443.010532][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208443.011166][14293:14293] CHIP:EM: <<< [E:58556r M:187682312 (Ack:202477555)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208443.011267][14293:14293] CHIP:IN: (S) Sending msg 187682312 on secure session with LSID: 36095 - [1667208443.011979][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:55431 | 187682312 | [Interaction Model (1) / Report Data (0x05) / Session = 33043 / Exchange = 58556] - [1667208443.012078][14293:14293] CHIP:DMG: Header Flags = - [1667208443.012135][14293:14293] CHIP:DMG: { - [1667208443.012221][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208443.012277][14293:14293] CHIP:DMG: { - [1667208443.012337][14293:14293] CHIP:DMG: AckMsg = 202477555 - [1667208443.012417][14293:14293] CHIP:DMG: NeedsAck = true - [1667208443.012471][14293:14293] CHIP:DMG: } - [1667208443.012544][14293:14293] CHIP:DMG: } - [1667208443.012623][14293:14293] CHIP:DMG: - [1667208443.012689][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208443.012766][14293:14293] CHIP:DMG: { - [1667208443.012822][14293:14293] CHIP:DMG: data = 0013810008ce2f0b6a8e60eea7fcefa14510f7d1d921eac543f9f7fa8e2a5a6c200fe67232673f9d798999b6784b99d7eb3c84e98ff73a9cc013cd53663d1fd14135e4f579 - [1667208443.012880][14293:14293] CHIP:DMG: buffer_ptr = 187650247916304 - [1667208443.013136][14293:14293] CHIP:DMG: } - [1667208443.013195][14293:14293] CHIP:DMG: - [1667208443.013272][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208443.013353][14293:14293] CHIP:DMG: { - [1667208443.013410][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240404182902181818290424ff0118 - [1667208443.013465][14293:14293] CHIP:DMG: } - [1667208443.013517][14293:14293] CHIP:DMG: - [1667208443.013685][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208443.013773][14293:14293] CHIP:DMG: { - [1667208443.013828][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208443.013928][14293:14293] CHIP:DMG: [ - [1667208443.013993][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208443.014103][14293:14293] CHIP:DMG: { - [1667208443.014188][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208443.014297][14293:14293] CHIP:DMG: { - [1667208443.014391][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208443.014520][14293:14293] CHIP:DMG: AttributePathIB = - [1667208443.014612][14293:14293] CHIP:DMG: { - [1667208443.014723][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208443.014814][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208443.014930][14293:14293] CHIP:DMG: Attribute = 0x0000_0004, - [1667208443.015015][14293:14293] CHIP:DMG: } - [1667208443.015134][14293:14293] CHIP:DMG: - [1667208443.015245][14293:14293] CHIP:DMG: Data = true, - [1667208443.015327][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 6: DUT reads LastNetworkingStatus attribute from the TH" - PICS: CNET.C.A0005 - verification: | - ./chip-tool networkcommissioning read last-networking-status 1 0 --trace_decode 1 - - Verify LastNetworkingStatus attribute response on TH(all-clusters-app) log: - - [1667208469.154755][14293:14293] CHIP:EM: Handling via exchange: 45977r, Delegate: 0xaaaaaff382d8 - [1667208469.154875][14293:14293] CHIP:IM: Received Read request - [1667208469.155241][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208469.155315][14293:14293] CHIP:DMG: { - [1667208469.155395][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208469.155461][14293:14293] CHIP:DMG: [ - [1667208469.155514][14293:14293] CHIP:DMG: AttributePathIB = - [1667208469.155586][14293:14293] CHIP:DMG: { - [1667208469.155664][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208469.155777][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208469.155868][14293:14293] CHIP:DMG: Attribute = 0x0000_0005, - [1667208469.155968][14293:14293] CHIP:DMG: } - [1667208469.156047][14293:14293] CHIP:DMG: - [1667208469.156136][14293:14293] CHIP:DMG: ], - [1667208469.156210][14293:14293] CHIP:DMG: - [1667208469.156277][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208469.156361][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208469.156422][14293:14293] CHIP:DMG: }, - [1667208469.156602][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208469.156848][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208469.156943][14293:14293] CHIP:DMG: Cluster 31, Attribute 5 is dirty - [1667208469.156998][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0005 (expanded=0) - [1667208469.157065][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208469.157164][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208469.157295][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208469.157908][14293:14293] CHIP:EM: <<< [E:45977r M:124480128 (Ack:41106952)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208469.158007][14293:14293] CHIP:IN: (S) Sending msg 124480128 on secure session with LSID: 36096 - [1667208469.158760][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:42766 | 124480128 | [Interaction Model (1) / Report Data (0x05) / Session = 62096 / Exchange = 45977] - [1667208469.158858][14293:14293] CHIP:DMG: Header Flags = - [1667208469.158915][14293:14293] CHIP:DMG: { - [1667208469.158999][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208469.159055][14293:14293] CHIP:DMG: { - [1667208469.159113][14293:14293] CHIP:DMG: AckMsg = 41106952 - [1667208469.159200][14293:14293] CHIP:DMG: NeedsAck = true - [1667208469.159254][14293:14293] CHIP:DMG: } - [1667208469.159327][14293:14293] CHIP:DMG: } - [1667208469.159406][14293:14293] CHIP:DMG: - [1667208469.159475][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208469.159531][14293:14293] CHIP:DMG: { - [1667208469.159609][14293:14293] CHIP:DMG: data = 0090f200806a6b07d642bf93d4c8b77a7c81b3f962ba8e786850a3096e2e6ec88d07c84d2be0da74164ac245461957f335581afcfccced791c8558dc20ac7837f4c3e563ac - [1667208469.159668][14293:14293] CHIP:DMG: buffer_ptr = 187650247921216 - [1667208469.159721][14293:14293] CHIP:DMG: } - [1667208469.159796][14293:14293] CHIP:DMG: - [1667208469.159872][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208469.159951][14293:14293] CHIP:DMG: { - [1667208469.160007][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240405183402181818290424ff0118 - [1667208469.160063][14293:14293] CHIP:DMG: } - [1667208469.160136][14293:14293] CHIP:DMG: - [1667208469.160282][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208469.160369][14293:14293] CHIP:DMG: { - [1667208469.160423][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208469.160528][14293:14293] CHIP:DMG: [ - [1667208469.160593][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208469.160702][14293:14293] CHIP:DMG: { - [1667208469.160785][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208469.160900][14293:14293] CHIP:DMG: { - [1667208469.160994][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208469.161104][14293:14293] CHIP:DMG: AttributePathIB = - [1667208469.161196][14293:14293] CHIP:DMG: { - [1667208469.161310][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208469.161424][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208469.161517][14293:14293] CHIP:DMG: Attribute = 0x0000_0005, - [1667208469.161634][14293:14293] CHIP:DMG: } - [1667208469.161732][14293:14293] CHIP:DMG: - [1667208469.161834][14293:14293] CHIP:DMG: Data = 0, - [1667208469.161919][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 7: DUT reads LastNetworkID attribute from the TH" - PICS: CNET.C.A0006 - verification: | - ./chip-tool networkcommissioning read last-network-id 1 0 --trace_decode 1 - - Verify LastNetworkID attribute response on TH(all-clusters-app) log: - - [1667208560.669590][14293:14293] CHIP:EM: Handling via exchange: 8923r, Delegate: 0xaaaaaff382d8 - [1667208560.669685][14293:14293] CHIP:IM: Received Read request - [1667208560.669852][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208560.669918][14293:14293] CHIP:DMG: { - [1667208560.669971][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208560.670037][14293:14293] CHIP:DMG: [ - [1667208560.670098][14293:14293] CHIP:DMG: AttributePathIB = - [1667208560.670181][14293:14293] CHIP:DMG: { - [1667208560.670254][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208560.670337][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208560.670411][14293:14293] CHIP:DMG: Attribute = 0x0000_0006, - [1667208560.670531][14293:14293] CHIP:DMG: } - [1667208560.670600][14293:14293] CHIP:DMG: - [1667208560.670656][14293:14293] CHIP:DMG: ], - [1667208560.670717][14293:14293] CHIP:DMG: - [1667208560.670813][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208560.670879][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208560.670938][14293:14293] CHIP:DMG: }, - [1667208560.671124][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208560.671497][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208560.671571][14293:14293] CHIP:DMG: Cluster 31, Attribute 6 is dirty - [1667208560.671652][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0006 (expanded=0) - [1667208560.671721][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208560.671798][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208560.671909][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208560.672533][14293:14293] CHIP:EM: <<< [E:8923r M:15654191 (Ack:76394150)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208560.672634][14293:14293] CHIP:IN: (S) Sending msg 15654191 on secure session with LSID: 36097 - [1667208560.673339][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:58362 | 15654191 | [Interaction Model (1) / Report Data (0x05) / Session = 25183 / Exchange = 8923] - [1667208560.673436][14293:14293] CHIP:DMG: Header Flags = - [1667208560.673492][14293:14293] CHIP:DMG: { - [1667208560.673577][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208560.673633][14293:14293] CHIP:DMG: { - [1667208560.673692][14293:14293] CHIP:DMG: AckMsg = 76394150 - [1667208560.673772][14293:14293] CHIP:DMG: NeedsAck = true - [1667208560.673827][14293:14293] CHIP:DMG: } - [1667208560.673899][14293:14293] CHIP:DMG: } - [1667208560.673977][14293:14293] CHIP:DMG: - [1667208560.674046][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208560.674101][14293:14293] CHIP:DMG: { - [1667208560.674178][14293:14293] CHIP:DMG: data = 005f62002fddee00d80c8412f88ff071d10fe8c05870e885a47452243d3e90e359d9d7a0e44c456808561806f24b7814babb12c7762f1633bf6489e9baabe9ae6fd8c49efb - [1667208560.674237][14293:14293] CHIP:DMG: buffer_ptr = 187650247916272 - [1667208560.674290][14293:14293] CHIP:DMG: } - [1667208560.674369][14293:14293] CHIP:DMG: - [1667208560.674445][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208560.674546][14293:14293] CHIP:DMG: { - [1667208560.674622][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240406183402181818290424ff0118 - [1667208560.674679][14293:14293] CHIP:DMG: } - [1667208560.674730][14293:14293] CHIP:DMG: - [1686200885.068762][2221:2223] CHIP:DMG: ReportDataMessage = - [1686200885.068823][2221:2223] CHIP:DMG: { - [1686200885.068872][2221:2223] CHIP:DMG: AttributeReportIBs = - [1686200885.068944][2221:2223] CHIP:DMG: [ - [1686200885.069000][2221:2223] CHIP:DMG: AttributeReportIB = - [1686200885.069077][2221:2223] CHIP:DMG: { - [1686200885.069138][2221:2223] CHIP:DMG: AttributeDataIB = - [1686200885.069209][2221:2223] CHIP:DMG: { - [1686200885.069283][2221:2223] CHIP:DMG: DataVersion = 0xe8e1d5c0, - [1686200885.069354][2221:2223] CHIP:DMG: AttributePathIB = - [1686200885.069429][2221:2223] CHIP:DMG: { - [1686200885.069504][2221:2223] CHIP:DMG: Endpoint = 0x0, - [1686200885.069621][2221:2223] CHIP:DMG: Cluster = 0x31, - [1686200885.069710][2221:2223] CHIP:DMG: Attribute = 0x0000_0006, - [1686200885.069785][2221:2223] CHIP:DMG: } - [1686200885.069860][2221:2223] CHIP:DMG: - [1686200885.069933][2221:2223] CHIP:DMG: Data = [ - [1686200885.070011][2221:2223] CHIP:DMG: 0x47, 0x52, 0x4c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - [1686200885.070094][2221:2223] CHIP:DMG: ] (10 bytes) - [1686200885.070161][2221:2223] CHIP:DMG: }, - [1686200885.070236][2221:2223] CHIP:DMG: - [1686200885.070296][2221:2223] CHIP:DMG: }, - [1686200885.070369][2221:2223] CHIP:DMG: - [1686200885.070424][2221:2223] CHIP:DMG: ], - [1686200885.070494][2221:2223] CHIP:DMG: - [1686200885.070550][2221:2223] CHIP:DMG: SuppressResponse = true, - [1686200885.070608][2221:2223] CHIP:DMG: InteractionModelRevision = 1 - [1686200885.070662][2221:2223] CHIP:DMG: } - disabled: true - - - label: "Step 8: DUT reads LastConnectErrorValue attribute from the TH" - PICS: CNET.C.A0007 - verification: | - ./chip-tool networkcommissioning read last-connect-error-value 1 0 --trace_decode 1 - - Verify LastConnectErrorValue attribute response on TH(all-clusters-app) log: - - [1667208660.521154][14293:14293] CHIP:EM: Handling via exchange: 50685r, Delegate: 0xaaaaaff382d8 - [1667208660.521272][14293:14293] CHIP:IM: Received Read request - [1667208660.521464][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208660.521530][14293:14293] CHIP:DMG: { - [1667208660.521585][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208660.521649][14293:14293] CHIP:DMG: [ - [1667208660.521732][14293:14293] CHIP:DMG: AttributePathIB = - [1667208660.521810][14293:14293] CHIP:DMG: { - [1667208660.521889][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208660.522001][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208660.522112][14293:14293] CHIP:DMG: Attribute = 0x0000_0007, - [1667208660.522195][14293:14293] CHIP:DMG: } - [1667208660.522294][14293:14293] CHIP:DMG: - [1667208660.522366][14293:14293] CHIP:DMG: ], - [1667208660.522437][14293:14293] CHIP:DMG: - [1667208660.522624][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208660.522716][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208660.522777][14293:14293] CHIP:DMG: }, - [1667208660.522959][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208660.523199][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208660.523295][14293:14293] CHIP:DMG: Cluster 31, Attribute 7 is dirty - [1667208660.523354][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0007 (expanded=0) - [1667208660.523415][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208660.523490][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208660.523597][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208660.524201][14293:14293] CHIP:EM: <<< [E:50685r M:187408347 (Ack:256041164)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208660.524304][14293:14293] CHIP:IN: (S) Sending msg 187408347 on secure session with LSID: 36098 - [1667208660.525002][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:41724 | 187408347 | [Interaction Model (1) / Report Data (0x05) / Session = 11768 / Exchange = 50685] - [1667208660.525101][14293:14293] CHIP:DMG: Header Flags = - [1667208660.525159][14293:14293] CHIP:DMG: { - [1667208660.525244][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208660.525300][14293:14293] CHIP:DMG: { - [1667208660.525358][14293:14293] CHIP:DMG: AckMsg = 256041164 - [1667208660.525438][14293:14293] CHIP:DMG: NeedsAck = true - [1667208660.525493][14293:14293] CHIP:DMG: } - [1667208660.525567][14293:14293] CHIP:DMG: } - [1667208660.525646][14293:14293] CHIP:DMG: - [1667208660.525716][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208660.525771][14293:14293] CHIP:DMG: { - [1667208660.525851][14293:14293] CHIP:DMG: data = 00f82d00db9f2b0bfc92cc46b01644793468172d04b473e3be4af5b2ac225fbab6a8196d30b3b489100a7c4a3acb5939adce0594f1b13bb12e488a8a8d655958887b4f367c - [1667208660.525910][14293:14293] CHIP:DMG: buffer_ptr = 187650247916496 - [1667208660.525963][14293:14293] CHIP:DMG: } - [1667208660.526038][14293:14293] CHIP:DMG: - [1667208660.526115][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208660.526171][14293:14293] CHIP:DMG: { - [1667208660.526249][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240407183402181818290424ff0118 - [1667208660.526305][14293:14293] CHIP:DMG: } - [1667208660.526357][14293:14293] CHIP:DMG: - [1667208660.526570][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208660.526666][14293:14293] CHIP:DMG: { - [1667208660.526721][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208660.526820][14293:14293] CHIP:DMG: [ - [1667208660.526885][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208660.526972][14293:14293] CHIP:DMG: { - [1667208660.527061][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208660.527142][14293:14293] CHIP:DMG: { - [1667208660.527245][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208660.527329][14293:14293] CHIP:DMG: AttributePathIB = - [1667208660.527432][14293:14293] CHIP:DMG: { - [1667208660.527527][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208660.527633][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208660.527733][14293:14293] CHIP:DMG: Attribute = 0x0000_0007, - [1667208660.527840][14293:14293] CHIP:DMG: } - [1667208660.527951][14293:14293] CHIP:DMG: - [1667208660.528048][14293:14293] CHIP:DMG: Data = NULL - [1667208660.528152][14293:14293] CHIP:DMG: }, - [1667208660.528240][14293:14293] CHIP:DMG: - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml deleted file mode 100644 index 22453236dde1be..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml +++ /dev/null @@ -1,193 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 12.4.16. [TC-CNET-4.18] [Thread] Verification for attributes check - [DUT-Client] - -PICS: - - CNET.C.F01 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "Commission TH and DUT on Thread setup" - verification: | - - disabled: true - - - label: "Step 1: DUT reads the MaxNetworks attribute from the TH" - PICS: CNET.C.A0000 - verification: | - ./chip-tool networkcommissioning read max-networks 54 0 - - Verify MaxNetworks attribute response on TH(all-clusters-app) log: - - D: 7993601 [SC]Allocated SecureSession (0x20003680) - waiting for Sigma1 msg - D: 7993608 [EM]Retransmitting MessageCounter:53368032 on exchange 5643r Send Cnt 1 - I: 7993615 [IN]Sending unauthenticated msg 0x2000489c with MessageCounter:53368032 to 0x0000000000000000c - I: 7993630 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:231115534 on exchar - D: 7993640 [EM]Handling via exchange: 5644r, Delegate: 0x200070ec - D: 7993647 [IM]Received Read request - D: 7993651 [DMG]IM RH moving to [GeneratingReports] - D: 7993657 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 7993666 [DMG] Cluster 31, Attribute 0 is dirty - D: 7993671 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0000 (expanded=0) - D: 7993682 [DMG] Sending report (payload has 36 bytes)... - I: 7993688 [IN]Prepared secure message 0x200048b4 to 0x00000000000 - disabled: true - - - label: "Step 2: DUT reads the Networks attribute from the TH" - PICS: CNET.C.A0001 - verification: | - ./chip-tool networkcommissioning read networks 54 0 - - Verify Networks attribute response on TH(all-clusters-app) log: - - D: 8065181 [SC]Allocated SecureSession (0x20003738) - waiting for Sigma1 msg - D: 8065188 [EM]Retransmitting MessageCounter:53368036 on exchange 57159r Send Cnt 1 - I: 8065196 [IN]Sending unauthenticated msg 0x2000489c with MessageCounter:53368036 to 0x0000000000000000c - I: 8065213 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:15008713 on exchanr - D: 8065223 [EM]Handling via exchange: 57160r, Delegate: 0x200070ec - D: 8065229 [IM]Received Read request - D: 8065233 [DMG]IM RH moving to [GeneratingReports] - D: 8065240 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 8065248 [DMG] Cluster 31, Attribute 1 is dirty - D: 8065254 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0001 (expanded=0) - D: 8065265 [DMG] Sending report (payload has 77 bytes)... - disabled: true - - - label: "Step 3: DUT reads ScanMaxTimeSeconds attribute from the TH" - PICS: CNET.C.A0002 - verification: | - ./chip-tool networkcommissioning read scan-max-time-seconds 54 0 - - Verify ScanMaxTimeSeconds attribute response on TH(all-clusters-app) log: - - - D: 8108702 [SC]Allocated SecureSession (0x200037f0) - waiting for Sigma1 msg - I: 8108710 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:194637583 on exchar - D: 8108720 [EM]Handling via exchange: 42632r, Delegate: 0x200070ec - D: 8108726 [IM]Received Read request - D: 8108730 [DMG]IM RH moving to [GeneratingReports] - D: 8108735 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 8108743 [DMG] Cluster 31, Attribute 2 is dirty - D: 8108749 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0002 (expanded=0) - D: 8108758 [DMG] Sending report (payload has 36 bytes)... - disabled: true - - - label: "Step 4: DUT reads ConnectMaxTimeSeconds attribute from the TH" - PICS: CNET.C.A0003 - verification: | - ./chip-tool networkcommissioning read connect-max-time-seconds 54 0 - - Verify InterfaceEnabled attribute response on TH(all-clusters-app) log: - - D: 8145477 [SC]Allocated SecureSession (0x20002c70) - waiting for Sigma1 msg - I: 8145484 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:134704639 on exchar - D: 8145495 [EM]Handling via exchange: 57526r, Delegate: 0x200070ec - D: 8145502 [IM]Received Read request - D: 8145506 [DMG]IM RH moving to [GeneratingReports] - D: 8145511 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 8145520 [DMG] Cluster 31, Attribute 3 is dirty - D: 8145525 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0003 (expanded=0) - D: 8145534 [DMG] Sending report (payload has 36 bytes)... - disabled: true - - - label: "Step 5: DUT reads InterfaceEnabled attribute from the TH" - PICS: CNET.C.A0004 - verification: | - ./chip-tool networkcommissioning read interface-enabled 54 0 - - Verify InterfaceEnabled attribute response on TH(all-clusters-app) log: - - D: 8179717 [SC]Allocated SecureSession (0x20002de0) - waiting for Sigma1 msg - I: 8179725 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:158532673 on exchar - D: 8179735 [EM]Handling via exchange: 13106r, Delegate: 0x200070ec - D: 8179741 [IM]Received Read request - D: 8179745 [DMG]IM RH moving to [GeneratingReports] - D: 8179750 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 8179759 [DMG] Cluster 31, Attribute 4 is dirty - D: 8179764 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0004 (expanded=0) - D: 8179775 [DMG] Sending report (payload has 35 bytes)... - disabled: true - - - label: "Step 6: DUT reads LastNetworkingStatus attribute from the TH" - PICS: CNET.C.A0005 - verification: | - ./chip-tool networkcommissioning read last-networking-status 54 0 - - Verify LastNetworkingStatus attribute response on TH(all-clusters-app) log: - - D: 8428403 [SC]Allocated SecureSession (0x20002d28) - waiting for Sigma1 msg - I: 8428410 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:135181543 on exchar - D: 8428421 [EM]Handling via exchange: 29697r, Delegate: 0x200070ec - D: 8428427 [IM]Received Read request - D: 8428431 [DMG]IM RH moving to [GeneratingReports] - D: 8428435 [EM]Retransmitting MessageCounter:53368052 on exchange 29696r Send Cnt 1 - I: 8428443 [IN]Sending unauthenticated msg 0x2000489c with MessageCounter:53368052 to 0x0000000000000000c - D: 8428459 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 8428468 [DMG] Cluster 31, Attribute 5 is dirty - D: 8428473 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0005 (expanded=0) - D: 8428483 [DMG] Sending report (payload has 36 bytes)... - disabled: true - - - label: "Step 7: DUT reads LastNetworkID attribute from the TH" - PICS: CNET.C.A0006 - verification: | - ./chip-tool networkcommissioning read last-network-id 54 0 - - Verify LastNetworkID attribute response on TH(all-clusters-app) log: - - D: 8469179 [SC]Allocated SecureSession (0x20002e98) - waiting for Sigma1 msg - I: 8469187 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:91003604 on exchanr - D: 8469197 [EM]Handling via exchange: 63120r, Delegate: 0x200070ec - D: 8469203 [IM]Received Read request - D: 8469207 [DMG]IM RH moving to [GeneratingReports] - D: 8469212 [EM]Retransmitting MessageCounter:53368056 on exchange 63119r Send Cnt 1 - I: 8469219 [IN]Sending unauthenticated msg 0x2000489c with MessageCounter:53368056 to 0x0000000000000000c - D: 8469233 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 8469242 [DMG] Cluster 31, Attribute 6 is dirty - D: 8469248 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0006 (expanded=0) - D: 8469258 [DMG] Sending report (payload has 44 bytes)... - disabled: true - - - label: "Step 8: DUT reads LastConnectErrorValue attribute from the TH" - PICS: CNET.C.A0007 - verification: | - ./chip-tool networkcommissioning read last-connect-error-value 54 0 - - Verify LastConnectErrorValue attribute response on TH(all-clusters-app) log: - - D: 8729020 [SC]Allocated SecureSession (0x20002f50) - waiting for Sigma1 msg - I: 8729028 [EM]Received message of type 0x2 with protocolId (0, 1) and MessageCounter:249692114 on exchar - D: 8729038 [EM]Handling via exchange: 17068r, Delegate: 0x200070ec - D: 8729044 [IM]Received Read request - D: 8729048 [DMG]IM RH moving to [GeneratingReports] - D: 8729053 [EM]Retransmitting MessageCounter:53368060 on exchange 17067r Send Cnt 1 - I: 8729060 [IN]Sending unauthenticated msg 0x2000489c with MessageCounter:53368060 to 0x0000000000000000c - D: 8729074 [DMG]Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - D: 8729083 [DMG] Cluster 31, Attribute 7 is dirty - D: 8729089 [DMG]Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0007 (expanded=0) - D: 8729100 [DMG] Sending report (payload has 35 bytes)... - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml deleted file mode 100644 index fc77ec9f4b2e59..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml +++ /dev/null @@ -1,517 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 12.4.17. [TC-CNET-4.19] [Ethernet] Verification for attributes check - [DUT-Client] - -PICS: - - CNET.C.F02 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "Commission TH and DUT on Ethernet setup" - verification: | - - disabled: true - - - label: "Step 1: DUT reads the MaxNetworks attribute from the TH" - PICS: CNET.C.A0000 - verification: | - ./chip-tool networkcommissioning read max-networks 1 0 --trace_decode 1 - - Verify MaxNetworks attribute response on TH(all-clusters-app) log: - - [1667208272.085200][14293:14293] CHIP:EM: Handling via exchange: 31335r, Delegate: 0xaaaaaff382d8 - [1667208272.085299][14293:14293] CHIP:IM: Received Read request - [1667208272.085469][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208272.085536][14293:14293] CHIP:DMG: { - [1667208272.085591][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208272.085656][14293:14293] CHIP:DMG: [ - [1667208272.085717][14293:14293] CHIP:DMG: AttributePathIB = - [1667208272.085795][14293:14293] CHIP:DMG: { - [1667208272.085875][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208272.085965][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208272.086053][14293:14293] CHIP:DMG: Attribute = 0x0000_0000, - [1667208272.086129][14293:14293] CHIP:DMG: } - [1667208272.086305][14293:14293] CHIP:DMG: - [1667208272.086375][14293:14293] CHIP:DMG: ], - [1667208272.086446][14293:14293] CHIP:DMG: - [1667208272.086558][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208272.086623][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208272.086683][14293:14293] CHIP:DMG: }, - [1667208272.086838][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208272.087061][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208272.087133][14293:14293] CHIP:DMG: Cluster 31, Attribute 0 is dirty - [1667208272.087187][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0000 (expanded=0) - [1667208272.087411][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208272.087490][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208272.087693][14293:14293] CHIP:DMG: Sending report (payload has 36 bytes)... - [1667208272.088306][14293:14293] CHIP:EM: <<< [E:31335r M:207979142 (Ack:102020621)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208272.088408][14293:14293] CHIP:IN: (S) Sending msg 207979142 on secure session with LSID: 36091 - [1667208272.089216][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:51656 | 207979142 | [Interaction Model (1) / Report Data (0x05) / Session = 62189 / Exchange = 31335] - [1667208272.089312][14293:14293] CHIP:DMG: Header Flags = - [1667208272.089370][14293:14293] CHIP:DMG: { - [1667208272.089455][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208272.089511][14293:14293] CHIP:DMG: { - [1667208272.089571][14293:14293] CHIP:DMG: AckMsg = 102020621 - [1667208272.089698][14293:14293] CHIP:DMG: NeedsAck = true - [1667208272.089751][14293:14293] CHIP:DMG: } - [1667208272.089825][14293:14293] CHIP:DMG: } - [1667208272.089880][14293:14293] CHIP:DMG: - [1667208272.089947][14293:14293] CHIP:DMG: Encrypted Payload (70 bytes) = - [1667208272.090003][14293:14293] CHIP:DMG: { - [1667208272.090058][14293:14293] CHIP:DMG: data = 00edf2008682650ca88b35a87ab9790201216607af689478e5c56dad2629043281e44b91b4ac9e365e70b2ddd2a03df4d99b2f61bdd43e79d8cd1ebac7435b1d5f00ede22d15 - [1667208272.090116][14293:14293] CHIP:DMG: buffer_ptr = 187650247915488 - [1667208272.090169][14293:14293] CHIP:DMG: } - [1667208272.090220][14293:14293] CHIP:DMG: - [1667208272.090295][14293:14293] CHIP:DMG: Decrypted Payload (36 bytes) = - [1667208272.090351][14293:14293] CHIP:DMG: { - [1667208272.090405][14293:14293] CHIP:DMG: data = 153601153501260083a6a084370124020024033124040018240201181818290424ff0118 - [1667208272.090489][14293:14293] CHIP:DMG: } - [1667208272.090613][14293:14293] CHIP:DMG: - [1667208272.090767][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208272.090833][14293:14293] CHIP:DMG: { - [1667208272.090958][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208272.091047][14293:14293] CHIP:DMG: [ - [1667208272.091111][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208272.091200][14293:14293] CHIP:DMG: { - [1667208272.091274][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208272.091356][14293:14293] CHIP:DMG: { - [1667208272.091508][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208272.091585][14293:14293] CHIP:DMG: AttributePathIB = - [1667208272.091679][14293:14293] CHIP:DMG: { - [1667208272.091772][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208272.091871][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208272.091961][14293:14293] CHIP:DMG: Attribute = 0x0000_0000, - [1667208272.092109][14293:14293] CHIP:DMG: } - [1667208272.092212][14293:14293] CHIP:DMG: - [1667208272.092308][14293:14293] CHIP:DMG: Data = 1, - [1667208272.092394][14293:14293] CHIP:DMG: }, - [1667208272.092489][14293:14293] CHIP:DMG: - [1667208272.092558][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 2: DUT reads the Networks attribute from the TH" - PICS: CNET.C.A0001 - verification: | - ./chip-tool networkcommissioning read networks 1 0 --trace_decode 1 - - Verify Networks attribute response on TH(all-clusters-app) log: - - [1667208308.741069][14293:14293] CHIP:EM: Handling via exchange: 43353r, Delegate: 0xaaaaaff382d8 - [1667208308.741175][14293:14293] CHIP:IM: Received Read request - [1667208308.741369][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208308.741460][14293:14293] CHIP:DMG: { - [1667208308.741516][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208308.741582][14293:14293] CHIP:DMG: [ - [1667208308.741667][14293:14293] CHIP:DMG: AttributePathIB = - [1667208308.741840][14293:14293] CHIP:DMG: { - [1667208308.741921][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208308.742024][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208308.742187][14293:14293] CHIP:DMG: Attribute = 0x0000_0001, - [1667208308.742319][14293:14293] CHIP:DMG: } - [1667208308.742512][14293:14293] CHIP:DMG: - [1667208308.742609][14293:14293] CHIP:DMG: ], - [1667208308.742684][14293:14293] CHIP:DMG: - [1667208308.742830][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208308.742954][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208308.743093][14293:14293] CHIP:DMG: }, - [1667208308.743284][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208308.743587][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208308.743666][14293:14293] CHIP:DMG: Cluster 31, Attribute 1 is dirty - [1667208308.743746][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0001 (expanded=0) - [1667208308.743815][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208308.743892][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208308.745831][14293:14293] CHIP:DMG: Sending report (payload has 73 bytes)... - [1667208308.746713][14293:14293] CHIP:EM: <<< [E:43353r M:155711130 (Ack:201136820)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208308.746838][14293:14293] CHIP:IN: (S) Sending msg 155711130 on secure session with LSID: 36092 - [1667208308.747599][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:52150 | 155711130 | [Interaction Model (1) / Report Data (0x05) / Session = 40348 / Exchange = 43353] - [1667208308.747711][14293:14293] CHIP:DMG: Header Flags = - [1667208308.747768][14293:14293] CHIP:DMG: { - [1667208308.747856][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208308.747913][14293:14293] CHIP:DMG: { - [1667208308.747974][14293:14293] CHIP:DMG: AckMsg = 201136820 - [1667208308.748053][14293:14293] CHIP:DMG: NeedsAck = true - [1667208308.748108][14293:14293] CHIP:DMG: } - [1667208308.748180][14293:14293] CHIP:DMG: } - [1667208308.748264][14293:14293] CHIP:DMG: - [1667208308.748333][14293:14293] CHIP:DMG: Encrypted Payload (107 bytes) = - [1667208308.748389][14293:14293] CHIP:DMG: { - [1667208308.748465][14293:14293] CHIP:DMG: data = 009c9d009af64709fd692537184757531ff033e57fff8702ca85430f673c4c8802c45aefde3185456e10531518fbd5f20b65eb97c3e838cb25b721f6f888c8193a57321ca2a250076c3193de634943ed81438452b3634c9eaad965089bb493bbf863758b04303f072253e7 - [1667208308.748528][14293:14293] CHIP:DMG: buffer_ptr = 187650247918064 - [1667208308.748580][14293:14293] CHIP:DMG: } - [1667208308.748659][14293:14293] CHIP:DMG: - [1667208308.748734][14293:14293] CHIP:DMG: Decrypted Payload (73 bytes) = - [1667208308.748790][14293:14293] CHIP:DMG: { - [1667208308.748868][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240401183602181818153501260083a6a0843701240200240331240401340518350230000465746830290118181818290424ff0118 - [1667208308.748924][14293:14293] CHIP:DMG: } - [1667208308.748976][14293:14293] CHIP:DMG: - [1667208308.749223][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208308.749291][14293:14293] CHIP:DMG: { - [1667208308.749345][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208308.749440][14293:14293] CHIP:DMG: [ - [1667208308.749526][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208308.749608][14293:14293] CHIP:DMG: { - [1667208308.749695][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208308.749785][14293:14293] CHIP:DMG: { - [1667208308.749889][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208308.749979][14293:14293] CHIP:DMG: AttributePathIB = - [1667208308.750094][14293:14293] CHIP:DMG: { - [1667208308.750191][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208308.750316][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208308.750437][14293:14293] CHIP:DMG: Attribute = 0x0000_0001, - [1667208308.750555][14293:14293] CHIP:DMG: } - [1667208308.750682][14293:14293] CHIP:DMG: - [1667208308.750770][14293:14293] CHIP:DMG: Data = [ - [1667208308.750884][14293:14293] CHIP:DMG: - [1667208308.750982][14293:14293] CHIP:DMG: ], - [1667208308.751090][14293:14293] CHIP:DMG: }, - [1667208308.751200][14293:14293] CHIP:DMG: - [1667208308.751275][14293:14293] CHIP:DMG: }, - [1667208308.751401][14293:14293] CHIP:DMG: - [1667208308.751471][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208308.751584][14293:14293] CHIP:DMG: { - [1667208308.751666][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208308.751765][14293:14293] CHIP:DMG: { - [1667208308.751856][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208308.751962][14293:14293] CHIP:DMG: AttributePathIB = - [1667208308.752053][14293:14293] CHIP:DMG: { - [1667208308.752159][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208308.752264][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208308.752376][14293:14293] CHIP:DMG: Attribute = 0x0000_0001, - [1667208308.752493][14293:14293] CHIP:DMG: ListIndex = Null, - [1667208308.752596][14293:14293] CHIP:DMG: } - [1667208308.752712][14293:14293] CHIP:DMG: - [1667208308.752794][14293:14293] CHIP:DMG: Data = - [1667208308.752909][14293:14293] CHIP:DMG: { - [1667208308.752998][14293:14293] CHIP:DMG: 0x0 = [ - [1667208308.753108][14293:14293] CHIP:DMG: 0x65, 0x74, 0x68, 0x30, - [1667208308.753240][14293:14293] CHIP:DMG: ] (4 bytes) - [1667208308.753335][14293:14293] CHIP:DMG: 0x1 = true, - [1667208308.753456][14293:14293] CHIP:DMG: }, - [1667208308.753544][14293:14293] CHIP:DMG: }, - [1667208308.753658][14293:14293] CHIP:DMG: - disabled: true - - - label: "Step 3: DUT reads InterfaceEnabled attribute from the TH" - PICS: CNET.C.A0004 - verification: | - ./chip-tool networkcommissioning read interface-enabled 1 0 --trace_decode 1 - - Verify InterfaceEnabled attribute response on TH(all-clusters-app) log: - - [1667208443.008116][14293:14293] CHIP:EM: Handling via exchange: 58556r, Delegate: 0xaaaaaff382d8 - [1667208443.008243][14293:14293] CHIP:IM: Received Read request - [1667208443.008440][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208443.008508][14293:14293] CHIP:DMG: { - [1667208443.008563][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208443.008628][14293:14293] CHIP:DMG: [ - [1667208443.008713][14293:14293] CHIP:DMG: AttributePathIB = - [1667208443.008809][14293:14293] CHIP:DMG: { - [1667208443.008883][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208443.008967][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208443.009074][14293:14293] CHIP:DMG: Attribute = 0x0000_0004, - [1667208443.009158][14293:14293] CHIP:DMG: } - [1667208443.009256][14293:14293] CHIP:DMG: - [1667208443.009328][14293:14293] CHIP:DMG: ], - [1667208443.009421][14293:14293] CHIP:DMG: - [1667208443.009491][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208443.009567][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208443.009650][14293:14293] CHIP:DMG: }, - [1667208443.009833][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208443.010086][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208443.010157][14293:14293] CHIP:DMG: Cluster 31, Attribute 4 is dirty - [1667208443.010235][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0004 (expanded=0) - [1667208443.010305][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=v - [1667208443.010382][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208443.010532][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208443.011166][14293:14293] CHIP:EM: <<< [E:58556r M:187682312 (Ack:202477555)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208443.011267][14293:14293] CHIP:IN: (S) Sending msg 187682312 on secure session with LSID: 36095 - [1667208443.011979][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:55431 | 187682312 | [Interaction Model (1) / Report Data (0x05) / Session = 33043 / Exchange = 58556] - [1667208443.012078][14293:14293] CHIP:DMG: Header Flags = - [1667208443.012135][14293:14293] CHIP:DMG: { - [1667208443.012221][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208443.012277][14293:14293] CHIP:DMG: { - [1667208443.012337][14293:14293] CHIP:DMG: AckMsg = 202477555 - [1667208443.012417][14293:14293] CHIP:DMG: NeedsAck = true - [1667208443.012471][14293:14293] CHIP:DMG: } - [1667208443.012544][14293:14293] CHIP:DMG: } - [1667208443.012623][14293:14293] CHIP:DMG: - [1667208443.012689][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208443.012766][14293:14293] CHIP:DMG: { - [1667208443.012822][14293:14293] CHIP:DMG: data = 0013810008ce2f0b6a8e60eea7fcefa14510f7d1d921eac543f9f7fa8e2a5a6c200fe67232673f9d798999b6784b99d7eb3c84e98ff73a9cc013cd53663d1fd14135e4f579 - [1667208443.012880][14293:14293] CHIP:DMG: buffer_ptr = 187650247916304 - [1667208443.013136][14293:14293] CHIP:DMG: } - [1667208443.013195][14293:14293] CHIP:DMG: - [1667208443.013272][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208443.013353][14293:14293] CHIP:DMG: { - [1667208443.013410][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240404182902181818290424ff0118 - [1667208443.013465][14293:14293] CHIP:DMG: } - [1667208443.013517][14293:14293] CHIP:DMG: - [1667208443.013685][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208443.013773][14293:14293] CHIP:DMG: { - [1667208443.013828][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208443.013928][14293:14293] CHIP:DMG: [ - [1667208443.013993][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208443.014103][14293:14293] CHIP:DMG: { - [1667208443.014188][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208443.014297][14293:14293] CHIP:DMG: { - [1667208443.014391][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208443.014520][14293:14293] CHIP:DMG: AttributePathIB = - [1667208443.014612][14293:14293] CHIP:DMG: { - [1667208443.014723][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208443.014814][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208443.014930][14293:14293] CHIP:DMG: Attribute = 0x0000_0004, - [1667208443.015015][14293:14293] CHIP:DMG: } - [1667208443.015134][14293:14293] CHIP:DMG: - [1667208443.015245][14293:14293] CHIP:DMG: Data = true, - [1667208443.015327][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 4: DUT reads LastNetworkingStatus attribute from the TH" - PICS: CNET.C.A0005 - verification: | - ./chip-tool networkcommissioning read last-networking-status 1 0 --trace_decode 1 - - Verify LastNetworkingStatus attribute response on TH(all-clusters-app) log: - - [1667208469.154755][14293:14293] CHIP:EM: Handling via exchange: 45977r, Delegate: 0xaaaaaff382d8 - [1667208469.154875][14293:14293] CHIP:IM: Received Read request - [1667208469.155241][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208469.155315][14293:14293] CHIP:DMG: { - [1667208469.155395][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208469.155461][14293:14293] CHIP:DMG: [ - [1667208469.155514][14293:14293] CHIP:DMG: AttributePathIB = - [1667208469.155586][14293:14293] CHIP:DMG: { - [1667208469.155664][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208469.155777][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208469.155868][14293:14293] CHIP:DMG: Attribute = 0x0000_0005, - [1667208469.155968][14293:14293] CHIP:DMG: } - [1667208469.156047][14293:14293] CHIP:DMG: - [1667208469.156136][14293:14293] CHIP:DMG: ], - [1667208469.156210][14293:14293] CHIP:DMG: - [1667208469.156277][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208469.156361][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208469.156422][14293:14293] CHIP:DMG: }, - [1667208469.156602][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208469.156848][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208469.156943][14293:14293] CHIP:DMG: Cluster 31, Attribute 5 is dirty - [1667208469.156998][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0005 (expanded=0) - [1667208469.157065][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208469.157164][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208469.157295][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208469.157908][14293:14293] CHIP:EM: <<< [E:45977r M:124480128 (Ack:41106952)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208469.158007][14293:14293] CHIP:IN: (S) Sending msg 124480128 on secure session with LSID: 36096 - [1667208469.158760][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:42766 | 124480128 | [Interaction Model (1) / Report Data (0x05) / Session = 62096 / Exchange = 45977] - [1667208469.158858][14293:14293] CHIP:DMG: Header Flags = - [1667208469.158915][14293:14293] CHIP:DMG: { - [1667208469.158999][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208469.159055][14293:14293] CHIP:DMG: { - [1667208469.159113][14293:14293] CHIP:DMG: AckMsg = 41106952 - [1667208469.159200][14293:14293] CHIP:DMG: NeedsAck = true - [1667208469.159254][14293:14293] CHIP:DMG: } - [1667208469.159327][14293:14293] CHIP:DMG: } - [1667208469.159406][14293:14293] CHIP:DMG: - [1667208469.159475][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208469.159531][14293:14293] CHIP:DMG: { - [1667208469.159609][14293:14293] CHIP:DMG: data = 0090f200806a6b07d642bf93d4c8b77a7c81b3f962ba8e786850a3096e2e6ec88d07c84d2be0da74164ac245461957f335581afcfccced791c8558dc20ac7837f4c3e563ac - [1667208469.159668][14293:14293] CHIP:DMG: buffer_ptr = 187650247921216 - [1667208469.159721][14293:14293] CHIP:DMG: } - [1667208469.159796][14293:14293] CHIP:DMG: - [1667208469.159872][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208469.159951][14293:14293] CHIP:DMG: { - [1667208469.160007][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240405183402181818290424ff0118 - [1667208469.160063][14293:14293] CHIP:DMG: } - [1667208469.160136][14293:14293] CHIP:DMG: - [1667208469.160282][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208469.160369][14293:14293] CHIP:DMG: { - [1667208469.160423][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208469.160528][14293:14293] CHIP:DMG: [ - [1667208469.160593][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208469.160702][14293:14293] CHIP:DMG: { - [1667208469.160785][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208469.160900][14293:14293] CHIP:DMG: { - [1667208469.160994][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208469.161104][14293:14293] CHIP:DMG: AttributePathIB = - [1667208469.161196][14293:14293] CHIP:DMG: { - [1667208469.161310][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208469.161424][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208469.161517][14293:14293] CHIP:DMG: Attribute = 0x0000_0005, - [1667208469.161634][14293:14293] CHIP:DMG: } - [1667208469.161732][14293:14293] CHIP:DMG: - [1667208469.161834][14293:14293] CHIP:DMG: Data = NULL - [1667208469.161919][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 5: DUT reads LastNetworkID attribute from the TH" - PICS: CNET.C.A0006 - verification: | - ./chip-tool networkcommissioning read last-network-id 1 0 --trace_decode 1 - - Verify LastNetworkID attribute response from TH(all-clusters-app) log: - - [1667208560.669590][14293:14293] CHIP:EM: Handling via exchange: 8923r, Delegate: 0xaaaaaff382d8 - [1667208560.669685][14293:14293] CHIP:IM: Received Read request - [1667208560.669852][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208560.669918][14293:14293] CHIP:DMG: { - [1667208560.669971][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208560.670037][14293:14293] CHIP:DMG: [ - [1667208560.670098][14293:14293] CHIP:DMG: AttributePathIB = - [1667208560.670181][14293:14293] CHIP:DMG: { - [1667208560.670254][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208560.670337][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208560.670411][14293:14293] CHIP:DMG: Attribute = 0x0000_0006, - [1667208560.670531][14293:14293] CHIP:DMG: } - [1667208560.670600][14293:14293] CHIP:DMG: - [1667208560.670656][14293:14293] CHIP:DMG: ], - [1667208560.670717][14293:14293] CHIP:DMG: - [1667208560.670813][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208560.670879][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208560.670938][14293:14293] CHIP:DMG: }, - [1667208560.671124][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208560.671497][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208560.671571][14293:14293] CHIP:DMG: Cluster 31, Attribute 6 is dirty - [1667208560.671652][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0006 (expanded=0) - [1667208560.671721][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208560.671798][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208560.671909][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208560.672533][14293:14293] CHIP:EM: <<< [E:8923r M:15654191 (Ack:76394150)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208560.672634][14293:14293] CHIP:IN: (S) Sending msg 15654191 on secure session with LSID: 36097 - [1667208560.673339][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:58362 | 15654191 | [Interaction Model (1) / Report Data (0x05) / Session = 25183 / Exchange = 8923] - [1667208560.673436][14293:14293] CHIP:DMG: Header Flags = - [1667208560.673492][14293:14293] CHIP:DMG: { - [1667208560.673577][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208560.673633][14293:14293] CHIP:DMG: { - [1667208560.673692][14293:14293] CHIP:DMG: AckMsg = 76394150 - [1667208560.673772][14293:14293] CHIP:DMG: NeedsAck = true - [1667208560.673827][14293:14293] CHIP:DMG: } - [1667208560.673899][14293:14293] CHIP:DMG: } - [1667208560.673977][14293:14293] CHIP:DMG: - [1667208560.674046][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208560.674101][14293:14293] CHIP:DMG: { - [1667208560.674178][14293:14293] CHIP:DMG: data = 005f62002fddee00d80c8412f88ff071d10fe8c05870e885a47452243d3e90e359d9d7a0e44c456808561806f24b7814babb12c7762f1633bf6489e9baabe9ae6fd8c49efb - [1667208560.674237][14293:14293] CHIP:DMG: buffer_ptr = 187650247916272 - [1667208560.674290][14293:14293] CHIP:DMG: } - [1667208560.674369][14293:14293] CHIP:DMG: - [1667208560.674445][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208560.674546][14293:14293] CHIP:DMG: { - [1667208560.674622][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240406183402181818290424ff0118 - [1667208560.674679][14293:14293] CHIP:DMG: } - [1667208560.674730][14293:14293] CHIP:DMG: - [1667208560.674900][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208560.674967][14293:14293] CHIP:DMG: { - [1667208560.675021][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208560.675129][14293:14293] CHIP:DMG: [ - [1667208560.675193][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208560.675302][14293:14293] CHIP:DMG: { - [1667208560.675383][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208560.675488][14293:14293] CHIP:DMG: { - [1667208560.675595][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208560.675681][14293:14293] CHIP:DMG: AttributePathIB = - [1667208560.675788][14293:14293] CHIP:DMG: { - [1667208560.675884][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208560.676000][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208560.676102][14293:14293] CHIP:DMG: Attribute = 0x0000_0006, - [1667208560.676211][14293:14293] CHIP:DMG: } - [1667208560.676303][14293:14293] CHIP:DMG: - [1667208560.676413][14293:14293] CHIP:DMG: Data = NULL - [1667208560.676494][14293:14293] CHIP:DMG: }, - disabled: true - - - label: "Step 6: DUT reads LastConnectErrorValue attribute from the TH" - PICS: CNET.C.A0007 - verification: | - ./chip-tool networkcommissioning read last-connect-error-value 1 0 --trace_decode 1 - - Verify LastConnectErrorValue attribute response from on TH(all-clusters-app) log: - - [1667208660.521154][14293:14293] CHIP:EM: Handling via exchange: 50685r, Delegate: 0xaaaaaff382d8 - [1667208660.521272][14293:14293] CHIP:IM: Received Read request - [1667208660.521464][14293:14293] CHIP:DMG: ReadRequestMessage = - [1667208660.521530][14293:14293] CHIP:DMG: { - [1667208660.521585][14293:14293] CHIP:DMG: AttributePathIBs = - [1667208660.521649][14293:14293] CHIP:DMG: [ - [1667208660.521732][14293:14293] CHIP:DMG: AttributePathIB = - [1667208660.521810][14293:14293] CHIP:DMG: { - [1667208660.521889][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208660.522001][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208660.522112][14293:14293] CHIP:DMG: Attribute = 0x0000_0007, - [1667208660.522195][14293:14293] CHIP:DMG: } - [1667208660.522294][14293:14293] CHIP:DMG: - [1667208660.522366][14293:14293] CHIP:DMG: ], - [1667208660.522437][14293:14293] CHIP:DMG: - [1667208660.522624][14293:14293] CHIP:DMG: isFabricFiltered = true, - [1667208660.522716][14293:14293] CHIP:DMG: InteractionModelRevision = 1 - [1667208660.522777][14293:14293] CHIP:DMG: }, - [1667208660.522959][14293:14293] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667208660.523199][14293:14293] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667208660.523295][14293:14293] CHIP:DMG: Cluster 31, Attribute 7 is dirty - [1667208660.523354][14293:14293] CHIP:DMG: Reading attribute: Cluster=0x0000_0031 Endpoint=0 AttributeId=0x0000_0007 (expanded=0) - [1667208660.523415][14293:14293] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0031 e=0 p=a - [1667208660.523490][14293:14293] CHIP:DMG: AccessControl: allowed - [1667208660.523597][14293:14293] CHIP:DMG: Sending report (payload has 35 bytes)... - [1667208660.524201][14293:14293] CHIP:EM: <<< [E:50685r M:187408347 (Ack:256041164)] (S) Msg TX to 1:000000000001B669 [9A5A] --- Type 0001:05 (IM:ReportData) - [1667208660.524304][14293:14293] CHIP:IN: (S) Sending msg 187408347 on secure session with LSID: 36098 - [1667208660.525002][14293:14293] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:41724 | 187408347 | [Interaction Model (1) / Report Data (0x05) / Session = 11768 / Exchange = 50685] - [1667208660.525101][14293:14293] CHIP:DMG: Header Flags = - [1667208660.525159][14293:14293] CHIP:DMG: { - [1667208660.525244][14293:14293] CHIP:DMG: Exchange (0x06) = - [1667208660.525300][14293:14293] CHIP:DMG: { - [1667208660.525358][14293:14293] CHIP:DMG: AckMsg = 256041164 - [1667208660.525438][14293:14293] CHIP:DMG: NeedsAck = true - [1667208660.525493][14293:14293] CHIP:DMG: } - [1667208660.525567][14293:14293] CHIP:DMG: } - [1667208660.525646][14293:14293] CHIP:DMG: - [1667208660.525716][14293:14293] CHIP:DMG: Encrypted Payload (69 bytes) = - [1667208660.525771][14293:14293] CHIP:DMG: { - [1667208660.525851][14293:14293] CHIP:DMG: data = 00f82d00db9f2b0bfc92cc46b01644793468172d04b473e3be4af5b2ac225fbab6a8196d30b3b489100a7c4a3acb5939adce0594f1b13bb12e488a8a8d655958887b4f367c - [1667208660.525910][14293:14293] CHIP:DMG: buffer_ptr = 187650247916496 - [1667208660.525963][14293:14293] CHIP:DMG: } - [1667208660.526038][14293:14293] CHIP:DMG: - [1667208660.526115][14293:14293] CHIP:DMG: Decrypted Payload (35 bytes) = - [1667208660.526171][14293:14293] CHIP:DMG: { - [1667208660.526249][14293:14293] CHIP:DMG: data = 153601153501260083a6a0843701240200240331240407183402181818290424ff0118 - [1667208660.526305][14293:14293] CHIP:DMG: } - [1667208660.526357][14293:14293] CHIP:DMG: - [1667208660.526570][14293:14293] CHIP:DMG: ReportDataMessage = - [1667208660.526666][14293:14293] CHIP:DMG: { - [1667208660.526721][14293:14293] CHIP:DMG: AttributeReportIBs = - [1667208660.526820][14293:14293] CHIP:DMG: [ - [1667208660.526885][14293:14293] CHIP:DMG: AttributeReportIB = - [1667208660.526972][14293:14293] CHIP:DMG: { - [1667208660.527061][14293:14293] CHIP:DMG: AttributeDataIB = - [1667208660.527142][14293:14293] CHIP:DMG: { - [1667208660.527245][14293:14293] CHIP:DMG: DataVersion = 0x84a0a683, - [1667208660.527329][14293:14293] CHIP:DMG: AttributePathIB = - [1667208660.527432][14293:14293] CHIP:DMG: { - [1667208660.527527][14293:14293] CHIP:DMG: Endpoint = 0x0, - [1667208660.527633][14293:14293] CHIP:DMG: Cluster = 0x31, - [1667208660.527733][14293:14293] CHIP:DMG: Attribute = 0x0000_0007, - [1667208660.527840][14293:14293] CHIP:DMG: } - [1667208660.527951][14293:14293] CHIP:DMG: - [1667208660.528048][14293:14293] CHIP:DMG: Data = NULL - [1667208660.528152][14293:14293] CHIP:DMG: }, - [1667208660.528240][14293:14293] CHIP:DMG: - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml index ce0b858b614348..8a4565b3f310dd 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml @@ -302,9 +302,9 @@ tests: "Step 11: TH sends ArmFailSafe command to the DUT with ExpiryLengthSeconds set to 900" verification: | - ./chip-tool generalcommissioning arm-fail-safe 90 1 1 0 + ./chip-tool generalcommissioning arm-fail-safe 900 1 1 0 - Via the TH (chip-tool), Verify the DUT sends ArmFailSafe with timeout as 90 secs to the TH. + Via the TH (chip-tool), Verify the DUT sends ArmFailSafe with timeout as 900 secs to the TH. [1657288428.409103][2382:2388] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 [1657288428.409191][2382:2388] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_7.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_7.yaml index 34d6396a670121..a82b0a37f5682a 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_7.yaml @@ -38,9 +38,9 @@ tests: - Printed using a minimum font size of 6 points, typically producing a typeface height of 2.1 mm (6/72 inches) - - Include dashes between the groups of Manual Pairing Code digits (e.g. "MATTER 1234-5678-901") + - Include dashes between the groups of Manual Pairing Code digits with the following spacing: - - If the code is presented in audio format it SHOULD be read in groups of 4 digits, with the last group being only 3 or 1 digits depending on overall size. + - For 11 or 21-digit codes, the first row spacing is 4-3-4 (First Row: "1234-567-8901") - - If a Matter logo cannot be printed alongside the code then the code SHOULD be prefixed with MATTER (e.g. "MATTER 1234-5678-901") + - For 21-digit codes, the second row spacing is 4-3-2-1 (Second Row:"9876-543-21-0") disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml index 3923c8291cf4d8..2e469df84d7d10 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml @@ -33,7 +33,6 @@ tests: value: nodeId - label: "Step 2: Read the global attribute: ClusterRevision" - PICS: DESC.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -42,7 +41,6 @@ tests: type: int16u - label: "Step 3: Read the global attribute: FeatureMap" - PICS: DESC.S.Afffc command: "readAttribute" attribute: "FeatureMap" response: @@ -51,7 +49,7 @@ tests: type: bitmap32 - label: "Step 4a: Read the global attribute: AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && DESC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -61,7 +59,7 @@ tests: #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - label: "Step 4a: Read the global attribute: AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && DESC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -100,7 +98,7 @@ tests: [1676280023.477370][3892:3894] CHIP:TOO: [10]: 65533 cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && DESC.S.Afffb + PICS: PICS_USER_PROMPT arguments: values: - name: "message" @@ -125,7 +123,7 @@ tests: [1676366852.531334][9747:9749] CHIP:TOO: EventList: 0 entries cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && DESC.S.Afffa + PICS: PICS_USER_PROMPT arguments: values: - name: "message" @@ -152,7 +150,7 @@ tests: [1649425400.031430][3493:3498] CHIP:TOO: AcceptedCommandList: 0 entries cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && DESC.S.Afff9 + PICS: PICS_USER_PROMPT arguments: values: - name: "message" @@ -179,7 +177,7 @@ tests: [1649425614.162088][3509:3514] CHIP:TOO: GeneratedCommandList: 0 entries cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && DESC.S.Afff8 + PICS: PICS_USER_PROMPT arguments: values: - name: "message" diff --git a/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml index 3e725d334c4b05..04ffc88831b5d4 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml @@ -244,14 +244,7 @@ tests: disabled: true - label: "Step 5: TH reads from the DUT the 'TagList' attribute." + PICS: DESC.S.A0004 verification: | - Chip-tool has to implement the Taglist attribute - disabled: true - - - label: - "Step 6: The cluster tests applicable to each Device Type should be - executed to make sure all mandatory (and applicable optional) - attributes/commands are implemented." - verification: | - This step is redundant as during certification the appropriate tests are being run + SDK has to implement the Taglist attribute disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DESC_2_2_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DESC_2_2_Simulated.yaml deleted file mode 100644 index 6a5cc7c919395e..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DESC_2_2_Simulated.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 84.2.2. [TC-DESC-2.2] Descriptor Cluster Attributes [DUT-Client] - -PICS: - - DESC.C - -config: - nodeId: 0x12344321 - cluster: "Descriptor" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads DeviceTypeList from TH." - PICS: DESC.C.A0000 - wait: "readAttribute" - attribute: "DeviceTypeList" - - - label: "DUT reads ServerList from the TH" - PICS: DESC.C.A0001 - wait: "readAttribute" - attribute: "ServerList" - - - label: "DUT reads ClientList attribute from the TH" - PICS: DESC.C.A0002 - wait: "readAttribute" - attribute: "ClientList" - - - label: "DUT reads PartsList attribute from the TH" - PICS: DESC.C.A0003 - wait: "readAttribute" - attribute: "PartsList" - - - label: "DUT reads TagList from the TH" - PICS: PICS_USER_PROMPT - verification: | - Chip-tool has to implement the Taglist attribute - cluster: "LogCommands" - command: "UserPrompt" - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_DGETH_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DGETH_3_1_Simulated.yaml deleted file mode 100644 index d9d5df4e8e4c31..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGETH_3_1_Simulated.yaml +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 47.3.1. [TC-DGETH-3.1] Attributes [DUT as Client] - -PICS: - - DGETH.C - -config: - nodeId: 0x12344321 - cluster: "Ethernet Network Diagnostics" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: PHYRate" - PICS: DGETH.C.A0000 - wait: "readAttribute" - attribute: "PHYRate" - - - label: "Read attribute: FullDuplex" - PICS: DGETH.C.A0001 - wait: "readAttribute" - attribute: "FullDuplex" - - - label: "Read attribute: PacketRxCount" - PICS: DGETH.C.A0002 - wait: "readAttribute" - attribute: "PacketRxCount" - - - label: "Read attribute: PacketTxCount" - PICS: DGETH.C.A0003 - wait: "readAttribute" - attribute: "PacketTxCount" - - - label: "Read attribute: TxErrCount" - PICS: DGETH.C.A0004 - wait: "readAttribute" - attribute: "TxErrCount" - - - label: "Read attribute: CollisionCount" - PICS: DGETH.C.A0005 - wait: "readAttribute" - attribute: "CollisionCount" - - - label: "Read attribute: OverrunCount" - PICS: DGETH.C.A0006 - wait: "readAttribute" - attribute: "OverrunCount" - - - label: "Read attribute: CarrierDetect" - PICS: DGETH.C.A0007 - wait: "readAttribute" - attribute: "CarrierDetect" - - - label: "Read attribute: TimeSinceReset" - PICS: DGETH.C.A0008 - wait: "readAttribute" - attribute: "TimeSinceReset" diff --git a/src/app/tests/suites/certification/Test_TC_DGGEN_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DGGEN_3_1.yaml deleted file mode 100644 index 4d9de778ecbee0..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGGEN_3_1.yaml +++ /dev/null @@ -1,864 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 88.3.1. [TC-DGGEN-3.1] Attributes [DUT as Client] - -PICS: - - DGGEN.C - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "Step 1: Commission TH to DUT" - verification: | - execute the below mentioned command to put TH into a commissionable state in RPI platform, Pls use equivalent command on the respective platform - - step-1: create a file using touch command , something like touch mytest.txt - step-2: chmod 777 mytest.txt - step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt --trace_decode 1 - - - - Once TH reach the commissionable state pls send below mentioned command on DUT in RPI platform. Pls use equivalent command on the respective platform - ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 - Verify the commissioning completed with success on TH(chip-tool) from DUT - [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success - disabled: true - - - label: "Step 2: DUT reads NetworkInterfaces structure attribute from TH." - PICS: DGGEN.C.A0000 - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool generaldiagnostics read network-interfaces 1 0 - - On TH(all-clusters-app), Verify that The NetworkInterfaces attribute SHALL be a list of NetworkInterface structs, i.e The read data type( NetworkInterface struct) must match the value listed below - • Name(interface name) - • IsOperational (indicates the node is operational in the fabric) - • OffPremiseServicesReachableIPv4(Ability to reach off-premise services it uses by utilizing IPv4, if not NULL) - • OffPremiseServicesReachableIPv6(Ability to reach off-premise services it uses by utilizing IPv6, if not NULL) - • HardwareAddress(MAC-layer address for a 802.3 or IEEE 802.11-2020 network interface, or 802.15.4) - • IPv4Addresses and IPv6Addresses (a list of the unicast IPv6 addresses that are GUA and ULA) - • Type(Interface types). - - Below is the example log which is observed in the RPI platform : - - 06e45f010f19ff36051004c0a800641836061010fe80000000000000e65f01fffe0f19ff1824070218152c00026c6f290134023403300406000000000000360510047f000001183606101000000000000000000000000000000001182407001818181818290424ff0118 - [1686306559.824697][57013:57013] CHIP:DMG: } - [1686306559.824743][57013:57013] CHIP:DMG: - [1686306559.825340][57013:57013] CHIP:DMG: ReportDataMessage = - [1686306559.825522][57013:57013] CHIP:DMG: { - [1686306559.825576][57013:57013] CHIP:DMG: AttributeReportIBs = - [1686306559.825825][57013:57013] CHIP:DMG: [ - [1686306559.825887][57013:57013] CHIP:DMG: AttributeReportIB = - [1686306559.826121][57013:57013] CHIP:DMG: { - [1686306559.826183][57013:57013] CHIP:DMG: AttributeDataIB = - [1686306559.826249][57013:57013] CHIP:DMG: { - [1686306559.826324][57013:57013] CHIP:DMG: DataVersion = 0x280892f3, - [1686306559.826397][57013:57013] CHIP:DMG: AttributePathIB = - [1686306559.826472][57013:57013] CHIP:DMG: { - [1686306559.826549][57013:57013] CHIP:DMG: Endpoint = 0x0, - [1686306559.826631][57013:57013] CHIP:DMG: Cluster = 0x33, - [1686306559.826711][57013:57013] CHIP:DMG: Attribute = 0x0000_0000, - [1686306559.826788][57013:57013] CHIP:DMG: } - [1686306559.826867][57013:57013] CHIP:DMG: - [1686306559.826943][57013:57013] CHIP:DMG: Data = [ - [1686306559.827019][57013:57013] CHIP:DMG: - [1686306559.827100][57013:57013] CHIP:DMG: { - [1686306559.827190][57013:57013] CHIP:DMG: 0x0 = "veth272794b" (11 chars), - [1686306559.827279][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.827366][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.827452][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.827537][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.827623][57013:57013] CHIP:DMG: 0xa2, 0x2a, 0xce, 0x32, 0x00, 0x85, - [1686306559.827721][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.827804][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.827885][57013:57013] CHIP:DMG: - [1686306559.827973][57013:57013] CHIP:DMG: ], - [1686306559.828056][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.828141][57013:57013] CHIP:DMG: [ - [1686306559.828258][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x2a, 0xce, 0xff, 0xfe, 0x32, 0x00, 0x85, - [1686306559.828360][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.828451][57013:57013] CHIP:DMG: ], - [1686306559.828537][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.828622][57013:57013] CHIP:DMG: }, - [1686306559.828702][57013:57013] CHIP:DMG: { - [1686306559.828786][57013:57013] CHIP:DMG: 0x0 = "vethcfd3c36" (11 chars), - [1686306559.828875][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.828960][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.829041][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.829124][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.829209][57013:57013] CHIP:DMG: 0x2a, 0x59, 0xb8, 0x51, 0x27, 0xa9, - [1686306559.829303][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.829386][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.829467][57013:57013] CHIP:DMG: - [1686306559.829559][57013:57013] CHIP:DMG: ], - [1686306559.829642][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.829747][57013:57013] CHIP:DMG: [ - [1686306559.829856][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x59, 0xb8, 0xff, 0xfe, 0x51, 0x27, 0xa9, - [1686306559.829959][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.830047][57013:57013] CHIP:DMG: ], - [1686306559.830133][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.830217][57013:57013] CHIP:DMG: }, - [1686306559.830297][57013:57013] CHIP:DMG: { - [1686306559.830380][57013:57013] CHIP:DMG: 0x0 = "veth1237750" (11 chars), - [1686306559.830467][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.830554][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.830641][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.830724][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.830809][57013:57013] CHIP:DMG: 0x22, 0x0b, 0x8c, 0xe3, 0x7a, 0x60, - [1686306559.830902][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.830984][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.831066][57013:57013] CHIP:DMG: - [1686306559.831154][57013:57013] CHIP:DMG: ], - [1686306559.831236][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.831320][57013:57013] CHIP:DMG: [ - [1686306559.831430][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0b, 0x8c, 0xff, 0xfe, 0xe3, 0x7a, 0x60, - [1686306559.831532][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.831615][57013:57013] CHIP:DMG: ], - [1686306559.831701][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.831785][57013:57013] CHIP:DMG: }, - [1686306559.831865][57013:57013] CHIP:DMG: { - [1686306559.831949][57013:57013] CHIP:DMG: 0x0 = "veth9ebd7bf" (11 chars), - [1686306559.832037][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.832122][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.832208][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.832292][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.832378][57013:57013] CHIP:DMG: 0x26, 0xa7, 0x64, 0xaf, 0x5f, 0xfb, - [1686306559.832479][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.832562][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.832644][57013:57013] CHIP:DMG: - [1686306559.832733][57013:57013] CHIP:DMG: ], - [1686306559.832816][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.832900][57013:57013] CHIP:DMG: [ - [1686306559.833008][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0xa7, 0x64, 0xff, 0xfe, 0xaf, 0x5f, 0xfb, - [1686306559.833109][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.833198][57013:57013] CHIP:DMG: ], - [1686306559.833284][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.833367][57013:57013] CHIP:DMG: }, - [1686306559.833463][57013:57013] CHIP:DMG: { - [1686306559.833577][57013:57013] CHIP:DMG: 0x0 = "veth82c835f" (11 chars), - [1686306559.833673][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.834130][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.834229][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.834315][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.834399][57013:57013] CHIP:DMG: 0xf6, 0x3b, 0x4e, 0x45, 0xb5, 0xea, - [1686306559.834498][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.834583][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.834879][57013:57013] CHIP:DMG: - [1686306559.834980][57013:57013] CHIP:DMG: ], - [1686306559.835064][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.835148][57013:57013] CHIP:DMG: [ - [1686306559.835256][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x3b, 0x4e, 0xff, 0xfe, 0x45, 0xb5, 0xea, - [1686306559.835540][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.835638][57013:57013] CHIP:DMG: ], - [1686306559.835726][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.835813][57013:57013] CHIP:DMG: }, - [1686306559.835894][57013:57013] CHIP:DMG: { - [1686306559.835980][57013:57013] CHIP:DMG: 0x0 = "docker0" (7 chars), - [1686306559.836068][57013:57013] CHIP:DMG: 0x1 = false, - [1686306559.836154][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.836240][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.836323][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.836410][57013:57013] CHIP:DMG: 0x02, 0x42, 0x83, 0xd0, 0x85, 0xc7, - [1686306559.836515][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.836598][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.836683][57013:57013] CHIP:DMG: [ - [1686306559.836780][57013:57013] CHIP:DMG: 0xac, 0x11, 0x00, 0x01, - [1686306559.836880][57013:57013] CHIP:DMG: ] (4 bytes) - [1686306559.836974][57013:57013] CHIP:DMG: ], - [1686306559.837057][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.837141][57013:57013] CHIP:DMG: [ - [1686306559.837243][57013:57013] CHIP:DMG: - [1686306559.837348][57013:57013] CHIP:DMG: ] (0 bytes) - [1686306559.837438][57013:57013] CHIP:DMG: ], - [1686306559.837523][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.837609][57013:57013] CHIP:DMG: }, - [1686306559.837727][57013:57013] CHIP:DMG: { - [1686306559.837818][57013:57013] CHIP:DMG: 0x0 = "br-78aec9e78929" (15 chars), - [1686306559.837908][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.837994][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.838080][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.838164][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.838250][57013:57013] CHIP:DMG: 0x02, 0x42, 0xfc, 0xcb, 0x3f, 0xc9, - [1686306559.838339][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.838422][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.838508][57013:57013] CHIP:DMG: [ - [1686306559.838605][57013:57013] CHIP:DMG: 0xac, 0x13, 0x00, 0x01, - [1686306559.838699][57013:57013] CHIP:DMG: ] (4 bytes) - [1686306559.838794][57013:57013] CHIP:DMG: ], - [1686306559.838871][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.838956][57013:57013] CHIP:DMG: [ - [1686306559.839055][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xfc, 0xff, 0xfe, 0xcb, 0x3f, 0xc9, - [1686306559.839159][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.839254][57013:57013] CHIP:DMG: ], - [1686306559.839342][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.839426][57013:57013] CHIP:DMG: }, - [1686306559.839507][57013:57013] CHIP:DMG: { - [1686306559.839591][57013:57013] CHIP:DMG: 0x0 = "br-33eb65c97608" (15 chars), - [1686306559.839678][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.839759][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.839845][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.839923][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.840007][57013:57013] CHIP:DMG: 0x02, 0x42, 0x25, 0x3e, 0x90, 0xfe, - [1686306559.840097][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.840179][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.840263][57013:57013] CHIP:DMG: [ - [1686306559.840361][57013:57013] CHIP:DMG: 0xac, 0x12, 0x00, 0x01, - [1686306559.840455][57013:57013] CHIP:DMG: ] (4 bytes) - [1686306559.840546][57013:57013] CHIP:DMG: ], - [1686306559.840628][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.840713][57013:57013] CHIP:DMG: [ - [1686306559.840817][57013:57013] CHIP:DMG: 0xfd, 0x00, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - [1686306559.840922][57013:57013] CHIP:DMG: ] (16 bytes)[ - [1686306559.841023][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x25, 0xff, 0xfe, 0x3e, 0x90, 0xfe, - [1686306559.841126][57013:57013] CHIP:DMG: ] (16 bytes)[ - [1686306559.841234][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - [1686306559.841337][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.841432][57013:57013] CHIP:DMG: ], - [1686306559.841519][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.841604][57013:57013] CHIP:DMG: }, - [1686306559.841684][57013:57013] CHIP:DMG: { - [1686306559.841811][57013:57013] CHIP:DMG: 0x0 = "wlan0" (5 chars), - [1686306559.841900][57013:57013] CHIP:DMG: 0x1 = false, - [1686306559.841985][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.842072][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.842155][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.842241][57013:57013] CHIP:DMG: 0xe4, 0x5f, 0x01, 0x0f, 0x1a, 0x01, - [1686306559.842327][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.842408][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.842490][57013:57013] CHIP:DMG: - [1686306559.842579][57013:57013] CHIP:DMG: ], - [1686306559.842662][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.842743][57013:57013] CHIP:DMG: - [1686306559.842834][57013:57013] CHIP:DMG: ], - [1686306559.842922][57013:57013] CHIP:DMG: 0x7 = 1, - [1686306559.843006][57013:57013] CHIP:DMG: }, - [1686306559.843088][57013:57013] CHIP:DMG: { - [1686306559.843171][57013:57013] CHIP:DMG: 0x0 = "eth0" (4 chars), - [1686306559.843259][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.843346][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.843431][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.843516][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.843602][57013:57013] CHIP:DMG: 0xe4, 0x5f, 0x01, 0x0f, 0x19, 0xff, - [1686306559.843698][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.843775][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.843860][57013:57013] CHIP:DMG: [ - [1686306559.843950][57013:57013] CHIP:DMG: 0xc0, 0xa8, 0x00, 0x64, - [1686306559.844050][57013:57013] CHIP:DMG: ] (4 bytes) - [1686306559.844133][57013:57013] CHIP:DMG: ], - [1686306559.844215][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.844299][57013:57013] CHIP:DMG: [ - [1686306559.844407][57013:57013] CHIP:DMG: 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x5f, 0x01, 0xff, 0xfe, 0x0f, 0x19, 0xff, - [1686306559.844513][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.844603][57013:57013] CHIP:DMG: ], - [1686306559.844690][57013:57013] CHIP:DMG: 0x7 = 2, - [1686306559.844774][57013:57013] CHIP:DMG: }, - [1686306559.844854][57013:57013] CHIP:DMG: { - [1686306559.844938][57013:57013] CHIP:DMG: 0x0 = "lo" (2 chars), - [1686306559.845025][57013:57013] CHIP:DMG: 0x1 = true, - [1686306559.845112][57013:57013] CHIP:DMG: 0x2 = NULL - [1686306559.845197][57013:57013] CHIP:DMG: 0x3 = NULL - [1686306559.845281][57013:57013] CHIP:DMG: 0x4 = [ - [1686306559.845367][57013:57013] CHIP:DMG: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - [1686306559.845463][57013:57013] CHIP:DMG: ] (6 bytes) - [1686306559.845546][57013:57013] CHIP:DMG: 0x5 = [ - [1686306559.845632][57013:57013] CHIP:DMG: [ - [1686306559.845753][57013:57013] CHIP:DMG: 0x7f, 0x00, 0x00, 0x01, - [1686306559.845856][57013:57013] CHIP:DMG: ] (4 bytes) - [1686306559.845948][57013:57013] CHIP:DMG: ], - [1686306559.846031][57013:57013] CHIP:DMG: 0x6 = [ - [1686306559.846116][57013:57013] CHIP:DMG: [ - [1686306559.846226][57013:57013] CHIP:DMG: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - [1686306559.846331][57013:57013] CHIP:DMG: ] (16 bytes) - [1686306559.846419][57013:57013] CHIP:DMG: ], - [1686306559.846504][57013:57013] CHIP:DMG: 0x7 = 0, - [1686306559.846587][57013:57013] CHIP:DMG: }, - [1686306559.846667][57013:57013] CHIP:DMG: ], - [1686306559.846737][57013:57013] CHIP:DMG: }, - [1686306559.846960][57013:57013] CHIP:DMG: - [1686306559.847020][57013:57013] CHIP:DMG: }, - [1686306559.847234][57013:57013] CHIP:DMG: - [1686306559.847290][57013:57013] CHIP:DMG: ], - [1686306559.847502][57013:57013] CHIP:DMG: - [1686306559.847560][57013:57013] CHIP:DMG: SuppressResponse = true, - [1686306559.847619][57013:57013] CHIP:DMG: InteractionModelRevision = 1 - [1686306559.847674][57013:57013] CHIP:DMG: } - [1686306559.847727][57013:57013] CHIP:DMG: - [1686306559.848154][57013:57013] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686306559.848223][57013:57013] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - disabled: true - - - label: - "Step 3: DUT reads a RebootCount attribute value from TH. Then a TH - (node) gets rebooted more than 2 times." - PICS: DGGEN.C.A0001 - verification: | - ./chip-tool generaldiagnostics read reboot-count 1 0 - On TH(all-clusters-app), Verify that RebootCount attribute data type must be UINT16 - Below is the example log which is observed in the RPI platform : - - [1686307500.023849][57061:57061] CHIP:DMG: - [1686307500.023993][57061:57061] CHIP:DMG: ReportDataMessage = - [1686307500.024054][57061:57061] CHIP:DMG: { - [1686307500.024103][57061:57061] CHIP:DMG: AttributeReportIBs = - [1686307500.024175][57061:57061] CHIP:DMG: [ - [1686307500.024233][57061:57061] CHIP:DMG: AttributeReportIB = - [1686307500.024308][57061:57061] CHIP:DMG: { - [1686307500.024370][57061:57061] CHIP:DMG: AttributeDataIB = - [1686307500.024440][57061:57061] CHIP:DMG: { - [1686307500.024513][57061:57061] CHIP:DMG: DataVersion = 0x73550a54, - [1686307500.024586][57061:57061] CHIP:DMG: AttributePathIB = - [1686307500.024661][57061:57061] CHIP:DMG: { - [1686307500.024737][57061:57061] CHIP:DMG: Endpoint = 0x0, - [1686307500.024819][57061:57061] CHIP:DMG: Cluster = 0x33, - [1686307500.024899][57061:57061] CHIP:DMG: Attribute = 0x0000_0001, - [1686307500.024974][57061:57061] CHIP:DMG: } - [1686307500.025050][57061:57061] CHIP:DMG: - [1686307500.025129][57061:57061] CHIP:DMG: Data = 1, - [1686307500.025200][57061:57061] CHIP:DMG: }, - [1686307500.025279][57061:57061] CHIP:DMG: - [1686307500.025340][57061:57061] CHIP:DMG: }, - [1686307500.025411][57061:57061] CHIP:DMG: - [1686307500.025467][57061:57061] CHIP:DMG: ], - [1686307500.025539][57061:57061] CHIP:DMG: - [1686307500.025598][57061:57061] CHIP:DMG: SuppressResponse = true, - [1686307500.025658][57061:57061] CHIP:DMG: InteractionModelRevision = 1 - [1686307500.025745][57061:57061] CHIP:DMG: } - [1686307500.025800][57061:57061] CHIP:DMG: - [1686307500.026135][57061:57061] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307500.026203][57061:57061] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1686307500.026252][57061:57061] CHIP:DMG: IM RH moving to [AwaitingDestruction] - [1686307500.026313][57061:57061] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet - - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - - To reboot the TH(all-clusters-app) more than 2 times please follow the mentioned procedure and it's Only applicable on raspi, Pls use equivalent command to reboot on the respective DUT - - Kill DUT and launch again, without commission follow the next steps - - ./chip-tool generaldiagnostics read reboot-count 1 0 - The reboot-count count should match with the number of rebooted times - [1686307529.634007][57073:57073] CHIP:DMG: - [1686307529.634151][57073:57073] CHIP:DMG: ReportDataMessage = - [1686307529.634212][57073:57073] CHIP:DMG: { - [1686307529.634260][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686307529.634332][57073:57073] CHIP:DMG: [ - [1686307529.634390][57073:57073] CHIP:DMG: AttributeReportIB = - [1686307529.634465][57073:57073] CHIP:DMG: { - [1686307529.634527][57073:57073] CHIP:DMG: AttributeDataIB = - [1686307529.634596][57073:57073] CHIP:DMG: { - [1686307529.634669][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686307529.634737][57073:57073] CHIP:DMG: AttributePathIB = - [1686307529.634811][57073:57073] CHIP:DMG: { - [1686307529.634883][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686307529.634965][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686307529.635046][57073:57073] CHIP:DMG: Attribute = 0x0000_0001, - [1686307529.635118][57073:57073] CHIP:DMG: } - [1686307529.635195][57073:57073] CHIP:DMG: - [1686307529.635273][57073:57073] CHIP:DMG: Data = 3, - [1686307529.635342][57073:57073] CHIP:DMG: }, - [1686307529.635419][57073:57073] CHIP:DMG: - [1686307529.635479][57073:57073] CHIP:DMG: }, - [1686307529.635549][57073:57073] CHIP:DMG: - [1686307529.635605][57073:57073] CHIP:DMG: ], - [1686307529.635674][57073:57073] CHIP:DMG: - [1686307529.635732][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686307529.635792][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307529.635846][57073:57073] CHIP:DMG: } - [1686307529.635896][57073:57073] CHIP:DMG: - [1686307529.636229][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307529.636296][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1686307529.636346][57073:57073] CHIP:DMG: IM RH moving to [AwaitingDestruction] - [1686307529.636411][57073:57073] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet - disabled: true - - - label: - "Step 4: TH reboots and DUT reads a UpTime attribute value of TH since - some arbitrary start time of TH rebooting." - PICS: DGGEN.C.A0002 - verification: | - This is optional attribute implemented in RPI so its not compulsory to get the expected outcome - - ./chip-tool generaldiagnostics read up-time 1 0 - - On TH(all-clusters-app), Verify that UpTime attribute data type must be UINT64 and the time duratoin should be represented in seconds since TH (node) has been rebooted. - Below is the example log which is observed in the RPI platform : - - [1686307643.700814][57073:57073] CHIP:DMG: - [1686307643.700956][57073:57073] CHIP:DMG: ReportDataMessage = - [1686307643.701016][57073:57073] CHIP:DMG: { - [1686307643.701064][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686307643.701136][57073:57073] CHIP:DMG: [ - [1686307643.701193][57073:57073] CHIP:DMG: AttributeReportIB = - [1686307643.701267][57073:57073] CHIP:DMG: { - [1686307643.701329][57073:57073] CHIP:DMG: AttributeDataIB = - [1686307643.701397][57073:57073] CHIP:DMG: { - [1686307643.701467][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686307643.701538][57073:57073] CHIP:DMG: AttributePathIB = - [1686307643.701611][57073:57073] CHIP:DMG: { - [1686307643.701719][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686307643.701822][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686307643.701902][57073:57073] CHIP:DMG: Attribute = 0x0000_0002, - [1686307643.701979][57073:57073] CHIP:DMG: } - [1686307643.702056][57073:57073] CHIP:DMG: - [1686307643.702135][57073:57073] CHIP:DMG: Data = 118, - [1686307643.702205][57073:57073] CHIP:DMG: }, - [1686307643.702287][57073:57073] CHIP:DMG: - [1686307643.702346][57073:57073] CHIP:DMG: }, - [1686307643.702415][57073:57073] CHIP:DMG: - [1686307643.702470][57073:57073] CHIP:DMG: ], - [1686307643.702539][57073:57073] CHIP:DMG: - [1686307643.702596][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686307643.702654][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307643.702707][57073:57073] CHIP:DMG: } - [1686307643.702756][57073:57073] CHIP:DMG: - [1686307643.703091][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307643.703157][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1686307643.703207][57073:57073] CHIP:DMG: IM RH moving to [AwaitingDestruction] - [1686307643.703273][57073:57073] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet - disabled: true - - - label: - "Step 5: DUT reads a TotalOperationalHours attribute value from TH." - PICS: DGGEN.C.A0003 - verification: | - This is optional attribute implemented in RPI so its not compulsory to get the expected outcome - - ./chip-tool generaldiagnostics read total-operational-hours 1 0 - - On TH(all-clusters-app), Verify that TotalOperationalHours attribute data type must be UINT32 and the value indicates the number of hours the node has been operational since TH (node) has been rebooted, - - Below is the example log which is observed in the RPI platform : - - [1686307701.675949][57073:57073] CHIP:DMG: - [1686307701.676094][57073:57073] CHIP:DMG: ReportDataMessage = - [1686307701.676154][57073:57073] CHIP:DMG: { - [1686307701.676202][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686307701.676273][57073:57073] CHIP:DMG: [ - [1686307701.676331][57073:57073] CHIP:DMG: AttributeReportIB = - [1686307701.676405][57073:57073] CHIP:DMG: { - [1686307701.676466][57073:57073] CHIP:DMG: AttributeDataIB = - [1686307701.676534][57073:57073] CHIP:DMG: { - [1686307701.676607][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686307701.676679][57073:57073] CHIP:DMG: AttributePathIB = - [1686307701.676749][57073:57073] CHIP:DMG: { - [1686307701.676825][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686307701.676906][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686307701.676986][57073:57073] CHIP:DMG: Attribute = 0x0000_0003, - [1686307701.677062][57073:57073] CHIP:DMG: } - [1686307701.677140][57073:57073] CHIP:DMG: - [1686307701.677219][57073:57073] CHIP:DMG: Data = 0, - [1686307701.677286][57073:57073] CHIP:DMG: }, - [1686307701.677363][57073:57073] CHIP:DMG: - [1686307701.677423][57073:57073] CHIP:DMG: }, - [1686307701.677493][57073:57073] CHIP:DMG: - [1686307701.677547][57073:57073] CHIP:DMG: ], - [1686307701.677616][57073:57073] CHIP:DMG: - [1686307701.677674][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686307701.677865][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307701.677920][57073:57073] CHIP:DMG: } - [1686307701.677970][57073:57073] CHIP:DMG: - [1686307701.678326][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307701.678393][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1686307701.678445][57073:57073] CHIP:DMG: IM RH moving to [AwaitingDestruction] - disabled: true - - - label: - "Step 6: TH undergoes a reboot process. DUT reads a attribute value - from TH." - PICS: DGGEN.C.A0004 - verification: | - This is optional attribute implemented in RPI so its not compulsory to get the expected outcome - - ./chip-tool generaldiagnostics read boot-reason 1 0 - - On TH(all-clusters-app), Verify that bootreason attribute data type must match the value listed in Table 105 BootReason ENUM table in spec. - - Below is the example log which is observed in the RPI platform : - - [1686307743.025877][57073:57073] CHIP:DMG: ReportDataMessage = - [1686307743.025942][57073:57073] CHIP:DMG: { - [1686307743.025991][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686307743.026063][57073:57073] CHIP:DMG: [ - [1686307743.026121][57073:57073] CHIP:DMG: AttributeReportIB = - [1686307743.026197][57073:57073] CHIP:DMG: { - [1686307743.026259][57073:57073] CHIP:DMG: AttributeDataIB = - [1686307743.026329][57073:57073] CHIP:DMG: { - [1686307743.026402][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686307743.026475][57073:57073] CHIP:DMG: AttributePathIB = - [1686307743.026549][57073:57073] CHIP:DMG: { - [1686307743.026626][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686307743.026706][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686307743.026786][57073:57073] CHIP:DMG: Attribute = 0x0000_0004, - [1686307743.026863][57073:57073] CHIP:DMG: } - [1686307743.026942][57073:57073] CHIP:DMG: - [1686307743.027017][57073:57073] CHIP:DMG: Data = 0, - [1686307743.027088][57073:57073] CHIP:DMG: }, - [1686307743.027165][57073:57073] CHIP:DMG: - [1686307743.027226][57073:57073] CHIP:DMG: }, - [1686307743.027297][57073:57073] CHIP:DMG: - [1686307743.027353][57073:57073] CHIP:DMG: ], - [1686307743.027422][57073:57073] CHIP:DMG: - [1686307743.027481][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686307743.027617][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307743.027672][57073:57073] CHIP:DMG: } - [1686307743.027722][57073:57073] CHIP:DMG: - [1686307743.028065][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307743.028132][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1686307743.028183][57073:57073] CHIP:DMG: IM RH moving to [AwaitingDestruction] - disabled: true - - - label: - "Step 7: DUT reads ActiveHardwareFaults attribute value from TH. - Subscription is possible option for this attribute." - PICS: DGGEN.C.A0005 - verification: | - This is optional attribute implemented in RPI so its not compulsory to get the expected outcome - - ./chip-tool generaldiagnostics read active-hardware-faults 1 0 - - On TH(all-clusters-app), Verify that ActiveHardwareFaults attribute the attribute response should be empty. But when a hardware fault occurs, the return attribute value must match the value listed in the HardwareFault ENUM table 11.11.6.1. - - Below is the example log which is observed in the RPI platform : - - [1686307781.603898][57073:57073] CHIP:DMG: ReportDataMessage = - [1686307781.603957][57073:57073] CHIP:DMG: { - [1686307781.604008][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686307781.604080][57073:57073] CHIP:DMG: [ - [1686307781.604138][57073:57073] CHIP:DMG: AttributeReportIB = - [1686307781.604214][57073:57073] CHIP:DMG: { - [1686307781.604276][57073:57073] CHIP:DMG: AttributeDataIB = - [1686307781.604344][57073:57073] CHIP:DMG: { - [1686307781.604417][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686307781.604490][57073:57073] CHIP:DMG: AttributePathIB = - [1686307781.604563][57073:57073] CHIP:DMG: { - [1686307781.604639][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686307781.604715][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686307781.604796][57073:57073] CHIP:DMG: Attribute = 0x0000_0005, - [1686307781.604872][57073:57073] CHIP:DMG: } - [1686307781.604950][57073:57073] CHIP:DMG: - [1686307781.605024][57073:57073] CHIP:DMG: Data = [ - [1686307781.605097][57073:57073] CHIP:DMG: - [1686307781.605177][57073:57073] CHIP:DMG: ], - [1686307781.605243][57073:57073] CHIP:DMG: }, - [1686307781.605320][57073:57073] CHIP:DMG: - [1686307781.605380][57073:57073] CHIP:DMG: }, - [1686307781.605451][57073:57073] CHIP:DMG: - [1686307781.605507][57073:57073] CHIP:DMG: ], - [1686307781.605577][57073:57073] CHIP:DMG: - [1686307781.605634][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686307781.605730][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307781.605790][57073:57073] CHIP:DMG: } - [1686307781.605840][57073:57073] CHIP:DMG: - [1686307781.606181][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307781.606249][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - - Please perform subscription in Interactive mode - Here the command to enter interactive mode:-- ./chip-tool interactive start - - generaldiagnostics subscribe active-hardware-faults 3 100 1 0 - - On TH(all-clusters-app), Verify that ActiveHardwareFaults attribute the attribute response should be empty. But when a hardware fault occurs, the return attribute value must match the value listed in the HardwareFault ENUM table 11.11.6.1. This value may be subscribed. - - Below is the example log which is observed in the RPI platform : - - [1686307843.510650][57073:57073] CHIP:EM: Rxd Ack; Removing MessageCounter:23103056 from Retrans Table on exchange 24036r - [1686307843.510781][57073:57073] CHIP:DMG: StatusResponseMessage = - [1686307843.510845][57073:57073] CHIP:DMG: { - [1686307843.510922][57073:57073] CHIP:DMG: Status = 0x00 (SUCCESS), - [1686307843.510984][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307843.511038][57073:57073] CHIP:DMG: } - [1686307843.511116][57073:57073] CHIP:IM: Received status response, status is 0x00 (SUCCESS) - [1686307843.511216][57073:57073] CHIP:DMG: Refresh Subscribe Sync Timer with min 3 seconds and max 100 seconds - [1686307843.511770][57073:57073] CHIP:EM: <<< [E:24036r S:63322 M:23103057 (Ack:112203453)] (S) Msg TX to 1:000000000001B669 [A822] --- Type 0001:04 (IM:SubscribeResponse) - [1686307843.511859][57073:57073] CHIP:IN: (S) Sending msg 23103057 on secure session with LSID: 63322 - [1686307843.512510][57073:57073] CHIP:DMG: >> to UDP:[fe80::e9f6:2c08:2794:357d%eth0]:59421 | 23103057 | [Interaction Model (1) / Subscribe Response (0x04) / Session = 6810 / Exchange = 24036] - [1686307843.512597][57073:57073] CHIP:DMG: Header Flags = - [1686307843.512648][57073:57073] CHIP:DMG: { - [1686307843.512724][57073:57073] CHIP:DMG: Exchange (0x06) = - [1686307843.512775][57073:57073] CHIP:DMG: { - [1686307843.512826][57073:57073] CHIP:DMG: AckMsg = 112203453 - [1686307843.512898][57073:57073] CHIP:DMG: NeedsAck = true - [1686307843.512949][57073:57073] CHIP:DMG: } - [1686307843.513013][57073:57073] CHIP:DMG: } - [1686307843.513083][57073:57073] CHIP:DMG: - [1686307843.513145][57073:57073] CHIP:DMG: Encrypted Payload (48 bytes) = - [1686307843.513194][57073:57073] CHIP:DMG: { - [1686307843.513264][57073:57073] CHIP:DMG: data = 009a1a00518660011eb0619ea074318af4478c0426dc2e7e25cc783a1f14f0c1919836a77ef5e395bbdae42d05c30c31 - [1686307843.513316][57073:57073] CHIP:DMG: buffer_ptr = 187651312554688 - [1686307843.513363][57073:57073] CHIP:DMG: } - [1686307843.513408][57073:57073] CHIP:DMG: - [1686307843.513496][57073:57073] CHIP:DMG: Decrypted Payload (14 bytes) = - [1686307843.513548][57073:57073] CHIP:DMG: { - [1686307843.513595][57073:57073] CHIP:DMG: data = 15260084a6fd9624026424ff0118 - [1686307843.513667][57073:57073] CHIP:DMG: } - [1686307843.513826][57073:57073] CHIP:DMG: - [1686307843.513939][57073:57073] CHIP:DMG: SubscribeResponseMessage = - [1686307843.513998][57073:57073] CHIP:DMG: { - [1686307843.514073][57073:57073] CHIP:DMG: SubscriptionId = 0x96fda684, - [1686307843.514136][57073:57073] CHIP:DMG: MaxInterval = 0x64, - [1686307843.514196][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307843.514273][57073:57073] CHIP:DMG: } - [1686307843.514323][57073:57073] CHIP:DMG: - [1686307843.514684][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307843.514768][57073:57073] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true - - - label: - "Step 8: DUT reads ActiveRadioFaults attribute value from TH. - Subscription is possible option for this attribute." - PICS: DGGEN.C.A0006 - verification: | - This is optional attribute implemented in RPI so its not compulsory to get the expected outcome - - ./chip-tool generaldiagnostics read active-radio-faults 1 0 - On TH(all-clusters-app), Verify that ActiveRadioFaults attribute response should be empty. But when a radio fault occurs, the return attribute value must match the value listed in the RadioFault ENUM table. 11.11.6.2. - Below is the example log which is observed in the RPI platform : - [1686308161.710734][57073:57073] CHIP:DMG: ReportDataMessage = - [1686308161.710792][57073:57073] CHIP:DMG: { - [1686308161.710840][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686308161.710912][57073:57073] CHIP:DMG: [ - [1686308161.710969][57073:57073] CHIP:DMG: AttributeReportIB = - [1686308161.711044][57073:57073] CHIP:DMG: { - [1686308161.711105][57073:57073] CHIP:DMG: AttributeDataIB = - [1686308161.711175][57073:57073] CHIP:DMG: { - [1686308161.711245][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686308161.711317][57073:57073] CHIP:DMG: AttributePathIB = - [1686308161.711392][57073:57073] CHIP:DMG: { - [1686308161.711466][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686308161.711546][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686308161.711626][57073:57073] CHIP:DMG: Attribute = 0x0000_0006, - [1686308161.711702][57073:57073] CHIP:DMG: } - [1686308161.711780][57073:57073] CHIP:DMG: - [1686308161.711854][57073:57073] CHIP:DMG: Data = [ - [1686308161.711928][57073:57073] CHIP:DMG: - [1686308161.712008][57073:57073] CHIP:DMG: ], - [1686308161.712078][57073:57073] CHIP:DMG: }, - [1686308161.712161][57073:57073] CHIP:DMG: - [1686308161.712221][57073:57073] CHIP:DMG: }, - [1686308161.712292][57073:57073] CHIP:DMG: - [1686308161.712348][57073:57073] CHIP:DMG: ], - [1686308161.712418][57073:57073] CHIP:DMG: - [1686308161.712475][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686308161.712533][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686308161.712587][57073:57073] CHIP:DMG: } - [1686308161.712637][57073:57073] CHIP:DMG: - [1686308161.712974][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686308161.713043][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 1, RE has no more messages - [1686308161.713094][57073:57073] CHIP:DMG: IM RH moving to [AwaitingDestruction] - - - - Please perform subscription in Interactive mode - Here the command to enter interactive mode:-- ./chip-tool interactive start - - generaldiagnostics subscribe active-radio-faults 100 1000 1 0 - - On TH(all-clusters-app), Verify that ActiveRadioFaults attribute response should be empty. But when a radio fault occurs, the return attribute value must match the value listed in the RadioFault ENUM table. 11.11.6.2. . This value may be subscribed. - Below is the example log which is observed in the RPI platform : - - - [1686307919.469064][57073:57073] CHIP:DMG: StatusResponseMessage = - [1686307919.469149][57073:57073] CHIP:DMG: { - [1686307919.469207][57073:57073] CHIP:DMG: Status = 0x00 (SUCCESS), - [1686307919.469267][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307919.469344][57073:57073] CHIP:DMG: } - [1686307919.469400][57073:57073] CHIP:IM: Received status response, status is 0x00 (SUCCESS) - [1686307919.469519][57073:57073] CHIP:DMG: Refresh Subscribe Sync Timer with min 100 seconds and max 1000 seconds - [1686307919.470080][57073:57073] CHIP:EM: <<< [E:24037r S:63322 M:23103059 (Ack:112203456)] (S) Msg TX to 1:000000000001B669 [A822] --- Type 0001:04 (IM:SubscribeResponse) - [1686307919.470170][57073:57073] CHIP:IN: (S) Sending msg 23103059 on secure session with LSID: 63322 - [1686307919.470842][57073:57073] CHIP:DMG: >> to UDP:[fe80::e9f6:2c08:2794:357d%eth0]:59421 | 23103059 | [Interaction Model (1) / Subscribe Response (0x04) / Session = 6810 / Exchange = 24037] - [1686307919.470931][57073:57073] CHIP:DMG: Header Flags = - [1686307919.470983][57073:57073] CHIP:DMG: { - [1686307919.471061][57073:57073] CHIP:DMG: Exchange (0x06) = - [1686307919.471112][57073:57073] CHIP:DMG: { - [1686307919.471164][57073:57073] CHIP:DMG: AckMsg = 112203456 - [1686307919.471237][57073:57073] CHIP:DMG: NeedsAck = true - [1686307919.471288][57073:57073] CHIP:DMG: } - [1686307919.471352][57073:57073] CHIP:DMG: } - [1686307919.471420][57073:57073] CHIP:DMG: - [1686307919.471484][57073:57073] CHIP:DMG: Encrypted Payload (49 bytes) = - [1686307919.471534][57073:57073] CHIP:DMG: { - [1686307919.471604][57073:57073] CHIP:DMG: data = 009a1a0053866001e6272a390623bd75fd74354aab79de80781818aa40a6d57a63027f9adb46fa0c80dbcbea6e887e7814 - [1686307919.471658][57073:57073] CHIP:DMG: buffer_ptr = 187651312554688 - [1686307919.471704][57073:57073] CHIP:DMG: } - [1686307919.471750][57073:57073] CHIP:DMG: - [1686307919.471839][57073:57073] CHIP:DMG: Decrypted Payload (15 bytes) = - [1686307919.471891][57073:57073] CHIP:DMG: { - [1686307919.471938][57073:57073] CHIP:DMG: data = 1526009ab98a6b2502e80324ff0118 - [1686307919.472007][57073:57073] CHIP:DMG: } - [1686307919.472054][57073:57073] CHIP:DMG: - [1686307919.472164][57073:57073] CHIP:DMG: SubscribeResponseMessage = - [1686307919.472223][57073:57073] CHIP:DMG: { - [1686307919.472276][57073:57073] CHIP:DMG: SubscriptionId = 0x6b8ab99a, - [1686307919.472362][57073:57073] CHIP:DMG: MaxInterval = 0x3e8, - [1686307919.472422][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307919.472477][57073:57073] CHIP:DMG: } - [1686307919.472547][57073:57073] CHIP:DMG: - [1686307919.472904][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307919.472965][57073:57073] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true - - - label: - "Step 9: DUT reads ActiveNetworkFaults attribute value from TH. - Subscription is possible option for this attribute." - PICS: DGGEN.C.A0007 - verification: | - This is optional attribute implemented in RPI so its not compulsory to get the expected outcome - ./chip-tool generaldiagnostics read active-network-faults 1 0 - - On TH(all-clusters-app), Verify that ActiveNetworkFaults attribute value attribute response should be empty. But when a network fault occurs, the return attribute value must match the value listed in the NetworkFault ENUM table 11.11.6.3 - - Below is the example log which is observed in the RPI platform : - [1686308088.267488][57073:57073] CHIP:DMG: - [1686308088.267658][57073:57073] CHIP:DMG: ReportDataMessage = - [1686308088.267719][57073:57073] CHIP:DMG: { - [1686308088.267790][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686308088.267866][57073:57073] CHIP:DMG: [ - [1686308088.267923][57073:57073] CHIP:DMG: AttributeReportIB = - [1686308088.268026][57073:57073] CHIP:DMG: { - [1686308088.268088][57073:57073] CHIP:DMG: AttributeDataIB = - [1686308088.268179][57073:57073] CHIP:DMG: { - [1686308088.268254][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686308088.268345][57073:57073] CHIP:DMG: AttributePathIB = - [1686308088.268421][57073:57073] CHIP:DMG: { - [1686308088.268519][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686308088.268602][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686308088.268703][57073:57073] CHIP:DMG: Attribute = 0x0000_0007, - [1686308088.268781][57073:57073] CHIP:DMG: } - [1686308088.268881][57073:57073] CHIP:DMG: - [1686308088.268958][57073:57073] CHIP:DMG: Data = [ - [1686308088.269053][57073:57073] CHIP:DMG: - [1686308088.269136][57073:57073] CHIP:DMG: ], - [1686308088.269227][57073:57073] CHIP:DMG: }, - [1686308088.269307][57073:57073] CHIP:DMG: - [1686308088.269370][57073:57073] CHIP:DMG: }, - [1686308088.269464][57073:57073] CHIP:DMG: - [1686308088.269520][57073:57073] CHIP:DMG: ], - [1686308088.269618][57073:57073] CHIP:DMG: - [1686308088.269677][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686308088.269803][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686308088.269860][57073:57073] CHIP:DMG: } - [1686308088.269910][57073:57073] CHIP:DMG: - [1686308088.270319][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686308088.270385][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 1, RE has no more messages - [1686308088.270436][57073:57073] CHIP:DMG: IM RH moving to [AwaitingDestruction] - - - - Please perform subscription in Interactive mode - Here the command to enter interactive mode:-- ./chip-tool interactive start - - generaldiagnostics subscribe active-network-faults 100 1000 1 0 - - On TH(all-clusters-app), Verify that ActiveNetworkFaults attribute value attribute response should be empty. But when a network fault occurs, the return attribute value must match the value listed in the NetworkFault ENUM table 11.11.6.3. This value may be subscribed. - Below is the example log which is observed in the RPI platform : - - [1686307960.687673][57073:57073] CHIP:EM: Rxd Ack; Removing MessageCounter:30942835 from Retrans Table on exchange 24039r - [1686307960.687802][57073:57073] CHIP:DMG: StatusResponseMessage = - [1686307960.687864][57073:57073] CHIP:DMG: { - [1686307960.687942][57073:57073] CHIP:DMG: Status = 0x00 (SUCCESS), - [1686307960.688003][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307960.688057][57073:57073] CHIP:DMG: } - [1686307960.688136][57073:57073] CHIP:IM: Received status response, status is 0x00 (SUCCESS) - [1686307960.688230][57073:57073] CHIP:DMG: Refresh Subscribe Sync Timer with min 100 seconds and max 1000 seconds - [1686307960.688774][57073:57073] CHIP:EM: <<< [E:24039r S:63323 M:30942836 (Ack:186563629)] (S) Msg TX to 1:000000000001B669 [A822] --- Type 0001:04 (IM:SubscribeResponse) - [1686307960.688863][57073:57073] CHIP:IN: (S) Sending msg 30942836 on secure session with LSID: 63323 - [1686307960.689504][57073:57073] CHIP:DMG: >> to UDP:[fe80::e9f6:2c08:2794:357d%eth0]:59421 | 30942836 | [Interaction Model (1) / Subscribe Response (0x04) / Session = 6811 / Exchange = 24039] - [1686307960.689591][57073:57073] CHIP:DMG: Header Flags = - [1686307960.689643][57073:57073] CHIP:DMG: { - [1686307960.689755][57073:57073] CHIP:DMG: Exchange (0x06) = - [1686307960.689810][57073:57073] CHIP:DMG: { - [1686307960.689862][57073:57073] CHIP:DMG: AckMsg = 186563629 - [1686307960.689911][57073:57073] CHIP:DMG: NeedsAck = true - [1686307960.689958][57073:57073] CHIP:DMG: } - [1686307960.690048][57073:57073] CHIP:DMG: } - [1686307960.690100][57073:57073] CHIP:DMG: - [1686307960.690161][57073:57073] CHIP:DMG: Encrypted Payload (49 bytes) = - [1686307960.690232][57073:57073] CHIP:DMG: { - [1686307960.690283][57073:57073] CHIP:DMG: data = 009b1a007426d801508f052c4f353e1e4f7f65e371e88ed11df4630e03e488f1f4acbf93785d02417643644ac79541c2d0 - [1686307960.690333][57073:57073] CHIP:DMG: buffer_ptr = 187651312560480 - [1686307960.690379][57073:57073] CHIP:DMG: } - [1686307960.690446][57073:57073] CHIP:DMG: - [1686307960.690514][57073:57073] CHIP:DMG: Decrypted Payload (15 bytes) = - [1686307960.690565][57073:57073] CHIP:DMG: { - [1686307960.690640][57073:57073] CHIP:DMG: data = 152600031dfc822502e80324ff0118 - [1686307960.690688][57073:57073] CHIP:DMG: } - [1686307960.690733][57073:57073] CHIP:DMG: - [1686307960.690837][57073:57073] CHIP:DMG: SubscribeResponseMessage = - [1686307960.690897][57073:57073] CHIP:DMG: { - [1686307960.690950][57073:57073] CHIP:DMG: SubscriptionId = 0x82fc1d03, - [1686307960.691035][57073:57073] CHIP:DMG: MaxInterval = 0x3e8, - [1686307960.691094][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686307960.691168][57073:57073] CHIP:DMG: } - [1686307960.691221][57073:57073] CHIP:DMG: - [1686307960.691577][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686307960.691640][57073:57073] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true - - - label: - "Step 10: TH reads TestEventTriggersEnabled attribute value. If this - value is set True, then a certain test mode will be performed (or - triggered) according to pre-provisioned client and server test mode." - PICS: DGGEN.C.A0008 - verification: | - ./chip-tool generaldiagnostics read test-event-triggers-enabled 1 0 - - On TH(all-clusters-app), Verify that TestEventTriggersEnabled attribute value should be data type bool - Below is the example log which is observed in the RPI platform : - - [1686308043.575660][57073:57073] CHIP:DMG: - [1686308043.575826][57073:57073] CHIP:DMG: ReportDataMessage = - [1686308043.575887][57073:57073] CHIP:DMG: { - [1686308043.575958][57073:57073] CHIP:DMG: AttributeReportIBs = - [1686308043.576032][57073:57073] CHIP:DMG: [ - [1686308043.576116][57073:57073] CHIP:DMG: AttributeReportIB = - [1686308043.576192][57073:57073] CHIP:DMG: { - [1686308043.576253][57073:57073] CHIP:DMG: AttributeDataIB = - [1686308043.576345][57073:57073] CHIP:DMG: { - [1686308043.576416][57073:57073] CHIP:DMG: DataVersion = 0xb1a9fc1e, - [1686308043.576501][57073:57073] CHIP:DMG: AttributePathIB = - [1686308043.576576][57073:57073] CHIP:DMG: { - [1686308043.576652][57073:57073] CHIP:DMG: Endpoint = 0x0, - [1686308043.576755][57073:57073] CHIP:DMG: Cluster = 0x33, - [1686308043.576837][57073:57073] CHIP:DMG: Attribute = 0x0000_0008, - [1686308043.576934][57073:57073] CHIP:DMG: } - [1686308043.577014][57073:57073] CHIP:DMG: - [1686308043.577114][57073:57073] CHIP:DMG: Data = false, - [1686308043.577188][57073:57073] CHIP:DMG: }, - [1686308043.577286][57073:57073] CHIP:DMG: - [1686308043.577348][57073:57073] CHIP:DMG: }, - [1686308043.577419][57073:57073] CHIP:DMG: - [1686308043.577495][57073:57073] CHIP:DMG: ], - [1686308043.577566][57073:57073] CHIP:DMG: - [1686308043.577645][57073:57073] CHIP:DMG: SuppressResponse = true, - [1686308043.577759][57073:57073] CHIP:DMG: InteractionModelRevision = 1 - [1686308043.577817][57073:57073] CHIP:DMG: } - [1686308043.577891][57073:57073] CHIP:DMG: - [1686308043.578276][57073:57073] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686308043.578344][57073:57073] CHIP:DMG: ReportsInFlight = 0 with readHandler 1, RE has no more messages - [1686308043.578395][57073:57073] CHIP:DMG: IM RH moving to [AwaitingDestruction] - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_3_1_Simulated.yaml deleted file mode 100644 index e315cd95958a6f..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGSW_3_1_Simulated.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 44.3.1. [TC-DGSW-3.1] Attributes [DUT as Client] - -PICS: - - DGSW.C - -config: - nodeId: 0x12344321 - cluster: "Software Diagnostics" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: ThreadMetrics" - PICS: DGSW.C.A0000 - wait: "readAttribute" - attribute: "ThreadMetrics" - - - label: "Read attribute: CurrentHeapFree" - PICS: DGSW.C.A0001 - wait: "readAttribute" - attribute: "CurrentHeapFree" - - - label: "Read attribute: CurrentHeapUsed" - PICS: DGSW.C.A0002 - wait: "readAttribute" - attribute: "CurrentHeapUsed" - - - label: "Read attribute: CurrentHeapHighWatermark" - PICS: DGSW.C.A0003 - wait: "readAttribute" - attribute: "CurrentHeapHighWatermark" diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_1_Simulated.yaml deleted file mode 100644 index d2d4358b92fda1..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_1_Simulated.yaml +++ /dev/null @@ -1,174 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 50.3.1. [TC-DGTHREAD-3.1] Attributes [DUT- Client] - -PICS: - - DGTHREAD.C - -config: - nodeId: 0x12344321 - cluster: "Thread Network Diagnostics" - endpoint: 0 - -tests: - - label: "Wait for the device to be commissioned" - cluster: "DelayCommands" - command: "WaitForCommissioning" - - - label: "DUT reads Channel attribute value from TH" - wait: "readAttribute" - attribute: "Channel" - PICS: DGTHREAD.C.A0000 - - - label: "DUT reads RoutingRole attribute value from TH" - wait: "readAttribute" - attribute: "RoutingRole" - PICS: DGTHREAD.C.A0001 - - - label: "DUT reads NetworkName attribute value from TH" - wait: "readAttribute" - attribute: "NetworkName" - PICS: DGTHREAD.C.A0002 - - - label: "DUT reads PanId attribute value from TH" - wait: "readAttribute" - attribute: "PanId" - PICS: DGTHREAD.C.A0003 - - - label: "DUT reads ExtendedPanId attribute value from TH" - wait: "readAttribute" - attribute: "ExtendedPanId" - PICS: DGTHREAD.C.A0004 - - - label: "DUT reads MeshLocalPrefix attribute value from TH" - wait: "readAttribute" - attribute: "MeshLocalPrefix" - PICS: DGTHREAD.C.A0005 - - - label: "DUT reads OverrunCount attribute value from TH" - wait: "readAttribute" - attribute: "OverrunCount" - PICS: DGTHREAD.C.A0006 - - - label: "DUT reads NeighborTable attribute value from TH" - wait: "readAttribute" - attribute: "NeighborTable" - PICS: DGTHREAD.C.A0007 - - - label: "DUT reads RouteTable attribute value from TH" - wait: "readAttribute" - attribute: "RouteTable" - PICS: DGTHREAD.C.A0008 - - - label: "DUT reads PartitionId attribute value from TH" - wait: "readAttribute" - attribute: "PartitionId" - PICS: DGTHREAD.C.A0009 - - - label: "DUT reads Weighting attribute value from TH" - wait: "readAttribute" - attribute: "Weighting" - PICS: DGTHREAD.C.A000a - - - label: "DUT reads DataVersion attribute value from TH" - wait: "readAttribute" - attribute: "DataVersion" - PICS: DGTHREAD.C.A000b - - - label: "DUT reads StableDataVersion attribute value from TH" - wait: "readAttribute" - attribute: "StableDataVersion" - PICS: DGTHREAD.C.A000c - - - label: "DUT reads LeaderRouterId attribute value from TH" - wait: "readAttribute" - attribute: "LeaderRouterId" - PICS: DGTHREAD.C.A000d - - - label: "DUT reads DetachedRoleCount attribute value from TH" - wait: "readAttribute" - attribute: "DetachedRoleCount" - PICS: DGTHREAD.C.A000e - - - label: "DUT reads ChildRoleCount attribute value from TH" - wait: "readAttribute" - attribute: "ChildRoleCount" - PICS: DGTHREAD.C.A000f - - - label: "DUT reads RouterRoleCount attribute value from TH" - wait: "readAttribute" - attribute: "RouterRoleCount" - PICS: DGTHREAD.C.A0010 - - - label: "DUT reads LeaderRoleCount attribute value from TH" - wait: "readAttribute" - attribute: "LeaderRoleCount" - PICS: DGTHREAD.C.A0011 - - - label: "DUT reads AttachAttemptCount attribute value from TH" - wait: "readAttribute" - attribute: "AttachAttemptCount" - PICS: DGTHREAD.C.A0012 - - - label: "DUT reads PartitionIdChangeCount attribute value from TH" - wait: "readAttribute" - attribute: "PartitionIdChangeCount" - PICS: DGTHREAD.C.A0013 - - - label: - "DUT reads BetterPartitionAttachAttemptCount attribute value from TH" - wait: "readAttribute" - attribute: "BetterPartitionAttachAttemptCount" - PICS: DGTHREAD.C.A0014 - - - label: "DUT reads ParentChangeCount attribute value from TH" - wait: "readAttribute" - attribute: "ParentChangeCount" - PICS: DGTHREAD.C.A0015 - - - label: "DUT reads ActiveTimestamp attribute value from TH" - wait: "readAttribute" - attribute: "ActiveTimestamp" - PICS: DGTHREAD.C.A0038 - - - label: "DUT reads PendingTimestamp attribute value from TH" - wait: "readAttribute" - attribute: "PendingTimestamp" - PICS: DGTHREAD.C.A0039 - - - label: "DUT reads Delay attribute value from TH" - wait: "readAttribute" - attribute: "Delay" - PICS: DGTHREAD.C.A003a - - - label: "DUT reads SecurityPolicy attribute value from TH" - wait: "readAttribute" - attribute: "SecurityPolicy" - PICS: DGTHREAD.C.A003b - - - label: "DUT reads ChannelPage0Mask attribute value from TH" - wait: "readAttribute" - attribute: "ChannelPage0Mask" - PICS: DGTHREAD.C.A003c - - - label: "DUT reads OperationalDatasetComponents attribute value from TH" - wait: "readAttribute" - attribute: "OperationalDatasetComponents" - PICS: DGTHREAD.C.A003d - - - label: "DUT reads ActiveNetworkFaults attribute value from TH" - wait: "readAttribute" - attribute: "ActiveNetworkFaultsList" - PICS: DGTHREAD.C.A003e diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_2_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_2_Simulated.yaml deleted file mode 100644 index 992eaa3da0bd23..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_2_Simulated.yaml +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 3.3.2. [TC-DGTHREAD-3.2] Command Generated {DUT_Client}] - -PICS: - - DGTHREAD.C - -config: - nodeId: 0x12344321 - cluster: "Thread Network Diagnostics" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads TxTotalCount attribute value from TH" - wait: "readAttribute" - attribute: "TxTotalCount" - PICS: DGTHREAD.C.A0016 - - - label: "DUT reads TxUnicastCount attribute value from TH" - wait: "readAttribute" - attribute: "TxUnicastCount" - PICS: DGTHREAD.C.A0017 - - - label: "DUT reads TxBroadcastCount attribute value from TH" - wait: "readAttribute" - attribute: "TxBroadcastCount" - PICS: DGTHREAD.C.A0018 - - - label: "DUT reads TxAckRequestedCount attribute value from TH" - wait: "readAttribute" - attribute: "TxAckRequestedCount" - PICS: DGTHREAD.C.A0019 - - - label: "DUT reads TxAckedCount attribute value from TH" - wait: "readAttribute" - attribute: "TxAckedCount" - PICS: DGTHREAD.C.A001a - - - label: "DUT reads TxNoAckRequestedCount attribute value from TH" - wait: "readAttribute" - attribute: "TxNoAckRequestedCount" - PICS: DGTHREAD.C.A001b - - - label: "DUT reads TxDataCount attribute value from TH" - wait: "readAttribute" - attribute: "TxDataCount" - PICS: DGTHREAD.C.A001c - - - label: "DUT reads TxDataPollCount attribute value from TH" - wait: "readAttribute" - attribute: "TxDataPollCount" - PICS: DGTHREAD.C.A001d - - - label: "DUT reads TxBeaconCount attribute value from TH" - wait: "readAttribute" - attribute: "TxBeaconCount" - PICS: DGTHREAD.C.A001e - - - label: "DUT reads TxBeaconRequestCount attribute value from TH" - wait: "readAttribute" - attribute: "TxBeaconRequestCount" - PICS: DGTHREAD.C.A001f - - - label: "DUT reads TxOtherCount attribute value from TH" - wait: "readAttribute" - attribute: "TxOtherCount" - PICS: DGTHREAD.C.A0020 - - - label: "DUT reads TxRetryCount attribute value from TH" - wait: "readAttribute" - attribute: "TxRetryCount" - PICS: DGTHREAD.C.A0021 - - - label: "DUT reads TxDirectMaxRetryExpiryCount attribute value from TH" - wait: "readAttribute" - attribute: "TxDirectMaxRetryExpiryCount" - PICS: DGTHREAD.C.A0022 - - - label: "DUT reads TxIndirectMaxRetryExpiryCount attribute value from TH" - wait: "readAttribute" - attribute: "TxIndirectMaxRetryExpiryCount" - PICS: DGTHREAD.C.A0023 - - - label: "DUT reads TxErrCcaCount attribute value from TH" - wait: "readAttribute" - attribute: "TxErrCcaCount" - PICS: DGTHREAD.C.A0024 - - - label: "DUT reads TxErrAbortCount attribute value from TH" - wait: "readAttribute" - attribute: "TxErrAbortCount" - PICS: DGTHREAD.C.A0025 - - - label: "DUT reads TxErrBusyChannelCount attribute value from TH" - wait: "readAttribute" - attribute: "TxErrBusyChannelCount" - PICS: DGTHREAD.C.A0026 diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_3_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_3_Simulated.yaml deleted file mode 100644 index 8a343dce13b85b..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_3_3_Simulated.yaml +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 3.3.2. [TC-DGTHREAD-3.3] Command Generated {DUT_Client}] - -PICS: - - DGTHREAD.C - -config: - nodeId: 0x12344321 - cluster: "Thread Network Diagnostics" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads RxTotalCount attribute value from TH" - wait: "readAttribute" - attribute: "RxTotalCount" - PICS: DGTHREAD.C.A0027 - - - label: "DUT reads RxUnicastCount attribute value from TH" - wait: "readAttribute" - attribute: "RxUnicastCount" - PICS: DGTHREAD.C.A0028 - - - label: "DUT reads RxBroadcastCount attribute value from TH" - wait: "readAttribute" - attribute: "RxBroadcastCount" - PICS: DGTHREAD.C.A0029 - - - label: "DUT reads RxDataCount attribute value from TH" - wait: "readAttribute" - attribute: "RxDataCount" - PICS: DGTHREAD.C.A002a - - - label: "DUT reads RxDataPollCount attribute value from TH" - wait: "readAttribute" - attribute: "RxDataPollCount" - PICS: DGTHREAD.C.A002b - - - label: "DUT reads RxBeaconCount attribute value from TH" - wait: "readAttribute" - attribute: "RxBeaconCount" - PICS: DGTHREAD.C.A002c - - - label: "DUT reads RxBeaconRequestCount attribute value from TH" - wait: "readAttribute" - attribute: "RxBeaconRequestCount" - PICS: DGTHREAD.C.A002d - - - label: "DUT reads RxOtherCount attribute value from TH" - wait: "readAttribute" - attribute: "RxOtherCount" - PICS: DGTHREAD.C.A002e - - - label: "DUT reads RxAddressFilteredCount attribute value from TH" - wait: "readAttribute" - attribute: "RxAddressFilteredCount" - PICS: DGTHREAD.C.A002f - - - label: "DUT reads RxDestAddrFilteredCount attribute value from TH" - wait: "readAttribute" - attribute: "RxDestAddrFilteredCount" - PICS: DGTHREAD.C.A0030 - - - label: "DUT reads RxDuplicatedCount attribute value from TH" - wait: "readAttribute" - attribute: "RxDuplicatedCount" - PICS: DGTHREAD.C.A0031 - - - label: "DUT reads RxErrNoFrameCount attribute value from TH" - wait: "readAttribute" - attribute: "RxErrNoFrameCount" - PICS: DGTHREAD.C.A0032 - - - label: "DUT reads RxErrUnknownNeighborCount attribute value from TH" - wait: "readAttribute" - attribute: "RxErrUnknownNeighborCount" - PICS: DGTHREAD.C.A0033 - - - label: "DUT reads RxErrInvalidSrcAddrCount attribute value from TH" - wait: "readAttribute" - attribute: "RxErrInvalidSrcAddrCount" - PICS: DGTHREAD.C.A0034 - - - label: "DUT reads RxErrSecCount attribute value from TH" - wait: "readAttribute" - attribute: "RxErrSecCount" - PICS: DGTHREAD.C.A0035 - - - label: "DUT reads RxErrFcsCount attribute value from TH" - wait: "readAttribute" - attribute: "RxErrFcsCount" - PICS: DGTHREAD.C.A0036 - - - label: "DUT reads RxErrOtherCount attribute value from TH" - wait: "readAttribute" - attribute: "RxErrOtherCount" - PICS: DGTHREAD.C.A0037 diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_3_1_Simulated.yaml deleted file mode 100644 index 6205550ad8abbc..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGWIFI_3_1_Simulated.yaml +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 53.3.1. [TC-DGWIFI-3.1] Attributes [DUT as Client] - -PICS: - - DGWIFI.C.A - - DGWIFI.C - -config: - nodeId: 0x12344321 - cluster: "WiFi Network Diagnostics" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: BSSID" - PICS: DGWIFI.C.A0000 - wait: "readAttribute" - attribute: "BSSID" - - - label: "Read attribute: SecurityType" - PICS: DGWIFI.C.A0001 - wait: "readAttribute" - attribute: "SecurityType" - - - label: "Read attribute: WiFiVersion" - PICS: DGWIFI.C.A0002 - wait: "readAttribute" - attribute: "WiFiVersion" - - - label: "Read attribute: ChannelNumber" - PICS: DGWIFI.C.A0003 - wait: "readAttribute" - attribute: "ChannelNumber" - - - label: "Read attribute: RSSI" - PICS: DGWIFI.C.A0004 - wait: "readAttribute" - attribute: "RSSI" - - - label: "Read attribute: BeaconLostCount" - PICS: DGWIFI.C.A0005 - wait: "readAttribute" - attribute: "BeaconLostCount" - - - label: "Read attribute: BeaconRxCount" - PICS: DGWIFI.C.A0006 - wait: "readAttribute" - attribute: "BeaconRxCount" - - - label: "Read attribute: PacketMulticastRxCount" - PICS: DGWIFI.C.A0007 - wait: "readAttribute" - attribute: "PacketMulticastRxCount" - - - label: "Read attribute: PacketMulticastTxCount" - PICS: DGWIFI.C.A0008 - wait: "readAttribute" - attribute: "PacketMulticastTxCount" - - - label: "Read attribute: PacketUnicastRxCount" - PICS: DGWIFI.C.A0009 - wait: "readAttribute" - attribute: "PacketUnicastRxCount" - - - label: "Read attribute: PacketUnicastTxCount" - PICS: DGWIFI.C.A000a - wait: "readAttribute" - attribute: "PacketUnicastTxCount" - - - label: "Read attribute: CurrentMaxRate" - PICS: DGWIFI.C.A000b - wait: "readAttribute" - attribute: "CurrentMaxRate" - - - label: "Read attribute: OverrunCount" - PICS: DGWIFI.C.A000c - wait: "readAttribute" - attribute: "OverrunCount" diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index b79bbbd590df01..e27bf45da37446 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -33,70 +33,75 @@ tests: - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." verification: | - ./chip-tool dishwashermodeselect read cluster-revision 1 1 + ./chip-tool dishwashermode read cluster-revision 1 1 - Verify the "ClusterRevision" value is of unit16 and reflects the highest revision number 2 on the TH(chip-tool) and below is the sample log provided for the raspi platform: + Verify the "ClusterRevision" value is of unit16 and reflects the highest revision number 1 on the TH(Chip-tool) and below is the sample log provided for the raspi platform: - [1645775623.658997][3277:3282] CHIP:TOO: ClusterRevision: 1 + [1690365584.246794][27436:27438] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFFD DataVersion: 1130015440 + [1690365584.246860][27436:27438] CHIP:TOO: ClusterRevision: 1 disabled: true - label: "Step 3: TH reads from the DUT the FeatureMap attribute." verification: | - ./chip-tool dishwashermodeselect read feature-map 1 1 + ./chip-tool dishwashermode read feature-map 1 1 - On the TH(chip-tool) Log, Verify featureMap value is 1, This value changes depending on DUT implementing the features and below is the sample log provided for the raspi platform: + On the TH(Chip-tool) Log, Verify featureMap value is 1 If TCCM.S.F00(DEPONOFF) true, Otherwise 0, T and below is the sample log provided for the raspi platform: - [1649052001.646939][8355:8360] CHIP:TOO: FeatureMap: 1 + [1690365613.351850][27441:27443] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFFC DataVersion: 1130015440 + [1690365613.351911][27441:27443] CHIP:TOO: FeatureMap: 1 disabled: true - label: "Step 4: TH reads from the DUT the AttributeList attribute." verification: | - ./chip-tool dishwashermodeselect read attribute-list 1 1 - - Verify the "AttributeList " should include the mandatory attributes (values 0, 2, 3), - global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528) and - list may include optional attribute(value 0x0004), if MOD.S.A0004(StartUpMode) supports, - list contains feature dependent attribute (values 0x0005), if MOD.S.F00(DEPONOFF) is true on the TH(chip-tool) Log and below is the sample log provided for the raspi platform: - - [1676288620.483812][4014:4016] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_FFFB DataVersion: 2649295313 - [1676288620.483850][4014:4016] CHIP:TOO: AttributeList: 13 entries - [1676288620.483861][4014:4016] CHIP:TOO: [1]: 0 - [1676288620.483870][4014:4016] CHIP:TOO: [2]: 1 - [1676288620.483878][4014:4016] CHIP:TOO: [3]: 65528 - [1676288620.483886][4014:4016] CHIP:TOO: [4]: 65529 - [1676288620.483892][4014:4016] CHIP:TOO: [5]: 65530 - [1676288620.483899][4014:4016] CHIP:TOO: [6]: 65531 - [1676288620.483906][4014:4016] CHIP:TOO: [7]: 4293984257 - [1676288620.483915][4014:4016] CHIP:TOO: [8]: 2 - [1676288620.483922][4014:4016] CHIP:TOO: [9]: 3 - [1676288620.483929][4014:4016] CHIP:TOO: [10]: 4 - [1676288620.483934][4014:4016] CHIP:TOO: [11]: 5 - [1676288620.483941][4014:4016] CHIP:TOO: [12]: 65532 - [1676288620.483947][4014:4016] CHIP:TOO: [13]: 65533 - [1676288620.484034][4014:4016] CHIP:EM: <<< [E:29816i M:167554497 (Ack:41020138)] (S) Msg TX to 1:000000000 - - - *NOTE* : This sample attribute list reflects the currently implemented attributes on the all-clusters-app. + ./chip-tool dishwashermode read attribute-list 1 1 + + Verify the "AttributeList " should include the mandatory attributes (values 0, 1), + - global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528) and + - list may include optional attribute(value 0x0002), if MOD.S.A0004(StartUpMode) supports, + - list contains feature dependent attribute (values 0x0003), if MOD.S.F00(DEPONOFF) is true on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689930814.439457][300741:300743] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFFB DataVersion: 2031856391 + [1689930814.439500][300741:300743] CHIP:TOO: AttributeList: 10 entries + [1689930814.439520][300741:300743] CHIP:TOO: [1]: 0 + [1689930814.439538][300741:300743] CHIP:TOO: [2]: 1 + [1689930814.439565][300741:300743] CHIP:TOO: [3]: 2 + [1689930814.439584][300741:300743] CHIP:TOO: [4]: 3 + [1689930814.439599][300741:300743] CHIP:TOO: [5]: 65528 + [1689930814.439602][300741:300743] CHIP:TOO: [6]: 65529 + [1689930814.439604][300741:300743] CHIP:TOO: [7]: 65530 + [1689930814.439616][300741:300743] CHIP:TOO: [8]: 65531 + [1689930814.439619][300741:300743] CHIP:TOO: [9]: 65532 + [1689930814.439621][300741:300743] CHIP:TOO: [10]: 65533 disabled: true - - label: "Step 5: TH reads from the DUT the AcceptedCommandList attribute." + - label: "Step 5: TH reads from the DUT the EventList attribute." verification: | - ./chip-tool dishwashermodeselect read accepted-command-list 1 1 + ./chip-tool dishwashermode read event-list 1 1 - Verify the "AcceptedCommandList" contains feature dependent commands - if !MOD.S.F02(DEPCTM) feature supports list includes(value 0x0000) and - if MOD.S.F01(EXT) feature supports list includes(value 0x0001) on the TH (chip-tool) and below is the sample log provided for the raspi platform: + Verify "EventList" contains a list of supported events, for this cluster the list is emty(0 entries) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - [1650274602.826352][8965:8970] CHIP:TOO: AcceptedCommandList: 1 entries - [1650274602.826442][8965:8970] CHIP:TOO: [1]: 0 + [1689996691.141081][359868:359870] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFFA DataVersion: 1427220838 + [1689996691.141341][359868:359870] CHIP:TOO: EventList: 0 entries disabled: true - - label: "Step 6: TH reads from the DUT the GeneratedCommandList attribute." + - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." verification: | - ./chip-tool dishwashermodeselect read generated-command-list 1 1 + ./chip-tool dishwashermode read accepted-command-list 1 1 - Verify "GeneratedCommandList" contains feature dependent commands - if MOD.S.F01(EXT) feature supports list includes(value 0x0002), otherwise value is 0 on the TH(chip-tool) Log and below is the sample log provided for the raspi platform: + Verify the "AcceptedCommandList" contains a list of mandatory commands (value 0) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - [1650274662.075309][8972:8977] CHIP:TOO: GeneratedCommandList: 0 entries + [1690365651.143190][27451:27453] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFF9 DataVersion: 1130015440 + [1690365651.143256][27451:27453] CHIP:TOO: AcceptedCommandList: 1 entries + [1690365651.143284][27451:27453] CHIP:TOO: [1]: 0 + disabled: true + + - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." + verification: | + ./chip-tool dishwashermode read generated-command-list 1 1 + + Verify "GeneratedCommandList" contains a list of mandatory commands (value 1) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689997224.280302][360025:360027] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFF8 DataVersion: 1427220838 + [1689997224.280330][360025:360027] CHIP:TOO: GeneratedCommandList: 1 entries + [1689997224.280346][360025:360027] CHIP:TOO: [1]: 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index a4304e3d1d715c..34053c3f7f5ad2 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -34,85 +34,82 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast two ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } + ./chip-tool dishwashermode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries. + - Verify that list should contain at least one entry + - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value + - ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range + - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 + - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1689997453.610123][360094:360096] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 1427220838 + [1689997453.610169][360094:360096] CHIP:TOO: SupportedModes: 3 entries + [1689997453.610483][360094:360096] CHIP:TOO: [1]: { + [1689997453.610503][360094:360096] CHIP:TOO: Label: Normal + [1689997453.610530][360094:360096] CHIP:TOO: Mode: 0 + [1689997453.610536][360094:360096] CHIP:TOO: ModeTags: 1 entries + [1689997453.610540][360094:360096] CHIP:TOO: [1]: { + [1689997453.610542][360094:360096] CHIP:TOO: Value: 16384 + [1689997453.610551][360094:360096] CHIP:TOO: } + [1689997453.610553][360094:360096] CHIP:TOO: } + [1689997453.610559][360094:360096] CHIP:TOO: [2]: { + [1689997453.610571][360094:360096] CHIP:TOO: Label: Heavy + [1689997453.610574][360094:360096] CHIP:TOO: Mode: 1 + [1689997453.610577][360094:360096] CHIP:TOO: ModeTags: 2 entries + [1689997453.610580][360094:360096] CHIP:TOO: [1]: { + [1689997453.610582][360094:360096] CHIP:TOO: Value: 7 + [1689997453.610583][360094:360096] CHIP:TOO: } + [1689997453.610585][360094:360096] CHIP:TOO: [2]: { + [1689997453.610587][360094:360096] CHIP:TOO: Value: 16385 + [1689997453.610588][360094:360096] CHIP:TOO: } + [1689997453.610590][360094:360096] CHIP:TOO: } + [1689997453.610594][360094:360096] CHIP:TOO: [3]: { + [1689997453.610595][360094:360096] CHIP:TOO: Label: Light + [1689997453.610597][360094:360096] CHIP:TOO: Mode: 2 + [1689997453.610600][360094:360096] CHIP:TOO: ModeTags: 3 entries + [1689997453.610602][360094:360096] CHIP:TOO: [1]: { + [1689997453.610604][360094:360096] CHIP:TOO: Value: 16386 + [1689997453.610605][360094:360096] CHIP:TOO: } + [1689997453.610607][360094:360096] CHIP:TOO: [2]: { + [1689997453.610609][360094:360096] CHIP:TOO: Value: 8 + [1689997453.610610][360094:360096] CHIP:TOO: } + [1689997453.610612][360094:360096] CHIP:TOO: [3]: { + [1689997453.610614][360094:360096] CHIP:TOO: Value: 2 + [1689997453.610615][360094:360096] CHIP:TOO: } + [1689997453.610617][360094:360096] CHIP:TOO: } disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1645776767.611140][4667:4672] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469718 - - [1645776767.611214][4667:4672] CHIP:TOO: CurrentMode: 0 + [1689997642.999367][360160:360162] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 1994417976 + [1689997642.999395][360160:360162] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the OnMode attribute." PICS: DISHM.S.A0003 verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 - - Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform: - + ./chip-tool dishwashermode read on-mode 1 1 - [1649676072.465968][10754:10759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065072 + Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform, Here OnMode attribute value is Null + [1649676072.465968][10754:10759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 4277065072 [1649676072.466094][10754:10759] CHIP:TOO: OnMode: null disabled: true - label: "Step 5: TH reads from the DUT the StartUpMode attribute." PICS: DISHM.S.A0002 verification: | - ./chip-tool dishwashermodeselect read start-up-mode 1 1 + ./chip-tool dishwashermode read start-up-mode 1 1 - Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer and value is from supported_modes_dut, below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer(As per spec default value is null) and value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null - [1649677014.496348][10778:10784] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 4277065072 - [1649677014.496469][10778:10784] CHIP:TOO: StartUpMode: 0 + [1689997956.636092][360258:360260] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 1994417976 + [1689997956.636125][360258:360260] CHIP:TOO: StartUpMode: null disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index 57546907ea001a..767bf66498b0fe 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -24,6 +24,28 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To execute this test case set onmode to any integer value because as default it value has null. + + ./chip-tool dishwashermode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + + [1690188722.057858][15975:15977] CHIP:DMG: StatusIB = + [1690188722.057862][15975:15977] CHIP:DMG: { + [1690188722.057865][15975:15977] CHIP:DMG: status = 0x00 (SUCCESS), + [1690188722.057867][15975:15977] CHIP:DMG: }, + disabled: true + + - label: "Precondition" + verification: | + 1 Dishwasher Mode and OnOff clusters are available on the same endpoint + + 2 The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,152 +56,193 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains two or more ModeOptionsStruct entries and - Save the Mode field values as supported_modes_dut, below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } - disabled: true - - - label: "Step 2: TH reads from the DUT the CurrentMode attribute." + ./chip-tool dishwashermode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1689998005.121163][360287:360289] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 1994417976 + [1689998005.121241][360287:360289] CHIP:TOO: SupportedModes: 3 entries + [1689998005.121250][360287:360289] CHIP:TOO: [1]: { + [1689998005.121256][360287:360289] CHIP:TOO: Label: Normal + [1689998005.121261][360287:360289] CHIP:TOO: Mode: 0 + [1689998005.121264][360287:360289] CHIP:TOO: ModeTags: 1 entries + [1689998005.121268][360287:360289] CHIP:TOO: [1]: { + [1689998005.121270][360287:360289] CHIP:TOO: Value: 16384 + [1689998005.121272][360287:360289] CHIP:TOO: } + [1689998005.121274][360287:360289] CHIP:TOO: } + [1689998005.121278][360287:360289] CHIP:TOO: [2]: { + [1689998005.121279][360287:360289] CHIP:TOO: Label: Heavy + [1689998005.121280][360287:360289] CHIP:TOO: Mode: 1 + [1689998005.121283][360287:360289] CHIP:TOO: ModeTags: 2 entries + [1689998005.121285][360287:360289] CHIP:TOO: [1]: { + [1689998005.121287][360287:360289] CHIP:TOO: Value: 7 + [1689998005.121288][360287:360289] CHIP:TOO: } + [1689998005.121291][360287:360289] CHIP:TOO: [2]: { + [1689998005.121292][360287:360289] CHIP:TOO: Value: 16385 + [1689998005.121293][360287:360289] CHIP:TOO: } + [1689998005.121295][360287:360289] CHIP:TOO: } + [1689998005.121299][360287:360289] CHIP:TOO: [3]: { + [1689998005.121300][360287:360289] CHIP:TOO: Label: Light + [1689998005.121302][360287:360289] CHIP:TOO: Mode: 2 + [1689998005.121305][360287:360289] CHIP:TOO: ModeTags: 3 entries + [1689998005.121307][360287:360289] CHIP:TOO: [1]: { + [1689998005.121309][360287:360289] CHIP:TOO: Value: 16386 + [1689998005.121310][360287:360289] CHIP:TOO: } + [1689998005.121312][360287:360289] CHIP:TOO: [2]: { + [1689998005.121314][360287:360289] CHIP:TOO: Value: 8 + [1689998005.121315][360287:360289] CHIP:TOO: } + [1689998005.121317][360287:360289] CHIP:TOO: [3]: { + [1689998005.121319][360287:360289] CHIP:TOO: Value: 2 + [1689998005.121320][360287:360289] CHIP:TOO: } + [1689998005.121321][360287:360289] CHIP:TOO: } + disabled: true + + - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - Save the value as old_current_mode_dut - - Select a value from supported_modes_dut, different from old_current_mode_dut, and which corresponds to a mode the device can switch to, given its current state and save this value as new_mode_th - - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, - below is the sample log provided for the raspi platform: + - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 3: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 4: TH sends a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut" PICS: DISHM.S.C00.Rsp verification: | - ChangeToModeWithStatus Command is not impleented. + ./chip-tool dishwashermode change-to-mode 0 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690185977.976163][15730:15732] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 + [1690185977.976178][15730:15732] CHIP:TOO: ChangeToModeResponse: { + [1690185977.976182][15730:15732] CHIP:TOO: status: 0 + [1690185977.976185][15730:15732] CHIP:TOO: } disabled: true - label: - "Step 4: Manually put the device in a state from which it will FAIL to + "Step 5: Manually put the device in a state from which it will FAIL to transition to PIXIT.DISHM.MODE_CHANGE_FAIL" + PICS: PIXIT.DISHM.CAN_TEST_MODE_FAILURE verification: | - ChangeToModeWithStatus Command is not implented. + Manual operation required disabled: true - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + - label: "Step 6: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and equal to the new_mode_th, below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 6: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.DISHM.MODE_CHANGE_FAIL" - PICS: DISHM.S.C00.Rsp + PICS: PIXIT.DISHM.CAN_TEST_MODE_FAILURE && DISHM.S.C00.Rsp verification: | - ChangeToModeWithStatus Command is not implented. + Note : Please skip this step as SDK is not enabled with this failure response + + ./chip-tool dishwashermode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a GenericFailure(0x02) status response and below is the sample log provided for the raspi platform: + + [1690264785.719168][29854:29856] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0059 Command=0x0000_0001 + [1690264785.719200][29854:29856] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 + [1690264785.719263][29854:29856] CHIP:TOO: ChangeToModeResponse: { + [1690264785.719283][29854:29856] CHIP:TOO: status: 0 + [1690264785.719297][29854:29856] CHIP:TOO: } disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | + ./chip-tool dishwashermode read current-mode 1 1 + + Verify on TH(chip-tool), CurrentMode attribute value is an integer value and equal to old_current_mode_dut below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + [1690186182.071331][15758:15760] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242726 + [1690186182.071346][15758:15760] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 8: Manually put the device in a state from which it will + "Step 9: Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.DISHM.MODE_CHANGE_OK" verification: | - + Manual operation required disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | + ./chip-tool dishwashermode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + [1690186182.071331][15758:15760] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242726 + [1690186182.071346][15758:15760] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 10: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 11: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.DISHM.MODE_CHANGE_OK" PICS: DISHM.S.C00.Rsp verification: | + ./chip-tool dishwashermode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + [1690187929.904831][15897:15899] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 + [1690187929.904845][15897:15899] CHIP:TOO: ChangeToModeResponse: { + [1690187929.904852][15897:15899] CHIP:TOO: status: 0 + [1690187929.904855][15897:15899] CHIP:TOO: } disabled: true - - label: "Step 11: TH reads from the DUT the CurrentMode attribute." + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | + ./chip-tool dishwashermode read current-mode 1 1 + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 11, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 + + [1690187960.116433][15901:15903] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242727 + [1690187960.116478][15901:15903] CHIP:TOO: CurrentMode: 2 disabled: true - label: - "Step 12: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 13: TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th" PICS: DISHM.S.C00.Rsp verification: | + ./chip-tool dishwashermode change-to-mode 4 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a UnsupportedMode(0x01) status response and below is the sample log provided for the raspi platform: + [1690188004.105157][15906:15908] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 + [1690188004.105172][15906:15908] CHIP:TOO: ChangeToModeResponse: { + [1690188004.105178][15906:15908] CHIP:TOO: status: 1 + [1690188004.105181][15906:15908] CHIP:TOO: } disabled: true - - label: "Step 13: TH reads from the DUT the CurrentMode attribute." + - label: "Step 14: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | + ./chip-tool dishwashermode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 12, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 + [1690187960.116433][15901:15903] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242727 + [1690187960.116478][15901:15903] CHIP:TOO: CurrentMode: 2 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml index 8836ca0ba9595f..78974199d806b8 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml @@ -24,6 +24,28 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To execute this test case set onmode to any integer value because as default it value has null. + + ./chip-tool dishwashermode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + + [1690188722.057858][15975:15977] CHIP:DMG: StatusIB = + [1690188722.057862][15975:15977] CHIP:DMG: { + [1690188722.057865][15975:15977] CHIP:DMG: status = 0x00 (SUCCESS), + [1690188722.057867][15975:15977] CHIP:DMG: }, + disabled: true + + - label: "Precondition" + verification: | + 1 Dishwasher Mode and OnOff clusters are available on the same endpoint + + 2 The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,77 +56,75 @@ tests: - label: "Step 2: TH reads from the DUT the OnMode attribute." PICS: DISHM.S.A0003 && DISHM.S.F00 verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 + ./chip-tool dishwashermode read on-mode 1 1 - On TH(chip-tool), Verify OnMode attribute value is an integer. save the value as on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer or Null + Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - [1649678983.679893][10871:10876] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065073 - [1649678983.680002][10871:10876] CHIP:TOO: OnMode: 0 + [1690188734.934221][15978:15980] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 74242734 + [1690188734.934259][15978:15980] CHIP:TOO: OnMode: 0 disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 && DISHM.S.F00 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - On TH(chip-tool), Verify CurrentMode attribute is an integer. save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute is an integer. + Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. - [1649679034.895848][10879:10884] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679034.895972][10879:10884] CHIP:TOO: CurrentMode: 0 + [1690188747.957507][15982:15984] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242734 + [1690188747.957564][15982:15984] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 && DISHM.S.F00 verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. - Save the Mode field values as supported_modes_dut. - Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } + ./chip-tool dishwashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690188771.532158][15986:15988] CHIP:DMG: } + [1690188771.532258][15986:15988] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 74242734 + [1690188771.532287][15986:15988] CHIP:TOO: SupportedModes: 3 entries + [1690188771.532305][15986:15988] CHIP:TOO: [1]: { + [1690188771.532309][15986:15988] CHIP:TOO: Label: Normal + [1690188771.532316][15986:15988] CHIP:TOO: Mode: 0 + [1690188771.532321][15986:15988] CHIP:TOO: ModeTags: 1 entries + [1690188771.532327][15986:15988] CHIP:TOO: [1]: { + [1690188771.532331][15986:15988] CHIP:TOO: Value: 16384 + [1690188771.532334][15986:15988] CHIP:TOO: } + [1690188771.532338][15986:15988] CHIP:TOO: } + [1690188771.532345][15986:15988] CHIP:TOO: [2]: { + [1690188771.532348][15986:15988] CHIP:TOO: Label: Heavy + [1690188771.532352][15986:15988] CHIP:TOO: Mode: 1 + [1690188771.532358][15986:15988] CHIP:TOO: ModeTags: 2 entries + [1690188771.532363][15986:15988] CHIP:TOO: [1]: { + [1690188771.532366][15986:15988] CHIP:TOO: Value: 7 + [1690188771.532368][15986:15988] CHIP:TOO: } + [1690188771.532372][15986:15988] CHIP:TOO: [2]: { + [1690188771.532374][15986:15988] CHIP:TOO: Value: 16385 + [1690188771.532376][15986:15988] CHIP:TOO: } + [1690188771.532379][15986:15988] CHIP:TOO: } + [1690188771.532386][15986:15988] CHIP:TOO: [3]: { + [1690188771.532388][15986:15988] CHIP:TOO: Label: Light + [1690188771.532390][15986:15988] CHIP:TOO: Mode: 2 + [1690188771.532395][15986:15988] CHIP:TOO: ModeTags: 3 entries + [1690188771.532398][15986:15988] CHIP:TOO: [1]: { + [1690188771.532401][15986:15988] CHIP:TOO: Value: 16386 + [1690188771.532403][15986:15988] CHIP:TOO: } + [1690188771.532406][15986:15988] CHIP:TOO: [2]: { + [1690188771.532409][15986:15988] CHIP:TOO: Value: 8 + [1690188771.532411][15986:15988] CHIP:TOO: } + [1690188771.532414][15986:15988] CHIP:TOO: [3]: { + [1690188771.532417][15986:15988] CHIP:TOO: Value: 2 + [1690188771.532419][15986:15988] CHIP:TOO: } + [1690188771.532421][15986:15988] CHIP:TOO: } disabled: true - label: @@ -112,16 +132,14 @@ tests: to new_mode_th" PICS: DISHM.S.C00.Rsp && DISHM.S.F00 verification: | - ./chip-tool dishwashermodeselect change-to-mode 2 1 1 + ./chip-tool dishwashermode change-to-mode 2 1 1 - On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931013.571019][20667:20669] CHIP:DMG: - [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = - [1684931013.571024][20667:20669] CHIP:DMG: { - [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931013.571030][20667:20669] CHIP:DMG: }, - [1684931013.571034][20667:20669] CHIP:DMG: + [1690198333.074192][17405:17407] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 + [1690198333.074208][17405:17407] CHIP:TOO: ChangeToModeResponse: { + [1690198333.074213][17405:17407] CHIP:TOO: status: 0 + [1690198333.074216][17405:17407] CHIP:TOO: } disabled: true - label: "Step 6: TH sends a Off command to the DUT" @@ -131,7 +149,6 @@ tests: On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931101.118656][20709:20711] CHIP:DMG: StatusIB = [1684931101.118659][20709:20711] CHIP:DMG: { [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), [1684931101.118665][20709:20711] CHIP:DMG: }, @@ -144,7 +161,6 @@ tests: On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931217.055514][20729:20731] CHIP:DMG: StatusIB = [1684931217.055517][20729:20731] CHIP:DMG: { [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), [1684931217.055523][20729:20731] CHIP:DMG: }, @@ -153,10 +169,10 @@ tests: - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 && DISHM.S.F00 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - On TH(chip-tool), Verify that CurrentMode attribute value is an integer and value is equal to on_mode_dut. below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 - [1649679202.069163][10899:10904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679202.069278][10899:10904] CHIP:TOO: CurrentMode: 2 + [1690188859.713934][16004:16006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242736 + [1690188859.713980][16004:16006] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml index 960e14a4046d90..737dd31cc7c433 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml @@ -24,6 +24,19 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To Execute the TC-DISHM-3.2 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,108 +47,179 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: DISHM.S.A0002 verification: | - ./chip-tool dishwashermodeselect read start-up-mode 1 1 + ./chip-tool dishwashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer or null + - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is null - On TH(chip-tool), Verify StartUpMode attribute value is an integer. save the value as startup_mode_dut and below is the sample log provided for the raspi platform: + NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. - [1645777708.406864][4841:4846] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469721 - [1645777708.406933][4841:4846] CHIP:TOO: StartUpMode: 0 + [1690188941.380388][16015:16017] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 74242738 + [1690188941.380430][16015:16017] CHIP:TOO: StartUpMode: null disabled: true - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: DISHM.S.A0000 + verification: | + ./chip-tool dishwashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690188996.754102][16022:16024] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 74242738 + [1690188996.754208][16022:16024] CHIP:TOO: SupportedModes: 3 entries + [1690188996.754248][16022:16024] CHIP:TOO: [1]: { + [1690188996.754258][16022:16024] CHIP:TOO: Label: Normal + [1690188996.754270][16022:16024] CHIP:TOO: Mode: 0 + [1690188996.754285][16022:16024] CHIP:TOO: ModeTags: 1 entries + [1690188996.754302][16022:16024] CHIP:TOO: [1]: { + [1690188996.754314][16022:16024] CHIP:TOO: Value: 16384 + [1690188996.754325][16022:16024] CHIP:TOO: } + [1690188996.754336][16022:16024] CHIP:TOO: } + [1690188996.754360][16022:16024] CHIP:TOO: [2]: { + [1690188996.754369][16022:16024] CHIP:TOO: Label: Heavy + [1690188996.754378][16022:16024] CHIP:TOO: Mode: 1 + [1690188996.754393][16022:16024] CHIP:TOO: ModeTags: 2 entries + [1690188996.754407][16022:16024] CHIP:TOO: [1]: { + [1690188996.754416][16022:16024] CHIP:TOO: Value: 7 + [1690188996.754425][16022:16024] CHIP:TOO: } + [1690188996.754439][16022:16024] CHIP:TOO: [2]: { + [1690188996.754450][16022:16024] CHIP:TOO: Value: 16385 + [1690188996.754459][16022:16024] CHIP:TOO: } + [1690188996.754469][16022:16024] CHIP:TOO: } + [1690188996.754493][16022:16024] CHIP:TOO: [3]: { + [1690188996.754501][16022:16024] CHIP:TOO: Label: Light + [1690188996.754511][16022:16024] CHIP:TOO: Mode: 2 + [1690188996.754548][16022:16024] CHIP:TOO: ModeTags: 3 entries + [1690188996.754564][16022:16024] CHIP:TOO: [1]: { + [1690188996.754574][16022:16024] CHIP:TOO: Value: 16386 + [1690188996.754583][16022:16024] CHIP:TOO: } + [1690188996.754597][16022:16024] CHIP:TOO: [2]: { + [1690188996.754606][16022:16024] CHIP:TOO: Value: 8 + [1690188996.754615][16022:16024] CHIP:TOO: } + [1690188996.754629][16022:16024] CHIP:TOO: [3]: { + [1690188996.754638][16022:16024] CHIP:TOO: Value: 2 + [1690188996.754646][16022:16024] CHIP:TOO: } + [1690188996.754654][16022:16024] CHIP:TOO: } + disabled: true + + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: DISHM.S.A0002 + verification: | + ./chip-tool dishwashermode write start-up-mode 0 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690188912.259778][16011:16013] CHIP:DMG: { + [1690188912.259790][16011:16013] CHIP:DMG: status = 0x00 (SUCCESS), + [1690188912.259800][16011:16013] CHIP:DMG: }, + [1690188912.259813][16011:16013] CHIP:DMG: + disabled: true + + - label: "Step 5: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - On TH(chip-tool), Verify CurrentMode attribute value is an integer, - save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8. - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 + [1690189040.789208][16040:16042] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 1012425326 + [1690189040.789223][16040:16042] CHIP:TOO: CurrentMode: 0 disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. - Save the Mode field values as supported_modes_dut. - Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } + ./chip-tool dishwashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690188996.754102][16022:16024] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 74242738 + [1690188996.754208][16022:16024] CHIP:TOO: SupportedModes: 3 entries + [1690188996.754248][16022:16024] CHIP:TOO: [1]: { + [1690188996.754258][16022:16024] CHIP:TOO: Label: Normal + [1690188996.754270][16022:16024] CHIP:TOO: Mode: 0 + [1690188996.754285][16022:16024] CHIP:TOO: ModeTags: 1 entries + [1690188996.754302][16022:16024] CHIP:TOO: [1]: { + [1690188996.754314][16022:16024] CHIP:TOO: Value: 16384 + [1690188996.754325][16022:16024] CHIP:TOO: } + [1690188996.754336][16022:16024] CHIP:TOO: } + [1690188996.754360][16022:16024] CHIP:TOO: [2]: { + [1690188996.754369][16022:16024] CHIP:TOO: Label: Heavy + [1690188996.754378][16022:16024] CHIP:TOO: Mode: 1 + [1690188996.754393][16022:16024] CHIP:TOO: ModeTags: 2 entries + [1690188996.754407][16022:16024] CHIP:TOO: [1]: { + [1690188996.754416][16022:16024] CHIP:TOO: Value: 7 + [1690188996.754425][16022:16024] CHIP:TOO: } + [1690188996.754439][16022:16024] CHIP:TOO: [2]: { + [1690188996.754450][16022:16024] CHIP:TOO: Value: 16385 + [1690188996.754459][16022:16024] CHIP:TOO: } + [1690188996.754469][16022:16024] CHIP:TOO: } + [1690188996.754493][16022:16024] CHIP:TOO: [3]: { + [1690188996.754501][16022:16024] CHIP:TOO: Label: Light + [1690188996.754511][16022:16024] CHIP:TOO: Mode: 2 + [1690188996.754548][16022:16024] CHIP:TOO: ModeTags: 3 entries + [1690188996.754564][16022:16024] CHIP:TOO: [1]: { + [1690188996.754574][16022:16024] CHIP:TOO: Value: 16386 + [1690188996.754583][16022:16024] CHIP:TOO: } + [1690188996.754597][16022:16024] CHIP:TOO: [2]: { + [1690188996.754606][16022:16024] CHIP:TOO: Value: 8 + [1690188996.754615][16022:16024] CHIP:TOO: } + [1690188996.754629][16022:16024] CHIP:TOO: [3]: { + [1690188996.754638][16022:16024] CHIP:TOO: Value: 2 + [1690188996.754646][16022:16024] CHIP:TOO: } + [1690188996.754654][16022:16024] CHIP:TOO: } disabled: true - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: DISHM.S.C00.Rsp verification: | - ./chip-tool dishwashermodeselect change-to-mode 2 1 1 - + ./chip-tool dishwashermode change-to-mode 2 1 1 - On TH(chip-tool) , Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931419.768138][20792:20794] CHIP:DMG: StatusIB = - [1684931419.768143][20792:20794] CHIP:DMG: { - [1684931419.768148][20792:20794] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931419.768152][20792:20794] CHIP:DMG: }, + [1690265961.529808][30174:30176] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 + [1690265961.529857][30174:30176] CHIP:TOO: ChangeToModeResponse: { + [1690265961.529880][30174:30176] CHIP:TOO: status: 0 + [1690265961.529891][30174:30176] CHIP:TOO: } disabled: true - - label: "Step 6: Physically power cycle the device" + - label: "Step 8: Physically power cycle the device" verification: | Physically power cycle the device. disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 9: TH reads from the DUT the StartUpMode attribute." + PICS: DISHM.S.A0002 + verification: | + ./chip-tool dishwashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer. + - Save the value as new_start_up_mode_dut and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform, Here StartUpMode value is 0 + + [1690188941.380388][16015:16017] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 74242738 + [1690188941.380430][16015:16017] CHIP:TOO: StartUpMode: 0 + disabled: true + + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - on TH(chip-tool), Verify that CurrentMode attribute value is same as value recorded in step 1 and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 + [1690189040.789208][16040:16042] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 1012425326 + [1690189040.789223][16040:16042] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml index f2fec608881422..3efe1d547d7a2e 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml @@ -24,6 +24,19 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To Execute the TC-DISH-3.3 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,128 +47,181 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: DISHM.S.A0002 verification: | - ./chip-tool dishwashermodeselect read start-up-mode 1 1 + ./chip-tool dishwashermode read start-up-mode 1 1 - On TH(chip-tool) log, Verify StartUpMode attribute value is an integer. save this value as startup_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that StartUpMode attribute value is an integer or Null + - Save the value as startup_mode_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is null + NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 - [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: 0 + [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: null + disabled: true + + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: DISHM.S.A0000 + verification: | + ./chip-tool dishwashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690189296.612007][16077:16079] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 1012425327 + [1690189296.612104][16077:16079] CHIP:TOO: SupportedModes: 3 entries + [1690189296.612139][16077:16079] CHIP:TOO: [1]: { + [1690189296.612149][16077:16079] CHIP:TOO: Label: Normal + [1690189296.612168][16077:16079] CHIP:TOO: Mode: 0 + [1690189296.612189][16077:16079] CHIP:TOO: ModeTags: 1 entries + [1690189296.612214][16077:16079] CHIP:TOO: [1]: { + [1690189296.612224][16077:16079] CHIP:TOO: Value: 16384 + [1690189296.612234][16077:16079] CHIP:TOO: } + [1690189296.612243][16077:16079] CHIP:TOO: } + [1690189296.612264][16077:16079] CHIP:TOO: [2]: { + [1690189296.612273][16077:16079] CHIP:TOO: Label: Heavy + [1690189296.612282][16077:16079] CHIP:TOO: Mode: 1 + [1690189296.612296][16077:16079] CHIP:TOO: ModeTags: 2 entries + [1690189296.612309][16077:16079] CHIP:TOO: [1]: { + [1690189296.612318][16077:16079] CHIP:TOO: Value: 7 + [1690189296.612327][16077:16079] CHIP:TOO: } + [1690189296.612339][16077:16079] CHIP:TOO: [2]: { + [1690189296.612348][16077:16079] CHIP:TOO: Value: 16385 + [1690189296.612356][16077:16079] CHIP:TOO: } + [1690189296.612365][16077:16079] CHIP:TOO: } + [1690189296.612384][16077:16079] CHIP:TOO: [3]: { + [1690189296.612392][16077:16079] CHIP:TOO: Label: Light + [1690189296.612398][16077:16079] CHIP:TOO: Mode: 2 + [1690189296.612413][16077:16079] CHIP:TOO: ModeTags: 3 entries + [1690189296.612425][16077:16079] CHIP:TOO: [1]: { + [1690189296.612433][16077:16079] CHIP:TOO: Value: 16386 + [1690189296.612443][16077:16079] CHIP:TOO: } + [1690189296.612456][16077:16079] CHIP:TOO: [2]: { + [1690189296.612465][16077:16079] CHIP:TOO: Value: 8 + [1690189296.612473][16077:16079] CHIP:TOO: } + [1690189296.612485][16077:16079] CHIP:TOO: [3]: { + [1690189296.612494][16077:16079] CHIP:TOO: Value: 2 + [1690189296.612502][16077:16079] CHIP:TOO: } + [1690189296.612511][16077:16079] CHIP:TOO: } + disabled: true + + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: DISHM.S.A0002 + verification: | + ./chip-tool dishwashermode write start-up-mode 0 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690188912.259766][16011:16013] CHIP:DMG: StatusIB = + [1690188912.259778][16011:16013] CHIP:DMG: { + [1690188912.259790][16011:16013] CHIP:DMG: status = 0x00 (SUCCESS), + [1690188912.259800][16011:16013] CHIP:DMG: }, + [1690188912.259813][16011:16013] CHIP:DMG: disabled: true - - label: "Step 3: TH reads from the DUT the OnMode attribute." + - label: "Step 5: TH reads from the DUT the OnMode attribute." PICS: DISHM.S.A0003 && DISHM.S.A0002 verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 + Set onmode to any integer value because as default it value has null. + + ./chip-tool dishwashermode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690189187.414225][16062:16064] CHIP:DMG: StatusIB = + [1690189187.414237][16062:16064] CHIP:DMG: { + [1690189187.414249][16062:16064] CHIP:DMG: status = 0x00 (SUCCESS), + [1690189187.414260][16062:16064] CHIP:DMG: }, + - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as old_on_mode_dut and below is the sample log provided for the raspi platform: + ./chip-tool dishwashermode read on-mode 1 1 + On TH(chip-tool), Verify that OnMode attribute value is an integer value + - Save the value as old_on_mode_dut, below is the sample log provided for the raspi platform, here OnMode attribute value is 0 - [1654780979.979743][61542:61547] CHIP:DMG: } - [1654780979.980040][61542:61547] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 235764160 - [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 4 + NOTE: If startup_mode_dut is equal to old_on_mode_dut proceed to step 6. Else proceed to step 8. + + [1690189501.554415][16104:16106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 1012425329 + [1690189501.554429][16104:16106] CHIP:TOO: OnMode: 0 disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 && DISHM.S.A0002 verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. - Save the Mode field values as supported_modes_dut. - Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } + ./chip-tool dishwashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690189296.612007][16077:16079] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 1012425327 + [1690189296.612104][16077:16079] CHIP:TOO: SupportedModes: 3 entries + [1690189296.612139][16077:16079] CHIP:TOO: [1]: { + [1690189296.612149][16077:16079] CHIP:TOO: Label: Normal + [1690189296.612168][16077:16079] CHIP:TOO: Mode: 0 + [1690189296.612189][16077:16079] CHIP:TOO: ModeTags: 1 entries + [1690189296.612214][16077:16079] CHIP:TOO: [1]: { + [1690189296.612224][16077:16079] CHIP:TOO: Value: 16384 + [1690189296.612234][16077:16079] CHIP:TOO: } + [1690189296.612243][16077:16079] CHIP:TOO: } + [1690189296.612264][16077:16079] CHIP:TOO: [2]: { + [1690189296.612273][16077:16079] CHIP:TOO: Label: Heavy + [1690189296.612282][16077:16079] CHIP:TOO: Mode: 1 + [1690189296.612296][16077:16079] CHIP:TOO: ModeTags: 2 entries + [1690189296.612309][16077:16079] CHIP:TOO: [1]: { + [1690189296.612318][16077:16079] CHIP:TOO: Value: 7 + [1690189296.612327][16077:16079] CHIP:TOO: } + [1690189296.612339][16077:16079] CHIP:TOO: [2]: { + [1690189296.612348][16077:16079] CHIP:TOO: Value: 16385 + [1690189296.612356][16077:16079] CHIP:TOO: } + [1690189296.612365][16077:16079] CHIP:TOO: } + [1690189296.612384][16077:16079] CHIP:TOO: [3]: { + [1690189296.612392][16077:16079] CHIP:TOO: Label: Light + [1690189296.612398][16077:16079] CHIP:TOO: Mode: 2 + [1690189296.612413][16077:16079] CHIP:TOO: ModeTags: 3 entries + [1690189296.612425][16077:16079] CHIP:TOO: [1]: { + [1690189296.612433][16077:16079] CHIP:TOO: Value: 16386 + [1690189296.612443][16077:16079] CHIP:TOO: } + [1690189296.612456][16077:16079] CHIP:TOO: [2]: { + [1690189296.612465][16077:16079] CHIP:TOO: Value: 8 + [1690189296.612473][16077:16079] CHIP:TOO: } + [1690189296.612485][16077:16079] CHIP:TOO: [3]: { + [1690189296.612494][16077:16079] CHIP:TOO: Value: 2 + [1690189296.612502][16077:16079] CHIP:TOO: } + [1690189296.612511][16077:16079] CHIP:TOO: } disabled: true - label: - "Step 5: TH writes to the DUT the OnMode attribute with the + "Step 7: TH writes to the DUT the OnMode attribute with the new_mode_th value" PICS: DISHM.S.A0003 verification: | - ./chip-tool dishwashermodeselect write on-mode 7 1 1 + ./chip-tool dishwashermode write on-mode 2 1 1 On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651099941884] [84269:7567211] CHIP: [DMG] WriteResponseMessage = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIBs = - [1651099941884] [84269:7567211] CHIP: [DMG] [ - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIB = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] AttributePathIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] Endpoint = 0x1, - [1651099941887] [84269:7567211] CHIP: [DMG] Cluster = 0x50, - [1651099941887] [84269:7567211] CHIP: [DMG] Attribute = 0x0000_0005, - [1651099941887] [84269:7567211] CHIP: [DMG] } - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] StatusIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] ], - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] InteractionModelRevision = 1 - [1651099941887] [84269:7567211] CHIP: [DMG] } + [1690189470.746137][16086:16088] CHIP:DMG: { + [1690189470.746140][16086:16088] CHIP:DMG: status = 0x00 (SUCCESS), + [1690189470.746142][16086:16088] CHIP:DMG: }, disabled: true - - label: "Step 6: TH reads from the DUT the OnMode attribute." + - label: "Step 8: TH reads from the DUT the OnMode attribute." PICS: DISHM.S.A0003 && DISHM.S.F00 verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 + ./chip-tool dishwashermode read on-mode 1 1 - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as new_on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer + - Save the value as new_on_mode_dut and is equal to new_mode_th and below is the sample log provided for the raspi platform, here OnMode attribute value is 2 - [1669190858.739158][4187:4189] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4107771634 - [1669190858.739222][4187:4189] CHIP:TOO: OnMode: 7 + [1690189501.554415][16104:16106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 1012425329 + [1690189501.554429][16104:16106] CHIP:TOO: OnMode: 2 disabled: true - label: - "Step 7: TH writes to the DUT the StartUpOnOff attribute with the + "Step 9: TH writes to the DUT the StartUpOnOff attribute with the value 1." PICS: OO.S.A4003 verification: | @@ -163,44 +229,34 @@ tests: On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651101661959] [90832:7598169] CHIP: [DMG] WriteResponseMessage = - [1651101661959] [90832:7598169] CHIP: [DMG] { - [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIBs = - [1651101661959] [90832:7598169] CHIP: [DMG] [ - [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIB = - [1651101661959] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] AttributePathIB = - [1651101661960] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] Endpoint = 0x1, - [1651101661960] [90832:7598169] CHIP: [DMG] Cluster = 0x6, - [1651101661960] [90832:7598169] CHIP: [DMG] Attribute = 0x0000_4003, - [1651101661960] [90832:7598169] CHIP: [DMG] } - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] StatusIB = [1651101661960] [90832:7598169] CHIP: [DMG] { [1651101661960] [90832:7598169] CHIP: [DMG] status = 0x00 (SUCCESS), [1651101661960] [90832:7598169] CHIP: [DMG] }, - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] }, - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] ], - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] InteractionModelRevision = 1 - [1651101661960] [90832:7598169] CHIP: [DMG] } disabled: true - - label: "Step 8: Physically power cycle the device" + - label: "Step 10: Physically power cycle the device" verification: | Physically power cycle the device. disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + - label: "Step 11: TH reads from the DUT the StartUpMode attribute." + PICS: DISHM.S.A0002 + verification: | + ./chip-tool dishwashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is an integer and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is 0 + + [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 + [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: 0 + disabled: true + + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." PICS: DISHM.S.A0001 verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 - On TH(chip-tool), Verify CurrentMode attribute value is same as the value recorded in step 3 and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_on_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 - [1669190936.869804][4194:4196] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3908583538 - [1669190936.869875][4194:4196] CHIP:TOO: CurrentMode: 7 + [1690189536.790233][16118:16120] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 4080703118 + [1690189536.790280][16118:16120] CHIP:TOO: CurrentMode: 2 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml index 2e9008d4eca7b4..686061edda9c34 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml @@ -583,7 +583,7 @@ tests: constraints: type: int16u minValue: 0 - maxValue: 65534 + maxValue: 255 - label: "Step 17b: TH writes MinRFIDCodeLength attribute as 17" PICS: DRLK.S.F01 && DRLK.S.A001a diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml index 38290883e3b699..4481532c0ca1af 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml @@ -227,7 +227,7 @@ tests: response: error: FAILURE - - label: "TStep 10a: H reads the WrongCodeEntryLimit attribute from the DUT" + - label: "Step 10a: H reads the WrongCodeEntryLimit attribute from the DUT" PICS: DRLK.S.A0030 command: "readAttribute" attribute: "WrongCodeEntryLimit" diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml index 9b04eb751ec30d..e1169d4acd1aeb 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml @@ -219,120 +219,60 @@ tests: - name: "Status" constraints: anyOf: [0x2, 0x3] - - name: "UserIndex" - value: null - label: "Step 6b: TH sends Set Credential Command to DUT and Verify that the - DUT sends Set Credential Response command with response as OCCUPIED if - the CredentialIndex is repeated" - verification: | - ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1, "credentialIndex" : 1}' 123456 1 null null 1 1 --timedInteractionTimeoutMs 1000 - - Verify "DUT sends Set Credential Response command with response as DUPLICATE or OCCUPIED" on the TH(Chip-tool) Log: - - [1660216276.191641][71849:71854] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 - [1660216276.191673][71849:71854] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 - [1660216276.191725][71849:71854] CHIP:TOO: SetCredentialResponse: { - [1660216276.191752][71849:71854] CHIP:TOO: status: 2 - [1660216276.191764][71849:71854] CHIP:TOO: userIndex: null - [1660216276.191776][71849:71854] CHIP:TOO: nextCredentialIndex: 2 - [1660216276.191798][71849:71854] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + DUT sends Set Credential Response command with status as DUPLICATE or + OCCUPIED." + PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + command: "SetCredential" + timedInteractionTimeoutMs: 10000 arguments: values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #- label: - # "Step 6b: TH sends Set Credential Command to DUT and Verify that the DUT sends - # Set Credential Response command with response as OCCUPIED if the - # CredentialIndex is repeated" - # PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx - # command: "SetCredential" - # timedInteractionTimeoutMs: 10000 - # arguments: - # values: - # - name: "OperationType" - # value: 0 - # - name: "Credential" - # value: { CredentialType: 1, CredentialIndex: 1 } - # - name: "CredentialData" - # value: "123456" - # - name: "UserIndex" - # value: 1 - # - name: "UserStatus" - # value: null - # - name: "UserType" - # value: null - # response: - # values: - # - name: "Status" - # constraints: - # anyOf: [0x2, 0x3] - # - name: "UserIndex" - # value: null + - name: "OperationType" + value: 0 + - name: "Credential" + value: { CredentialType: 1, CredentialIndex: 1 } + - name: "CredentialData" + value: "123457" + - name: "UserIndex" + value: 1 + - name: "UserStatus" + value: null + - name: "UserType" + value: null + response: + values: + - name: "Status" + constraints: + anyOf: [0x2, 0x3] - #Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed. - label: "Step 7: TH sends Set Credential Command to DUT and Verify that the - DUT sends Set Credential Response command with response as OCCUPIED if - the CredentialIndex is repeated" - PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx - verification: | - Mark as not applicable and proceed to next step - - ./chip-tool doorlock set-credential 2 '{ "credentialType" : 1, "credentialIndex" : 3 }' 1234567 1 null null 1 1 --timedInteractionTimeoutMs 1000 - Verify "DUT sends Set Credential Response command with response as OCCUPIED" on the TH(Chip-tool) Log: - - [1658473055.384297][2667:2672] CHIP:DMG: }, - [1658473055.384374][2667:2672] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 - [1658473055.384433][2667:2672] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 - [1658473055.384516][2667:2672] CHIP:TOO: SetCredentialResponse: { - [1658473055.384571][2667:2672] CHIP:TOO: status: 2 - [1658473055.384602][2667:2672] CHIP:TOO: userIndex: null - [1658473055.384632][2667:2672] CHIP:TOO: nextCredentialIndex: 4 - [1658473055.384660][2667:2672] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" + DUT sends Set Credential Response command with status + INVALID_COMMAND(0x85) if the CredentialIndex is not associated with + the UserIndex." + PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + command: "SetCredential" + timedInteractionTimeoutMs: 10000 arguments: values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #- label: - # "Step 7: TH sends Set Credential Command to DUT and Verify that the DUT sends - # Set Credential Response command with response as OCCUPIED if the - # CredentialIndex is repeated" - # PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx - # command: "SetCredential" - # timedInteractionTimeoutMs: 10000 - # arguments: - # values: - # - name: "OperationType" - # value: 2 - # - name: "Credential" - # value: { CredentialType: 1, CredentialIndex: 3 } - # - name: "CredentialData" - # value: "123456" - # - name: "UserIndex" - # value: 1 - # - name: "UserStatus" - # value: null - # - name: "UserType" - # value: null - # response: - # values: - # - name: "Status" - # value: 0x3 - # - name: "UserIndex" - # value: null + - name: "OperationType" + value: 2 + - name: "Credential" + value: { CredentialType: 1, CredentialIndex: 3 } + - name: "CredentialData" + value: "1234567" + - name: "UserIndex" + value: 1 + - name: "UserStatus" + value: null + - name: "UserType" + value: null + response: + values: + - name: "Status" + value: 0x85 - label: "Step 8: TH sends Clear Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C26.Rsp diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_1_Simulated.yaml deleted file mode 100644 index 062b253bb8f103..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DRLK_3_1_Simulated.yaml +++ /dev/null @@ -1,212 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 121.3.1. [TC-DRLK-3.1] Attributes check [DUT - Client] - -PICS: - - DRLK.C - -config: - nodeId: 0x12344321 - cluster: "Door Lock" - endpoint: 0 - -tests: - - label: "Wait for the device to be commissioned" - cluster: "DelayCommands" - command: "WaitForCommissioning" - - - label: "DUT reads LockState attribute value from TH" - wait: "readAttribute" - attribute: "LockState" - PICS: DRLK.C.A0000 - - - label: "DUT reads LockType attribute value from TH" - wait: "readAttribute" - attribute: "LockType" - PICS: DRLK.C.A0001 - - - label: "DUT reads ActuatorEnabled attribute value from TH" - wait: "readAttribute" - attribute: "ActuatorEnabled" - PICS: DRLK.C.A0002 - - - label: "DUT reads DoorState attribute value from TH" - wait: "readAttribute" - attribute: "DoorState" - PICS: DRLK.C.F05 && DRLK.C.A0003 - - - label: "DUT reads DoorOpenEvents attribute value from TH" - wait: "readAttribute" - attribute: "DoorOpenEvents" - PICS: DRLK.C.F05 && DRLK.C.A0004 - - - label: "DUT reads DoorClosedEvents attribute value from TH" - wait: "readAttribute" - attribute: "DoorClosedEvents" - PICS: DRLK.C.F05 && DRLK.C.A0005 - - - label: "DUT reads OpenPeriod attribute value from TH" - wait: "readAttribute" - attribute: "OpenPeriod" - PICS: DRLK.C.F05 && DRLK.C.A0006 - - - label: "DUT reads NumberOfTotalUsersSupported attribute value from TH" - wait: "readAttribute" - attribute: "NumberOfTotalUsersSupported" - PICS: DRLK.C.F05 && DRLK.C.A0011 - - - label: "DUT reads NumberofPINUsersSupported attribute value from TH" - wait: "readAttribute" - attribute: "NumberOfPINUsersSupported" - PICS: DRLK.C.F00 && DRLK.C.A0012 - - - label: "DUT reads NumberofRFIDUsersSupported attribute value from TH" - wait: "readAttribute" - attribute: "NumberOfRFIDUsersSupported" - PICS: DRLK.C.F01 && DRLK.C.A0013 - - - label: - "DUT reads NumberofWeekDaysSchedulesSupported attribute value from TH" - wait: "readAttribute" - attribute: "NumberOfWeekDaySchedulesSupportedPerUser" - PICS: DRLK.C.F04 && DRLK.C.A0014 - - - label: - "DUT reads NumberofYearDaysSchedulesSupported attribute value from TH" - wait: "readAttribute" - attribute: "NumberOfYearDaySchedulesSupportedPerUser" - PICS: DRLK.C.F04 && DRLK.C.A0015 - - - label: - "DUT reads NumberofHolidaySchedulesSupported attribute value from TH" - wait: "readAttribute" - attribute: "NumberOfHolidaySchedulesSupported" - PICS: DRLK.C.F04 && DRLK.C.A0016 - - - label: "DUT reads MaxPINCodeLength attribute value from TH" - wait: "readAttribute" - attribute: "MaxPINCodeLength" - PICS: DRLK.C.F00 && DRLK.C.A0017 - - - label: "DUT reads MinPINCodeLength attribute value from TH" - wait: "readAttribute" - attribute: "MinPINCodeLength" - PICS: DRLK.C.F00 && DRLK.C.A0018 - - - label: "DUT reads MaxRFIDCodeLength attribute value from TH" - wait: "readAttribute" - attribute: "MaxRFIDCodeLength" - PICS: DRLK.C.F01 && DRLK.C.A0019 - - - label: "DUT reads MinRFIDCodeLength attribute value from TH" - wait: "readAttribute" - attribute: "MinRFIDCodeLength" - PICS: DRLK.C.F01 && DRLK.C.A001a - - - label: "DUT reads CredentialRulesSupport attribute value from TH" - wait: "readAttribute" - attribute: "CredentialRulesSupport" - PICS: DRLK.C.F08 && DRLK.C.A001b - - - label: "DUT reads Language attribute value from TH" - wait: "readAttribute" - attribute: "Language" - PICS: DRLK.C.A0021 - - - label: "DUT reads LEDSettings attribute value from TH" - wait: "readAttribute" - attribute: "LEDSettings" - PICS: DRLK.C.A0022 - - - label: "DUT reads AutoRelockTime attribute value from TH" - wait: "readAttribute" - attribute: "AutoRelockTime" - PICS: DRLK.C.A0023 - - - label: "DUT reads SoundVolume attribute value from TH" - wait: "readAttribute" - attribute: "SoundVolume" - PICS: DRLK.C.A0024 - - - label: "DUT reads OperatingMode attribute value from TH" - wait: "readAttribute" - attribute: "OperatingMode" - PICS: DRLK.C.A0025 - - - label: "DUT reads SupportedOperatingModes attribute value from TH" - wait: "readAttribute" - attribute: "SupportedOperatingModes" - PICS: DRLK.C.A0026 - - - label: "DUT reads DefaultConfigurationRegister attribute value from TH" - wait: "readAttribute" - attribute: "DefaultConfigurationRegister" - PICS: DRLK.C.A0027 - - - label: "DUT reads EnableLocalProgramming attribute value from TH" - wait: "readAttribute" - attribute: "EnableLocalProgramming" - PICS: DRLK.C.A0028 - - - label: "DUT reads EnableOneTouchLocking attribute value from TH" - wait: "readAttribute" - attribute: "EnableOneTouchLocking" - PICS: DRLK.C.A0029 - - - label: "DUT reads EnableInsideStatusLED attribute value from TH" - wait: "readAttribute" - attribute: "EnableInsideStatusLED" - PICS: DRLK.C.A002a - - - label: "DUT reads EnablePrivacyModeButton attribute value from TH" - wait: "readAttribute" - attribute: "EnablePrivacyModeButton" - PICS: DRLK.C.A002b - - - label: "DUT reads LocalProgrammingFeatures attribute value from TH" - wait: "readAttribute" - attribute: "LocalProgrammingFeatures" - PICS: DRLK.C.A002c - - - label: "DUT reads WrongCodeEntryLimit attribute value from TH" - wait: "readAttribute" - attribute: "WrongCodeEntryLimit" - PICS: DRLK.C.F00 && DRLK.C.F01 && DRLK.C.A0030 - - - label: "DUT reads UserCodeTemporaryDisableTime attribute value from TH" - wait: "readAttribute" - attribute: "UserCodeTemporaryDisableTime" - PICS: DRLK.C.F00 && DRLK.C.F01 && DRLK.C.A0031 - - - label: "DUT reads SendPINOverTheAir attribute value from TH" - wait: "readAttribute" - attribute: "SendPINOverTheAir" - PICS: DRLK.C.F07 && DRLK.C.F00 && DRLK.C.A0032 - - - label: "DUT reads RequirePINForRemoteOperation attribute value from TH" - wait: "readAttribute" - attribute: "RequirePINforRemoteOperation" - PICS: DRLK.C.F07 && DRLK.C.F00 && DRLK.C.A0033 - - - label: "DUT reads ExpiringUserTimeOut attribute value from TH" - wait: "readAttribute" - attribute: "ExpiringUserTimeout" - PICS: DRLK.C.F08 && DRLK.C.A0035 - - - label: - "DUT reads NumberOfCredentialsSupportedPerUser attribute value from TH" - wait: "readAttribute" - attribute: "NumberOfCredentialsSupportedPerUser" - PICS: DRLK.C.F08 && DRLK.C.A001c diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml deleted file mode 100644 index 561ed8fa37149f..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml +++ /dev/null @@ -1,995 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 116.3.3. [TC-DRLK-3.3] Verification for the Door Lock Events [DUT - Client] - -PICS: - - DRLK.C - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: "Note" - verification: | - "NOTE: https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/linux#readme - Events to be executed as following - 1. Compile app using below command in connectedhomeip folder - a. ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-arm64-all-clusters-no-ble-asan-clang build" - 2. Build respective app (lock-app) - 3. Commission DUT to TH - 4. Open 2nd terminal of DUT and provide the below command to obtain PID of DUT - ps -aef|grep lock-app - 5. Follow the Verification step below to generate the event in 2nd terminal of DUT " - - - "Pre-Conditions - - Before sending the Events proceed following step: - - 1. Send Set User Command and Get User for setting User. - - 2. Send Set Credential Command and Get Credential Status for setting PIN code. - - After sending Events with all condition proceed following step - - 1. Send Clear Credential and Clear User Command. - - " - disabled: true - - - label: - "Step 1: TH will initiate DoorLockAlarm Event (LockJammed scenario)" - PICS: DRLK.C.E00 - verification: | - To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in lock-app to generate the event, Vendor Dut should have capability to generate this event) - - - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner) and TH as lock-app. - - To generate the event give below command - echo '{"Cmd": "SendDoorLockAlarm", "Params": { "EndpointId": 1, "AlarmCode": 0 } }' > /tmp/chip_lock_app_fifo- (PID of lock app) - - ./chip-tool doorlock read-event door-lock-alarm 1 1 --trace_decode 1 - - Verify DoorLockAlarm event response on TH(Lock-app) log: - - [1685673738.170024][2702:2704] CHIP:DMG: ReportDataMessage = - [1685673738.170087][2702:2704] CHIP:DMG: { - [1685673738.170137][2702:2704] CHIP:DMG: EventReportIBs = - [1685673738.170234][2702:2704] CHIP:DMG: [ - [1685673738.170292][2702:2704] CHIP:DMG: EventReportIB = - [1685673738.170404][2702:2704] CHIP:DMG: { - [1685673738.170467][2702:2704] CHIP:DMG: EventDataIB = - [1685673738.170538][2702:2704] CHIP:DMG: { - [1685673738.170627][2702:2704] CHIP:DMG: EventPath = - [1685673738.170701][2702:2704] CHIP:DMG: { - [1685673738.170799][2702:2704] CHIP:DMG: Endpoint = 0x1, - [1685673738.170878][2702:2704] CHIP:DMG: Cluster = 0x101, - [1685673738.170978][2702:2704] CHIP:DMG: Event = 0x0, - [1685673738.171054][2702:2704] CHIP:DMG: }, - [1685673738.171152][2702:2704] CHIP:DMG: - [1685673738.171225][2702:2704] CHIP:DMG: EventNumber = 0x10, - [1685673738.171332][2702:2704] CHIP:DMG: PriorityLevel = 0x2, - [1685673738.171407][2702:2704] CHIP:DMG: EpochTimestamp = 0x18879fbdff3, - [1685673738.171505][2702:2704] CHIP:DMG: EventData = - [1685673738.171581][2702:2704] CHIP:DMG: { - [1685673738.171681][2702:2704] CHIP:DMG: 0x0 = 0, - [1685673738.171762][2702:2704] CHIP:DMG: }, - [1685673738.171853][2702:2704] CHIP:DMG: }, - [1685673738.171934][2702:2704] CHIP:DMG: - [1685673738.172017][2702:2704] CHIP:DMG: }, - [1685673738.172095][2702:2704] CHIP:DMG: - [1685673738.172170][2702:2704] CHIP:DMG: ], - [1685673738.172246][2702:2704] CHIP:DMG: - [1685673738.172303][2702:2704] CHIP:DMG: SuppressResponse = true, - [1685673738.172382][2702:2704] CHIP:DMG: InteractionModelRevision = 1 - [1685673738.172437][2702:2704] CHIP:DMG: } - disabled: true - - - label: - "Step 2: DUT sends the Unlock Door command to the TH with valid - PINCode" - PICS: DRLK.C.C01.Tx - verification: | - ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 - - Verify TH receives Set user command with SUCCESS response on TH(lock-app) log: - - [1685673762.886102][2706:2708] CHIP:DMG: InvokeResponseMessage = - [1685673762.886157][2706:2708] CHIP:DMG: { - [1685673762.886210][2706:2708] CHIP:DMG: suppressResponse = false, - [1685673762.886267][2706:2708] CHIP:DMG: InvokeResponseIBs = - [1685673762.886340][2706:2708] CHIP:DMG: [ - [1685673762.886397][2706:2708] CHIP:DMG: InvokeResponseIB = - [1685673762.886473][2706:2708] CHIP:DMG: { - [1685673762.886533][2706:2708] CHIP:DMG: CommandStatusIB = - [1685673762.886613][2706:2708] CHIP:DMG: { - [1685673762.886680][2706:2708] CHIP:DMG: CommandPathIB = - [1685673762.886755][2706:2708] CHIP:DMG: { - [1685673762.886830][2706:2708] CHIP:DMG: EndpointId = 0x1, - [1685673762.886911][2706:2708] CHIP:DMG: ClusterId = 0x101, - [1685673762.886985][2706:2708] CHIP:DMG: CommandId = 0x1a, - [1685673762.887060][2706:2708] CHIP:DMG: }, - [1685673762.887144][2706:2708] CHIP:DMG: - [1685673762.887212][2706:2708] CHIP:DMG: StatusIB = - [1685673762.887291][2706:2708] CHIP:DMG: { - [1685673762.887367][2706:2708] CHIP:DMG: status = 0x00 (SUCCESS), - [1685673762.887444][2706:2708] CHIP:DMG: }, - [1685673762.887516][2706:2708] CHIP:DMG: - [1685673762.887582][2706:2708] CHIP:DMG: }, - [1685673762.887659][2706:2708] CHIP:DMG: - [1685673762.887719][2706:2708] CHIP:DMG: }, - [1685673762.887790][2706:2708] CHIP:DMG: - [1685673762.887845][2706:2708] CHIP:DMG: ], - [1685673762.887915][2706:2708] CHIP:DMG: - [1685673762.887971][2706:2708] CHIP:DMG: InteractionModelRevision = 1 - [1685673762.888027][2706:2708] CHIP:DMG: }, - - - - ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 1 }' 123456 1 null null 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 - - Verify TH receives Set credential command response on TH(lock-app) log: - - [1685673784.984804][2711:2713] CHIP:DMG: InvokeResponseMessage = - [1685673784.984861][2711:2713] CHIP:DMG: { - [1685673784.984941][2711:2713] CHIP:DMG: suppressResponse = false, - [1685673784.984998][2711:2713] CHIP:DMG: InvokeResponseIBs = - [1685673784.985092][2711:2713] CHIP:DMG: [ - [1685673784.985151][2711:2713] CHIP:DMG: InvokeResponseIB = - [1685673784.985249][2711:2713] CHIP:DMG: { - [1685673784.985311][2711:2713] CHIP:DMG: CommandDataIB = - [1685673784.985384][2711:2713] CHIP:DMG: { - [1685673784.985472][2711:2713] CHIP:DMG: CommandPathIB = - [1685673784.985548][2711:2713] CHIP:DMG: { - [1685673784.985647][2711:2713] CHIP:DMG: EndpointId = 0x1, - [1685673784.985728][2711:2713] CHIP:DMG: ClusterId = 0x101, - [1685673784.985852][2711:2713] CHIP:DMG: CommandId = 0x23, - [1685673784.985953][2711:2713] CHIP:DMG: }, - [1685673784.986034][2711:2713] CHIP:DMG: - [1685673784.986123][2711:2713] CHIP:DMG: CommandFields = - [1685673784.986198][2711:2713] CHIP:DMG: { - [1685673784.986295][2711:2713] CHIP:DMG: 0x0 = 0, - [1685673784.986375][2711:2713] CHIP:DMG: 0x1 = NULL - [1685673784.986478][2711:2713] CHIP:DMG: 0x2 = 2, - [1685673784.986558][2711:2713] CHIP:DMG: }, - [1685673784.986649][2711:2713] CHIP:DMG: }, - [1685673784.986728][2711:2713] CHIP:DMG: - [1685673784.986788][2711:2713] CHIP:DMG: }, - [1685673784.986892][2711:2713] CHIP:DMG: - [1685673784.986948][2711:2713] CHIP:DMG: ], - [1685673784.987044][2711:2713] CHIP:DMG: - [1685673784.987102][2711:2713] CHIP:DMG: InteractionModelRevision = 1 - [1685673784.987157][2711:2713] CHIP:DMG: }, - - - - - - ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PINCode 123456 --trace_decode 1 - - Verify TH receives Unlock Door command with SUCCESS response on TH(lock-app) log: - - [1685673812.339507][2715:2717] CHIP:DMG: InvokeResponseMessage = - [1685673812.339564][2715:2717] CHIP:DMG: { - [1685673812.339617][2715:2717] CHIP:DMG: suppressResponse = false, - [1685673812.339674][2715:2717] CHIP:DMG: InvokeResponseIBs = - [1685673812.339745][2715:2717] CHIP:DMG: [ - [1685673812.339801][2715:2717] CHIP:DMG: InvokeResponseIB = - [1685673812.339893][2715:2717] CHIP:DMG: { - [1685673812.339964][2715:2717] CHIP:DMG: CommandStatusIB = - [1685673812.340053][2715:2717] CHIP:DMG: { - [1685673812.340135][2715:2717] CHIP:DMG: CommandPathIB = - [1685673812.340226][2715:2717] CHIP:DMG: { - [1685673812.340320][2715:2717] CHIP:DMG: EndpointId = 0x1, - [1685673812.340415][2715:2717] CHIP:DMG: ClusterId = 0x101, - [1685673812.340510][2715:2717] CHIP:DMG: CommandId = 0x1, - [1685673812.340600][2715:2717] CHIP:DMG: }, - [1685673812.340699][2715:2717] CHIP:DMG: - [1685673812.340782][2715:2717] CHIP:DMG: StatusIB = - [1685673812.340864][2715:2717] CHIP:DMG: { - [1685673812.340947][2715:2717] CHIP:DMG: status = 0x00 (SUCCESS), - [1685673812.341028][2715:2717] CHIP:DMG: }, - [1685673812.341111][2715:2717] CHIP:DMG: - [1685673812.341185][2715:2717] CHIP:DMG: }, - [1685673812.341270][2715:2717] CHIP:DMG: - [1685673812.341341][2715:2717] CHIP:DMG: }, - [1685673812.341422][2715:2717] CHIP:DMG: - [1685673812.341479][2715:2717] CHIP:DMG: ], - [1685673812.341551][2715:2717] CHIP:DMG: - [1685673812.341606][2715:2717] CHIP:DMG: InteractionModelRevision = 1 - [1685673812.341661][2715:2717] CHIP:DMG: }, - disabled: true - - - label: - "Step 3: TH initiates DoorStateChange event with DoorState set to - DoorOpen" - PICS: DRLK.C.F05 && DRLK.C.E01 - verification: | - To trigger the event give below command in another terminal of DUT - echo '{"Cmd": "SetDoorState", "Params": { "EndpointId": 1, "DoorState": 1 } }' > /tmp/chip_lock_app_fifo- (PID of lock-app) - - ./chip-tool doorlock read-event door-state-change 1 1 --trace_decode 1 - - Verify DoorStateChange event response on TH(Lock-app) log: - - [1685673847.500892][2722:2724] CHIP:DMG: ReportDataMessage = - [1685673847.500955][2722:2724] CHIP:DMG: { - [1685673847.501030][2722:2724] CHIP:DMG: EventReportIBs = - [1685673847.501110][2722:2724] CHIP:DMG: [ - [1685673847.501166][2722:2724] CHIP:DMG: EventReportIB = - [1685673847.501272][2722:2724] CHIP:DMG: { - [1685673847.501334][2722:2724] CHIP:DMG: EventDataIB = - [1685673847.501428][2722:2724] CHIP:DMG: { - [1685673847.501497][2722:2724] CHIP:DMG: EventPath = - [1685673847.501592][2722:2724] CHIP:DMG: { - [1685673847.501672][2722:2724] CHIP:DMG: Endpoint = 0x1, - [1685673847.501823][2722:2724] CHIP:DMG: Cluster = 0x101, - [1685673847.501905][2722:2724] CHIP:DMG: Event = 0x1, - [1685673847.501999][2722:2724] CHIP:DMG: }, - [1685673847.502081][2722:2724] CHIP:DMG: - [1685673847.502175][2722:2724] CHIP:DMG: EventNumber = 0x1, - [1685673847.502250][2722:2724] CHIP:DMG: PriorityLevel = 0x2, - [1685673847.502345][2722:2724] CHIP:DMG: EpochTimestamp = 0x18879f130f2, - [1685673847.502419][2722:2724] CHIP:DMG: EventData = - [1685673847.502514][2722:2724] CHIP:DMG: { - [1685673847.502594][2722:2724] CHIP:DMG: 0x0 = 1, - [1685673847.502695][2722:2724] CHIP:DMG: }, - [1685673847.502767][2722:2724] CHIP:DMG: }, - [1685673847.502867][2722:2724] CHIP:DMG: - [1685673847.502930][2722:2724] CHIP:DMG: }, - [1685673847.503007][2722:2724] CHIP:DMG: - [1685673847.503085][2722:2724] CHIP:DMG: ], - [1685673847.503160][2722:2724] CHIP:DMG: - [1685673847.503249][2722:2724] CHIP:DMG: SuppressResponse = true, - [1685673847.503313][2722:2724] CHIP:DMG: InteractionModelRevision = 1 - [1685673847.503368][2722:2724] CHIP:DMG: } - disabled: true - - - label: - "Step 4: DUT sends the Lock Door command to the TH with valid PINCode" - PICS: DRLK.C.C00.Tx - verification: | - ./chip-tool doorlock lock-door 1 1 --timedInteractionTimeoutMs 1000 --PINCode 123456 --trace_decode 1 - - Verify TH receives Lock Door command with SUCCESS response on TH(lock-app) log: - - [1685673873.420811][2727:2729] CHIP:DMG: InvokeResponseMessage = - [1685673873.420869][2727:2729] CHIP:DMG: { - [1685673873.420923][2727:2729] CHIP:DMG: suppressResponse = false, - [1685673873.420980][2727:2729] CHIP:DMG: InvokeResponseIBs = - [1685673873.421052][2727:2729] CHIP:DMG: [ - [1685673873.421110][2727:2729] CHIP:DMG: InvokeResponseIB = - [1685673873.421192][2727:2729] CHIP:DMG: { - [1685673873.421255][2727:2729] CHIP:DMG: CommandStatusIB = - [1685673873.421325][2727:2729] CHIP:DMG: { - [1685673873.421392][2727:2729] CHIP:DMG: CommandPathIB = - [1685673873.421468][2727:2729] CHIP:DMG: { - [1685673873.421545][2727:2729] CHIP:DMG: EndpointId = 0x1, - [1685673873.421623][2727:2729] CHIP:DMG: ClusterId = 0x101, - [1685673873.421697][2727:2729] CHIP:DMG: CommandId = 0x0, - [1685673873.421805][2727:2729] CHIP:DMG: }, - [1685673873.421896][2727:2729] CHIP:DMG: - [1685673873.421963][2727:2729] CHIP:DMG: StatusIB = - [1685673873.422039][2727:2729] CHIP:DMG: { - [1685673873.422116][2727:2729] CHIP:DMG: status = 0x00 (SUCCESS), - [1685673873.422194][2727:2729] CHIP:DMG: }, - [1685673873.422271][2727:2729] CHIP:DMG: - [1685673873.422339][2727:2729] CHIP:DMG: }, - [1685673873.422416][2727:2729] CHIP:DMG: - [1685673873.422475][2727:2729] CHIP:DMG: }, - [1685673873.422546][2727:2729] CHIP:DMG: - [1685673873.422601][2727:2729] CHIP:DMG: ], - [1685673873.422671][2727:2729] CHIP:DMG: - [1685673873.422726][2727:2729] CHIP:DMG: InteractionModelRevision = 1 - [1685673873.422780][2727:2729] CHIP:DMG: }, - disabled: true - - - label: - "Step 5: TH will initiate LockOperation event with LockOperationType - to Lock" - PICS: DRLK.C.E02 - verification: | - ./chip-tool doorlock read-event lock-operation 1 1 --trace_decode 1 - - Verify LockOperation event response on TH(Lock-app) log: - - [1685673894.510509][2730:2732] CHIP:DMG: ReportDataMessage = - [1685673894.510571][2730:2732] CHIP:DMG: { - [1685673894.510620][2730:2732] CHIP:DMG: EventReportIBs = - [1685673894.510700][2730:2732] CHIP:DMG: [ - [1685673894.510756][2730:2732] CHIP:DMG: EventReportIB = - [1685673894.510839][2730:2732] CHIP:DMG: { - [1685673894.510899][2730:2732] CHIP:DMG: EventDataIB = - [1685673894.510974][2730:2732] CHIP:DMG: { - [1685673894.511041][2730:2732] CHIP:DMG: EventPath = - [1685673894.511119][2730:2732] CHIP:DMG: { - [1685673894.511194][2730:2732] CHIP:DMG: Endpoint = 0x1, - [1685673894.511274][2730:2732] CHIP:DMG: Cluster = 0x101, - [1685673894.511352][2730:2732] CHIP:DMG: Event = 0x2, - [1685673894.511428][2730:2732] CHIP:DMG: }, - [1685673894.511507][2730:2732] CHIP:DMG: - [1685673894.511578][2730:2732] CHIP:DMG: EventNumber = 0x4, - [1685673894.511654][2730:2732] CHIP:DMG: PriorityLevel = 0x2, - [1685673894.511728][2730:2732] CHIP:DMG: EpochTimestamp = 0x18879f18196, - [1685673894.511802][2730:2732] CHIP:DMG: EventData = - [1685673894.511875][2730:2732] CHIP:DMG: { - [1685673894.511959][2730:2732] CHIP:DMG: 0x0 = 0, - [1685673894.512040][2730:2732] CHIP:DMG: 0x1 = 7, - [1685673894.512120][2730:2732] CHIP:DMG: 0x2 = NULL - [1685673894.512199][2730:2732] CHIP:DMG: 0x3 = 1, - [1685673894.512281][2730:2732] CHIP:DMG: 0x4 = 112233, - [1685673894.512360][2730:2732] CHIP:DMG: 0x5 = NULL - [1685673894.512439][2730:2732] CHIP:DMG: }, - [1685673894.512509][2730:2732] CHIP:DMG: }, - [1685673894.512594][2730:2732] CHIP:DMG: - [1685673894.512653][2730:2732] CHIP:DMG: }, - [1685673894.512754][2730:2732] CHIP:DMG: - [1685673894.512810][2730:2732] CHIP:DMG: EventReportIB = - [1685673894.512894][2730:2732] CHIP:DMG: { - [1685673894.512955][2730:2732] CHIP:DMG: EventDataIB = - [1685673894.513022][2730:2732] CHIP:DMG: { - [1685673894.513089][2730:2732] CHIP:DMG: EventPath = - [1685673894.513161][2730:2732] CHIP:DMG: { - [1685673894.513236][2730:2732] CHIP:DMG: Endpoint = 0x1, - [1685673894.513315][2730:2732] CHIP:DMG: Cluster = 0x101, - [1685673894.513393][2730:2732] CHIP:DMG: Event = 0x2, - [1685673894.513467][2730:2732] CHIP:DMG: }, - [1685673894.513545][2730:2732] CHIP:DMG: - [1685673894.513615][2730:2732] CHIP:DMG: EventNumber = 0x5, - [1685673894.513689][2730:2732] CHIP:DMG: PriorityLevel = 0x2, - [1685673894.513804][2730:2732] CHIP:DMG: EpochTimestamp = 0x18879f20277, - [1685673894.513884][2730:2732] CHIP:DMG: EventData = - [1685673894.513969][2730:2732] CHIP:DMG: { - [1685673894.514047][2730:2732] CHIP:DMG: 0x0 = 1, - [1685673894.514127][2730:2732] CHIP:DMG: 0x1 = 7, - [1685673894.514206][2730:2732] CHIP:DMG: 0x2 = NULL - [1685673894.514287][2730:2732] CHIP:DMG: 0x3 = 1, - [1685673894.514368][2730:2732] CHIP:DMG: 0x4 = 112233, - [1685673894.514447][2730:2732] CHIP:DMG: 0x5 = NULL - [1685673894.514525][2730:2732] CHIP:DMG: }, - [1685673894.514594][2730:2732] CHIP:DMG: }, - [1685673894.514676][2730:2732] CHIP:DMG: - [1685673894.514736][2730:2732] CHIP:DMG: }, - [1685673894.514837][2730:2732] CHIP:DMG: - [1685673894.514894][2730:2732] CHIP:DMG: EventReportIB = - [1685673894.514978][2730:2732] CHIP:DMG: { - [1685673894.515038][2730:2732] CHIP:DMG: EventDataIB = - [1685673894.515106][2730:2732] CHIP:DMG: { - [1685673894.515171][2730:2732] CHIP:DMG: EventPath = - [1685673894.515243][2730:2732] CHIP:DMG: { - [1685673894.515317][2730:2732] CHIP:DMG: Endpoint = 0x1, - [1685673894.515395][2730:2732] CHIP:DMG: Cluster = 0x101, - [1685673894.515468][2730:2732] CHIP:DMG: Event = 0x2, - [1685673894.515534][2730:2732] CHIP:DMG: }, - [1685673894.515609][2730:2732] CHIP:DMG: - [1685673894.515680][2730:2732] CHIP:DMG: EventNumber = 0x6, - [1685673894.515754][2730:2732] CHIP:DMG: PriorityLevel = 0x2, - [1685673894.515827][2730:2732] CHIP:DMG: EpochTimestamp = 0x18879f24737, - [1685673894.515898][2730:2732] CHIP:DMG: EventData = - [1685673894.515970][2730:2732] CHIP:DMG: { - [1685673894.516046][2730:2732] CHIP:DMG: 0x0 = 1, - [1685673894.516124][2730:2732] CHIP:DMG: 0x1 = 7, - [1685673894.516202][2730:2732] CHIP:DMG: 0x2 = NULL - [1685673894.516282][2730:2732] CHIP:DMG: 0x3 = 1, - [1685673894.516362][2730:2732] CHIP:DMG: 0x4 = 112233, - [1685673894.516441][2730:2732] CHIP:DMG: 0x5 = NULL - [1685673894.516519][2730:2732] CHIP:DMG: }, - [1685673894.516589][2730:2732] CHIP:DMG: }, - [1685673894.516672][2730:2732] CHIP:DMG: - [1685673894.516731][2730:2732] CHIP:DMG: }, - [1685673894.516830][2730:2732] CHIP:DMG: - [1685673894.516886][2730:2732] CHIP:DMG: EventReportIB = - [1685673894.516970][2730:2732] CHIP:DMG: { - [1685673894.517030][2730:2732] CHIP:DMG: EventDataIB = - [1685673894.517097][2730:2732] CHIP:DMG: { - [1685673894.517162][2730:2732] CHIP:DMG: EventPath = - [1685673894.517234][2730:2732] CHIP:DMG: { - [1685673894.517308][2730:2732] CHIP:DMG: Endpoint = 0x1, - [1685673894.517386][2730:2732] CHIP:DMG: Cluster = 0x101, - [1685673894.517456][2730:2732] CHIP:DMG: Event = 0x2, - [1685673894.517528][2730:2732] CHIP:DMG: }, - [1685673894.517604][2730:2732] CHIP:DMG: - [1685673894.517674][2730:2732] CHIP:DMG: EventNumber = 0x9, - [1685673894.517747][2730:2732] CHIP:DMG: PriorityLevel = 0x2, - [1685673894.517981][2730:2732] CHIP:DMG: EpochTimestamp = 0x18879f331a0, - [1685673894.518056][2730:2732] CHIP:DMG: EventData = - [1685673894.518127][2730:2732] CHIP:DMG: { - [1685673894.518204][2730:2732] CHIP:DMG: 0x0 = 0, - [1685673894.518284][2730:2732] CHIP:DMG: 0x1 = 4, - [1685673894.518363][2730:2732] CHIP:DMG: 0x2 = NULL - [1685673894.518443][2730:2732] CHIP:DMG: 0x3 = NULL - [1685673894.518535][2730:2732] CHIP:DMG: 0x4 = NULL - [1685673894.518625][2730:2732] CHIP:DMG: 0x5 = NULL - [1685673894.518704][2730:2732] CHIP:DMG: }, - [1685673894.518774][2730:2732] CHIP:DMG: }, - [1685673894.518859][2730:2732] CHIP:DMG: - [1685673894.518918][2730:2732] CHIP:DMG: }, - [1685673894.519023][2730:2732] CHIP:DMG: - [1685673894.519080][2730:2732] CHIP:DMG: EventReportIB = - [1685673894.519167][2730:2732] CHIP:DMG: { - [1685673894.519228][2730:2732] CHIP:DMG: EventDataIB = - [1685673894.519295][2730:2732] CHIP:DMG: { - [1685673894.519361][2730:2732] CHIP:DMG: EventPath = - [1685673894.519434][2730:2732] CHIP:DMG: { - [1685673894.519509][2730:2732] CHIP:DMG: Endpoint = 0x1, - [1685673894.519588][2730:2732] CHIP:DMG: Cluster = 0x101, - [1685673894.519666][2730:2732] CHIP:DMG: Event = 0x2, - [1685673894.519740][2730:2732] CHIP:DMG: }, - [1685673894.519816][2730:2732] CHIP:DMG: - [1685673894.519888][2730:2732] CHIP:DMG: EventNumber = 0x13, - [1685673894.519962][2730:2732] CHIP:DMG: PriorityLevel = 0x2, - [1685673894.520036][2730:2732] CHIP:DMG: EpochTimestamp = 0x18879fd2160, - [1685673894.520108][2730:2732] CHIP:DMG: EventData = - [1685673894.520181][2730:2732] CHIP:DMG: { - [1685673894.520256][2730:2732] CHIP:DMG: 0x0 = 1, - [1685673894.520338][2730:2732] CHIP:DMG: 0x1 = 7, - [1685673894.520420][2730:2732] CHIP:DMG: 0x2 = 1, - [1685673894.520503][2730:2732] CHIP:DMG: 0x3 = 1, - [1685673894.520584][2730:2732] CHIP:DMG: 0x4 = 112233, - [1685673894.520661][2730:2732] CHIP:DMG: 0x5 = [ - [1685673894.520740][2730:2732] CHIP:DMG: - [1685673894.520827][2730:2732] CHIP:DMG: { - [1685673894.520916][2730:2732] CHIP:DMG: 0x0 = 1, - [1685673894.521014][2730:2732] CHIP:DMG: 0x1 = 1, - [1685673894.521114][2730:2732] CHIP:DMG: }, - [1685673894.521199][2730:2732] CHIP:DMG: ], - [1685673894.521280][2730:2732] CHIP:DMG: }, - [1685673894.521350][2730:2732] CHIP:DMG: }, - [1685673894.521437][2730:2732] CHIP:DMG: - [1685673894.521498][2730:2732] CHIP:DMG: }, - [1685673894.521600][2730:2732] CHIP:DMG: - [1685673894.521656][2730:2732] CHIP:DMG: EventReportIB = - [1685673894.521740][2730:2732] CHIP:DMG: { - [1685673894.521832][2730:2732] CHIP:DMG: EventDataIB = - [1685673894.521904][2730:2732] CHIP:DMG: { - [1685673894.521971][2730:2732] CHIP:DMG: EventPath = - [1685673894.522044][2730:2732] CHIP:DMG: { - [1685673894.522119][2730:2732] CHIP:DMG: Endpoint = 0x1, - [1685673894.522198][2730:2732] CHIP:DMG: Cluster = 0x101, - [1685673894.522275][2730:2732] CHIP:DMG: Event = 0x2, - [1685673894.522350][2730:2732] CHIP:DMG: }, - [1685673894.522426][2730:2732] CHIP:DMG: - [1685673894.522496][2730:2732] CHIP:DMG: EventNumber = 0x14, - [1685673894.522570][2730:2732] CHIP:DMG: PriorityLevel = 0x2, - [1685673894.522646][2730:2732] CHIP:DMG: EpochTimestamp = 0x18879fe0bcf, - [1685673894.522718][2730:2732] CHIP:DMG: EventData = - [1685673894.522790][2730:2732] CHIP:DMG: { - [1685673894.522868][2730:2732] CHIP:DMG: 0x0 = 0, - [1685673894.522948][2730:2732] CHIP:DMG: 0x1 = 4, - [1685673894.523026][2730:2732] CHIP:DMG: 0x2 = NULL - [1685673894.523105][2730:2732] CHIP:DMG: 0x3 = NULL - [1685673894.523184][2730:2732] CHIP:DMG: 0x4 = NULL - [1685673894.523262][2730:2732] CHIP:DMG: 0x5 = NULL - [1685673894.523341][2730:2732] CHIP:DMG: }, - [1685673894.523409][2730:2732] CHIP:DMG: }, - [1685673894.523491][2730:2732] CHIP:DMG: - [1685673894.523551][2730:2732] CHIP:DMG: }, - [1685673894.523654][2730:2732] CHIP:DMG: - [1685673894.523710][2730:2732] CHIP:DMG: EventReportIB = - [1685673894.523798][2730:2732] CHIP:DMG: { - [1685673894.523858][2730:2732] CHIP:DMG: EventDataIB = - [1685673894.523925][2730:2732] CHIP:DMG: { - [1685673894.523995][2730:2732] CHIP:DMG: EventPath = - [1685673894.524067][2730:2732] CHIP:DMG: { - [1685673894.524142][2730:2732] CHIP:DMG: Endpoint = 0x1, - [1685673894.524221][2730:2732] CHIP:DMG: Cluster = 0x101, - [1685673894.524298][2730:2732] CHIP:DMG: Event = 0x2, - [1685673894.524372][2730:2732] CHIP:DMG: }, - [1685673894.524449][2730:2732] CHIP:DMG: - [1685673894.524518][2730:2732] CHIP:DMG: EventNumber = 0x15, - [1685673894.524593][2730:2732] CHIP:DMG: PriorityLevel = 0x2, - [1685673894.524666][2730:2732] CHIP:DMG: EpochTimestamp = 0x18879fe0fff, - [1685673894.524739][2730:2732] CHIP:DMG: EventData = - [1685673894.524810][2730:2732] CHIP:DMG: { - [1685673894.524887][2730:2732] CHIP:DMG: 0x0 = 0, - [1685673894.524966][2730:2732] CHIP:DMG: 0x1 = 7, - [1685673894.525048][2730:2732] CHIP:DMG: 0x2 = 1, - [1685673894.525128][2730:2732] CHIP:DMG: 0x3 = 1, - [1685673894.525210][2730:2732] CHIP:DMG: 0x4 = 112233, - [1685673894.525287][2730:2732] CHIP:DMG: 0x5 = [ - [1685673894.525360][2730:2732] CHIP:DMG: - [1685673894.525446][2730:2732] CHIP:DMG: { - [1685673894.525534][2730:2732] CHIP:DMG: 0x0 = 1, - [1685673894.525618][2730:2732] CHIP:DMG: 0x1 = 1, - [1685673894.525707][2730:2732] CHIP:DMG: }, - [1685673894.525808][2730:2732] CHIP:DMG: ], - [1685673894.525888][2730:2732] CHIP:DMG: }, - [1685673894.525958][2730:2732] CHIP:DMG: }, - [1685673894.526045][2730:2732] CHIP:DMG: - [1685673894.526106][2730:2732] CHIP:DMG: }, - [1685673894.526187][2730:2732] CHIP:DMG: - [1685673894.526243][2730:2732] CHIP:DMG: ], - [1685673894.526435][2730:2732] CHIP:DMG: - [1685673894.526494][2730:2732] CHIP:DMG: SuppressResponse = true, - [1685673894.526552][2730:2732] CHIP:DMG: InteractionModelRevision = 1 - [1685673894.526606][2730:2732] CHIP:DMG: } - disabled: true - - - label: - "Step 6: DUT sends the Unlock Door command to the TH with Invalid - PINCode" - PICS: DRLK.C.C01.Tx - verification: | - ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PINCode 12345678 --trace_decode 1 - - Verify TH receives Unlock Door command with FAILURE response on TH(lock-app) log: - - [1685673944.179783][2739:2741] CHIP:DMG: InvokeResponseMessage = - [1685673944.179842][2739:2741] CHIP:DMG: { - [1685673944.179896][2739:2741] CHIP:DMG: suppressResponse = false, - [1685673944.179954][2739:2741] CHIP:DMG: InvokeResponseIBs = - [1685673944.180049][2739:2741] CHIP:DMG: [ - [1685673944.180108][2739:2741] CHIP:DMG: InvokeResponseIB = - [1685673944.180185][2739:2741] CHIP:DMG: { - [1685673944.180267][2739:2741] CHIP:DMG: CommandStatusIB = - [1685673944.180332][2739:2741] CHIP:DMG: { - [1685673944.180420][2739:2741] CHIP:DMG: CommandPathIB = - [1685673944.180497][2739:2741] CHIP:DMG: { - [1685673944.180594][2739:2741] CHIP:DMG: EndpointId = 0x1, - [1685673944.180676][2739:2741] CHIP:DMG: ClusterId = 0x101, - [1685673944.180776][2739:2741] CHIP:DMG: CommandId = 0x1, - [1685673944.180853][2739:2741] CHIP:DMG: }, - [1685673944.180960][2739:2741] CHIP:DMG: - [1685673944.181030][2739:2741] CHIP:DMG: StatusIB = - [1685673944.181105][2739:2741] CHIP:DMG: { - [1685673944.181180][2739:2741] CHIP:DMG: status = 0x01 (FAILURE), - [1685673944.181280][2739:2741] CHIP:DMG: }, - [1685673944.181355][2739:2741] CHIP:DMG: - [1685673944.181446][2739:2741] CHIP:DMG: }, - [1685673944.181524][2739:2741] CHIP:DMG: - [1685673944.181584][2739:2741] CHIP:DMG: }, - [1685673944.181686][2739:2741] CHIP:DMG: - [1685673944.181743][2739:2741] CHIP:DMG: ], - [1685673944.181884][2739:2741] CHIP:DMG: - [1685673944.181943][2739:2741] CHIP:DMG: InteractionModelRevision = 1 - [1685673944.181998][2739:2741] CHIP:DMG: }, - disabled: true - - - label: - "Step 7: TH will initiate LockOperationError event by causing Lock - error using invalid PIN" - PICS: DRLK.C.E03 - verification: | - ./chip-tool doorlock read-event lock-operation-error 1 1 --trace_decode 1 - - Verify LockOperationError event response on TH(Lock-app) log: - - [1685673961.918640][2743:2745] CHIP:DMG: ReportDataMessage = - [1685673961.918701][2743:2745] CHIP:DMG: { - [1685673961.918750][2743:2745] CHIP:DMG: EventReportIBs = - [1685673961.918831][2743:2745] CHIP:DMG: [ - [1685673961.918888][2743:2745] CHIP:DMG: EventReportIB = - [1685673961.918974][2743:2745] CHIP:DMG: { - [1685673961.919034][2743:2745] CHIP:DMG: EventDataIB = - [1685673961.919105][2743:2745] CHIP:DMG: { - [1685673961.919172][2743:2745] CHIP:DMG: EventPath = - [1685673961.919246][2743:2745] CHIP:DMG: { - [1685673961.919321][2743:2745] CHIP:DMG: Endpoint = 0x1, - [1685673961.919401][2743:2745] CHIP:DMG: Cluster = 0x101, - [1685673961.919479][2743:2745] CHIP:DMG: Event = 0x3, - [1685673961.919555][2743:2745] CHIP:DMG: }, - [1685673961.919634][2743:2745] CHIP:DMG: - [1685673961.919705][2743:2745] CHIP:DMG: EventNumber = 0x16, - [1685673961.919780][2743:2745] CHIP:DMG: PriorityLevel = 0x2, - [1685673961.919856][2743:2745] CHIP:DMG: EpochTimestamp = 0x18879ff2466, - [1685673961.919931][2743:2745] CHIP:DMG: EventData = - [1685673961.920006][2743:2745] CHIP:DMG: { - [1685673961.920084][2743:2745] CHIP:DMG: 0x0 = 1, - [1685673961.920166][2743:2745] CHIP:DMG: 0x1 = 7, - [1685673961.920241][2743:2745] CHIP:DMG: 0x2 = 1, - [1685673961.920335][2743:2745] CHIP:DMG: 0x3 = NULL - [1685673961.920416][2743:2745] CHIP:DMG: 0x4 = 1, - [1685673961.920499][2743:2745] CHIP:DMG: 0x5 = 112233, - [1685673961.920580][2743:2745] CHIP:DMG: 0x6 = NULL - [1685673961.920659][2743:2745] CHIP:DMG: }, - [1685673961.920730][2743:2745] CHIP:DMG: }, - [1685673961.920815][2743:2745] CHIP:DMG: - [1685673961.920878][2743:2745] CHIP:DMG: }, - [1685673961.920958][2743:2745] CHIP:DMG: - [1685673961.921013][2743:2745] CHIP:DMG: ], - [1685673961.921092][2743:2745] CHIP:DMG: - [1685673961.921150][2743:2745] CHIP:DMG: SuppressResponse = true, - [1685673961.921209][2743:2745] CHIP:DMG: InteractionModelRevision = 1 - [1685673961.921263][2743:2745] CHIP:DMG: } - disabled: true - - - label: "Step 8: DUT sends Set User command to TH" - PICS: DRLK.C.F08 && DRLK.C.C1a.Tx - verification: | - ./chip-tool doorlock set-user 0 3 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 - - Verify TH receives Set User command with SUCCESS response on TH(lock-app) log: - - [1685673982.319643][2748:2750] CHIP:DMG: InvokeResponseMessage = - [1685673982.319698][2748:2750] CHIP:DMG: { - [1685673982.319752][2748:2750] CHIP:DMG: suppressResponse = false, - [1685673982.319808][2748:2750] CHIP:DMG: InvokeResponseIBs = - [1685673982.319881][2748:2750] CHIP:DMG: [ - [1685673982.319938][2748:2750] CHIP:DMG: InvokeResponseIB = - [1685673982.320016][2748:2750] CHIP:DMG: { - [1685673982.320072][2748:2750] CHIP:DMG: CommandStatusIB = - [1685673982.320148][2748:2750] CHIP:DMG: { - [1685673982.320211][2748:2750] CHIP:DMG: CommandPathIB = - [1685673982.320285][2748:2750] CHIP:DMG: { - [1685673982.320361][2748:2750] CHIP:DMG: EndpointId = 0x1, - [1685673982.320441][2748:2750] CHIP:DMG: ClusterId = 0x101, - [1685673982.320519][2748:2750] CHIP:DMG: CommandId = 0x1a, - [1685673982.320613][2748:2750] CHIP:DMG: }, - [1685673982.320719][2748:2750] CHIP:DMG: - [1685673982.320789][2748:2750] CHIP:DMG: StatusIB = - [1685673982.320863][2748:2750] CHIP:DMG: { - [1685673982.320937][2748:2750] CHIP:DMG: status = 0x00 (SUCCESS), - [1685673982.321009][2748:2750] CHIP:DMG: }, - [1685673982.321084][2748:2750] CHIP:DMG: - [1685673982.321153][2748:2750] CHIP:DMG: }, - [1685673982.321228][2748:2750] CHIP:DMG: - [1685673982.321291][2748:2750] CHIP:DMG: }, - [1685673982.321361][2748:2750] CHIP:DMG: - [1685673982.321417][2748:2750] CHIP:DMG: ], - [1685673982.321486][2748:2750] CHIP:DMG: - [1685673982.321542][2748:2750] CHIP:DMG: InteractionModelRevision = 1 - [1685673982.321598][2748:2750] CHIP:DMG: }, - disabled: true - - - label: - "Step 9: TH initiates LockUserChange event by adding the UserIndex - using Set User command" - PICS: DRLK.C.E04 - verification: | - ./chip-tool doorlock read-event lock-user-change 1 1 --trace_decode 1 - - Verify LockUserChange event response on TH(Lock-app) log: - - [1685674004.671171][2752:2754] CHIP:DMG: ReportDataMessage = - [1685674004.671235][2752:2754] CHIP:DMG: { - [1685674004.671283][2752:2754] CHIP:DMG: EventReportIBs = - [1685674004.671364][2752:2754] CHIP:DMG: [ - [1685674004.671421][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.671517][2752:2754] CHIP:DMG: { - [1685674004.671578][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.671654][2752:2754] CHIP:DMG: { - [1685674004.671722][2752:2754] CHIP:DMG: EventPath = - [1685674004.671799][2752:2754] CHIP:DMG: { - [1685674004.671876][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.671956][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.672035][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.672111][2752:2754] CHIP:DMG: }, - [1685674004.672191][2752:2754] CHIP:DMG: - [1685674004.672262][2752:2754] CHIP:DMG: EventNumber = 0x8, - [1685674004.672336][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.672412][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879f2ec55, - [1685674004.672486][2752:2754] CHIP:DMG: EventData = - [1685674004.672559][2752:2754] CHIP:DMG: { - [1685674004.672637][2752:2754] CHIP:DMG: 0x0 = 3, - [1685674004.672718][2752:2754] CHIP:DMG: 0x1 = 0, - [1685674004.672800][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.672880][2752:2754] CHIP:DMG: 0x3 = 1, - [1685674004.672961][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.673043][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.673125][2752:2754] CHIP:DMG: 0x6 = 1, - [1685674004.673204][2752:2754] CHIP:DMG: }, - [1685674004.673274][2752:2754] CHIP:DMG: }, - [1685674004.673361][2752:2754] CHIP:DMG: - [1685674004.673420][2752:2754] CHIP:DMG: }, - [1685674004.673523][2752:2754] CHIP:DMG: - [1685674004.673580][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.673667][2752:2754] CHIP:DMG: { - [1685674004.673729][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.673851][2752:2754] CHIP:DMG: { - [1685674004.673925][2752:2754] CHIP:DMG: EventPath = - [1685674004.673995][2752:2754] CHIP:DMG: { - [1685674004.674069][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.674149][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.674229][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.674304][2752:2754] CHIP:DMG: }, - [1685674004.674377][2752:2754] CHIP:DMG: - [1685674004.674448][2752:2754] CHIP:DMG: EventNumber = 0xa, - [1685674004.674523][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.674593][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879f3ba0b, - [1685674004.674665][2752:2754] CHIP:DMG: EventData = - [1685674004.674738][2752:2754] CHIP:DMG: { - [1685674004.674813][2752:2754] CHIP:DMG: 0x0 = 3, - [1685674004.674894][2752:2754] CHIP:DMG: 0x1 = 1, - [1685674004.674974][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.675054][2752:2754] CHIP:DMG: 0x3 = 1, - [1685674004.675134][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.675215][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.675293][2752:2754] CHIP:DMG: 0x6 = 1, - [1685674004.675371][2752:2754] CHIP:DMG: }, - [1685674004.675439][2752:2754] CHIP:DMG: }, - [1685674004.675521][2752:2754] CHIP:DMG: - [1685674004.675580][2752:2754] CHIP:DMG: }, - [1685674004.675683][2752:2754] CHIP:DMG: - [1685674004.675739][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.675826][2752:2754] CHIP:DMG: { - [1685674004.675887][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.675955][2752:2754] CHIP:DMG: { - [1685674004.676021][2752:2754] CHIP:DMG: EventPath = - [1685674004.676094][2752:2754] CHIP:DMG: { - [1685674004.676168][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.676247][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.676324][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.676398][2752:2754] CHIP:DMG: }, - [1685674004.676474][2752:2754] CHIP:DMG: - [1685674004.676545][2752:2754] CHIP:DMG: EventNumber = 0xb, - [1685674004.676620][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.676686][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879f3faa3, - [1685674004.676750][2752:2754] CHIP:DMG: EventData = - [1685674004.676824][2752:2754] CHIP:DMG: { - [1685674004.676898][2752:2754] CHIP:DMG: 0x0 = 4, - [1685674004.676979][2752:2754] CHIP:DMG: 0x1 = 0, - [1685674004.677059][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.677140][2752:2754] CHIP:DMG: 0x3 = 1, - [1685674004.677220][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.677299][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.677379][2752:2754] CHIP:DMG: 0x6 = 1, - [1685674004.677457][2752:2754] CHIP:DMG: }, - [1685674004.677526][2752:2754] CHIP:DMG: }, - [1685674004.677611][2752:2754] CHIP:DMG: - [1685674004.677671][2752:2754] CHIP:DMG: }, - [1685674004.677808][2752:2754] CHIP:DMG: - [1685674004.677872][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.677957][2752:2754] CHIP:DMG: { - [1685674004.678017][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.678085][2752:2754] CHIP:DMG: { - [1685674004.678151][2752:2754] CHIP:DMG: EventPath = - [1685674004.678225][2752:2754] CHIP:DMG: { - [1685674004.678299][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.678379][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.678458][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.678532][2752:2754] CHIP:DMG: }, - [1685674004.678610][2752:2754] CHIP:DMG: - [1685674004.678681][2752:2754] CHIP:DMG: EventNumber = 0xc, - [1685674004.678755][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.678829][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879f48d3b, - [1685674004.678900][2752:2754] CHIP:DMG: EventData = - [1685674004.678972][2752:2754] CHIP:DMG: { - [1685674004.679047][2752:2754] CHIP:DMG: 0x0 = 4, - [1685674004.679129][2752:2754] CHIP:DMG: 0x1 = 1, - [1685674004.679210][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.679290][2752:2754] CHIP:DMG: 0x3 = 1, - [1685674004.679371][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.679452][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.679532][2752:2754] CHIP:DMG: 0x6 = 1, - [1685674004.679610][2752:2754] CHIP:DMG: }, - [1685674004.679681][2752:2754] CHIP:DMG: }, - [1685674004.679763][2752:2754] CHIP:DMG: - [1685674004.679823][2752:2754] CHIP:DMG: }, - [1685674004.679926][2752:2754] CHIP:DMG: - [1685674004.679982][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.680067][2752:2754] CHIP:DMG: { - [1685674004.680127][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.680197][2752:2754] CHIP:DMG: { - [1685674004.680264][2752:2754] CHIP:DMG: EventPath = - [1685674004.680336][2752:2754] CHIP:DMG: { - [1685674004.680411][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.680489][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.680568][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.680642][2752:2754] CHIP:DMG: }, - [1685674004.680720][2752:2754] CHIP:DMG: - [1685674004.680788][2752:2754] CHIP:DMG: EventNumber = 0xd, - [1685674004.680862][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.680936][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879f5cf3e, - [1685674004.681008][2752:2754] CHIP:DMG: EventData = - [1685674004.681081][2752:2754] CHIP:DMG: { - [1685674004.681158][2752:2754] CHIP:DMG: 0x0 = 2, - [1685674004.681257][2752:2754] CHIP:DMG: 0x1 = 0, - [1685674004.681344][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.681424][2752:2754] CHIP:DMG: 0x3 = 2, - [1685674004.681505][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.681585][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.681664][2752:2754] CHIP:DMG: 0x6 = 2, - [1685674004.681742][2752:2754] CHIP:DMG: }, - [1685674004.681887][2752:2754] CHIP:DMG: }, - [1685674004.681980][2752:2754] CHIP:DMG: - [1685674004.682039][2752:2754] CHIP:DMG: }, - [1685674004.682140][2752:2754] CHIP:DMG: - [1685674004.682196][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.682281][2752:2754] CHIP:DMG: { - [1685674004.682341][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.682407][2752:2754] CHIP:DMG: { - [1685674004.682470][2752:2754] CHIP:DMG: EventPath = - [1685674004.682543][2752:2754] CHIP:DMG: { - [1685674004.682617][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.682697][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.682773][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.682847][2752:2754] CHIP:DMG: }, - [1685674004.682923][2752:2754] CHIP:DMG: - [1685674004.682994][2752:2754] CHIP:DMG: EventNumber = 0xe, - [1685674004.683068][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.683142][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879f67e3f, - [1685674004.683213][2752:2754] CHIP:DMG: EventData = - [1685674004.683287][2752:2754] CHIP:DMG: { - [1685674004.683359][2752:2754] CHIP:DMG: 0x0 = 2, - [1685674004.683438][2752:2754] CHIP:DMG: 0x1 = 1, - [1685674004.683518][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.683599][2752:2754] CHIP:DMG: 0x3 = 2, - [1685674004.683680][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.683761][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.683842][2752:2754] CHIP:DMG: 0x6 = 2, - [1685674004.683920][2752:2754] CHIP:DMG: }, - [1685674004.683990][2752:2754] CHIP:DMG: }, - [1685674004.684075][2752:2754] CHIP:DMG: - [1685674004.684134][2752:2754] CHIP:DMG: }, - [1685674004.684235][2752:2754] CHIP:DMG: - [1685674004.684291][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.684376][2752:2754] CHIP:DMG: { - [1685674004.684436][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.684504][2752:2754] CHIP:DMG: { - [1685674004.684570][2752:2754] CHIP:DMG: EventPath = - [1685674004.684641][2752:2754] CHIP:DMG: { - [1685674004.684716][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.684791][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.684868][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.684942][2752:2754] CHIP:DMG: }, - [1685674004.685026][2752:2754] CHIP:DMG: - [1685674004.685096][2752:2754] CHIP:DMG: EventNumber = 0xf, - [1685674004.685171][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.685246][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879f7dd82, - [1685674004.685317][2752:2754] CHIP:DMG: EventData = - [1685674004.685391][2752:2754] CHIP:DMG: { - [1685674004.685467][2752:2754] CHIP:DMG: 0x0 = 2, - [1685674004.685548][2752:2754] CHIP:DMG: 0x1 = 1, - [1685674004.685630][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.685710][2752:2754] CHIP:DMG: 0x3 = 1, - [1685674004.685831][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.685913][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.685991][2752:2754] CHIP:DMG: 0x6 = 1, - [1685674004.686069][2752:2754] CHIP:DMG: }, - [1685674004.686140][2752:2754] CHIP:DMG: }, - [1685674004.686222][2752:2754] CHIP:DMG: - [1685674004.686281][2752:2754] CHIP:DMG: }, - [1685674004.686383][2752:2754] CHIP:DMG: - [1685674004.686439][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.686524][2752:2754] CHIP:DMG: { - [1685674004.686585][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.686652][2752:2754] CHIP:DMG: { - [1685674004.686718][2752:2754] CHIP:DMG: EventPath = - [1685674004.686791][2752:2754] CHIP:DMG: { - [1685674004.686865][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.686945][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.687023][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.687097][2752:2754] CHIP:DMG: }, - [1685674004.687174][2752:2754] CHIP:DMG: - [1685674004.687241][2752:2754] CHIP:DMG: EventNumber = 0x11, - [1685674004.687315][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.687388][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879fc602b, - [1685674004.687459][2752:2754] CHIP:DMG: EventData = - [1685674004.687531][2752:2754] CHIP:DMG: { - [1685674004.687607][2752:2754] CHIP:DMG: 0x0 = 2, - [1685674004.687687][2752:2754] CHIP:DMG: 0x1 = 0, - [1685674004.687767][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.687848][2752:2754] CHIP:DMG: 0x3 = 1, - [1685674004.687928][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.688008][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.688089][2752:2754] CHIP:DMG: 0x6 = 1, - [1685674004.688162][2752:2754] CHIP:DMG: }, - [1685674004.688232][2752:2754] CHIP:DMG: }, - [1685674004.688316][2752:2754] CHIP:DMG: - [1685674004.688375][2752:2754] CHIP:DMG: }, - [1685674004.688477][2752:2754] CHIP:DMG: - [1685674004.688533][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.688617][2752:2754] CHIP:DMG: { - [1685674004.688677][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.688745][2752:2754] CHIP:DMG: { - [1685674004.688811][2752:2754] CHIP:DMG: EventPath = - [1685674004.688880][2752:2754] CHIP:DMG: { - [1685674004.688954][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.689033][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.689111][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.689185][2752:2754] CHIP:DMG: }, - [1685674004.689262][2752:2754] CHIP:DMG: - [1685674004.689332][2752:2754] CHIP:DMG: EventNumber = 0x12, - [1685674004.689403][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.689473][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879fcb681, - [1685674004.689545][2752:2754] CHIP:DMG: EventData = - [1685674004.689617][2752:2754] CHIP:DMG: { - [1685674004.689693][2752:2754] CHIP:DMG: 0x0 = 6, - [1685674004.689882][2752:2754] CHIP:DMG: 0x1 = 0, - [1685674004.689965][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.690046][2752:2754] CHIP:DMG: 0x3 = 1, - [1685674004.690126][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.690205][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.690285][2752:2754] CHIP:DMG: 0x6 = 1, - [1685674004.690362][2752:2754] CHIP:DMG: }, - [1685674004.690433][2752:2754] CHIP:DMG: }, - [1685674004.690515][2752:2754] CHIP:DMG: - [1685674004.690574][2752:2754] CHIP:DMG: }, - [1685674004.690677][2752:2754] CHIP:DMG: - [1685674004.690733][2752:2754] CHIP:DMG: EventReportIB = - [1685674004.690819][2752:2754] CHIP:DMG: { - [1685674004.690879][2752:2754] CHIP:DMG: EventDataIB = - [1685674004.690948][2752:2754] CHIP:DMG: { - [1685674004.691015][2752:2754] CHIP:DMG: EventPath = - [1685674004.691095][2752:2754] CHIP:DMG: { - [1685674004.691171][2752:2754] CHIP:DMG: Endpoint = 0x1, - [1685674004.691249][2752:2754] CHIP:DMG: Cluster = 0x101, - [1685674004.691328][2752:2754] CHIP:DMG: Event = 0x4, - [1685674004.691403][2752:2754] CHIP:DMG: }, - [1685674004.691481][2752:2754] CHIP:DMG: - [1685674004.691551][2752:2754] CHIP:DMG: EventNumber = 0x17, - [1685674004.691626][2752:2754] CHIP:DMG: PriorityLevel = 0x1, - [1685674004.691701][2752:2754] CHIP:DMG: EpochTimestamp = 0x18879ffb961, - [1685674004.691772][2752:2754] CHIP:DMG: EventData = - [1685674004.691845][2752:2754] CHIP:DMG: { - [1685674004.691921][2752:2754] CHIP:DMG: 0x0 = 2, - [1685674004.692002][2752:2754] CHIP:DMG: 0x1 = 0, - [1685674004.692082][2752:2754] CHIP:DMG: 0x2 = 7, - [1685674004.692163][2752:2754] CHIP:DMG: 0x3 = 3, - [1685674004.692245][2752:2754] CHIP:DMG: 0x4 = 1, - [1685674004.692326][2752:2754] CHIP:DMG: 0x5 = 112233, - [1685674004.692407][2752:2754] CHIP:DMG: 0x6 = 3, - [1685674004.692486][2752:2754] CHIP:DMG: }, - [1685674004.692555][2752:2754] CHIP:DMG: }, - [1685674004.692641][2752:2754] CHIP:DMG: - [1685674004.692700][2752:2754] CHIP:DMG: }, - [1685674004.692779][2752:2754] CHIP:DMG: - [1685674004.692835][2752:2754] CHIP:DMG: ], - [1685674004.693080][2752:2754] CHIP:DMG: - [1685674004.693138][2752:2754] CHIP:DMG: SuppressResponse = true, - [1685674004.693195][2752:2754] CHIP:DMG: InteractionModelRevision = 1 - [1685674004.693249][2752:2754] CHIP:DMG: } - disabled: true - - - label: - "Step 10: DUT sends the Unbolt Door command to the TH with valid - PINCode" - PICS: DRLK.C.C27.Tx - verification: | - ./chip-tool doorlock unbolt-door 1 1 --timedInteractionTimeoutMs 1000 --PINCode 123456 --trace_decode 1 - - Verify TH receives Unbolt Door command with SUCCESS response on TH(lock-app) log: - - [1689767521.623730][2330:2332] CHIP:DMG: ICR moving to [ResponseRe] - [1689767521.623822][2330:2332] CHIP:DMG: InvokeResponseMessage = - [1689767521.623877][2330:2332] CHIP:DMG: { - [1689767521.623929][2330:2332] CHIP:DMG: suppressResponse = false, - [1689767521.623983][2330:2332] CHIP:DMG: InvokeResponseIBs = - [1689767521.624054][2330:2332] CHIP:DMG: [ - [1689767521.624109][2330:2332] CHIP:DMG: InvokeResponseIB = - [1689767521.624184][2330:2332] CHIP:DMG: { - [1689767521.624243][2330:2332] CHIP:DMG: CommandStatusIB = - [1689767521.624312][2330:2332] CHIP:DMG: { - [1689767521.624375][2330:2332] CHIP:DMG: CommandPathIB = - [1689767521.624459][2330:2332] CHIP:DMG: { - [1689767521.624537][2330:2332] CHIP:DMG: EndpointId = 0x1, - [1689767521.624616][2330:2332] CHIP:DMG: ClusterId = 0x101, - [1689767521.624761][2330:2332] CHIP:DMG: CommandId = 0x27, - [1689767521.624838][2330:2332] CHIP:DMG: }, - [1689767521.624921][2330:2332] CHIP:DMG: - [1689767521.624986][2330:2332] CHIP:DMG: StatusIB = - [1689767521.625059][2330:2332] CHIP:DMG: { - [1689767521.625135][2330:2332] CHIP:DMG: status = 0x00 (SUCCESS), - [1689767521.625209][2330:2332] CHIP:DMG: }, - [1689767521.625283][2330:2332] CHIP:DMG: - [1689767521.625346][2330:2332] CHIP:DMG: }, - [1689767521.625418][2330:2332] CHIP:DMG: - [1689767521.625476][2330:2332] CHIP:DMG: }, - [1689767521.625547][2330:2332] CHIP:DMG: - [1689767521.625601][2330:2332] CHIP:DMG: ], - [1689767521.625671][2330:2332] CHIP:DMG: - [1689767521.625725][2330:2332] CHIP:DMG: InteractionModelRevision = 1 - [1689767521.625779][2330:2332] CHIP:DMG: }, - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_FAN_3_2.yaml b/src/app/tests/suites/certification/Test_TC_FAN_3_2.yaml index 00c34297c69e15..4375b03cec064b 100644 --- a/src/app/tests/suites/certification/Test_TC_FAN_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_FAN_3_2.yaml @@ -40,8 +40,8 @@ tests: saveAs: rSpeedMax - label: - "Step 3: TH writes TH writes to the DUT the a value less than or equal - to the value read in step 2" + "Step 3: TH writes to the DUT the a value less than or equal to the + value read in step 2" PICS: FAN.S.A0005 command: "writeAttribute" attribute: "SpeedSetting" @@ -57,14 +57,14 @@ tests: - name: "ms" value: 1000 - - label: "Step 4: TH reads from the DUT the the SpeedSetting attribute" + - label: "Step 4: TH reads from the DUT the SpeedSetting attribute" PICS: FAN.S.A0005 command: "readAttribute" attribute: "SpeedSetting" response: value: rSpeedMax - - label: "Step 5: TH reads from the DUT the the SpeedCurrent attribute" + - label: "Step 5: TH reads from the DUT the SpeedCurrent attribute" PICS: FAN.S.A0006 command: "readAttribute" attribute: "SpeedCurrent" diff --git a/src/app/tests/suites/certification/Test_TC_FAN_3_3.yaml b/src/app/tests/suites/certification/Test_TC_FAN_3_3.yaml deleted file mode 100644 index 091d097bfa0c7f..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_FAN_3_3.yaml +++ /dev/null @@ -1,175 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 263.2.8. [TC-FAN-3.3] Optional rock functionality with DUT as Server - -PICS: - - FAN.S - - FAN.S.F03 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Step 1: Commission DUT to TH" - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the RockSupport attribute and store" - PICS: FAN.S.A0007 - verification: | - ./chip-tool fancontrol read rock-support 1 1 - - On TH(chip-tool), Verify the RockSupport attribute value is in the range of 1 to 7. - - [1689757789.384816][23225:23227] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0007 DataVersion: 1958137194 - [1689757789.384890][23225:23227] CHIP:TOO: RockSupport: 3 - disabled: true - - - label: - "Step 3: If the RockSupport attribute read above has bit 0 set, then - TH writes to the DUT the RockSetting attribute with 0x01" - PICS: FAN.S.A0008( - verification: | - ./chip-tool fancontrol write rock-setting 1 1 1 - - On TH(chip-tool), Verify the SUCCESS response for RockSetting attribute write function - - [1685104690.737557][30753:30755] CHIP:DMG: Endpoint = 0x1, - [1685104690.737632][30753:30755] CHIP:DMG: Cluster = 0x202, - [1685104690.737707][30753:30755] CHIP:DMG: Attribute = 0x0000_0008, - [1685104690.737825][30753:30755] CHIP:DMG: } - [1685104690.737911][30753:30755] CHIP:DMG: - [1685104690.737980][30753:30755] CHIP:DMG: StatusIB = - [1685104690.738051][30753:30755] CHIP:DMG: { - [1685104690.738122][30753:30755] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104690.738199][30753:30755] CHIP:DMG: }, - [1685104690.738270][30753:30755] CHIP:DMG: - [1685104690.738330][30753:30755] CHIP:DMG: }, - [1685104690.738400][30753:30755] CHIP:DMG: - [1685104690.738455][30753:30755] CHIP:DMG: ], - [1685104690.738524][30753:30755] CHIP:DMG: - [1685104690.738579][30753:30755] CHIP:DMG: InteractionModelRevision = 1 - [1685104690.738632][30753:30755] CHIP:DMG: } - [1685104690.738790][30753:30755] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 4: If the previous step is written, after a few seconds, TH - reads from the DUT the RockSetting attribute" - PICS: FAN.S.A0008 - verification: | - ./chip-tool fancontrol read rock-setting 1 1 - - On TH(chip-tool), Verify the RockSetting attribute value as 1. - - [1689757942.179085][23325:23327] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0008 DataVersion: 1958137195 - [1689757942.179162][23325:23327] CHIP:TOO: RockSetting: 1 - disabled: true - - - label: - "Step 5: If the RockSupport attribute read above has bit 1 set, then - TH writes to the DUT the RockSetting attribute with 0x02" - PICS: FAN.S.A0008 - verification: | - ./chip-tool fancontrol write rock-setting 2 1 1 - - On TH(chip-tool), Verify the SUCCESS response for RockSetting attribute write function - - [1685104690.737408][30753:30755] CHIP:DMG: AttributePathIB = - [1685104690.737488][30753:30755] CHIP:DMG: { - [1685104690.737557][30753:30755] CHIP:DMG: Endpoint = 0x1, - [1685104690.737632][30753:30755] CHIP:DMG: Cluster = 0x202, - [1685104690.737707][30753:30755] CHIP:DMG: Attribute = 0x0000_0008, - [1685104690.737825][30753:30755] CHIP:DMG: } - [1685104690.737911][30753:30755] CHIP:DMG: - [1685104690.737980][30753:30755] CHIP:DMG: StatusIB = - [1685104690.738051][30753:30755] CHIP:DMG: { - [1685104690.738122][30753:30755] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104690.738199][30753:30755] CHIP:DMG: }, - [1685104690.738270][30753:30755] CHIP:DMG: - [1685104690.738330][30753:30755] CHIP:DMG: }, - [1685104690.738400][30753:30755] CHIP:DMG: - [1685104690.738455][30753:30755] CHIP:DMG: ], - [1685104690.738524][30753:30755] CHIP:DMG: - [1685104690.738579][30753:30755] CHIP:DMG: InteractionModelRevision = 1 - [1685104690.738632][30753:30755] CHIP:DMG: } - [1685104690.738790][30753:30755] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 6: If the previous step is written, after a few seconds, TH - reads from the DUT the RockSetting attribute" - PICS: FAN.S.A0008 - verification: | - ./chip-tool fancontrol read rock-setting 1 1 - - On TH(chip-tool), Verify the RockSetting attribute value as 2. - - [1689757942.179085][23325:23327] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0008 DataVersion: 1958137195 - [1689757942.179162][23325:23327] CHIP:TOO: RockSetting: 2 - disabled: true - - - label: - "Step 7: If the RockSupport attribute read above has bit 2 set, then - TH writes to the DUT the RockSetting attribute with 0x04" - PICS: FAN.S.A0008 - verification: | - ./chip-tool fancontrol write rock-setting 4 1 1 - - On TH(chip-tool), Verify the SUCCESS response for RockSetting attribute write function - - Current sample apps do not have RockSupport attribute bit 2 . However, if the vendor has implemented it, the below response will be displayed. - - [1685104690.737408][30753:30755] CHIP:DMG: AttributePathIB = - [1685104690.737488][30753:30755] CHIP:DMG: { - [1685104690.737557][30753:30755] CHIP:DMG: Endpoint = 0x1, - [1685104690.737632][30753:30755] CHIP:DMG: Cluster = 0x202, - [1685104690.737707][30753:30755] CHIP:DMG: Attribute = 0x0000_0008, - [1685104690.737825][30753:30755] CHIP:DMG: } - [1685104690.737911][30753:30755] CHIP:DMG: - [1685104690.737980][30753:30755] CHIP:DMG: StatusIB = - [1685104690.738051][30753:30755] CHIP:DMG: { - [1685104690.738122][30753:30755] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104690.738199][30753:30755] CHIP:DMG: }, - [1685104690.738270][30753:30755] CHIP:DMG: - [1685104690.738330][30753:30755] CHIP:DMG: }, - [1685104690.738400][30753:30755] CHIP:DMG: - [1685104690.738455][30753:30755] CHIP:DMG: ], - [1685104690.738524][30753:30755] CHIP:DMG: - [1685104690.738579][30753:30755] CHIP:DMG: InteractionModelRevision = 1 - [1685104690.738632][30753:30755] CHIP:DMG: } - [1685104690.738790][30753:30755] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 8: If the previous step is written, after a few seconds, TH - reads from the DUT the RockSetting attribute" - PICS: FAN.S.A0008 - verification: | - Note : Execute only if STEP 7 resulted with SUCCESS - - ./chip-tool fancontrol read rock-setting 1 1 - - On TH(chip-tool), Verify the RockSetting attribute value as 4. - - Current sample apps do not have RockSupport attribute bit 2 . However, if the vendor has implemented it, the below response will be displayed. - - [1689757942.179085][23325:23327] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0008 DataVersion: 1958137195 - [1689757942.179162][23325:23327] CHIP:TOO: RockSetting: 4 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_FAN_3_5.yaml b/src/app/tests/suites/certification/Test_TC_FAN_3_5.yaml deleted file mode 100644 index ec221dec3c2fd3..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_FAN_3_5.yaml +++ /dev/null @@ -1,592 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 263.2.10. [TC-FAN-3.5] Optional step functionality with DUT as Server - -PICS: - - FAN.S - - FAN.S.F04 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Step 1: Commission DUT to TH" - verification: | - - disabled: true - - - label: - "Step 2a: TH writes to the DUT the PercentSetting attribute with 50" - PICS: FAN.S.A0002 - verification: | - ./chip-tool fancontrol write percent-setting 50 1 1 - - On TH(chip-tool), Verify the SUCCESS response for FanMode attribute successful write. - - [1689758735.697705][23402:23404] CHIP:DMG: AttributePathIB = - [1689758735.697729][23402:23404] CHIP:DMG: { - [1689758735.697755][23402:23404] CHIP:DMG: Endpoint = 0x1, - [1689758735.697780][23402:23404] CHIP:DMG: Cluster = 0x202, - [1689758735.697805][23402:23404] CHIP:DMG: Attribute = 0x0000_0002, - [1689758735.697829][23402:23404] CHIP:DMG: } - [1689758735.697856][23402:23404] CHIP:DMG: - [1689758735.697879][23402:23404] CHIP:DMG: StatusIB = - [1689758735.697903][23402:23404] CHIP:DMG: { - [1689758735.697928][23402:23404] CHIP:DMG: status = 0x00 (SUCCESS), - [1689758735.697953][23402:23404] CHIP:DMG: }, - [1689758735.697976][23402:23404] CHIP:DMG: - [1689758735.697997][23402:23404] CHIP:DMG: }, - disabled: true - - - label: - "Step 2b: after a few seconds, TH reads from the DUT the - PercentCurrent attribute" - PICS: FAN.S.A0003 - verification: | - ./chip-tool fancontrol read percent-current 1 1 - - On TH(chip-tool), Verify the PercentCurrent attribute value is in the range of 0 to 100. - - [1685105264.946295][30821:30823] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0003 DataVersion: 3398333304 - [1685105264.946447][30821:30823] CHIP:TOO: PercentCurrent: 50 - disabled: true - - - label: - "Step 2c: TH sends Step command to DUT with Direction set to Increase" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 0 1 1 - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 2d: after a few seconds, TH reads from the DUT the - PercentCurrent attribute" - PICS: FAN.S.A0003 - verification: | - ./chip-tool fancontrol read percent-current 1 1 - - On TH(chip-tool), Verify the PercentCurrent attribute value is higher than step 2b. - - [1685105264.946295][30821:30823] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0003 DataVersion: 3398333304 - [1685105264.946447][30821:30823] CHIP:TOO: PercentCurrent: 50 - disabled: true - - - label: - "Step 3a: TH writes to the DUT the PercentSetting attribute with 50" - PICS: FAN.S.A0002 - verification: | - ./chip-tool fancontrol write percent-setting 50 1 1 - - On TH(chip-tool), Verify the SUCCESS response for FanMode attribute successful write. - - [1689758735.697705][23402:23404] CHIP:DMG: AttributePathIB = - [1689758735.697729][23402:23404] CHIP:DMG: { - [1689758735.697755][23402:23404] CHIP:DMG: Endpoint = 0x1, - [1689758735.697780][23402:23404] CHIP:DMG: Cluster = 0x202, - [1689758735.697805][23402:23404] CHIP:DMG: Attribute = 0x0000_0002, - [1689758735.697829][23402:23404] CHIP:DMG: } - [1689758735.697856][23402:23404] CHIP:DMG: - [1689758735.697879][23402:23404] CHIP:DMG: StatusIB = - [1689758735.697903][23402:23404] CHIP:DMG: { - [1689758735.697928][23402:23404] CHIP:DMG: status = 0x00 (SUCCESS), - [1689758735.697953][23402:23404] CHIP:DMG: }, - [1689758735.697976][23402:23404] CHIP:DMG: - [1689758735.697997][23402:23404] CHIP:DMG: }, - disabled: true - - - label: - "Step 3b: after a few seconds, TH reads from the DUT the - PercentCurrent attribute" - PICS: FAN.S.A0003 - verification: | - ./chip-tool fancontrol read percent-current 1 1 - - On TH(chip-tool), Verify the PercentCurrent attribute value is in the range of 0 to 100. - - [1685105264.946295][30821:30823] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0003 DataVersion: 3398333304 - [1685105264.946447][30821:30823] CHIP:TOO: PercentCurrent: 50 - disabled: true - - - label: - "Step 3c: TH sends Step command to DUT with Direction set to Decrease" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 1 1 1 - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 3d: after a few seconds, TH reads from the DUT the - PercentCurrent attribute" - PICS: FAN.S.A0003 - verification: | - ./chip-tool fancontrol read percent-current 1 1 - - On TH(chip-tool), Verify the PercentCurrent attribute value is lower than step 3b. - - [1685105264.946295][30821:30823] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0003 DataVersion: 3398333304 - [1685105264.946447][30821:30823] CHIP:TOO: PercentCurrent: 50 - disabled: true - - - label: "Step 4a: TH reads from the DUT the SpeedMax attribute" - PICS: FAN.S.A0004 - verification: | - ./chip-tool fancontrol read speed-max 1 1 - - On TH(chip-tool), Verify the SpeedMax attribute value is in the range of 1 to 100. - - [1688647242.182652][7491:7493] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0004 DataVersion: 2333446701 - [1688647242.182906][7491:7493] CHIP:TOO: SpeedMax: 100 - [1688647242.183197][7491:7493] CHIP:EM: <<< [E:6958i S:20670 M:246576408 (Ack:49619178)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: - "Step 4b: TH writes to the DUT the SpeedSetting attribute with value - read from step 4a" - PICS: FAN.S.A0005 - verification: | - ./chip-tool fancontrol write speed-setting 100 1 1 - - On TH(chip-tool), Verify the SUCCESS response for SpeedSetting attribute successful write. - - [1685104349.577491][30723:30725] CHIP:DMG: WriteClient moving to [ResponseRe] - [1685104349.577594][30723:30725] CHIP:DMG: WriteResponseMessage = - [1685104349.577653][30723:30725] CHIP:DMG: { - [1685104349.577728][30723:30725] CHIP:DMG: AttributeStatusIBs = - [1685104349.577838][30723:30725] CHIP:DMG: [ - [1685104349.577897][30723:30725] CHIP:DMG: AttributeStatusIB = - [1685104349.577988][30723:30725] CHIP:DMG: { - [1685104349.578122][30723:30725] CHIP:DMG: AttributePathIB = - [1685104349.578201][30723:30725] CHIP:DMG: { - [1685104349.578276][30723:30725] CHIP:DMG: Endpoint = 0x1, - [1685104349.578371][30723:30725] CHIP:DMG: Cluster = 0x202, - [1685104349.578448][30723:30725] CHIP:DMG: Attribute = 0x0000_0005, - [1685104349.578544][30723:30725] CHIP:DMG: } - [1685104349.578625][30723:30725] CHIP:DMG: - [1685104349.578720][30723:30725] CHIP:DMG: StatusIB = - [1685104349.578793][30723:30725] CHIP:DMG: { - [1685104349.578893][30723:30725] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104349.578967][30723:30725] CHIP:DMG: }, - [1685104349.579062][30723:30725] CHIP:DMG: - [1685104349.579125][30723:30725] CHIP:DMG: }, - [1685104349.579214][30723:30725] CHIP:DMG: - [1685104349.579270][30723:30725] CHIP:DMG: ], - [1685104349.579340][30723:30725] CHIP:DMG: - [1685104349.579420][30723:30725] CHIP:DMG: InteractionModelRevision = 1 - [1685104349.579474][30723:30725] CHIP:DMG: } - [1685104349.579657][30723:30725] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 4c: after a few seconds, TH sends Step command to DUT with - Direction set to Increase and Wrap set to false" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 0 1 1 --Wrap false - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 4d: after a few seconds, TH reads from the DUT the SpeedCurrent - attribute" - PICS: FAN.S.A0006 - verification: | - ./chip-tool fancontrol read speed-current 1 1 - - On TH(chip-tool), Verify the SpeedCurrent attribute value is lower than step 4a. - - [1688649821.674949][7869:7871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0006 DataVersion: 2333446701 - [1688649821.675124][7869:7871] CHIP:TOO: SpeedCurrent: 100 - [1688649821.675408][7869:7871] CHIP:EM: <<< [E:46324i S:9042 M:257483571 (Ack:231043875)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: - "Step 5a: TH writes to the DUT the SpeedSetting attribute with value - read from step 4a" - PICS: FAN.S.A0005 - verification: | - ./chip-tool fancontrol write speed-setting 100 1 1 - - On TH(chip-tool), Verify the SUCCESS response for SpeedSetting attribute successful write. - - [1685104349.577491][30723:30725] CHIP:DMG: WriteClient moving to [ResponseRe] - [1685104349.577594][30723:30725] CHIP:DMG: WriteResponseMessage = - [1685104349.577653][30723:30725] CHIP:DMG: { - [1685104349.577728][30723:30725] CHIP:DMG: AttributeStatusIBs = - [1685104349.577838][30723:30725] CHIP:DMG: [ - [1685104349.577897][30723:30725] CHIP:DMG: AttributeStatusIB = - [1685104349.577988][30723:30725] CHIP:DMG: { - [1685104349.578122][30723:30725] CHIP:DMG: AttributePathIB = - [1685104349.578201][30723:30725] CHIP:DMG: { - [1685104349.578276][30723:30725] CHIP:DMG: Endpoint = 0x1, - [1685104349.578371][30723:30725] CHIP:DMG: Cluster = 0x202, - [1685104349.578448][30723:30725] CHIP:DMG: Attribute = 0x0000_0005, - [1685104349.578544][30723:30725] CHIP:DMG: } - [1685104349.578625][30723:30725] CHIP:DMG: - [1685104349.578720][30723:30725] CHIP:DMG: StatusIB = - [1685104349.578793][30723:30725] CHIP:DMG: { - [1685104349.578893][30723:30725] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104349.578967][30723:30725] CHIP:DMG: }, - [1685104349.579062][30723:30725] CHIP:DMG: - [1685104349.579125][30723:30725] CHIP:DMG: }, - [1685104349.579214][30723:30725] CHIP:DMG: - [1685104349.579270][30723:30725] CHIP:DMG: ], - [1685104349.579340][30723:30725] CHIP:DMG: - [1685104349.579420][30723:30725] CHIP:DMG: InteractionModelRevision = 1 - [1685104349.579474][30723:30725] CHIP:DMG: } - [1685104349.579657][30723:30725] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 5b: after a few seconds, TH sends Step command to DUT with - Direction set to Increase, Wrap set to true, and LowestOff set to - false" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 0 1 1 --Wrap true --LowestOff false - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 5c: after a few seconds, TH reads from the DUT the SpeedCurrent - attribute" - PICS: FAN.S.A0006 - verification: | - ./chip-tool fancontrol read speed-current 1 1 - - On TH(chip-tool), Verify the SpeedCurrent attribute value is 1. - - [1688649821.674949][7869:7871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0006 DataVersion: 2333446701 - [1688649821.675124][7869:7871] CHIP:TOO: SpeedCurrent: 100 - [1688649821.675408][7869:7871] CHIP:EM: <<< [E:46324i S:9042 M:257483571 (Ack:231043875)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: - "Step 6a: TH writes to the DUT the SpeedSetting attribute with value - read from step 4a" - PICS: FAN.S.A0005 - verification: | - ./chip-tool fancontrol write speed-setting 100 1 1 - - On TH(chip-tool), Verify the SUCCESS response for SpeedSetting attribute successful write. - - [1685104349.577491][30723:30725] CHIP:DMG: WriteClient moving to [ResponseRe] - [1685104349.577594][30723:30725] CHIP:DMG: WriteResponseMessage = - [1685104349.577653][30723:30725] CHIP:DMG: { - [1685104349.577728][30723:30725] CHIP:DMG: AttributeStatusIBs = - [1685104349.577838][30723:30725] CHIP:DMG: [ - [1685104349.577897][30723:30725] CHIP:DMG: AttributeStatusIB = - [1685104349.577988][30723:30725] CHIP:DMG: { - [1685104349.578122][30723:30725] CHIP:DMG: AttributePathIB = - [1685104349.578201][30723:30725] CHIP:DMG: { - [1685104349.578276][30723:30725] CHIP:DMG: Endpoint = 0x1, - [1685104349.578371][30723:30725] CHIP:DMG: Cluster = 0x202, - [1685104349.578448][30723:30725] CHIP:DMG: Attribute = 0x0000_0005, - [1685104349.578544][30723:30725] CHIP:DMG: } - [1685104349.578625][30723:30725] CHIP:DMG: - [1685104349.578720][30723:30725] CHIP:DMG: StatusIB = - [1685104349.578793][30723:30725] CHIP:DMG: { - [1685104349.578893][30723:30725] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104349.578967][30723:30725] CHIP:DMG: }, - [1685104349.579062][30723:30725] CHIP:DMG: - [1685104349.579125][30723:30725] CHIP:DMG: }, - [1685104349.579214][30723:30725] CHIP:DMG: - [1685104349.579270][30723:30725] CHIP:DMG: ], - [1685104349.579340][30723:30725] CHIP:DMG: - [1685104349.579420][30723:30725] CHIP:DMG: InteractionModelRevision = 1 - [1685104349.579474][30723:30725] CHIP:DMG: } - [1685104349.579657][30723:30725] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 6b: after a few seconds, TH sends Step command to DUT with - Direction set to Increase, Wrap set to true, and LowestOff set to true" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 0 1 1 --Wrap true --LowestOff true - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 6c: after a few seconds, TH reads from the DUT the SpeedCurrent - attribute" - PICS: FAN.S.A0006 - verification: | - ./chip-tool fancontrol read speed-current 1 1 - - On TH(chip-tool), Verify the SpeedCurrent attribute value is 0. - - [1688649821.674949][7869:7871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0006 DataVersion: 2333446701 - [1688649821.675124][7869:7871] CHIP:TOO: SpeedCurrent: 100 - [1688649821.675408][7869:7871] CHIP:EM: <<< [E:46324i S:9042 M:257483571 (Ack:231043875)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: - "Step 7a: TH writes to the DUT the SpeedSetting attribute with a value - of 1" - PICS: FAN.S.A0005 - verification: | - ./chip-tool fancontrol write speed-setting 1 1 1 - - On TH(chip-tool), Verify the SUCCESS response for SpeedSetting attribute successful write. - - [1685104349.577491][30723:30725] CHIP:DMG: WriteClient moving to [ResponseRe] - [1685104349.577594][30723:30725] CHIP:DMG: WriteResponseMessage = - [1685104349.577653][30723:30725] CHIP:DMG: { - [1685104349.577728][30723:30725] CHIP:DMG: AttributeStatusIBs = - [1685104349.577838][30723:30725] CHIP:DMG: [ - [1685104349.577897][30723:30725] CHIP:DMG: AttributeStatusIB = - [1685104349.577988][30723:30725] CHIP:DMG: { - [1685104349.578122][30723:30725] CHIP:DMG: AttributePathIB = - [1685104349.578201][30723:30725] CHIP:DMG: { - [1685104349.578276][30723:30725] CHIP:DMG: Endpoint = 0x1, - [1685104349.578371][30723:30725] CHIP:DMG: Cluster = 0x202, - [1685104349.578448][30723:30725] CHIP:DMG: Attribute = 0x0000_0005, - [1685104349.578544][30723:30725] CHIP:DMG: } - [1685104349.578625][30723:30725] CHIP:DMG: - [1685104349.578720][30723:30725] CHIP:DMG: StatusIB = - [1685104349.578793][30723:30725] CHIP:DMG: { - [1685104349.578893][30723:30725] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104349.578967][30723:30725] CHIP:DMG: }, - [1685104349.579062][30723:30725] CHIP:DMG: - [1685104349.579125][30723:30725] CHIP:DMG: }, - [1685104349.579214][30723:30725] CHIP:DMG: - [1685104349.579270][30723:30725] CHIP:DMG: ], - [1685104349.579340][30723:30725] CHIP:DMG: - [1685104349.579420][30723:30725] CHIP:DMG: InteractionModelRevision = 1 - [1685104349.579474][30723:30725] CHIP:DMG: } - [1685104349.579657][30723:30725] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 7b: after a few seconds, TH sends Step command to DUT with - Direction set to Decrease and Wrap set to false and LowestOff set to - false" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 1 1 1 --Wrap false --LowestOff false - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 7c: after a few seconds, TH reads from the DUT the SpeedCurrent - attribute" - PICS: FAN.S.A0006 - verification: | - ./chip-tool fancontrol read speed-current 1 1 - - On TH(chip-tool), Verify the SpeedCurrent attribute value is 1. - - [1688649821.674949][7869:7871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0006 DataVersion: 2333446701 - [1688649821.675124][7869:7871] CHIP:TOO: SpeedCurrent: 1 - [1688649821.675408][7869:7871] CHIP:EM: <<< [E:46324i S:9042 M:257483571 (Ack:231043875)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: "Step 8a: TH reads from the DUT the SpeedMax attribute" - PICS: FAN.S.A0004 - verification: | - ./chip-tool fancontrol read speed-max 1 1 - - On TH(chip-tool), Verify the SpeedMax attribute value is in the range of 1 to 100. - - [1688647242.182652][7491:7493] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0004 DataVersion: 2333446701 - [1688647242.182906][7491:7493] CHIP:TOO: SpeedMax: 100 - [1688647242.183197][7491:7493] CHIP:EM: <<< [E:6958i S:20670 M:246576408 (Ack:49619178)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: - "Step 8b: TH writes to the DUT the SpeedSetting attribute with a value - of 1" - PICS: FAN.S.A0005 - verification: | - ./chip-tool fancontrol write speed-setting 1 1 1 - - On TH(chip-tool), Verify the SUCCESS response for SpeedSetting attribute successful write. - - [1685104349.577491][30723:30725] CHIP:DMG: WriteClient moving to [ResponseRe] - [1685104349.577594][30723:30725] CHIP:DMG: WriteResponseMessage = - [1685104349.577653][30723:30725] CHIP:DMG: { - [1685104349.577728][30723:30725] CHIP:DMG: AttributeStatusIBs = - [1685104349.577838][30723:30725] CHIP:DMG: [ - [1685104349.577897][30723:30725] CHIP:DMG: AttributeStatusIB = - [1685104349.577988][30723:30725] CHIP:DMG: { - [1685104349.578122][30723:30725] CHIP:DMG: AttributePathIB = - [1685104349.578201][30723:30725] CHIP:DMG: { - [1685104349.578276][30723:30725] CHIP:DMG: Endpoint = 0x1, - [1685104349.578371][30723:30725] CHIP:DMG: Cluster = 0x202, - [1685104349.578448][30723:30725] CHIP:DMG: Attribute = 0x0000_0005, - [1685104349.578544][30723:30725] CHIP:DMG: } - [1685104349.578625][30723:30725] CHIP:DMG: - [1685104349.578720][30723:30725] CHIP:DMG: StatusIB = - [1685104349.578793][30723:30725] CHIP:DMG: { - [1685104349.578893][30723:30725] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104349.578967][30723:30725] CHIP:DMG: }, - [1685104349.579062][30723:30725] CHIP:DMG: - [1685104349.579125][30723:30725] CHIP:DMG: }, - [1685104349.579214][30723:30725] CHIP:DMG: - [1685104349.579270][30723:30725] CHIP:DMG: ], - [1685104349.579340][30723:30725] CHIP:DMG: - [1685104349.579420][30723:30725] CHIP:DMG: InteractionModelRevision = 1 - [1685104349.579474][30723:30725] CHIP:DMG: } - [1685104349.579657][30723:30725] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 8c: after a few seconds, TH sends Step command to DUT with - Direction set to Decrease, Wrap set to true, and LowestOff set to - false" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 1 1 1 --Wrap true --LowestOff false - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 8d: after a few seconds, TH reads from the DUT the SpeedCurrent - attribute" - PICS: FAN.S.A0006 - verification: | - ./chip-tool fancontrol read speed-current 1 1 - - On TH(chip-tool), Verify the SpeedCurrent attribute value is same as step 8a. - - [1688649821.674949][7869:7871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0006 DataVersion: 2333446701 - [1688649821.675124][7869:7871] CHIP:TOO: SpeedCurrent: 1 - [1688649821.675408][7869:7871] CHIP:EM: <<< [E:46324i S:9042 M:257483571 (Ack:231043875)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: "Step 9a: TH reads from the DUT the SpeedMax attribute" - PICS: FAN.S.A0004 - verification: | - ./chip-tool fancontrol read speed-max 1 1 - - On TH(chip-tool), Verify the SpeedMax attribute value is in the range of 1 to 100. - - [1688647242.182652][7491:7493] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0004 DataVersion: 2333446701 - [1688647242.182906][7491:7493] CHIP:TOO: SpeedMax: 100 - [1688647242.183197][7491:7493] CHIP:EM: <<< [E:6958i S:20670 M:246576408 (Ack:49619178)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true - - - label: - "Step 9b: TH writes to the DUT the SpeedSetting attribute with value - of zero" - PICS: FAN.S.A0005 - verification: | - ./chip-tool fancontrol write speed-setting 0 1 1 - - On TH(chip-tool), Verify the SUCCESS response for SpeedSetting attribute successful write. - - [1685104349.577491][30723:30725] CHIP:DMG: WriteClient moving to [ResponseRe] - [1685104349.577594][30723:30725] CHIP:DMG: WriteResponseMessage = - [1685104349.577653][30723:30725] CHIP:DMG: { - [1685104349.577728][30723:30725] CHIP:DMG: AttributeStatusIBs = - [1685104349.577838][30723:30725] CHIP:DMG: [ - [1685104349.577897][30723:30725] CHIP:DMG: AttributeStatusIB = - [1685104349.577988][30723:30725] CHIP:DMG: { - [1685104349.578122][30723:30725] CHIP:DMG: AttributePathIB = - [1685104349.578201][30723:30725] CHIP:DMG: { - [1685104349.578276][30723:30725] CHIP:DMG: Endpoint = 0x1, - [1685104349.578371][30723:30725] CHIP:DMG: Cluster = 0x202, - [1685104349.578448][30723:30725] CHIP:DMG: Attribute = 0x0000_0005, - [1685104349.578544][30723:30725] CHIP:DMG: } - [1685104349.578625][30723:30725] CHIP:DMG: - [1685104349.578720][30723:30725] CHIP:DMG: StatusIB = - [1685104349.578793][30723:30725] CHIP:DMG: { - [1685104349.578893][30723:30725] CHIP:DMG: status = 0x00 (SUCCESS), - [1685104349.578967][30723:30725] CHIP:DMG: }, - [1685104349.579062][30723:30725] CHIP:DMG: - [1685104349.579125][30723:30725] CHIP:DMG: }, - [1685104349.579214][30723:30725] CHIP:DMG: - [1685104349.579270][30723:30725] CHIP:DMG: ], - [1685104349.579340][30723:30725] CHIP:DMG: - [1685104349.579420][30723:30725] CHIP:DMG: InteractionModelRevision = 1 - [1685104349.579474][30723:30725] CHIP:DMG: } - [1685104349.579657][30723:30725] CHIP:DMG: WriteClient moving to [AwaitingDe] - disabled: true - - - label: - "Step 9c: after a few seconds, TH sends Step command to DUT with - Direction set to Decrease, Wrap set to true, and LowestOff set to true" - PICS: FAN.S.C00.Rsp - verification: | - ./chip-tool fancontrol step 1 1 1 --Wrap true --LowestOff true - - On TH(chip-tool), Verify the SUCCESS response for sending Step command. - - [1688369238.200998][44233:44235] CHIP:DMG: StatusIB = - [1688369238.201073][44233:44235] CHIP:DMG: { - [1688369238.201149][44233:44235] CHIP:DMG: status = 0x00 (SUCCESS), - [1688369238.201226][44233:44235] CHIP:DMG: }, - disabled: true - - - label: - "Step 9d: after a few seconds, TH reads from the DUT the SpeedCurrent - attribute" - PICS: FAN.S.A0006 - verification: | - ./chip-tool fancontrol read speed-current 1 1 - - On TH(chip-tool), Verify the SpeedCurrent attribute value is same as step 9a. - - [1688649821.674949][7869:7871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_0006 DataVersion: 2333446701 - [1688649821.675124][7869:7871] CHIP:TOO: SpeedCurrent: 0 - [1688649821.675408][7869:7871] CHIP:EM: <<< [E:46324i S:9042 M:257483571 (Ack:231043875)] (S) Msg TX to 1:0000000000000001 [08DD] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_FLABEL_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_FLABEL_3_1_Simulated.yaml deleted file mode 100644 index e109c22a0669cd..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_FLABEL_3_1_Simulated.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 98.3.1. [TC-FLABEL-1.1] Global Attributes with DUT as Server - -PICS: - - FLABEL.C - -config: - nodeId: 0x12344321 - cluster: "Fixed Label" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads LabelList from the TH" - PICS: FLABEL.C.A0000 - wait: "readAttribute" - attribute: "LabelList" diff --git a/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml index f1e8e72ae0ada9..c55f58614d0f2a 100644 --- a/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: FLDCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !FLDCONC.S.F00 && !FLDCONC.S.F01 && !FLDCONC.S.F02 && !FLDCONC.S.F03 + && !FLDCONC.S.F04 && !FLDCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given FLDCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && FLDCONC.S.F00 + PICS: FLDCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && !FLDCONC.S.F00 + PICS: " !FLDCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && FLDCONC.S.F01 + PICS: FLDCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && !FLDCONC.S.F01 + PICS: " !FLDCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && FLDCONC.S.F02 + PICS: FLDCONC.S.F02 && FLDCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && !FLDCONC.S.F02 + PICS: " !FLDCONC.S.F02 && !FLDCONC.S.F01" response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && FLDCONC.S.F03 + PICS: FLDCONC.S.F03 && FLDCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && !FLDCONC.S.F03 + PICS: " !FLDCONC.S.F03 && !FLDCONC.S.F01 " response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && FLDCONC.S.F04 + PICS: FLDCONC.S.F04 && FLDCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && !FLDCONC.S.F04 + PICS: " !FLDCONC.S.F04 && !FLDCONC.S.F00 " response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && FLDCONC.S.F05 + PICS: FLDCONC.S.F05 && FLDCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: FLDCONC.S.Afffc && !FLDCONC.S.F05 + PICS: " !FLDCONC.S.F05 && !FLDCONC.S.F00" response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && FLDCONC.S.A0007 && FLDCONC.S.F00 + PICS: FLDCONC.S.A0007 && FLDCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when FLDCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && !FLDCONC.S.A0007 + PICS: " !FLDCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && FLDCONC.S.F00 + PICS: FLDCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when FLDCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && !FLDCONC.S.F00 + PICS: " !FLDCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && FLDCONC.S.F04 + PICS: FLDCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when FLDCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && !FLDCONC.S.F04 + PICS: " !FLDCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && FLDCONC.S.F05 + PICS: FLDCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: FLDCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && !FLDCONC.S.F05 + PICS: " !FLDCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && FLDCONC.S.F01 + PICS: FLDCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: FLDCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: FLDCONC.S.Afffb && !FLDCONC.S.F01 + PICS: " !FLDCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: FLDCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: FLDCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_FLW_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_FLW_3_1_Simulated.yaml deleted file mode 100644 index 24db2438da578c..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_FLW_3_1_Simulated.yaml +++ /dev/null @@ -1,415 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 31.3.1. [TC-FLW-3.1] Attributes with Client as DUT - -PICS: - - FLW.C - - FLW.C.AM-READ - - FLW.C.AO-READ - - FLW.C.AM-WRITE - - FLW.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Flow Measurement" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: MeasuredValue" - PICS: FLW.C.AM-READ - wait: "readAttribute" - attribute: "MeasuredValue" - - - label: "Read attribute: MinMeasuredValue" - PICS: FLW.C.AM-READ - wait: "readAttribute" - attribute: "MinMeasuredValue" - - - label: "Read attribute: MaxMeasuredValue" - PICS: FLW.C.AM-READ - wait: "readAttribute" - attribute: "MaxMeasuredValue" - - - label: "Read attribute: Tolerance" - PICS: FLW.C.AO-READ - wait: "readAttribute" - attribute: "Tolerance" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again." - verification: | - Verify TH(all-clusters-minimal-app) that it implements mandatory and none of the optional attributes of the server-side of the cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. - - ./chip-tool flowmeasurement read attribute-list 1 1 - - Verify AttributeList response on the TH(all-clusters-minimal-app) Log: - - ReportDataMessage = - [1666851487.507946][18927:18927] CHIP:DMG: { - [1666851487.507950][18927:18927] CHIP:DMG: AttributeReportIBs = - [1666851487.507957][18927:18927] CHIP:DMG: [ - [1666851487.507961][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.507969][18927:18927] CHIP:DMG: { - [1666851487.507974][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.507979][18927:18927] CHIP:DMG: { - [1666851487.507984][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.507990][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.507995][18927:18927] CHIP:DMG: { - [1666851487.508001][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508007][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508012][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508018][18927:18927] CHIP:DMG: } - [1666851487.508024][18927:18927] CHIP:DMG: - [1666851487.508030][18927:18927] CHIP:DMG: Data = [ - [1666851487.508035][18927:18927] CHIP:DMG: - [1666851487.508041][18927:18927] CHIP:DMG: ], - [1666851487.508045][18927:18927] CHIP:DMG: }, - [1666851487.508053][18927:18927] CHIP:DMG: - [1666851487.508057][18927:18927] CHIP:DMG: }, - [1666851487.508068][18927:18927] CHIP:DMG: - [1666851487.508072][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508080][18927:18927] CHIP:DMG: { - [1666851487.508085][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508089][18927:18927] CHIP:DMG: { - [1666851487.508094][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508098][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508104][18927:18927] CHIP:DMG: { - [1666851487.508108][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508113][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508119][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508124][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508128][18927:18927] CHIP:DMG: } - [1666851487.508134][18927:18927] CHIP:DMG: - [1666851487.508139][18927:18927] CHIP:DMG: Data = 0, - [1666851487.508143][18927:18927] CHIP:DMG: }, - [1666851487.508149][18927:18927] CHIP:DMG: - [1666851487.508152][18927:18927] CHIP:DMG: }, - [1666851487.508161][18927:18927] CHIP:DMG: - [1666851487.508165][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508173][18927:18927] CHIP:DMG: { - [1666851487.508178][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508183][18927:18927] CHIP:DMG: { - [1666851487.508189][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508194][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508199][18927:18927] CHIP:DMG: { - [1666851487.508204][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508210][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508216][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508221][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508225][18927:18927] CHIP:DMG: } - [1666851487.508232][18927:18927] CHIP:DMG: - [1666851487.508237][18927:18927] CHIP:DMG: Data = 1, - [1666851487.508242][18927:18927] CHIP:DMG: }, - [1666851487.508249][18927:18927] CHIP:DMG: - [1666851487.508254][18927:18927] CHIP:DMG: }, - [1666851487.508264][18927:18927] CHIP:DMG: - [1666851487.508268][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508275][18927:18927] CHIP:DMG: { - [1666851487.508280][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508285][18927:18927] CHIP:DMG: { - [1666851487.508289][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508293][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508298][18927:18927] CHIP:DMG: { - [1666851487.508303][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508307][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508314][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508318][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508324][18927:18927] CHIP:DMG: } - [1666851487.508331][18927:18927] CHIP:DMG: - [1666851487.508337][18927:18927] CHIP:DMG: Data = 2, - [1666851487.508341][18927:18927] CHIP:DMG: }, - [1666851487.508348][18927:18927] CHIP:DMG: - [1666851487.508353][18927:18927] CHIP:DMG: }, - [1666851487.508363][18927:18927] CHIP:DMG: - [1666851487.508367][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508374][18927:18927] CHIP:DMG: { - [1666851487.508377][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508382][18927:18927] CHIP:DMG: { - [1666851487.508386][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508390][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508395][18927:18927] CHIP:DMG: { - [1666851487.508399][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508406][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508411][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508416][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508420][18927:18927] CHIP:DMG: } - [1666851487.508426][18927:18927] CHIP:DMG: - [1666851487.508431][18927:18927] CHIP:DMG: Data = 65528, - [1666851487.508436][18927:18927] CHIP:DMG: }, - [1666851487.508443][18927:18927] CHIP:DMG: - [1666851487.508447][18927:18927] CHIP:DMG: }, - [1666851487.508456][18927:18927] CHIP:DMG: - [1666851487.508461][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508468][18927:18927] CHIP:DMG: { - [1666851487.508471][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508475][18927:18927] CHIP:DMG: { - [1666851487.508480][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508486][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508491][18927:18927] CHIP:DMG: { - [1666851487.508495][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508500][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508506][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508511][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508515][18927:18927] CHIP:DMG: } - [1666851487.508521][18927:18927] CHIP:DMG: - [1666851487.508526][18927:18927] CHIP:DMG: Data = 65529, - [1666851487.508531][18927:18927] CHIP:DMG: }, - [1666851487.508538][18927:18927] CHIP:DMG: - [1666851487.508543][18927:18927] CHIP:DMG: }, - [1666851487.508554][18927:18927] CHIP:DMG: - [1666851487.508557][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508564][18927:18927] CHIP:DMG: { - [1666851487.508569][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508574][18927:18927] CHIP:DMG: { - [1666851487.508579][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508584][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508590][18927:18927] CHIP:DMG: { - [1666851487.508595][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508601][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508607][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508611][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508616][18927:18927] CHIP:DMG: } - [1666851487.508622][18927:18927] CHIP:DMG: - [1666851487.508627][18927:18927] CHIP:DMG: Data = 65531, - [1666851487.508632][18927:18927] CHIP:DMG: }, - [1666851487.508638][18927:18927] CHIP:DMG: - [1666851487.508642][18927:18927] CHIP:DMG: }, - [1666851487.508652][18927:18927] CHIP:DMG: - [1666851487.508656][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508663][18927:18927] CHIP:DMG: { - [1666851487.508668][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508673][18927:18927] CHIP:DMG: { - [1666851487.508678][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508683][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508688][18927:18927] CHIP:DMG: { - [1666851487.508692][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508699][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508705][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508710][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508714][18927:18927] CHIP:DMG: } - [1666851487.508721][18927:18927] CHIP:DMG: - [1666851487.508726][18927:18927] CHIP:DMG: Data = 65532, - [1666851487.508730][18927:18927] CHIP:DMG: }, - [1666851487.508737][18927:18927] CHIP:DMG: - [1666851487.508741][18927:18927] CHIP:DMG: }, - [1666851487.508750][18927:18927] CHIP:DMG: - [1666851487.508754][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851487.508761][18927:18927] CHIP:DMG: { - [1666851487.508766][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851487.508771][18927:18927] CHIP:DMG: { - [1666851487.508775][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851487.508780][18927:18927] CHIP:DMG: AttributePathIB = - [1666851487.508785][18927:18927] CHIP:DMG: { - [1666851487.508790][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851487.508796][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851487.508803][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666851487.508808][18927:18927] CHIP:DMG: ListIndex = Null, - [1666851487.508814][18927:18927] CHIP:DMG: } - [1666851487.508820][18927:18927] CHIP:DMG: - [1666851487.508825][18927:18927] CHIP:DMG: Data = 65533, - [1666851487.508829][18927:18927] CHIP:DMG: }, - [1666851487.508836][18927:18927] CHIP:DMG: - [1666851487.508840][18927:18927] CHIP:DMG: }, - [1666851487.508847][18927:18927] CHIP:DMG: - [1666851487.508851][18927:18927] CHIP:DMG: ], - [1666851487.508879][18927:18927] CHIP:DMG: - [1666851487.508884][18927:18927] CHIP:DMG: SuppressResponse = true, - [1666851487.508888][18927:18927] CHIP:DMG: InteractionModelRevision = 1 - [1666851487.508892][18927:18927] CHIP:DMG: } - [1666851487.508896][18927:18927] CHIP:DMG: - - - - ./chip-tool flowmeasurement read feature-map 1 1 - - Verify FeatureMap attribute response on the TH(all-clusters-minimal-app) Log: - - ReportDataMessage = - [1666851643.847203][18927:18927] CHIP:DMG: { - [1666851643.847206][18927:18927] CHIP:DMG: AttributeReportIBs = - [1666851643.847211][18927:18927] CHIP:DMG: [ - [1666851643.847214][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851643.847219][18927:18927] CHIP:DMG: { - [1666851643.847222][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851643.847226][18927:18927] CHIP:DMG: { - [1666851643.847229][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851643.847232][18927:18927] CHIP:DMG: AttributePathIB = - [1666851643.847236][18927:18927] CHIP:DMG: { - [1666851643.847240][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851643.847244][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851643.847249][18927:18927] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666851643.847252][18927:18927] CHIP:DMG: } - [1666851643.847256][18927:18927] CHIP:DMG: - [1666851643.847261][18927:18927] CHIP:DMG: Data = 0, - [1666851643.847264][18927:18927] CHIP:DMG: }, - [1666851643.847269][18927:18927] CHIP:DMG: - [1666851643.847272][18927:18927] CHIP:DMG: }, - [1666851643.847276][18927:18927] CHIP:DMG: - [1666851643.847279][18927:18927] CHIP:DMG: ], - [1666851643.847285][18927:18927] CHIP:DMG: - [1666851643.847288][18927:18927] CHIP:DMG: SuppressResponse = true, - [1666851643.847291][18927:18927] CHIP:DMG: InteractionModelRevision = 1 - [1666851643.847294][18927:18927] CHIP:DMG: } - - - ./chip-tool flowmeasurement read measured-value 1 1 - - Verify MeasuredValue response on the TH(all-clusters-minimal-app) Log: - - ReportDataMessage = - [1666851671.893452][18927:18927] CHIP:DMG: { - [1666851671.893455][18927:18927] CHIP:DMG: AttributeReportIBs = - [1666851671.893460][18927:18927] CHIP:DMG: [ - [1666851671.893462][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851671.893467][18927:18927] CHIP:DMG: { - [1666851671.893471][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851671.893476][18927:18927] CHIP:DMG: { - [1666851671.893479][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851671.893484][18927:18927] CHIP:DMG: AttributePathIB = - [1666851671.893487][18927:18927] CHIP:DMG: { - [1666851671.893493][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851671.893496][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851671.893501][18927:18927] CHIP:DMG: Attribute = 0x0000_0000, - [1666851671.893506][18927:18927] CHIP:DMG: } - [1666851671.893511][18927:18927] CHIP:DMG: - [1666851671.893517][18927:18927] CHIP:DMG: Data = 0, - [1666851671.893520][18927:18927] CHIP:DMG: }, - [1666851671.893526][18927:18927] CHIP:DMG: - [1666851671.893529][18927:18927] CHIP:DMG: }, - [1666851671.893534][18927:18927] CHIP:DMG: - [1666851671.893538][18927:18927] CHIP:DMG: ], - [1666851671.893545][18927:18927] CHIP:DMG: - [1666851671.893549][18927:18927] CHIP:DMG: SuppressResponse = true, - [1666851671.893552][18927:18927] CHIP:DMG: InteractionModelRevision = 1 - [1666851671.893555][18927:18927] CHIP:DMG: } - - - - ./chip-tool flowmeasurement read min-measured-value 1 1 - - Verify MinMeasuredValue response on the TH(all-clusters-minimal-app) Log: - - ReportDataMessage = - [1666851700.451575][18927:18927] CHIP:DMG: { - [1666851700.451579][18927:18927] CHIP:DMG: AttributeReportIBs = - [1666851700.451585][18927:18927] CHIP:DMG: [ - [1666851700.451589][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851700.451596][18927:18927] CHIP:DMG: { - [1666851700.451599][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851700.451603][18927:18927] CHIP:DMG: { - [1666851700.451606][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851700.451611][18927:18927] CHIP:DMG: AttributePathIB = - [1666851700.451615][18927:18927] CHIP:DMG: { - [1666851700.451620][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851700.451625][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851700.451630][18927:18927] CHIP:DMG: Attribute = 0x0000_0001, - [1666851700.451633][18927:18927] CHIP:DMG: } - [1666851700.451638][18927:18927] CHIP:DMG: - [1666851700.451644][18927:18927] CHIP:DMG: Data = 0, - [1666851700.451647][18927:18927] CHIP:DMG: }, - [1666851700.451652][18927:18927] CHIP:DMG: - [1666851700.451655][18927:18927] CHIP:DMG: }, - [1666851700.451661][18927:18927] CHIP:DMG: - [1666851700.451665][18927:18927] CHIP:DMG: ], - [1666851700.451671][18927:18927] CHIP:DMG: - [1666851700.451674][18927:18927] CHIP:DMG: SuppressResponse = true, - [1666851700.451677][18927:18927] CHIP:DMG: InteractionModelRevision = 1 - [1666851700.451681][18927:18927] CHIP:DMG: } - - - ./chip-tool flowmeasurement read max-measured-value 1 1 - - Verify MaxMeasured Value response on the TH(all-clusters-minimal-app) Log: - - ReportDataMessage = - [1666851727.140175][18927:18927] CHIP:DMG: { - [1666851727.140178][18927:18927] CHIP:DMG: AttributeReportIBs = - [1666851727.140185][18927:18927] CHIP:DMG: [ - [1666851727.140190][18927:18927] CHIP:DMG: AttributeReportIB = - [1666851727.140197][18927:18927] CHIP:DMG: { - [1666851727.140201][18927:18927] CHIP:DMG: AttributeDataIB = - [1666851727.140206][18927:18927] CHIP:DMG: { - [1666851727.140210][18927:18927] CHIP:DMG: DataVersion = 0xca67ce55, - [1666851727.140214][18927:18927] CHIP:DMG: AttributePathIB = - [1666851727.140220][18927:18927] CHIP:DMG: { - [1666851727.140225][18927:18927] CHIP:DMG: Endpoint = 0x1, - [1666851727.140230][18927:18927] CHIP:DMG: Cluster = 0x404, - [1666851727.140235][18927:18927] CHIP:DMG: Attribute = 0x0000_0002, - [1666851727.140240][18927:18927] CHIP:DMG: } - [1666851727.140247][18927:18927] CHIP:DMG: - [1666851727.140253][18927:18927] CHIP:DMG: Data = 0, - [1666851727.140258][18927:18927] CHIP:DMG: }, - [1666851727.140264][18927:18927] CHIP:DMG: - [1666851727.140267][18927:18927] CHIP:DMG: }, - [1666851727.140275][18927:18927] CHIP:DMG: - [1666851727.140278][18927:18927] CHIP:DMG: ], - [1666851727.140285][18927:18927] CHIP:DMG: - [1666851727.140290][18927:18927] CHIP:DMG: SuppressResponse = true, - [1666851727.140295][18927:18927] CHIP:DMG: InteractionModelRevision = 1 - [1666851727.140298][18927:18927] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - Verify TH(all-clusters-minimal-app) receives the read command, and responds that this attribute is not available and also DUT is aware that the optional attributes are not available, and does not issue read requests for the attributes which it did read in step 2 - - - ./chip-tool flowmeasurement read tolerance 1 1 - - Verify Tolerance response on the TH(all-clusters-minimal-app) Log: - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && FLW.C.AO-READ - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_GRPKEY_1_1.yaml b/src/app/tests/suites/certification/Test_TC_GRPKEY_1_1.yaml new file mode 100644 index 00000000000000..4f9f2db080c1c3 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_GRPKEY_1_1.yaml @@ -0,0 +1,232 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 26.1.1. [TC-GRPKEY-1.1] Global Attributes with DUT as Server + +PICS: + - GRPKEY.S + +config: + nodeId: 0x12344321 + cluster: "Group Key Management" + endpoint: 0 + +tests: + - label: "Step 1: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + #Please refer Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3280 + - label: "Step 2: TH reads the ClusterRevision from DUT" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 2 + constraints: + type: int16u + + - label: "Step 3a: TH reads the FeatureMap from DUT" + PICS: " !GRPKEY.S.F00 " + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + + - label: + "Step 3b: Given GRPKEY.S.F00(CS) ensure featuremap has the correct bit + set" + PICS: GRPKEY.S.F00 + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x1] + + - label: "Step 4a: TH reads AttributeList from DUT" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 3, 65528, 65529, 65530, 65531, 65532, 65533] + + - label: "Step 4a: TH reads AttributeList from DUT" + PICS: " !PICS_EVENT_LIST_ENABLED " + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] + + - label: + "Step 4b: The list SHALL NOT contain any additional values in the + standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 + - 0x0000_FFFE). 2.The list MAY contain values in the Manufacturer + Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where + XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be + ignored. 3.TThe list SHALL NOT contain any values in the Test Vendor + or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), + (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where + XXXX is the allowed MEI range (0x0001 - 0xFFF1)" + verification: | + ./chip-tool groupkeymanagement read attribute-list 1 0 + + Verify the "AttributeList" contains the mandatory attribute (values 0, 1, 2, 3) , global attributes ( 65528, 65529, 65530, 65531, 65532, 65533) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + + [1689923270.946521][6116:6118] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFFB DataVersion: 4114127542 + [1689923270.946632][6116:6118] CHIP:TOO: AttributeList: 10 entries + [1689923270.946672][6116:6118] CHIP:TOO: [1]: 0 + [1689923270.946705][6116:6118] CHIP:TOO: [2]: 1 + [1689923270.946737][6116:6118] CHIP:TOO: [3]: 2 + [1689923270.946768][6116:6118] CHIP:TOO: [4]: 3 + [1689923270.946800][6116:6118] CHIP:TOO: [5]: 65528 + [1689923270.946831][6116:6118] CHIP:TOO: [6]: 65529 + [1689923270.946862][6116:6118] CHIP:TOO: [7]: 65530 + [1689923270.946893][6116:6118] CHIP:TOO: [8]: 65531 + [1689923270.946924][6116:6118] CHIP:TOO: [9]: 65532 + [1689923270.946956][6116:6118] CHIP:TOO: [10]: 65533 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "Step 5a: TH1 reads EventList from DUT" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list + + - label: + "Step 5b: TH reads EventList attribute from DUT. 1.The list SHALL NOT + contain any additional values in the standard or scoped range: + (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the + Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - + 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), + these values SHALL be ignored. 3.The list SHALL NOT contain any values + in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), + (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where + XXXX is the allowed MEI range (0x0001 - 0xFFF1)" + verification: | + ./chip-tool groupkeymanagement read event-list 1 0 + + Verify "EventList" contains the list of supported events, for this cluster list is empty(0 entries) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689923450.468055][6130:6132] CHIP:DMG: } + [1689923450.468251][6130:6132] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFFA DataVersion: 4114127542 + [1689923450.468339][6130:6132] CHIP:TOO: EventList: 0 entries + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "Step 6a: TH reads AcceptedCommandList from DUT" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [0, 1, 3, 4] + + - label: + "Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list + MAY contain values in the Manufacturer Extensible Identifier (MEI) + range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI + range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list + SHALL NOT contain any values in the Test Vendor or invalid range: + (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and + (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range + (0x0001 - 0xFFF1)" + verification: | + ./chip-tool groupkeymanagement read accepted-command-list 1 0 + + Verify the "AcceptedCommandList" contains a list of mandatory commands (values 0, 1, 3, 4) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + + [1689923406.548840][6123:6125] CHIP:DMG: } + [1689923406.549076][6123:6125] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFF9 DataVersion: 4114127542 + [1689923406.549164][6123:6125] CHIP:TOO: AcceptedCommandList: 4 entries + [1689923406.549197][6123:6125] CHIP:TOO: [1]: 0 + [1689923406.549225][6123:6125] CHIP:TOO: [2]: 1 + [1689923406.549252][6123:6125] CHIP:TOO: [3]: 3 + [1689923406.549279][6123:6125] CHIP:TOO: [4]: 4 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "Step 7a: TH reads GeneratedCommandList from DUT" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + constraints: + type: list + contains: [2, 5] + + - label: + "Step 7b: TH reads GeneratedCommandList attribute from DUT. 1.The list + MAY contain values in the Manufacturer Extensible Identifier (MEI) + range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI + range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list + SHALL NOT contain any values in the Test Vendor or invalid range: + (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and + (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range + (0x0001 - 0xFFF1)" + verification: | + ./chip-tool groupkeymanagement read generated-command-list 1 0 + + Verify the "GeneratedCommandList" contains al ist of mandatory commands(values 2, 5) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + + [1689923490.959431][6135:6137] CHIP:DMG: } + [1689923490.959610][6135:6137] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFF8 DataVersion: 4114127542 + [1689923490.959684][6135:6137] CHIP:TOO: GeneratedCommandList: 2 entries + [1689923490.959711][6135:6137] CHIP:TOO: [1]: 2 + [1689923490.959734][6135:6137] CHIP:TOO: [2]: 5 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_G_2_4.yaml b/src/app/tests/suites/certification/Test_TC_G_2_4.yaml new file mode 100644 index 00000000000000..22227d62333728 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_G_2_4.yaml @@ -0,0 +1,435 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 131.2.4. [TC-G-2.4] Commands - AddGroup Command with same GroupID on + Multiple Endpoint [DUT-Server] + +PICS: + - G.S + - MCORE.G.MULTIENDPOINT + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Pre-Conditions" + verification: | + 1 Note: This test case is applicable only when DUT supports Group Cluster at least on two end points: PIXIT.G.ENDPOINT,PIXIT.G.ENDPOINT2 + + 2 TH is commissioned with DUT + disabled: true + + - label: + "Step 1: Verify that PIXIT.G.ENDPOINT and PIXIT.G.ENDPOINT2 are + different." + verification: | + Verify that PIXIT.G.ENDPOINT and PIXIT.G.ENDPOINT2 are different. + disabled: true + + - label: + "Step 2: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT on EP0 using a key that is pre-installed on the TH. + GroupKeySet fields are as follows: GroupKeySetID: 1 + GroupKeySecurityPolicy: TrustFirst (0) EpochKey0: + d0d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime0: 2220000 EpochKey1: + d0d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime1: 2220001 EpochKey2: + d0d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime2: 2220002" + verification: | + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 1, "groupKeySecurityPolicy": 0, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": + "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 + + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689928280.676270][5573:5576] CHIP:DMG: InvokeResponseMessage = + [1689928280.676273][5573:5576] CHIP:DMG: { + [1689928280.676275][5573:5576] CHIP:DMG: suppressResponse = false, + [1689928280.676277][5573:5576] CHIP:DMG: InvokeResponseIBs = + [1689928280.676280][5573:5576] CHIP:DMG: [ + [1689928280.676281][5573:5576] CHIP:DMG: InvokeResponseIB = + [1689928280.676285][5573:5576] CHIP:DMG: { + [1689928280.676287][5573:5576] CHIP:DMG: CommandStatusIB = + [1689928280.676289][5573:5576] CHIP:DMG: { + [1689928280.676291][5573:5576] CHIP:DMG: CommandPathIB = + [1689928280.676293][5573:5576] CHIP:DMG: { + [1689928280.676295][5573:5576] CHIP:DMG: EndpointId = 0x0, + [1689928280.676297][5573:5576] CHIP:DMG: ClusterId = 0x3f, + [1689928280.676300][5573:5576] CHIP:DMG: CommandId = 0x0, + [1689928280.676302][5573:5576] CHIP:DMG: }, + [1689928280.676304][5573:5576] CHIP:DMG: + [1689928280.676306][5573:5576] CHIP:DMG: StatusIB = + [1689928280.676309][5573:5576] CHIP:DMG: { + [1689928280.676311][5573:5576] CHIP:DMG: status = 0x00 (SUCCESS), + [1689928280.676313][5573:5576] CHIP:DMG: }, + [1689928280.676315][5573:5576] CHIP:DMG: + [1689928280.676317][5573:5576] CHIP:DMG: }, + [1689928280.676320][5573:5576] CHIP:DMG: + [1689928280.676321][5573:5576] CHIP:DMG: }, + [1689928280.676324][5573:5576] CHIP:DMG: + [1689928280.676326][5573:5576] CHIP:DMG: ], + [1689928280.676328][5573:5576] CHIP:DMG: + disabled: true + + - label: + "Step 3: TH writes the GroupKeyMap attribute in the GroupKeyManagement + cluster on EP0 with one entry binding GroupId(0x0001) with + GroupKeySetID 1" + verification: | + ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 1, "groupKeySetID": 1, "fabricIndex": 1} ]' 1 0 + + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + 1689928416.859884][5757:5760] CHIP:DMG: WriteResponseMessage = + [1689928416.859894][5757:5760] CHIP:DMG: { + [1689928416.859903][5757:5760] CHIP:DMG: AttributeStatusIBs = + [1689928416.859921][5757:5760] CHIP:DMG: [ + [1689928416.859931][5757:5760] CHIP:DMG: AttributeStatusIB = + [1689928416.859943][5757:5760] CHIP:DMG: { + [1689928416.859953][5757:5760] CHIP:DMG: AttributePathIB = + [1689928416.859964][5757:5760] CHIP:DMG: { + [1689928416.859975][5757:5760] CHIP:DMG: Endpoint = 0x0, + [1689928416.859988][5757:5760] CHIP:DMG: Cluster = 0x3f, + [1689928416.859999][5757:5760] CHIP:DMG: Attribute = 0x0000_0000, + [1689928416.860009][5757:5760] CHIP:DMG: } + [1689928416.860025][5757:5760] CHIP:DMG: + [1689928416.860036][5757:5760] CHIP:DMG: StatusIB = + [1689928416.860050][5757:5760] CHIP:DMG: { + [1689928416.860062][5757:5760] CHIP:DMG: status = 0x00 (SUCCESS), + [1689928416.860071][5757:5760] CHIP:DMG: }, + [1689928416.860081][5757:5760] CHIP:DMG: + [1689928416.860088][5757:5760] CHIP:DMG: }, + [1689928416.860104][5757:5760] CHIP:DMG: + [1689928416.860113][5757:5760] CHIP:DMG: AttributeStatusIB = + [1689928416.860126][5757:5760] CHIP:DMG: { + [1689928416.860135][5757:5760] CHIP:DMG: AttributePathIB = + [1689928416.860145][5757:5760] CHIP:DMG: { + [1689928416.860156][5757:5760] CHIP:DMG: Endpoint = 0x0, + [1689928416.860167][5757:5760] CHIP:DMG: Cluster = 0x3f, + [1689928416.860177][5757:5760] CHIP:DMG: Attribute = 0x0000_0000, + [1689928416.860185][5757:5760] CHIP:DMG: ListIndex = Null, + [1689928416.860197][5757:5760] CHIP:DMG: } + [1689928416.860209][5757:5760] CHIP:DMG: + [1689928416.860216][5757:5760] CHIP:DMG: StatusIB = + [1689928416.860224][5757:5760] CHIP:DMG: { + [1689928416.860231][5757:5760] CHIP:DMG: status = 0x00 (SUCCESS), + [1689928416.860239][5757:5760] CHIP:DMG: }, + [1689928416.860251][5757:5760] CHIP:DMG: + [1689928416.860261][5757:5760] CHIP:DMG: }, + [1689928416.860277][5757:5760] CHIP:DMG: + [1689928416.860286][5757:5760] CHIP:DMG: ], + [1689928416.860307][5757:5760] CHIP:DMG: + [1689928416.860319][5757:5760] CHIP:DMG: InteractionModelRevision = 1 + [1689928416.860328][5757:5760] CHIP:DMG: } + disabled: true + + - label: + "Step 4: TH cleans up the groups by sending the RemoveAllGroups + command to the DUT on PIXIT.G.ENDPOINT,PIXIT.G.ENDPOINT2" + verification: | + ./chip-tool groups remove-all-groups 1 1 + + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689928700.354515][5800:5803] CHIP:DMG: { + [1689928700.354516][5800:5803] CHIP:DMG: suppressResponse = false, + [1689928700.354518][5800:5803] CHIP:DMG: InvokeResponseIBs = + [1689928700.354522][5800:5803] CHIP:DMG: [ + [1689928700.354524][5800:5803] CHIP:DMG: InvokeResponseIB = + [1689928700.354527][5800:5803] CHIP:DMG: { + [1689928700.354528][5800:5803] CHIP:DMG: CommandStatusIB = + [1689928700.354531][5800:5803] CHIP:DMG: { + [1689928700.354533][5800:5803] CHIP:DMG: CommandPathIB = + [1689928700.354537][5800:5803] CHIP:DMG: { + [1689928700.354539][5800:5803] CHIP:DMG: EndpointId = 0x1, + [1689928700.354541][5800:5803] CHIP:DMG: ClusterId = 0x4, + [1689928700.354544][5800:5803] CHIP:DMG: CommandId = 0x4, + [1689928700.354546][5800:5803] CHIP:DMG: }, + [1689928700.354549][5800:5803] CHIP:DMG: + [1689928700.354551][5800:5803] CHIP:DMG: StatusIB = + [1689928700.354554][5800:5803] CHIP:DMG: { + [1689928700.354556][5800:5803] CHIP:DMG: status = 0x00 (SUCCESS), + [1689928700.354558][5800:5803] CHIP:DMG: }, + [1689928700.354560][5800:5803] CHIP:DMG: + [1689928700.354562][5800:5803] CHIP:DMG: }, + [1689928700.354565][5800:5803] CHIP:DMG: + [1689928700.354567][5800:5803] CHIP:DMG: }, + [1689928700.354569][5800:5803] CHIP:DMG: + [1689928700.354571][5800:5803] CHIP:DMG: ], + [1689928700.354574][5800:5803] CHIP:DMG: + + + ./chip-tool groups remove-all-groups 1 2 + + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689928742.133296][5810:5813] CHIP:DMG: InvokeResponseMessage = + [1689928742.133303][5810:5813] CHIP:DMG: { + [1689928742.133311][5810:5813] CHIP:DMG: suppressResponse = false, + [1689928742.133317][5810:5813] CHIP:DMG: InvokeResponseIBs = + [1689928742.133329][5810:5813] CHIP:DMG: [ + [1689928742.133336][5810:5813] CHIP:DMG: InvokeResponseIB = + [1689928742.133348][5810:5813] CHIP:DMG: { + [1689928742.133355][5810:5813] CHIP:DMG: CommandStatusIB = + [1689928742.133364][5810:5813] CHIP:DMG: { + [1689928742.133371][5810:5813] CHIP:DMG: CommandPathIB = + [1689928742.133380][5810:5813] CHIP:DMG: { + [1689928742.133388][5810:5813] CHIP:DMG: EndpointId = 0x2, + [1689928742.133397][5810:5813] CHIP:DMG: ClusterId = 0x4, + [1689928742.133405][5810:5813] CHIP:DMG: CommandId = 0x4, + [1689928742.133413][5810:5813] CHIP:DMG: }, + [1689928742.133424][5810:5813] CHIP:DMG: + [1689928742.133435][5810:5813] CHIP:DMG: StatusIB = + [1689928742.133447][5810:5813] CHIP:DMG: { + [1689928742.133455][5810:5813] CHIP:DMG: status = 0x00 (SUCCESS), + [1689928742.133463][5810:5813] CHIP:DMG: }, + [1689928742.133472][5810:5813] CHIP:DMG: + [1689928742.133478][5810:5813] CHIP:DMG: }, + [1689928742.133490][5810:5813] CHIP:DMG: + [1689928742.133500][5810:5813] CHIP:DMG: }, + [1689928742.133508][5810:5813] CHIP:DMG: + [1689928742.133514][5810:5813] CHIP:DMG: ], + [1689928742.133526][5810:5813] CHIP:DMG: + disabled: true + + - label: + "Step 5a: TH sends AddGroup command to DUT on PIXIT.G.ENDPOINT with + the following fields: GroupID as 0x0001 GroupName as 'Gp1'" + PICS: G.S.C00.Rsp && G.S.C00.Tx + verification: | + ./chip-tool groups add-group 0x0001 Gp1 1 1 + + Verify the AddGroupResponse with following field: + Status is SUCCESS + GroupID is 0x0001 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689928877.256544][5836:5839] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0000 + [1689928877.256740][5836:5839] CHIP:TOO: AddGroupResponse: { + [1689928877.256774][5836:5839] CHIP:TOO: status: 0 + [1689928877.256777][5836:5839] CHIP:TOO: groupID: 1 + [1689928877.256780][5836:5839] CHIP:TOO: } + disabled: true + + - label: + "Step 5b: TH sends AddGroup command to DUT on PIXIT.G.ENDPOINT2 with + the following fields: GroupID as 0x0001 GroupName as 'Gp2'" + PICS: G.S.C00.Rsp && G.S.C00.Tx + verification: | + ./chip-tool groups add-group 0x0001 Gp2 1 2 + + Verify the AddGroupResponse with following field: + Status is SUCCESS + GroupID is 0x0001 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689928983.569742][5852:5855] CHIP:DMG: Received Command Response Data, Endpoint=2 Cluster=0x0000_0004 Command=0x0000_0000 + [1689928983.569765][5852:5855] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0004 Command 0x0000_0000 + [1689928983.569795][5852:5855] CHIP:TOO: AddGroupResponse: { + [1689928983.569805][5852:5855] CHIP:TOO: status: 0 + [1689928983.569813][5852:5855] CHIP:TOO: groupID: 1 + [1689928983.569821][5852:5855] CHIP:TOO: } + disabled: true + + - label: + "Step 6: TH reads GroupTable attribute from the GroupKeyManagement + cluster from DUT on EP0" + PICS: GRPKEY.S.A0001 + verification: | + ./chip-tool groupkeymanagement read group-table 1 0 + + Verify the GroupTable with the following entries + GroupID is 0x0001 + If G.S.F00(GN) is true then GroupName is Gp2 , Otherwise empty + Endpoints list contains a endpoints 1, 2 + on TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689929132.327353][5868:5871] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 229830719 + [1689929132.327657][5868:5871] CHIP:TOO: GroupTable: 1 entries + [1689929132.327692][5868:5871] CHIP:TOO: [1]: { + [1689929132.327708][5868:5871] CHIP:TOO: GroupId: 1 + [1689929132.327724][5868:5871] CHIP:TOO: Endpoints: 2 entries + [1689929132.327736][5868:5871] CHIP:TOO: [1]: 1 + [1689929132.327744][5868:5871] CHIP:TOO: [2]: 2 + [1689929132.327754][5868:5871] CHIP:TOO: GroupName: Gp2 + [1689929132.327762][5868:5871] CHIP:TOO: FabricIndex: 1 + [1689929132.327769][5868:5871] CHIP:TOO: } + disabled: true + + - label: + "Step 7: Verify that the GroupTable contains an entry with the + GroupName as 'Gp2'" + PICS: G.S.F00 + verification: | + ./chip-tool groupkeymanagement read group-table 1 0 + + Verify the GroupTable with the following entries + GroupID is 0x0001 + If G.S.F00(GN) is true then GroupName is Gp2 , Otherwise empty + Endpoints list contains a endpoints 1, 2 + on TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689929132.327353][5868:5871] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 229830719 + [1689929132.327657][5868:5871] CHIP:TOO: GroupTable: 1 entries + [1689929132.327692][5868:5871] CHIP:TOO: [1]: { + [1689929132.327708][5868:5871] CHIP:TOO: GroupId: 1 + [1689929132.327724][5868:5871] CHIP:TOO: Endpoints: 2 entries + [1689929132.327736][5868:5871] CHIP:TOO: [1]: 1 + [1689929132.327744][5868:5871] CHIP:TOO: [2]: 2 + [1689929132.327754][5868:5871] CHIP:TOO: GroupName: Gp2 + [1689929132.327762][5868:5871] CHIP:TOO: FabricIndex: 1 + [1689929132.327769][5868:5871] CHIP:TOO: } + disabled: true + + - label: + "Step 8: TH sends ViewGroup command to DUT on PIXIT.G.ENDPOINT with + the following fields: GroupID as 0x0001" + PICS: G.S.C01.Rsp && G.S.C01.Tx + verification: | + ./chip-tool groups view-group 0x0001 1 1 + + Verify the ViewGroupResponse with following fields : + Status is SUCCESS + GroupID is 0x0001 + If G.S.F00(GN) is true then GroupName is Gp1, Otherwise empty + on TH(Chip-tool) Log , below is the sample log provided for the raspi platform: + + Note: GroupName for GroupID 0x0001 is same on ENDPOINT 1 and ENDPOINT 2 + + [1689929265.503341][5898:5901] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0001 + [1689929265.503352][5898:5901] CHIP:TOO: ViewGroupResponse: { + [1689929265.503357][5898:5901] CHIP:TOO: status: 0 + [1689929265.503359][5898:5901] CHIP:TOO: groupID: 1 + [1689929265.503361][5898:5901] CHIP:TOO: groupName: Gp2 + [1689929265.503363][5898:5901] CHIP:TOO: } + disabled: true + + - label: + "Step 9: Verify that the ViewGroupResponse contains GroupName as + 'GP2'. Note: GroupName for GroupID 0x0001 is same on PIXIT.G.ENDPOINT + and PIXIT.G.ENDPOINT2" + PICS: G.S.F00 + verification: | + ./chip-tool groups view-group 0x0001 1 1 + + Verify the ViewGroupResponse with following fields : + Status is SUCCESS + GroupID is 0x0001 + If G.S.F00(GN) is true then GroupName is Gp1, Otherwise empty + on TH(Chip-tool) Log , below is the sample log provided for the raspi platform: + + Note: GroupName for GroupID 0x0001 is same on ENDPOINT 1 and ENDPOINT 2 + + [1689929265.503341][5898:5901] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0001 + [1689929265.503352][5898:5901] CHIP:TOO: ViewGroupResponse: { + [1689929265.503357][5898:5901] CHIP:TOO: status: 0 + [1689929265.503359][5898:5901] CHIP:TOO: groupID: 1 + [1689929265.503361][5898:5901] CHIP:TOO: groupName: Gp2 + [1689929265.503363][5898:5901] CHIP:TOO: } + disabled: true + + - label: + "Step 10: TH sends RemoveGroup command to DUT on PIXIT.G.ENDPOINT as + unicast with the following field: GroupID as 0x0001" + PICS: G.S.C03.Rsp && G.S.C03.Tx + verification: | + ./chip-tool groups remove-group 0x0001 1 1 + + Verify the RemoveGroupResponse with Status as SUCCESS and GroupID is 0x0001 on the TH(Chip-tool) Log, below is the sample log provided for the raspi platform: + + [1689929333.591022][5912:5915] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0003 + [1689929333.591032][5912:5915] CHIP:TOO: RemoveGroupResponse: { + [1689929333.591035][5912:5915] CHIP:TOO: status: 0 + [1689929333.591037][5912:5915] CHIP:TOO: groupID: 1 + [1689929333.591039][5912:5915] CHIP:TOO: } + disabled: true + + - label: + "Step 11: TH reads GroupTable attribute from the GroupKeyManagement + cluster from DUT on EP0" + PICS: GRPKEY.S.A0001 + verification: | + ./chip-tool groupkeymanagement read group-table 1 0 + + Verify that Grouptable entry with GroupID 0x0001 is associated with the Endpoint 2 and no entry with GroupID 0x0001 associated with the Endpoint 1 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689929376.037105][5924:5927] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 229830719 + [1689929376.037147][5924:5927] CHIP:TOO: GroupTable: 1 entries + [1689929376.037191][5924:5927] CHIP:TOO: [1]: { + [1689929376.037204][5924:5927] CHIP:TOO: GroupId: 1 + [1689929376.037213][5924:5927] CHIP:TOO: Endpoints: 1 entries + [1689929376.037224][5924:5927] CHIP:TOO: [1]: 2 + [1689929376.037233][5924:5927] CHIP:TOO: GroupName: Gp2 + [1689929376.037241][5924:5927] CHIP:TOO: FabricIndex: 1 + [1689929376.037246][5924:5927] CHIP:TOO: } + disabled: true + + - label: + "Step 12: TH sends RemoveGroup command to DUT on PIXIT.G.ENDPOINT2 as + unicast with the following field: GroupID as 0x0001" + PICS: G.S.C03.Rsp && G.S.C03.Tx + verification: | + ./chip-tool groups remove-group 0x0001 1 2 + + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689929465.586716][5960:5963] CHIP:DMG: }, + [1689929465.586745][5960:5963] CHIP:DMG: Received Command Response Data, Endpoint=2 Cluster=0x0000_0004 Command=0x0000_0003 + [1689929465.586771][5960:5963] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0004 Command 0x0000_0003 + [1689929465.586795][5960:5963] CHIP:TOO: RemoveGroupResponse: { + [1689929465.586813][5960:5963] CHIP:TOO: status: 0 + [1689929465.586818][5960:5963] CHIP:TOO: groupID: 1 + [1689929465.586826][5960:5963] CHIP:TOO: } + disabled: true + + - label: + "Step 13: TH reads GroupTable attribute from the GroupKeyManagement + cluster from DUT on EP0" + PICS: GRPKEY.S.A0001 + verification: | + ./chip-tool groupkeymanagement read group-table 1 0 + + Verify that there is no entry that has GroupID 0x0001 associated with the Endpoint 2 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689934348.530688][6829:6831] CHIP:DMG: ReportDataMessage = + [1689934348.530718][6829:6831] CHIP:DMG: { + [1689934348.530740][6829:6831] CHIP:DMG: AttributeReportIBs = + [1689934348.530775][6829:6831] CHIP:DMG: [ + [1689934348.530801][6829:6831] CHIP:DMG: AttributeReportIB = + [1689934348.530837][6829:6831] CHIP:DMG: { + [1689934348.530864][6829:6831] CHIP:DMG: AttributeDataIB = + [1689934348.530900][6829:6831] CHIP:DMG: { + [1689934348.530935][6829:6831] CHIP:DMG: DataVersion = 0xdc445868, + [1689934348.530968][6829:6831] CHIP:DMG: AttributePathIB = + [1689934348.531003][6829:6831] CHIP:DMG: { + [1689934348.531056][6829:6831] CHIP:DMG: Endpoint = 0x0, + [1689934348.531095][6829:6831] CHIP:DMG: Cluster = 0x3f, + [1689934348.531143][6829:6831] CHIP:DMG: Attribute = 0x0000_0001, + [1689934348.531178][6829:6831] CHIP:DMG: } + [1689934348.531225][6829:6831] CHIP:DMG: + [1689934348.531259][6829:6831] CHIP:DMG: Data = [ + [1689934348.531303][6829:6831] CHIP:DMG: + [1689934348.531340][6829:6831] CHIP:DMG: ], + [1689934348.531384][6829:6831] CHIP:DMG: }, + [1689934348.531421][6829:6831] CHIP:DMG: + [1689934348.531450][6829:6831] CHIP:DMG: }, + [1689934348.531496][6829:6831] CHIP:DMG: + [1689934348.531521][6829:6831] CHIP:DMG: ], + [1689934348.531566][6829:6831] CHIP:DMG: + [1689934348.531592][6829:6831] CHIP:DMG: SuppressResponse = true, + [1689934348.531619][6829:6831] CHIP:DMG: InteractionModelRevision = 1 + [1689934348.531655][6829:6831] CHIP:DMG: } + [1689934348.531858][6829:6831] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 3695466600 + [1689934348.531940][6829:6831] CHIP:TOO: GroupTable: 0 entries + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_G_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_G_3_1_Simulated.yaml deleted file mode 100644 index 291ad030cf8cf2..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_G_3_1_Simulated.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 120.3.1. [TC-G-3.1] Attributes [DUT-Client] - -PICS: - - G.C - -config: - nodeId: 0x12344321 - cluster: "Groups" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads NameSupport attribute value from TH" - PICS: G.C.A0000 - wait: "readAttribute" - attribute: "NameSupport" diff --git a/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml b/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml index 24f4d7054afeaa..04db88ae83189b 100644 --- a/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml @@ -100,7 +100,7 @@ tests: contains: [2, 65528, 65529, 65531, 65532, 65533] - label: - "Step 4a: Read the feature dependent(HEPAFREMON.S.F00) attribute in + "Step 4b: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList" PICS: HEPAFREMON.S.F00 command: "readAttribute" @@ -111,9 +111,9 @@ tests: contains: [0, 1, 2] - label: - "Step 4b: Read the optional attribute InPlaceIndicator - (HEPAFREMON.S.A0002) in AttributeList" - PICS: HEPAFREMON.S.A0002 + "Step 4c: Read the optional attribute InPlaceIndicator + (HEPAFREMON.S.A0003) in AttributeList" + PICS: HEPAFREMON.S.A0003 command: "readAttribute" attribute: "AttributeList" response: @@ -121,6 +121,28 @@ tests: type: list contains: [3] + - label: + "Step 4d: Read the optional attribute LastChangedTime + (HEPAFREMON.S.A0004) in AttributeList" + PICS: HEPAFREMON.S.A0004 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [4] + + - label: + "Step 4e: Read the optional attribute ReplacementProductList + (HEPAFREMON.S.F02) in AttributeList" + PICS: HEPAFREMON.S.F02 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [5] + - label: "Step 5: TH reads EventList attribute from DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_IDM_10_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_10_1.yaml new file mode 100644 index 00000000000000..12d5a1140aa187 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_IDM_10_1.yaml @@ -0,0 +1,290 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 32.6.8. [TC-IDM-10.1] Cluster requirements - Global attributes [DUT as + Server] + +PICS: + - MCORE.IDM.S + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: + "Step 1: TH performs a wildcard read of all attributes and endpoints" + verification: | + TH(chip-tool) sends the wildcard read command to read all attributes and endpoints from DUT(Reference app/all-clusters-app) + ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF + + Please store the log for use in the next step validation. + disabled: true + + - label: + "Step 2: For every cluster on every endpoint verify that the cluster + includes all the mandatory global attributes: ClusterRevision, + FeatureMap, AttributeList, AcceptedCommandList, GeneratedCommandList, + EventList" + verification: | + The following log is an example of the output obtained for Identify Cluster on Endpoint 0. Descriptor cluster on Endpoint 1 and Occupancy cluster on Endpoint 2. + Pls repeat this for every cluster on every endpoint. The log represents the attributes of clusters found on different endpoints. + + Verify the presence of all mandatory global attributes for every cluster on every endpoint: + 1. ClusterRevision + 2. FeatureMap + 3. EventList + 4. AttributeList + 5. AcceptedCommandList + 6. GeneratedCommandList + + Verification Instructions: + Please use the provided example log as a guide to verify the attributes for other clusters and endpoints in a similar manner. + + Example verification log for 'Identify Cluster' (0x0000_0003) on Endpoint 0 : + [1690267325.176118][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 3031281428 + [1690267325.176127][9552:9554] CHIP:TOO: IdentifyType: 2 + [1690267325.176149][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFC DataVersion: 3031281428 + [1690267325.176152][9552:9554] CHIP:TOO: FeatureMap: 0 + [1690267325.176160][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 3031281428 + [1690267325.176163][9552:9554] CHIP:TOO: ClusterRevision: 4 + [1690267325.176182][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF8 DataVersion: 3031281428 + [1690267325.176186][9552:9554] CHIP:TOO: GeneratedCommandList: 0 entries + [1690267325.176202][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF9 DataVersion: 3031281428 + [1690267325.176206][9552:9554] CHIP:TOO: AcceptedCommandList: 2 entries + [1690267325.176208][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.176216][9552:9554] CHIP:TOO: [2]: 64 + [1690267325.176228][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFA DataVersion: 3031281428 + [1690267325.176231][9552:9554] CHIP:TOO: EventList: 0 entries + [1690267325.176250][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFB DataVersion: 3031281428 + [1690267325.176254][9552:9554] CHIP:TOO: AttributeList: 8 entries + [1690267325.176256][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.176258][9552:9554] CHIP:TOO: [2]: 1 + [1690267325.176261][9552:9554] CHIP:TOO: [3]: 65528 + [1690267325.176262][9552:9554] CHIP:TOO: [4]: 65529 + [1690267325.176264][9552:9554] CHIP:TOO: [5]: 65530 + [1690267325.176267][9552:9554] CHIP:TOO: [6]: 65531 + [1690267325.176269][9552:9554] CHIP:TOO: [7]: 65532 + [1690267325.176272][9552:9554] CHIP:TOO: [8]: 65533 + [1690267325.176274][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_0000 DataVersion: 800446264 + [1690267325.176277][9552:9554] CHIP:TOO: NameSupport: 128 + + Example verification log for ' Descriptor cluster ' (0x0000_001D) on Endpoint 1 : + [1690267325.249870][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 762289150 + [1690267325.249874][9552:9554] CHIP:TOO: PartsList: 0 entries + [1690267325.249878][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFC DataVersion: 762289150 + [1690267325.249881][9552:9554] CHIP:TOO: FeatureMap: 0 + [1690267325.249891][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 762289150 + [1690267325.249893][9552:9554] CHIP:TOO: ClusterRevision: 1 + [1690267325.249910][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFF8 DataVersion: 762289150 + [1690267325.249914][9552:9554] CHIP:TOO: GeneratedCommandList: 0 entries + [1690267325.249926][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFF9 DataVersion: 762289150 + [1690267325.249929][9552:9554] CHIP:TOO: AcceptedCommandList: 0 entries + [1690267325.249942][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFA DataVersion: 762289150 + [1690267325.249946][9552:9554] CHIP:TOO: EventList: 0 entries + [1690267325.249965][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFB DataVersion: 762289150 + [1690267325.249972][9552:9554] CHIP:TOO: AttributeList: 10 entries + [1690267325.249975][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.249978][9552:9554] CHIP:TOO: [2]: 1 + [1690267325.249980][9552:9554] CHIP:TOO: [3]: 2 + [1690267325.249982][9552:9554] CHIP:TOO: [4]: 3 + [1690267325.249986][9552:9554] CHIP:TOO: [5]: 65528 + [1690267325.249989][9552:9554] CHIP:TOO: [6]: 65529 + [1690267325.249992][9552:9554] CHIP:TOO: [7]: 65530 + [1690267325.249995][9552:9554] CHIP:TOO: [8]: 65531 + [1690267325.249999][9552:9554] CHIP:TOO: [9]: 65532 + [1690267325.250002][9552:9554] CHIP:TOO: [10]: 65533 + [1690267325.250017][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001E Attribute 0x0000_0000 DataVersion: 3536645262 + + Example verification log for ' Occupancy cluster ' (0x0000_0406) on Endpoint 2 : + + [1690267325.401773][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_0000 DataVersion: 3381359521 + [1690267325.401776][9552:9554] CHIP:TOO: Occupancy: 0 + [1690267325.401785][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_0001 DataVersion: 3381359521 + [1690267325.401787][9552:9554] CHIP:TOO: OccupancySensorType: 0 + [1690267325.401795][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_0002 DataVersion: 3381359521 + [1690267325.401798][9552:9554] CHIP:TOO: OccupancySensorTypeBitmap: 1 + [1690267325.401806][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFC DataVersion: 3381359521 + [1690267325.401808][9552:9554] CHIP:TOO: FeatureMap: 0 + [1690267325.401816][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFD DataVersion: 3381359521 + [1690267325.401819][9552:9554] CHIP:TOO: ClusterRevision: 3 + [1690267325.401834][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFF8 DataVersion: 3381359521 + [1690267325.401837][9552:9554] CHIP:TOO: GeneratedCommandList: 0 entries + [1690267325.401848][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFF9 DataVersion: 3381359521 + [1690267325.401850][9552:9554] CHIP:TOO: AcceptedCommandList: 0 entries + [1690267325.401861][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFA DataVersion: 3381359521 + [1690267325.401864][9552:9554] CHIP:TOO: EventList: 0 entries + [1690267325.401876][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFB DataVersion: 3381359521 + [1690267325.401880][9552:9554] CHIP:TOO: AttributeList: 9 entries + [1690267325.401882][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.401884][9552:9554] CHIP:TOO: [2]: 1 + [1690267325.401886][9552:9554] CHIP:TOO: [3]: 2 + [1690267325.401888][9552:9554] CHIP:TOO: [4]: 65528 + [1690267325.401890][9552:9554] CHIP:TOO: [5]: 65529 + [1690267325.401892][9552:9554] CHIP:TOO: [6]: 65530 + [1690267325.401894][9552:9554] CHIP:TOO: [7]: 65531 + [1690267325.401896][9552:9554] CHIP:TOO: [8]: 65532 + [1690267325.401898][9552:9554] CHIP:TOO: [9]: 65533 + [1690267325.401975][9552:9554] CHIP:EM: <<< [E:6807i S:13119 M:239700033 (Ack:147952547)] (S) Msg TX to 1:0000000000000001 [83EA] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690267325.401983][9552:9554] CHIP:IN: (S) Sending msg 239700033 on secure session with LSID: 13119 + [1690267325.402014][9552:9554] CHIP:EM: Flushed pending ack for MessageCounter:147952547 on exchange 6807i + disabled: true + + - label: + "Step 3: For every cluster on every endpoint, verify that each + attribute reported in the AttributeList exactly matches the set of + received attributes from the wildcard read. In other words, if an + attribute ID is present in the AttributeList, a report for that path + must have been seen in the read of step 1, and if an attribute path + exists in the read of step 1, its ID must be present in the + AttributeList of the associated cluster within the hierarchy." + verification: | + The following log is an example of the output obtained For every cluster on every endpoint. The log represents the attributes of clusters found on different endpoints. + + Verify AttributeList for Each Cluster on Every Endpoint, follow the verification process: + 1. Examine the AttributeList reported for the specific cluster. + 2. Cross-reference the attributes listed in the AttributeList with the set of received attributes from the wildcard read (Step 1). + 3. Ensure that each attribute ID present in the AttributeList is also seen in the received attributes from the wildcard read, and vice versa. + + Verification Instructions: + Please use the provided example log as a guide to verify the attributes for other clusters and endpoints in a similar manner. + + + Example verification log for 'Identify Cluster' (0x0000_0003) on Endpoint 0 : + - AttributeList: [0, 1, 65528, 65529, 65530, 65531, 65532, 65532] + - Wildcard Read Received Attributes: [0, 1, 65528, 65529, 65530, 65531, 65532, 65532] + - All attribute IDs in the AttributeList are present in the received attributes from the wildcard read. + - All received attributes from the wildcard read have their corresponding attribute IDs listed in the AttributeList. + [1690267325.175008][9552:9554] CHIP:DMG: InteractionModelRevision = 1 + [1690267325.175013][9552:9554] CHIP:DMG: } + [1690267325.175842][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 3031281428 + [1690267325.175868][9552:9554] CHIP:TOO: IdentifyTime: 0 + [1690267325.176118][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0001 DataVersion: 3031281428 + [1690267325.176127][9552:9554] CHIP:TOO: IdentifyType: 2 + [1690267325.176149][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFC DataVersion: 3031281428 + [1690267325.176152][9552:9554] CHIP:TOO: FeatureMap: 0 + [1690267325.176160][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 3031281428 + [1690267325.176163][9552:9554] CHIP:TOO: ClusterRevision: 4 + [1690267325.176182][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF8 DataVersion: 3031281428 + [1690267325.176186][9552:9554] CHIP:TOO: GeneratedCommandList: 0 entries + [1690267325.176202][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFF9 DataVersion: 3031281428 + [1690267325.176206][9552:9554] CHIP:TOO: AcceptedCommandList: 2 entries + [1690267325.176208][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.176216][9552:9554] CHIP:TOO: [2]: 64 + [1690267325.176228][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFA DataVersion: 3031281428 + [1690267325.176231][9552:9554] CHIP:TOO: EventList: 0 entries + [1690267325.176250][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFB DataVersion: 3031281428 + [1690267325.176254][9552:9554] CHIP:TOO: AttributeList: 8 entries + [1690267325.176256][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.176258][9552:9554] CHIP:TOO: [2]: 1 + [1690267325.176261][9552:9554] CHIP:TOO: [3]: 65528 + [1690267325.176262][9552:9554] CHIP:TOO: [4]: 65529 + [1690267325.176264][9552:9554] CHIP:TOO: [5]: 65530 + [1690267325.176267][9552:9554] CHIP:TOO: [6]: 65531 + [1690267325.176269][9552:9554] CHIP:TOO: [7]: 65532 + [1690267325.176272][9552:9554] CHIP:TOO: [8]: 65533 + [1690267325.176274][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_0000 DataVersion: 800446264 + [1690267325.176277][9552:9554] CHIP:TOO: NameSupport: 128 + [1690267325.176285][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFC DataVersion: 800446264 + [1690267325.176290][9552:9554] CHIP:TOO: FeatureMap: 1 + [1690267325.176298][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFD DataVersion: 800446264 + [1690267325.176301][9552:9554] CHIP:TOO: ClusterRevision: 4 + [1690267325.176324][9552:9554] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFF8 DataVersion: 800446264 + [1690267325.176328][9552:9554] CHIP:TOO: GeneratedCommandList: 4 entries + + + Example verification log for ' SWITCH cluster ' (0x0000_003B) on Endpoint 1 : + - AttributeList: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65532] + - Wildcard Read Received Attributes: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65532] + - All attribute IDs in the AttributeList are present in the received attributes from the wildcard read. + - All received attributes from the wildcard read have their corresponding attribute IDs listed in the AttributeList. + + [1690267325.252505][9552:9554] CHIP:TOO: [12]: 65532 + [1690267325.252507][9552:9554] CHIP:TOO: [13]: 65533 + [1690267325.252510][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0000 DataVersion: 279843917 + [1690267325.252512][9552:9554] CHIP:TOO: NumberOfPositions: 2 + [1690267325.252520][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001 DataVersion: 279843917 + [1690267325.252522][9552:9554] CHIP:TOO: CurrentPosition: 0 + [1690267325.252531][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0002 DataVersion: 279843917 + [1690267325.252533][9552:9554] CHIP:TOO: MultiPressMax: 2 + [1690267325.252541][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFFC DataVersion: 279843917 + [1690267325.252543][9552:9554] CHIP:TOO: FeatureMap: 1 + [1690267325.252551][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFFD DataVersion: 279843917 + [1690267325.252553][9552:9554] CHIP:TOO: ClusterRevision: 1 + [1690267325.252569][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFF8 DataVersion: 279843917 + [1690267325.252571][9552:9554] CHIP:TOO: GeneratedCommandList: 0 entries + [1690267325.252580][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFF9 DataVersion: 279843917 + [1690267325.252583][9552:9554] CHIP:TOO: AcceptedCommandList: 0 entries + [1690267325.252596][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFFA DataVersion: 279843917 + [1690267325.252598][9552:9554] CHIP:TOO: EventList: 1 entries + [1690267325.252601][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.252620][9552:9554] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_FFFB DataVersion: 279843917 + [1690267325.252625][9552:9554] CHIP:TOO: AttributeList: 9 entries + [1690267325.252627][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.252629][9552:9554] CHIP:TOO: [2]: 1 + [1690267325.252630][9552:9554] CHIP:TOO: [3]: 2 + [1690267325.252632][9552:9554] CHIP:TOO: [4]: 65528 + [1690267325.252634][9552:9554] CHIP:TOO: [5]: 65529 + [1690267325.252636][9552:9554] CHIP:TOO: [6]: 65530 + [1690267325.252638][9552:9554] CHIP:TOO: [7]: 65531 + [1690267325.252640][9552:9554] CHIP:TOO: [8]: 65532 + [1690267325.252642][9552:9554] CHIP:TOO: [9]: 65533 + [1690267325.252687][9552:9554] CHIP:EM: <<< [E:6807i S:13119 M:239699999 (Ack:147952513)] (S) Msg TX to 1:0000000000000001 [83EA] --- Type 0001:01 (IM:StatusResponse) + [1690267325.252691][9552:9554] CHIP:IN: (S) Sending msg 239699999 on secure session with LSID: 13119 + + Example verification log for ' Occupancy cluster ' (0x0000_0406) on Endpoint 2 : + - AttributeList: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65532] + - Wildcard Read Received Attributes: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65532] + - All attribute IDs in the AttributeList are present in the received attributes from the wildcard read. + - All received attributes from the wildcard read have their corresponding attribute IDs listed in the AttributeList. + [1690267325.401762][9552:9554] CHIP:TOO: [8]: 65528 + [1690267325.401764][9552:9554] CHIP:TOO: [9]: 65529 + [1690267325.401765][9552:9554] CHIP:TOO: [10]: 65530 + [1690267325.401767][9552:9554] CHIP:TOO: [11]: 65531 + [1690267325.401769][9552:9554] CHIP:TOO: [12]: 65532 + [1690267325.401771][9552:9554] CHIP:TOO: [13]: 65533 + [1690267325.401773][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_0000 DataVersion: 3381359521 + [1690267325.401776][9552:9554] CHIP:TOO: Occupancy: 0 + [1690267325.401785][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_0001 DataVersion: 3381359521 + [1690267325.401787][9552:9554] CHIP:TOO: OccupancySensorType: 0 + [1690267325.401795][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_0002 DataVersion: 3381359521 + [1690267325.401798][9552:9554] CHIP:TOO: OccupancySensorTypeBitmap: 1 + [1690267325.401806][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFC DataVersion: 3381359521 + [1690267325.401808][9552:9554] CHIP:TOO: FeatureMap: 0 + [1690267325.401816][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFD DataVersion: 3381359521 + [1690267325.401819][9552:9554] CHIP:TOO: ClusterRevision: 3 + [1690267325.401834][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFF8 DataVersion: 3381359521 + [1690267325.401837][9552:9554] CHIP:TOO: GeneratedCommandList: 0 entries + [1690267325.401848][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFF9 DataVersion: 3381359521 + [1690267325.401850][9552:9554] CHIP:TOO: AcceptedCommandList: 0 entries + [1690267325.401861][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFA DataVersion: 3381359521 + [1690267325.401864][9552:9554] CHIP:TOO: EventList: 0 entries + [1690267325.401876][9552:9554] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0406 Attribute 0x0000_FFFB DataVersion: 3381359521 + [1690267325.401880][9552:9554] CHIP:TOO: AttributeList: 9 entries + [1690267325.401882][9552:9554] CHIP:TOO: [1]: 0 + [1690267325.401884][9552:9554] CHIP:TOO: [2]: 1 + [1690267325.401886][9552:9554] CHIP:TOO: [3]: 2 + [1690267325.401888][9552:9554] CHIP:TOO: [4]: 65528 + [1690267325.401890][9552:9554] CHIP:TOO: [5]: 65529 + [1690267325.401892][9552:9554] CHIP:TOO: [6]: 65530 + [1690267325.401894][9552:9554] CHIP:TOO: [7]: 65531 + [1690267325.401896][9552:9554] CHIP:TOO: [8]: 65532 + [1690267325.401898][9552:9554] CHIP:TOO: [9]: 65533 + [1690267325.401975][9552:9554] CHIP:EM: <<< [E:6807i S:13119 M:239700033 (Ack:147952547)] (S) Msg TX to 1:0000000000000001 [83EA] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690267325.401983][9552:9554] CHIP:IN: (S) Sending msg 239700033 on secure session with LSID: 13119 + [1690267325.402014][9552:9554] CHIP:EM: Flushed pending ack for MessageCounter:147952547 on exchange 6807i + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_11_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_11_1.yaml new file mode 100644 index 00000000000000..1598e76f4d0d2d --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_IDM_11_1.yaml @@ -0,0 +1,81 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 32.6.9. [TC-IDM-11.1] Data types - attribute strings [DUT as Server] - data + model + +PICS: + - MCORE.IDM.S + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: + "Step 1: TH performs a wildcard read of all attributes and endpoints" + verification: | + TH(chip-tool) sends the wildcard read command to read all attributes and endpoints from DUT(Reference app/all-clusters-app) + ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF + + Please store the log for use in the next step validation. + disabled: true + + - label: + "Step 2: For every returned attribute, if the attribute type is string + and the returned value is not Null or empty, ensure the returned value + is a valid UTF-8-encoded string. It is not permitted to have partially + encoded codepoints between the last legally-encoded codepoint and the + end of the string." + verification: | + From the privious step log, Verify UTF-8 Encoding for Each Returned String Attribute. + For each returned attribute with the attribute type "string," follow the verification process: + 1. Check if the returned value is not Null or empty. + 2. If the returned value is not Null or empty, validate that it is a valid UTF-8-encoded string. + 3. Ensure that there are no partially encoded codepoints between the last legally-encoded codepoint and the end of the string. + + The following log is an example of the output obtained for Basic Inforamtion Cluster. Pls repeat this for every cluster on every endpoint. The log represents the attributes of clusters found on different endpoints. + + Verification Instructions: + Please use the provided example log as a guide to verify the attributes for other clusters and endpoints in a similar manner. + + Example verification log for 'Basic information Cluster' (0x0000_0028) on Endpoint 0 : + [1690271126.212327][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0000 DataVersion: 338522070 + [1690271126.212330][10587:10589] CHIP:TOO: DataModelRevision: 1 + [1690271126.212344][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0001 DataVersion: 338522070 + [1690271126.212348][10587:10589] CHIP:TOO: VendorName: TEST_VENDOR + [1690271126.212358][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0002 DataVersion: 338522070 + [1690271126.212361][10587:10589] CHIP:TOO: VendorID: 65521 + [1690271126.212369][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0003 DataVersion: 338522070 + [1690271126.212371][10587:10589] CHIP:TOO: ProductName: TEST_PRODUCT + [1690271126.212379][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0004 DataVersion: 338522070 + [1690271126.212382][10587:10589] CHIP:TOO: ProductID: 32769 + [1690271126.212390][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 338522070 + [1690271126.212392][10587:10589] CHIP:TOO: NodeLabel: + [1690271126.212401][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 338522070 + [1690271126.212403][10587:10589] CHIP:TOO: Location: XX + [1690271126.212411][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0007 DataVersion: 338522070 + [1690271126.212413][10587:10589] CHIP:TOO: HardwareVersion: 0 + [1690271126.212422][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0008 DataVersion: 338522070 + [1690271126.212424][10587:10589] CHIP:TOO: HardwareVersionString: TEST_VERSION + [1690271126.212432][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0009 DataVersion: 338522070 + [1690271126.212434][10587:10589] CHIP:TOO: SoftwareVersion: 1 + [1690271126.212443][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_000A DataVersion: 338522070 + [1690271126.212445][10587:10589] CHIP:TOO: SoftwareVersionString: 1.0 + [1690271126.212453][10587:10589] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_000B DataVersion: 338522070 + [1690271126.212455][10587:10589] CHIP:TOO: ManufacturingDate: 20200101 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml index ff7e3d0a241322..1abcdfb85b5f30 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml @@ -153,8 +153,8 @@ tests: ##### Test Implementation - label: - "TH sends the Invoke Request Message to the DUT with the path that - indicates a specific endpoint that is unsupported." + "Step 1: TH sends the Invoke Request Message to the DUT with the path + that indicates a specific endpoint that is unsupported." cluster: "AnyCommands" command: "CommandById" endpoint: PIXIT.IDM.UnsupportedEndPoint @@ -170,8 +170,8 @@ tests: error: UNSUPPORTED_ENDPOINT - label: - "TH sends the Invoke Request Message to the DUT with the path that - indicates a specific cluster that is unsupported." + "Step 2: TH sends the Invoke Request Message to the DUT with the path + that indicates a specific cluster that is unsupported." cluster: "AnyCommands" command: "CommandById" endpoint: InvokeRequestMessage.EndPoint @@ -187,8 +187,8 @@ tests: error: UNSUPPORTED_CLUSTER - label: - "TH sends the Invoke Request Message to the DUT with the path that - indicates a specific command that is unsupported." + "Step 3: TH sends the Invoke Request Message to the DUT with the path + that indicates a specific command that is unsupported." cluster: "AnyCommands" command: "CommandById" endpoint: InvokeRequestMessage.EndPoint @@ -204,8 +204,8 @@ tests: error: UNSUPPORTED_COMMAND - label: - "Setup the TH such that it should not have the privilege for the - cluster in the path." + "Step 4: Setup the TH such that it should not have the privilege for + the cluster in the path." cluster: "AccessControl" command: "writeAttribute" attribute: "ACL" @@ -230,7 +230,7 @@ tests: ] - label: - "TH sends the Invoke Request Message to the DUT with a valid + "Step 4: TH sends the Invoke Request Message to the DUT with a valid CommandDataIB" cluster: "AnyCommands" command: "CommandById" @@ -247,8 +247,8 @@ tests: error: UNSUPPORTED_ACCESS - label: - "TH sends the Invoke Request Message to the DUT with a valid and - fabric-scoped CommandDataIB" + "Step 5: TH sends the Invoke Request Message to the DUT with a valid + and fabric-scoped CommandDataIB" cluster: "General Commissioning" command: "CommissioningComplete" endpoint: PIXIT.Cluster.GeneralCommissioning.EndPoint @@ -275,8 +275,8 @@ tests: ] - label: - "(OPTIONAL) TH sends the Invoke Request Message to the DUT with the - command which requires a data response to be sent back." + "Step 6: (OPTIONAL) TH sends the Invoke Request Message to the DUT + with the command which requires a data response to be sent back." cluster: "General Commissioning" command: "ArmFailSafe" endpoint: PIXIT.Cluster.GeneralCommissioning.EndPoint @@ -292,7 +292,7 @@ tests: value: 0 - label: - "TH sends the Invoke Request Message to the DUT with a valid + "Step 7: TH sends the Invoke Request Message to the DUT with a valid CommandDataIB and SuppressResponse set to True" disabled: true verification: | @@ -333,8 +333,9 @@ tests: ] - label: - "TH sends a Invoke Request Message to the DUT with the TimedRequest - set as TRUE.(There should be no previous Timed Invoke action.)" + "Step 8: TH sends a Invoke Request Message to the DUT with the + TimedRequest set as TRUE.(There should be no previous Timed Invoke + action.)" cluster: "AnyCommands" command: "CommandById" endpoint: InvokeRequestMessage.EndPoint @@ -370,9 +371,9 @@ tests: ] - label: - "TH sends Invoke Request Message to the DUT with the command in the - path that requires a Timed Invoke transaction to invoke and this - action is not part of a Timed Invoke transaction" + "Step 9: TH sends Invoke Request Message to the DUT with the command + in the path that requires a Timed Invoke transaction to invoke and + this action is not part of a Timed Invoke transaction" cluster: "AdministratorCommissioning" command: "OpenBasicCommissioningWindow" endpoint: PIXIT.Cluster.AdministratorCommissioning.EndPoint diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml index de62254f8cef45..000c90336c0a8a 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_1.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 3.4.1. [TC-IDM-4.1] SubscriptionRequestMessage from DUT test cases. - [DUT_Client] + 32.4.1. [TC-IDM-4.1] SubscriptionRequestMessage from DUT test cases. [DUT as + Client] PICS: - MCORE.IDM.C.SubscribeRequest @@ -26,10 +26,16 @@ config: endpoint: 0 tests: - - label: "Note" + - label: "Notes/Testing Considerations" verification: | - 1. Please use Interactive mode to Verify subscription test cases Here the command to enter interactive mode:-- ./chip-tool interactive start - 2. Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. + 1. The Cluster and Commands should be based on the cluster implementation on the DUT. + 2. The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. + disabled: true + + - label: "Precondition" + verification: | + Please use Interactive mode to Verify subscription test cases + Here the command to enter interactive mode:-- ./chip-tool interactive start disabled: true - label: @@ -111,7 +117,6 @@ tests: verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - onoff subscribe on-off 10 80 1 1 --keepSubscriptions true Verify on the TH(reference-app) that the status response received from the DUT is "Success" @@ -170,9 +175,9 @@ tests: disabled: true - label: - "Step 3: [OPTIONAL] Activate the subscription between the DUT and the - TH for an attribute of data type boolean. Modify that attribute on the - TH. TH should send the modified data to the DUT. Modify the attribute + "Step 3: Activate the subscription between the DUT and the TH for an + attribute of data type boolean. Modify that attribute on the TH. TH + should send the modified data to the DUT. Modify the attribute multiple times (3 times)." PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_Bool verification: | @@ -283,9 +288,9 @@ tests: disabled: true - label: - "Step 4: [OPTIONAL] Activate the subscription between the DUT and the - TH for an attribute of data type string. Modify that attribute on the - TH. TH should send the modified data to the DUT. Modify the attribute + "Step 4: Activate the subscription between the DUT and the TH for an + attribute of data type string. Modify that attribute on the TH. TH + should send the modified data to the DUT. Modify the attribute multiple times (3 times)." PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_String verification: | @@ -392,10 +397,10 @@ tests: disabled: true - label: - "Step 5: [OPTIONAL] Activate the subscription between the DUT and the - TH for an attribute of data type unsigned integer. Modify that - attribute on the TH. TH should send the modified data to the DUT. - Modify the attribute multiple times (3 times)." + "Step 5: Activate the subscription between the DUT and the TH for an + attribute of data type unsigned integer. Modify that attribute on the + TH. TH should send the modified data to the DUT. Modify the attribute + multiple times (3 times)." PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_UnsignedInteger verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) @@ -500,10 +505,10 @@ tests: disabled: true - label: - "Step 6: [OPTIONAL] Activate the subscription between the DUT and the - TH for an attribute of data type signed integer. Modify that attribute - on the TH. TH should send the modified data to the DUT. Modify the - attribute multiple times (3 times)" + "Step 6: Activate the subscription between the DUT and the TH for an + attribute of data type signed integer. Modify that attribute on the + TH. TH should send the modified data to the DUT. Modify the attribute + multiple times (3 times)" PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_Integer verification: | DUT implementation required to verify subscribe an attribute of data type signed integer @@ -513,10 +518,10 @@ tests: disabled: true - label: - "Step 7: [OPTIONAL] Activate the subscription between the DUT and the - TH for an attribute of data type Floating Point. Modify that attribute - on the TH. TH should send the modified data to the DUT. Modify the - attribute multiple times (3 times)" + "Step 7: Activate the subscription between the DUT and the TH for an + attribute of data type Floating Point. Modify that attribute on the + TH. TH should send the modified data to the DUT. Modify the attribute + multiple times (3 times)" PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_FloatingPoint verification: | DUT implementation required to verify subscribe an attribute of data type floating point @@ -527,9 +532,9 @@ tests: disabled: true - label: - "Step 8: [OPTIONAL] Activate the subscription between the DUT and the - TH for an attribute of data type list. Modify that attribute on the - TH. TH should send the modified data to the DUT. Modify the attribute + "Step 8: Activate the subscription between the DUT and the TH for an + attribute of data type list. Modify that attribute on the TH. TH + should send the modified data to the DUT. Modify the attribute multiple times (3 times)" PICS: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_List verification: | @@ -548,12 +553,12 @@ tests: activation." PICS: MCORE.IDM.C.SubscribeRequest verification: | - Out of scope + Not verifiable/Out of scope disabled: true - label: "Step 10: DUT sends a subscription request message to the target - node/reference device for multiple attributes(3 attributes)." + node/reference device for multiple attributes (>1 attributes)." PICS: MCORE.IDM.C.SubscribeRequest.MultipleAttributes verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml index 5a5f36b73da8e8..67ceafbb3547b2 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 3.4.2. [TC-IDM-4.2] Subscription Response Messages from DUT Test Cases. - [{DUT_Server}] + 32.4.2. [TC-IDM-4.2] Subscription Response Messages from DUT Test Cases. + [DUT as Server] PICS: - MCORE.IDM.S @@ -26,108 +26,238 @@ config: endpoint: 0 tests: - - label: "Note" + - label: "Notes/Testing Considerations" + verification: | + 1. The Cluster and Commands should be based on the cluster implementation on the DUT. + 2. The cluster used in the below test steps is an example, User can use any supported chip cluster/attribute/command. + disabled: true + + - label: "Pre condition" verification: | Please use Interactive mode to Verify subscription test cases - Here the command to enter interactive mode:-- ./chip-tool interactive start + Here the command to enter interactive mode:-- ./chip-tool interactive start disabled: true - - label: - If the device is has the ICD Management cluster, TH reads from the DUT - the IdleModeInterval attribute and sets the - SubscriptionMaxIntervalPublisherLimit to the value read. If the device - does not have the ICD Management cluster, set the - SubscriptionMaxIntervalPublisherLimit to 60 minutes. + - label: "Step 0a: TH reads from the DUT the IdleModeInterval attribute." + PICS: " !ICDM.S " verification: | - The cluster used in the below command is an example, - icdmanagement read idle-mode-interval 12344321 0 + When the ICDM feature is not supported or enabled, the SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT is set to 60 minutes. + disabled: true + + - label: "Step 0b: TH reads from the DUT the IdleModeInterval attribute." + PICS: ICDM.S + verification: | + TH reads from the DUT the IdleModeInterval attribute by sending below mentioned command + + icdmanagement read idle-mode-interval 1 + Please note down the value of IdleModeInterval as SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT for use in the next step validations. + + + [1690475024.398278][5675:5677] CHIP:DMG: SuppressResponse = true, + [1690475024.398282][5675:5677] CHIP:DMG: InteractionModelRevision = 1 + [1690475024.398285][5675:5677] CHIP:DMG: } + [1690475024.398735][5675:5677] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_0000 DataVersion: 4216223957 + [1690475024.398921][5675:5677] CHIP:TOO: IdleModeInterval: 500 + [1690475024.399202][5675:5677] CHIP:EM: <<< [E:28320i S:44238 M:28503816 (Ack:266918637)] (S) Msg TX to 1:0000000000000001 [3C19] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690475024.399208][5675:5677] CHIP:IN: (S) Sending msg 28503816 on secure session with LSID: 44238 + [1690475024.399217][5675:5677] CHIP:EM: Flushed pending ack for MessageCounter:266918637 on exchange 28320i disabled: true - label: "Step 1: TH sends a subscription message to the DUT with - MaxIntervalCeiling set to a value greater than the - SubscriptionMaxIntervalPublisherLimit. DUT sends a report data action - to the TH. TH sends a success status response to the DUT. DUT sends a - Subscribe Response Message to the TH to activate the subscription." + MaxIntervalCeiling set to a value greater than + SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT. DUT sends a report data + action to the TH. TH sends a success status response to the DUT. DUT + sends a Subscribe Response Message to the TH to activate the + subscription." verification: | - onoff subscribe on-off 100 3900 1 1 --keepSubscriptions true - - On the TH(reference app), verify a report data message is received and verify it contains the following data : - Report data - data of the attribute/event requested earlier. - Verify on the TH the Subscribe Response has the following fields, - SubscriptionId - Verify it is of type uint32. - MaxInterval - Verify it is of type uint32. - Verify that the MaxInterval is less than or equal MaxIntervalCeiling. - - [1686294743.438593][101362:101364] CHIP:DMG: ], - [1686294743.438598][101362:101364] CHIP:DMG: - [1686294743.438601][101362:101364] CHIP:DMG: InteractionModelRevision = 1 - [1686294743.438604][101362:101364] CHIP:DMG: } - [1686294743.438641][101362:101364] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3334871844 - [1686294743.438651][101362:101364] CHIP:TOO: OnOff: FALSE - [1686294743.438663][101362:101364] CHIP:DMG: MoveToState ReadClient[0x7fc7ec011c50]: Moving to [AwaitingSu] - [1686294743.438688][101362:101364] CHIP:EM: <<< [E:49832i S:18140 M:226017852 (Ack:29621147)] (S) Msg TX to 1:0000000000000001 [A822] --- Type 0001:01 (IM:StatusResponse) - [1686294743.438695][101362:101364] CHIP:IN: (S) Sending msg 226017852 on secure session with LSID: 18140 - [1686294743.441447][101362:101364] CHIP:EM: >>> [E:49832i S:18140 M:29621148 (Ack:226017852)] (S) Msg RX from 1:0000000000000001 [A822] --- Type 0001:04 (IM:SubscribeResponse) - [1686294743.441455][101362:101364] CHIP:EM: Found matching exchange: 49832i, Delegate: 0x7fc7ec011c60 - [1686294743.441461][101362:101364] CHIP:EM: Rxd Ack; Removing MessageCounter:226017852 from Retrans Table on exchange 49832i - [1686294743.441467][101362:101364] CHIP:DMG: SubscribeResponse is received - [1686294743.441475][101362:101364] CHIP:DMG: SubscribeResponseMessage = - [1686294743.441479][101362:101364] CHIP:DMG: { - [1686294743.441483][101362:101364] CHIP:DMG: SubscriptionId = 0x51734852, - [1686294743.441487][101362:101364] CHIP:DMG: MaxInterval = 0xf3c, - [1686294743.441490][101362:101364] CHIP:DMG: InteractionModelRevision = 1 - [1686294743.441494][101362:101364] CHIP:DMG: } - [1686294743.441498][101362:101364] CHIP:DMG: Subscription established with SubscriptionID = 0x51734852 MinInterval = 100s MaxInterval = 3900s Peer = 01:0000000000000001 - [1686294743.441504][101362:101364] CHIP:DMG: MoveToState ReadClient[0x7fc7ec011c50]: Moving to [Subscripti] + Please run the following command on the TH to test the subscription feature and verify that the value of MaxIntervalCeiling is set correctly(set the value greater than SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT) + + onoff subscribe on-off 100 600 1 1 --keepSubscriptions true + + On the TH( chip-tool), verify a report data message is received and verify it contains the following data : + 1. Verify Report Data Message Received: + Check if a report data message is received on the TH. + + 2. Verify Report Data Contents: + Confirm that the received report data message contains the data of the attribute/event that was previously requested. + + 3. Verify Subscribe Response Fields: + Examine the Subscribe Response to ensure it includes the following fields: + SubscriptionId: Verify that it is of type uint32. + Verify MaxInterval Field: + + 4. Check for an additional field in the Subscribe Response: + MaxInterval: Verify that it is of type uint32. + + 5. Verify MaxInterval against MaxIntervalCeiling: + Compare the MaxInterval value received in the Subscribe Response to the MaxIntervalCeiling value to verify that MaxInterval is less than or equal to MaxIntervalCeiling. + + [1690475115.797447][5694:5696] CHIP:DMG: InteractionModelRevision = 1 + [1690475115.797452][5694:5696] CHIP:DMG: } + [1690475115.797536][5694:5696] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 2332229409 + [1690475115.797556][5694:5696] CHIP:TOO: OnOff: FALSE + [1690475115.797577][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd84800fb20]: Moving to [AwaitingSu] + [1690475115.797625][5694:5696] CHIP:EM: <<< [E:36539i S:55497 M:232793668 (Ack:16536682)] (S) Msg TX to 1:0000000000000001 [3C19] --- Type 0001:01 (IM:StatusResponse) + [1690475115.797638][5694:5696] CHIP:IN: (S) Sending msg 232793668 on secure session with LSID: 55497 + [1690475115.798143][5694:5696] CHIP:EM: >>> [E:36539i S:55497 M:16536683 (Ack:232793668)] (S) Msg RX from 1:0000000000000001 [3C19] --- Type 0001:04 (IM:SubscribeResponse) + [1690475115.798165][5694:5696] CHIP:EM: Found matching exchange: 36539i, Delegate: 0x7fd84800fb30 + [1690475115.798179][5694:5696] CHIP:EM: Rxd Ack; Removing MessageCounter:232793668 from Retrans Table on exchange 36539i + [1690475115.798192][5694:5696] CHIP:DMG: SubscribeResponse is received + [1690475115.798206][5694:5696] CHIP:DMG: SubscribeResponseMessage = + [1690475115.798213][5694:5696] CHIP:DMG: { + [1690475115.798220][5694:5696] CHIP:DMG: SubscriptionId = 0x9b87e9c7, + [1690475115.798226][5694:5696] CHIP:DMG: MaxInterval = 0x258, + [1690475115.798232][5694:5696] CHIP:DMG: InteractionModelRevision = 1 + [1690475115.798238][5694:5696] CHIP:DMG: } + [1690475115.798247][5694:5696] CHIP:DMG: Subscription established with SubscriptionID = 0x9b87e9c7 MinInterval = 100s MaxInterval = 600s Peer = 01:0000000000000001 + [1690475115.798256][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd84800fb20]: Moving to [Subscripti] disabled: true - label: "Step 2: TH sends a subscription message to the DUT with - MaxIntervalCeiling set to a value less than han the - SubscriptionMaxIntervalPublisherLimit. DUT sends a report data action - to the TH. TH sends a success status response to the DUT. DUT sends a - Subscribe Response Message to the TH to activate the subscription." + MaxIntervalCeiling set to a value less than + SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT. DUT sends a report data + action to the TH. TH sends a success status response to the DUT. DUT + sends a Subscribe Response Message to the TH to activate the + subscription." verification: | - basicinformation subscribe location 10 2400 1 0 --keepSubscriptions true + Please run the following command on the TH to test the subscription feature and verify that the value of MaxIntervalCeiling is set correctly( set the value less than SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT) + + + basicinformation subscribe location 10 400 1 0 --keepSubscriptions true + On the TH(chip-tool), verify a report data message is received and verify it contains the following data : - Report data - data of the attribute/event requested earlier. - Verify on the TH the Subscribe Response has the following fields, - SubscriptionId - Verify it is of type uint32. - MaxInterval - Verify it is of type uint32. - Verify that the MaxInterval is less than or equal to the MaxIntervalCeiling. - - [1686294932.404445][101362:101364] CHIP:DMG: InteractionModelRevision = 1 - [1686294932.404449][101362:101364] CHIP:DMG: } - [1686294932.404497][101362:101364] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 946377024 - [1686294932.404508][101362:101364] CHIP:TOO: Location: XX - [1686294932.404523][101362:101364] CHIP:DMG: MoveToState ReadClient[0x7fc7ec00e400]: Moving to [AwaitingSu] - [1686294932.404565][101362:101364] CHIP:EM: <<< [E:49833i S:18140 M:226017855 (Ack:29621149)] (S) Msg TX to 1:0000000000000001 [A822] --- Type 0001:01 (IM:StatusResponse) - [1686294932.404575][101362:101364] CHIP:IN: (S) Sending msg 226017855 on secure session with LSID: 18140 - [1686294932.420682][101362:101364] CHIP:EM: >>> [E:49833i S:18140 M:29621150 (Ack:226017855)] (S) Msg RX from 1:0000000000000001 [A822] --- Type 0001:04 (IM:SubscribeResponse) - [1686294932.420716][101362:101364] CHIP:EM: Found matching exchange: 49833i, Delegate: 0x7fc7ec00e410 - [1686294932.420737][101362:101364] CHIP:EM: Rxd Ack; Removing MessageCounter:226017855 from Retrans Table on exchange 49833i - [1686294932.420754][101362:101364] CHIP:DMG: SubscribeResponse is received - [1686294932.420777][101362:101364] CHIP:DMG: SubscribeResponseMessage = - [1686294932.420787][101362:101364] CHIP:DMG: { - [1686294932.420796][101362:101364] CHIP:DMG: SubscriptionId = 0xcbbba269, - [1686294932.420805][101362:101364] CHIP:DMG: MaxInterval = 0x960, - [1686294932.420815][101362:101364] CHIP:DMG: InteractionModelRevision = 1 - [1686294932.420822][101362:101364] CHIP:DMG: } - [1686294932.420834][101362:101364] CHIP:DMG: Subscription established with SubscriptionID = 0xcbbba269 MinInterval = 10s MaxInterval = 2400s Peer = 01:0000000000000001 - [1686294932.420847][101362:101364] CHIP:DMG: MoveToState ReadClient[0x7fc7ec00e400]: Moving to [Subscripti] + 1. Verify Report Data Message Received: + Check if a report data message is received on the TH (target hardware). + + 2. Verify Report Data Contents: + Confirm that the received report data message contains the data of the attribute/event that was previously requested. + + 3. Verify Subscribe Response Fields: + Examine the Subscribe Response to ensure it includes the following fields: + SubscriptionId: Verify that it is of type uint32. + MaxInterval: Verify that it is of type uint32. + + 4. Verify MaxInterval against SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT: + Compare the MaxInterval value received in the Subscribe Response to the value of SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT. + Verify that the MaxInterval value is less than or equal to SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT. + + [1690475286.624596][5694:5696] CHIP:DMG: + [1690475286.624598][5694:5696] CHIP:DMG: InteractionModelRevision = 1 + [1690475286.624600][5694:5696] CHIP:DMG: } + [1690475286.624620][5694:5696] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 2118637528 + [1690475286.624625][5694:5696] CHIP:TOO: Location: XX + [1690475286.624631][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd848010a50]: Moving to [AwaitingSu] + [1690475286.624645][5694:5696] CHIP:EM: <<< [E:36540i S:55497 M:232793671 (Ack:16536684)] (S) Msg TX to 1:0000000000000001 [3C19] --- Type 0001:01 (IM:StatusResponse) + [1690475286.624649][5694:5696] CHIP:IN: (S) Sending msg 232793671 on secure session with LSID: 55497 + [1690475286.624771][5694:5696] CHIP:EM: >>> [E:36540i S:55497 M:16536685 (Ack:232793671)] (S) Msg RX from 1:0000000000000001 [3C19] --- Type 0001:04 (IM:SubscribeResponse) + [1690475286.624775][5694:5696] CHIP:EM: Found matching exchange: 36540i, Delegate: 0x7fd848010a60 + [1690475286.624778][5694:5696] CHIP:EM: Rxd Ack; Removing MessageCounter:232793671 from Retrans Table on exchange 36540i + [1690475286.624782][5694:5696] CHIP:DMG: SubscribeResponse is received + [1690475286.624787][5694:5696] CHIP:DMG: SubscribeResponseMessage = + [1690475286.624789][5694:5696] CHIP:DMG: { + [1690475286.624791][5694:5696] CHIP:DMG: SubscriptionId = 0xc96fec0e, + [1690475286.624793][5694:5696] CHIP:DMG: MaxInterval = 0x190, + [1690475286.624796][5694:5696] CHIP:DMG: InteractionModelRevision = 1 + [1690475286.624798][5694:5696] CHIP:DMG: } + [1690475286.624801][5694:5696] CHIP:DMG: Subscription established with SubscriptionID = 0xc96fec0e MinInterval = 10s MaxInterval = 400s Peer = 01:0000000000000001 + [1690475286.624805][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd848010a50]: Moving to [Subscripti] disabled: true - label: - "Step 3: Setup TH2 such that it does not have access to an attribute - on a specific cluster and endpoint. TH2 sends a subscription message - to subscribe to an attribute for which it does not have access. - AttributePath = [[Attribute = Attribute, Cluster = ClusterID, Endpoint - = EndpointID ]]." + "Step 3: Setup TH2 such that it does not have access to a specific + cluster. TH2 sends a subscription message to subscribe to an attribute + on that cluster for which it does not have access. AttributePath = + [[Attribute = Attribute, Cluster = ClusterID, Endpoint = EndpointID + ]]." verification: | - As per Spec, there is no access control to specifically enable/disable access to an attribute, so the wording of the test plan need to be modified + Please send the below mentioned command to configure TH2 without access to a specific cluster, we send the ACL command, allowing access only to the Level Control cluster (cluster ID: 8); any attempts to subscribe to or use commands from other clusters will result in a status of 'INVALID_ACTION + + accesscontrol write acl '[{"privilege":5, "authMode":2, "subjects":[112233], "targets":null, "fabricIndex": 1},{"privilege":3, "authMode":2, "subjects":[4], "targets":[{"cluster":8, "endpoint":null, "deviceType":null}]}]' 1 0 + + [1689933254.566655][48781:48783] CHIP:EM: Rxd Ack; Removing MessageCounter:156974239 from Retrans Table on exchange 6316i + [1689933254.566660][48781:48783] CHIP:DMG: WriteClient moving to [ResponseRe] + [1689933254.566671][48781:48783] CHIP:DMG: WriteResponseMessage = + [1689933254.566675][48781:48783] CHIP:DMG: { + [1689933254.566677][48781:48783] CHIP:DMG: AttributeStatusIBs = + [1689933254.566682][48781:48783] CHIP:DMG: [ + [1689933254.566684][48781:48783] CHIP:DMG: AttributeStatusIB = + [1689933254.566688][48781:48783] CHIP:DMG: { + [1689933254.566691][48781:48783] CHIP:DMG: AttributePathIB = + [1689933254.566695][48781:48783] CHIP:DMG: { + [1689933254.566698][48781:48783] CHIP:DMG: Endpoint = 0x0, + [1689933254.566702][48781:48783] CHIP:DMG: Cluster = 0x1f, + [1689933254.566705][48781:48783] CHIP:DMG: Attribute = 0x0000_0000, + [1689933254.566708][48781:48783] CHIP:DMG: } + [1689933254.566713][48781:48783] CHIP:DMG: + [1689933254.566716][48781:48783] CHIP:DMG: StatusIB = + [1689933254.566720][48781:48783] CHIP:DMG: { + [1689933254.566723][48781:48783] CHIP:DMG: status = 0x00 (SUCCESS), + [1689933254.566726][48781:48783] CHIP:DMG: }, + [1689933254.566730][48781:48783] CHIP:DMG: + [1689933254.566732][48781:48783] CHIP:DMG: }, + [1689933254.566739][48781:48783] CHIP:DMG: + [1689933254.566741][48781:48783] CHIP:DMG: AttributeStatusIB = + [1689933254.566744][48781:48783] CHIP:DMG: { + [1689933254.566747][48781:48783] CHIP:DMG: AttributePathIB = + [1689933254.566750][48781:48783] CHIP:DMG: { + [1689933254.566752][48781:48783] CHIP:DMG: Endpoint = 0x0, + [1689933254.566756][48781:48783] CHIP:DMG: Cluster = 0x1f, + [1689933254.566760][48781:48783] CHIP:DMG: Attribute = 0x0000_0000, + [1689933254.566763][48781:48783] CHIP:DMG: ListIndex = Null, + [1689933254.566766][48781:48783] CHIP:DMG: } + [1689933254.566770][48781:48783] CHIP:DMG: + [1689933254.566773][48781:48783] CHIP:DMG: StatusIB = + [1689933254.566776][48781:48783] CHIP:DMG: { + [1689933254.566779][48781:48783] CHIP:DMG: status = 0x00 (SUCCESS), + [1689933254.566782][48781:48783] CHIP:DMG: }, + [1689933254.566786][48781:48783] CHIP:DMG: + [1689933254.566789][48781:48783] CHIP:DMG: }, + [1689933254.566794][48781:48783] CHIP:DMG: + [1689933254.566797][48781:48783] CHIP:DMG: AttributeStatusIB = + [1689933254.566800][48781:48783] CHIP:DMG: { + [1689933254.566802][48781:48783] CHIP:DMG: AttributePathIB = + [1689933254.566805][48781:48783] CHIP:DMG: { + [1689933254.566808][48781:48783] CHIP:DMG: Endpoint = 0x0, + [1689933254.566811][48781:48783] CHIP:DMG: Cluster = 0x1f, + [1689933254.566815][48781:48783] CHIP:DMG: Attribute = 0x0000_0000, + [1689933254.566818][48781:48783] CHIP:DMG: ListIndex = Null, + [1689933254.566821][48781:48783] CHIP:DMG: } + [1689933254.566825][48781:48783] CHIP:DMG: + [1689933254.566828][48781:48783] CHIP:DMG: StatusIB = + [1689933254.566831][48781:48783] CHIP:DMG: { + [1689933254.566834][48781:48783] CHIP:DMG: status = 0x00 (SUCCESS), + [1689933254.566837][48781:48783] CHIP:DMG: }, + [1689933254.566840][48781:48783] CHIP:DMG: + [1689933254.566843][48781:48783] CHIP:DMG: }, + [1689933254.566847][48781:48783] CHIP:DMG: + [1689933254.566849][48781:48783] CHIP:DMG: ], + [1689933254.566857][48781:48783] CHIP:DMG: + [1689933254.566859][48781:48783] CHIP:DMG: InteractionModelRevision = 1 + [1689933254.566862][48781:48783] CHIP:DMG: } + [1689933254.566897][48781:48783] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1689933254.566916][48781:48783] CHIP:EM: <<< [E:6316i S:13964 M:156974240 (Ack:46397313)] (S) Msg TX to 1:0000000000000001 [B15F] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689933254.566922][48781:48783] CHIP:IN: (S) Sending msg 156974240 on secure session with LSID: 13964 + + If TH2 attempts to subscribe to an attribute on a cluster (ClusterID) for which it does not have access, the AttributePath used for the subscription would be in the form [[Attribute = AttributeName, Cluster = ClusterID, Endpoint = EndpointID]], but this action will be denied, and TH2 will not be able to access the attribute due to the restricted access. + + below provided the example command used to subscribe location attribute from basicinformation cluster from node id(4) that have access to the “levelcontrol” cluster + + basicinformation subscribe location 10 2400 1 0 --commissioner-nodeid 4 + [1689933387.304826][48781:48783] CHIP:EM: Rxd Ack; Removing MessageCounter:42350588 from Retrans Table on exchange 6319i + [1689933387.304834][48781:48783] CHIP:DMG: StatusResponseMessage = + [1689933387.304838][48781:48783] CHIP:DMG: { + [1689933387.304841][48781:48783] CHIP:DMG: Status = 0x80 (INVALID_ACTION), + [1689933387.304845][48781:48783] CHIP:DMG: InteractionModelRevision = 1 + [1689933387.304846][48781:48783] CHIP:DMG: } + [1689933387.304850][48781:48783] CHIP:IM: Received status response, status is 0x80 (INVALID_ACTION) + [1689933387.304864][48781:48783] CHIP:EM: <<< [E:6319i S:13965 M:42350589 (Ack:227168589)] (S) Msg TX to 2:0000000000000001 [B15F] --- Type 0001:01 (IM:StatusResponse) + [1689933387.304869][48781:48783] CHIP:IN: (S) Sending msg 42350589 on secure session with LSID: 13965 + [1689933387.304882][48781:48783] CHIP:DMG: MoveToState ReadClient[0x7fd404019110]: Moving to [ Idle] - https://github.com/CHIP-Specifications/chip-test-plans/issues/2366 + With the ACL command in step-2, we are overwriting the default privilege that chip-tool has an admin. After this step-3 you need to send below mentioned command to Grant access to all clusters again. + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode":2, "subjects":[112233,4], "targets":null}]' 1 0 disabled: true - label: @@ -136,7 +266,7 @@ tests: to subscribe to all attributes for which it does not have access. AttributePath = [[Cluster = ClusterID, Endpoint = EndpointID ]]." verification: | - To Setup the TH2(chip-tool) such that it should not have the privilege for the cluster in the path(AttributePath = [[Attribute = Attribute, Cluster = ClusterID, Endpoint = EndpointID ]]). 1st we need to send below mentioned ACL command and Here by sending below mentioned ACL command giving only access for Level control cluster(8), So except Level control cluster if try to subscribe any other cluster commands will get status as INVALID_ACTION . + Please send the below mentioned command to configure TH2 without access to a specific cluster on Specific endpoint, we send the ACL command, allowing access only to the Level Control cluster (cluster ID: 8) on endpoint 1 ; any attempts to subscribe to or use commands from other clusters will result in a status of 'INVALID_ACTION accesscontrol write acl '[{"privilege":5, "authMode":2, "subjects":[112233], "targets":null, "fabricIndex": 1},{"privilege":3, "authMode":2, "subjects":[4], "targets":[{"cluster":8, "endpoint":1, "deviceType":null}]}]' 1 0 @@ -200,7 +330,11 @@ tests: [1687418564.590811][167960:167962] CHIP:DMG: } [1687418564.590882][167960:167962] CHIP:DMG: WriteClient moving to [AwaitingDe] - Try to subscribe to all attributes onto endpoint 1 for cluster “onoff” from a node id that have access to the “levelcontrol” cluster onto endpoint 1 + If TH2 attempts to subscribe to an attribute on a cluster (ClusterID) for which it does not have access, the AttributePath used for the subscription would be in the form AttributePath = [[Cluster = ClusterID, Endpoint = EndpointID ]]., but this action will be denied, and TH2 will not be able to access the attribute due to the restricted access. + + below provided the example command to subscribe all attributes onto endpoint 1 for onoff cluster from node id(4) that have access to the “levelcontrol” cluster onto endpoint 1 + + onoff subscribe-by-id 0xFFFFFFFF 5 100 1 1 --commissioner-nodeid 4 [1687418591.903193][167960:167962] CHIP:EM: Found matching exchange: 3641i, Delegate: 0x7fc81c00bbd0 @@ -225,8 +359,7 @@ tests: clusters on a specific Endpoint for which it does not have access. AttributePath = [[ Endpoint = EndpointID ]]." verification: | - To Setup the TH2(chip-tool) such that it should not have the privilege for the cluster in the path(AttributePath = [[ Endpoint = EndpointID ]]). 1st we need to send below mentioned ACL command and Here by sending below mentioned ACL command giving only access for Level control cluster(8), So except Level control cluster if try to subscribe any other cluster commands will get status as INVALID_ACTION . - + Please send the below mentioned command to configure TH2 without access to a specific endpoint, we send the ACL command, allowing access only to the endpoint 1 ; any attempts to subscribe to or use commands from other clusters will result in a status of 'INVALID_ACTION accesscontrol write acl '[{"privilege":5, "authMode":2, "subjects":[112233], "targets":null, "fabricIndex": 1},{"privilege":3, "authMode":2, "subjects":[4], "targets":[{"cluster":null, "endpoint":1, "deviceType":null}]}]' 1 0 @@ -290,7 +423,10 @@ tests: [1687418943.853418][167960:167962] CHIP:DMG: } [1687418943.853488][167960:167962] CHIP:DMG: WriteClient moving to [AwaitingDe] - Try to subscribe to all attributes onto endpoint 0 for cluster 6 from a node id that have access to everything onto endpoint 1 + If TH2 attempts to subscribe to an attribute on a cluster (ClusterID) for which it does not have access, the AttributePath used for the subscription would be in the form AttributePath = [[ Endpoint = EndpointID ]], but this action will be denied, and TH2 will not be able to access the attribute due to the restricted access. + + below provided the example command to subscribe to all attributes onto endpoint 0 for cluster 6 from a node id that have access to everything onto endpoint 1 + onoff subscribe-by-id 0xFFFFFFFF 5 100 1 0 --commissioner-nodeid 4 [1687418974.537572][167960:167962] CHIP:EM: Rxd Ack; Removing MessageCounter:104560062 from Retrans Table on exchange 3650i @@ -314,21 +450,8 @@ tests: clusters on all endpoints on a Node for which it does not have access. AttributePath = [[ ]]." verification: | - After commissioned the device, Device does not allow access for node id 4. Because it is not granted the access for Node ID 4 - - Try to subscribe to all attributes onto endpoint 1 for cluster 6 from a node id that does not have any access to the node - - onoff subscribe-by-id 0xFFFFFFFF 5 100 1 0 --commissioner-nodeid 4 - - [1687419427.834160][167960:167962] CHIP:EM: Rxd Ack; Removing MessageCounter:104560064 from Retrans Table on exchange 3652i - [1687419427.834192][167960:167962] CHIP:DMG: StatusResponseMessage = - [1687419427.834207][167960:167962] CHIP:DMG: { - [1687419427.834216][167960:167962] CHIP:DMG: Status = 0x80 (INVALID_ACTION), - [1687419427.834225][167960:167962] CHIP:DMG: InteractionModelRevision = 1 - [1687419427.834233][167960:167962] CHIP:DMG: } - [1687419427.834242][167960:167962] CHIP:IM: Received status response, status is 0x80 (INVALID_ACTION) - [1687419427.834293][167960:167962] CHIP:EM: <<< [E:3652i S:26604 M:104560065 (Ack:37058094)] (S) Msg TX to 2:0000000000000001 [2DB4] --- Type 0001:01 (IM:StatusResponse) - [1687419427.834308][167960:167962] CHIP:IN: (S) Sending msg 104560065 on secure session with LSID: 26604 + Chip-Tool support required to validate this step : SDK Issue - https://github.com/project-chip/connectedhomeip/issues/28360 + Not Testable disabled: true - label: @@ -338,53 +461,8 @@ tests: subscription for that attribute. Start another subscription with the DataVersionFilter field set to the data version received above." verification: | - onoff subscribe start-up-on-off 50 800 1 1 --keepSubscriptions true - - verify that subscription is activated between TH(chip-tool) and DUT(reference app) and DUT(reference-app) sends a report data action with the data of the attribute along with the data version to TH(chip-tool) - [1686295071.084688][101362:101364] CHIP:DMG: } - [1686295071.084713][101362:101364] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4003 DataVersion: 3334871844 - [1686295071.084721][101362:101364] CHIP:TOO: StartUpOnOff: null - [1686295071.084730][101362:101364] CHIP:DMG: MoveToState ReadClient[0x7fc7ec011120]: Moving to [AwaitingSu] - [1686295071.084754][101362:101364] CHIP:EM: <<< [E:49834i S:18140 M:226017858 (Ack:29621151)] (S) Msg TX to 1:0000000000000001 [A822] --- Type 0001:01 (IM:StatusResponse) - [1686295071.084759][101362:101364] CHIP:IN: (S) Sending msg 226017858 on secure session with LSID: 18140 - [1686295071.087868][101362:101364] CHIP:EM: >>> [E:49834i S:18140 M:29621152 (Ack:226017858)] (S) Msg RX from 1:0000000000000001 [A822] --- Type 0001:04 (IM:SubscribeResponse) - [1686295071.087881][101362:101364] CHIP:EM: Found matching exchange: 49834i, Delegate: 0x7fc7ec011130 - [1686295071.087887][101362:101364] CHIP:EM: Rxd Ack; Removing MessageCounter:226017858 from Retrans Table on exchange 49834i - [1686295071.087893][101362:101364] CHIP:DMG: SubscribeResponse is received - [1686295071.087899][101362:101364] CHIP:DMG: SubscribeResponseMessage = - [1686295071.087902][101362:101364] CHIP:DMG: { - [1686295071.087905][101362:101364] CHIP:DMG: SubscriptionId = 0x6bd3d042, - [1686295071.087908][101362:101364] CHIP:DMG: MaxInterval = 0x320, - [1686295071.087911][101362:101364] CHIP:DMG: InteractionModelRevision = 1 - [1686295071.087914][101362:101364] CHIP:DMG: } - [1686295071.087918][101362:101364] CHIP:DMG: Subscription established with SubscriptionID = 0x6bd3d042 MinInterval = 50s MaxInterval = 800s Peer = 01:0000000000000001 - [1686295071.087923][101362:101364] CHIP:DMG: MoveToState ReadClient[0x7fc7ec011120]: Moving to [Subscripti] - - - Start another subscription with the DataVersionFilter field set to the data version received above and Verify that the subscription is activated between TH and DUT. - onoff subscribe start-up-on-off 50 800 1 1 --data-version 3334871844 - - [1657450845.854472][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733050 from RetransTable on exchange 33630i - [1657450845.854526][11635:11640] CHIP:DMG: ReportDataMessage = - [1657450845.854555][11635:11640] CHIP:DMG: { - [1657450845.854581][11635:11640] CHIP:DMG: SubscriptionId = 0x6139c55e, - [1657450845.854607][11635:11640] CHIP:DMG: InteractionModelRevision = 1 - [1657450845.854631][11635:11640] CHIP:DMG: } - [1657450845.854675][11635:11640] CHIP:DMG: MoveToState ReadClient[0xffff94002cb0]: Moving to [AwaitingSu] - [1657450845.854728][11635:11640] CHIP:EM: Piggybacking Ack for MessageCounter:11055899 on exchange: 33630i - [1657450845.854786][11635:11640] CHIP:IN: Prepared secure message 0xffff94002458 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 33630i with MessageCounter:190733051. - [1657450845.854822][11635:11640] CHIP:IN: Sending encrypted msg 0xffff94002458 with MessageCounter:190733051 to 0x0000000000000001 (1) at monotonic time: 0000000000B04EDB msec - [1657450845.855783][11635:11640] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:11055900 on exchange 33630i - [1657450845.855818][11635:11640] CHIP:EM: Found matching exchange: 33630i, Delegate: 0xffff94002cb0 - [1657450845.855856][11635:11640] CHIP:EM: Rxd Ack; Removing MessageCounter:190733051 from Retrans Table on exchange 33630i - [1657450845.855876][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733051 from RetransTable on exchange 33630i - [1657450845.855921][11635:11640] CHIP:DMG: SubscribeResponseMessage = - [1657450845.855943][11635:11640] CHIP:DMG: { - [1657450845.855963][11635:11640] CHIP:DMG: SubscriptionId = 0x6bd3d042, - [1657450845.855985][11635:11640] CHIP:DMG: MaxInterval = 0x320, - [1657450845.856006][11635:11640] CHIP:DMG: InteractionModelRevision = 1 - [1657450845.856026][11635:11640] CHIP:DMG: } - [1657450845.856050][11635:11640] CHIP:DMG: Subscription established with SubscriptionID = 0x6139c55e MinInterval = 50s MaxInterval = 800s Peer = 01:0000000000000001 + Chip-Tool support required to validate this step : SDK Issue - https://github.com/project-chip/connectedhomeip/issues/28363 + Not Testable disabled: true - label: @@ -393,42 +471,126 @@ tests: Activate the Subscription between TH and DUT. Modify the attribute which has been subscribed to on the DUT." verification: | - The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. + Please send the following command from TH (the subscription requester) to DUT (the device under test) to activate the subscription for the "on-time" attribute, setting the MinIntervalFloor and MaxIntervalCeiling values to be the same (in this case, 100 seconds): onoff subscribe on-time 100 100 1 1 --keepSubscriptions true - - On TH(chip-tool) verify that the DUT sends a report data with the value of the attribute after the MinIntervalFloor time. - - [1657450934.856825][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733053 from RetransTable on exchange 33631i - [1657450934.856955][11635:11640] CHIP:DMG: ReportDataMessage = - [1657450934.857025][11635:11640] CHIP:DMG: { - [1657450934.857088][11635:11640] CHIP:DMG: SubscriptionId = 0x4b34909f, - [1657450934.857152][11635:11640] CHIP:DMG: AttributeReportIBs = - [1657450934.857262][11635:11640] CHIP:DMG: [ - [1657450934.857326][11635:11640] CHIP:DMG: AttributeReportIB = - [1657450934.857409][11635:11640] CHIP:DMG: { - [1657450934.857475][11635:11640] CHIP:DMG: AttributeDataIB = - [1657450934.857553][11635:11640] CHIP:DMG: { - [1657450934.857633][11635:11640] CHIP:DMG: DataVersion = 0x1979c37, - [1657450934.857719][11635:11640] CHIP:DMG: AttributePathIB = - [1657450934.857801][11635:11640] CHIP:DMG: { - [1657450934.857885][11635:11640] CHIP:DMG: Endpoint = 0x1, - [1657450934.857974][11635:11640] CHIP:DMG: Cluster = 0x6, - [1657450934.858061][11635:11640] CHIP:DMG: Attribute = 0x0000_4001, - [1657450934.858142][11635:11640] CHIP:DMG: } - [1657450934.858228][11635:11640] CHIP:DMG: - [1657450934.858314][11635:11640] CHIP:DMG: Data = 0, - [1657450934.858391][11635:11640] CHIP:DMG: }, - [1657450934.858471][11635:11640] CHIP:DMG: - [1657450934.858539][11635:11640] CHIP:DMG: }, - [1657450934.858612][11635:11640] CHIP:DMG: - [1657450934.858672][11635:11640] CHIP:DMG: ], - [1657450934.858747][11635:11640] CHIP:DMG: - [1657450934.858808][11635:11640] CHIP:DMG: InteractionModelRevision = 1 - [1657450934.858866][11635:11640] CHIP:DMG: } - [1657450934.859074][11635:11640] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 26713143 - [1657450934.859155][11635:11640] CHIP:TOO: OnTime: 0 - [1657450934.859242][11635:11640] CHIP:DMG: MoveToState ReadClient[0xffff940027a0]: Moving to [AwaitingSu] + On the TH(all-clusters-app) verify the SubscribeResponse is received successfully + [1690540281.061350][9488:9490] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 3310786904 + [1690540281.061363][9488:9490] CHIP:TOO: OnTime: 0 + [1690540281.061379][9488:9490] CHIP:DMG: MoveToState ReadClient[0x7faef8013880]: Moving to [AwaitingSu] + [1690540281.061427][9488:9490] CHIP:EM: <<< [E:49945i S:38251 M:151709012 (Ack:20807554)] (S) Msg TX to 1:0000000000000001 [8B98] --- Type 0001:01 (IM:StatusResponse) + [1690540281.061441][9488:9490] CHIP:IN: (S) Sending msg 151709012 on secure session with LSID: 38251 + [1690540281.061758][9488:9490] CHIP:EM: >>> [E:49945i S:38251 M:20807555 (Ack:151709012)] (S) Msg RX from 1:0000000000000001 [8B98] --- Type 0001:04 (IM:SubscribeResponse) + [1690540281.061771][9488:9490] CHIP:EM: Found matching exchange: 49945i, Delegate: 0x7faef8013890 + [1690540281.061786][9488:9490] CHIP:EM: Rxd Ack; Removing MessageCounter:151709012 from Retrans Table on exchange 49945i + [1690540281.061800][9488:9490] CHIP:DMG: SubscribeResponse is received + [1690540281.061816][9488:9490] CHIP:DMG: SubscribeResponseMessage = + [1690540281.061825][9488:9490] CHIP:DMG: { + [1690540281.061833][9488:9490] CHIP:DMG: SubscriptionId = 0x3ef5dc34, + [1690540281.061844][9488:9490] CHIP:DMG: MaxInterval = 0x64, + [1690540281.061853][9488:9490] CHIP:DMG: InteractionModelRevision = 1 + [1690540281.061862][9488:9490] CHIP:DMG: } + [1690540281.061875][9488:9490] CHIP:DMG: Subscription established with SubscriptionID = 0x3ef5dc34 MinInterval = 100s MaxInterval = 100s Peer = 01:0000000000000001 + + + + After activating the subscription between TH and DUT, please send the following command to modify the 'on-time' attribute value: + + >>> onoff write on-time 1 1 1 + On TH(chip-tool), verify that the DUT sends a report data containing the current 'ontime' attribute value after the MinIntervalFloor time has elapsed + + [1690540304.761997][9488:9488] CHIP:TOO: Command: onoff write on-time 1 1 1 + [1690540304.762298][9488:9490] CHIP:TOO: Sending command to node 0x1 + [1690540304.762462][9488:9490] CHIP:CSM: FindOrEstablishSession: PeerId = [1:0000000000000001] + [1690540304.762474][9488:9490] CHIP:CSM: FindOrEstablishSession: No existing OperationalSessionSetup instance found + [1690540304.762493][9488:9490] CHIP:DIS: Found an existing secure session to [1:0000000000000001]! + [1690540304.762501][9488:9490] CHIP:DIS: OperationalSessionSetup[1:0000000000000001]: State change 1 --> 5 + [1690540304.762534][9488:9490] CHIP:TOO: cluster 0x0000_0006, attribute: 0x0000_4001, endpoint 1 + [1690540304.762585][9488:9490] CHIP:DMG: WriteClient moving to [AddAttribu] + [1690540304.762673][9488:9490] CHIP:EM: <<< [E:49946i S:38251 M:151709014] (S) Msg TX to 1:0000000000000001 [8B98] --- Type 0001:06 (IM:WriteRequest) + [1690540304.762693][9488:9490] CHIP:IN: (S) Sending msg 151709014 on secure session with LSID: 38251 + [1690540304.762788][9488:9490] CHIP:DMG: WriteClient moving to [AwaitingRe] + [1690540304.763448][9488:9490] CHIP:EM: >>> [E:49946i S:38251 M:20807556 (Ack:151709014)] (S) Msg RX from 1:0000000000000001 [8B98] --- Type 0001:07 (IM:WriteResponse) + [1690540304.763464][9488:9490] CHIP:EM: Found matching exchange: 49946i, Delegate: 0x7faef800a5e0 + [1690540304.763478][9488:9490] CHIP:EM: Rxd Ack; Removing MessageCounter:151709014 from Retrans Table on exchange 49946i + [1690540304.763493][9488:9490] CHIP:DMG: WriteClient moving to [ResponseRe] + [1690540304.763518][9488:9490] CHIP:DMG: WriteResponseMessage = + [1690540304.763527][9488:9490] CHIP:DMG: { + [1690540304.763534][9488:9490] CHIP:DMG: AttributeStatusIBs = + [1690540304.763546][9488:9490] CHIP:DMG: [ + [1690540304.763553][9488:9490] CHIP:DMG: AttributeStatusIB = + [1690540304.763562][9488:9490] CHIP:DMG: { + [1690540304.763570][9488:9490] CHIP:DMG: AttributePathIB = + [1690540304.763579][9488:9490] CHIP:DMG: { + [1690540304.763589][9488:9490] CHIP:DMG: Endpoint = 0x1, + [1690540304.763597][9488:9490] CHIP:DMG: Cluster = 0x6, + [1690540304.763606][9488:9490] CHIP:DMG: Attribute = 0x0000_4001, + [1690540304.763614][9488:9490] CHIP:DMG: } + [1690540304.763626][9488:9490] CHIP:DMG: + [1690540304.763634][9488:9490] CHIP:DMG: StatusIB = + [1690540304.763646][9488:9490] CHIP:DMG: { + [1690540304.763654][9488:9490] CHIP:DMG: status = 0x00 (SUCCESS), + [1690540304.763662][9488:9490] CHIP:DMG: }, + [1690540304.763671][9488:9490] CHIP:DMG: + [1690540304.763677][9488:9490] CHIP:DMG: }, + [1690540304.763688][9488:9490] CHIP:DMG: + [1690540304.763694][9488:9490] CHIP:DMG: ], + [1690540304.763706][9488:9490] CHIP:DMG: + [1690540304.763713][9488:9490] CHIP:DMG: InteractionModelRevision = 1 + [1690540304.763719][9488:9490] CHIP:DMG: } + [1690540304.763753][9488:9490] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1690540304.763793][9488:9490] CHIP:EM: <<< [E:49946i S:38251 M:151709015 (Ack:20807556)] (S) Msg TX to 1:0000000000000001 [8B98] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690540304.763810][9488:9490] CHIP:IN: (S) Sending msg 151709015 on secure session with LSID: 38251 + [1690540304.763846][9488:9490] CHIP:EM: Flushed pending ack for MessageCounter:20807556 on exchange 49946i + [1690540325.496486][9488:9490] CHIP:EM: >>> [E:48664r S:38251 M:20807557] (S) Msg RX from 1:0000000000000001 [8B98] --- Type 0001:05 (IM:ReportData) + [1690540325.496520][9488:9490] CHIP:EM: Handling via exchange: 48664r, Delegate: 0x5639a50ebc68 + [1690540325.496552][9488:9490] CHIP:DMG: ReportDataMessage = + [1690540325.496565][9488:9490] CHIP:DMG: { + [1690540325.496576][9488:9490] CHIP:DMG: SubscriptionId = 0x3a11136b, + [1690540325.496587][9488:9490] CHIP:DMG: InteractionModelRevision = 1 + [1690540325.496595][9488:9490] CHIP:DMG: } + [1690540325.496632][9488:9490] CHIP:DMG: Refresh LivenessCheckTime for 804224 milliseconds with SubscriptionId = 0x3a11136b Peer = 01:0000000000000001 + [1690540325.496682][9488:9490] CHIP:EM: <<< [E:48664r S:38251 M:151709016 (Ack:20807557)] (S) Msg TX to 1:0000000000000001 [8B98] --- Type 0001:01 (IM:StatusResponse) + [1690540325.496697][9488:9490] CHIP:IN: (S) Sending msg 151709016 on secure session with LSID: 38251 + [1690540325.497211][9488:9490] CHIP:EM: >>> [E:48664r S:38251 M:20807558 (Ack:151709016)] (S) Msg RX from 1:0000000000000001 [8B98] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690540325.497237][9488:9490] CHIP:EM: Found matching exchange: 48664r, Delegate: (nil) + [1690540325.497258][9488:9490] CHIP:EM: Rxd Ack; Removing MessageCounter:151709016 from Retrans Table on exchange 48664r + [1690540381.062201][9488:9490] CHIP:EM: >>> [E:48665r S:38251 M:20807559] (S) Msg RX from 1:0000000000000001 [8B98] --- Type 0001:05 (IM:ReportData) + [1690540381.062234][9488:9490] CHIP:EM: Handling via exchange: 48665r, Delegate: 0x5639a50ebc68 + [1690540381.062272][9488:9490] CHIP:DMG: ReportDataMessage = + [1690540381.062281][9488:9490] CHIP:DMG: { + [1690540381.062289][9488:9490] CHIP:DMG: SubscriptionId = 0x3ef5dc34, + [1690540381.062296][9488:9490] CHIP:DMG: AttributeReportIBs = + [1690540381.062308][9488:9490] CHIP:DMG: [ + [1690540381.062315][9488:9490] CHIP:DMG: AttributeReportIB = + [1690540381.062325][9488:9490] CHIP:DMG: { + [1690540381.062332][9488:9490] CHIP:DMG: AttributeDataIB = + [1690540381.062338][9488:9490] CHIP:DMG: { + [1690540381.062346][9488:9490] CHIP:DMG: DataVersion = 0xc5569959, + [1690540381.062354][9488:9490] CHIP:DMG: AttributePathIB = + [1690540381.062367][9488:9490] CHIP:DMG: { + [1690540381.062375][9488:9490] CHIP:DMG: Endpoint = 0x1, + [1690540381.062383][9488:9490] CHIP:DMG: Cluster = 0x6, + [1690540381.062392][9488:9490] CHIP:DMG: Attribute = 0x0000_4001, + [1690540381.062399][9488:9490] CHIP:DMG: } + [1690540381.062409][9488:9490] CHIP:DMG: + [1690540381.062417][9488:9490] CHIP:DMG: Data = 1, + [1690540381.062423][9488:9490] CHIP:DMG: }, + [1690540381.062433][9488:9490] CHIP:DMG: + [1690540381.062439][9488:9490] CHIP:DMG: }, + [1690540381.062447][9488:9490] CHIP:DMG: + [1690540381.062453][9488:9490] CHIP:DMG: ], + [1690540381.062463][9488:9490] CHIP:DMG: + [1690540381.062470][9488:9490] CHIP:DMG: InteractionModelRevision = 1 + [1690540381.062476][9488:9490] CHIP:DMG: } + [1690540381.062543][9488:9490] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 3310786905 + [1690540381.062558][9488:9490] CHIP:TOO: OnTime: 1 + [1690540381.062580][9488:9490] CHIP:DMG: Refresh LivenessCheckTime for 104224 milliseconds with SubscriptionId = 0x3ef5dc34 Peer = 01:0000000000000001 + [1690540381.062627][9488:9490] CHIP:EM: <<< [E:48665r S:38251 M:151709017 (Ack:20807559)] (S) Msg TX to 1:0000000000000001 [8B98] --- Type 0001:01 (IM:StatusResponse) + [1690540381.062641][9488:9490] CHIP:IN: (S) Sending msg 151709017 on secure session with LSID: 38251 + [1690540381.063237][9488:9490] CHIP:EM: >>> [E:48665r S:38251 M:20807560 (Ack:151709017)] (S) Msg RX from 1:0000000000000001 [8B98] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1690540381.063261][9488:9490] CHIP:EM: Found matching exchange: 48665r, Delegate: (nil) + [1690540381.063276][9488:9490] CHIP:EM: Rxd Ack; Removing MessageCounter:151709017 from Retrans Table on exchange 48665r disabled: true - label: @@ -436,11 +598,12 @@ tests: set the MinIntervalFloor value to be greater than MaxIntervalCeiling. +" verification: | - The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. + Please send the following command from TH (the subscription requester) to DUT (the device under test) to activate the subscription for the "on-time" attribute, setting the MinIntervalFloor value to be greater than MaxIntervalCeiling: + + onoff subscribe on-time 500 100 1 1 --keepSubscriptions true - onoff subscribe on-time 500 100 1 1 --keepSubscriptions true + On TH (chip-tool), verify that the DUT sends an error message, confirming that the subscription is not established successfully - On TH(chip-tool) Verify that the DUT sends an error message and the subscription is not established. [1661754615.089845][103654:103659] CHIP:DMG: StatusResponseMessage = [1661754615.089857][103654:103659] CHIP:DMG: { [1661754615.089868][103654:103659] CHIP:DMG: Status = 0x80 (INVALID_ACTION), @@ -455,12 +618,41 @@ tests: global attribute from all clusters on all endpoints. AttributePath = [[Attribute = Global Attribute]]. +" verification: | - The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. - - any subscribe-by-id 0xFFFFFFFF 0xFFFD 10 300 1 0xFFFF --keepSubscriptions true - - - On TH(chip-tool) Verify that the Subscription succeeds and the DUT sends back the attribute values for the global attribute + any subscribe-by-id 0xFFFFFFFF 0xFFFD 10 300 1 0xFFFF --keepSubscriptions true + + The following log is an example of the output obtained for Attribute 0x0000_FFFD on Endpoint 0 + Pls repeat this for every cluster on every endpoint. The log represents the attributes of clusters found on different endpoints. + + Verify the presence of mandatory global attribute ClusterRevision for every cluster on every endpoint: + + + Verification Instructions: + Please use the provided example log as a guide to verify the attributes for other clusters and endpoints in a similar manner. + [1690541617.461279][9488:9490] CHIP:DMG: } + [1690541617.461374][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 124546948 + [1690541617.461379][9488:9490] CHIP:TOO: ClusterRevision: 4 + [1690541617.461388][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFD DataVersion: 1468663600 + [1690541617.461391][9488:9490] CHIP:TOO: ClusterRevision: 4 + [1690541617.461399][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 2536415407 + [1690541617.461402][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690541617.461410][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFD DataVersion: 1723648967 + [1690541617.461413][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690541617.461421][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_FFFD DataVersion: 659240739 + [1690541617.461424][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690541617.461432][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_FFFD DataVersion: 3950349597 + [1690541617.461435][9488:9490] CHIP:TOO: ClusterRevision: 2 + [1690541617.461443][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002A Attribute 0x0000_FFFD DataVersion: 1224601682 + [1690541617.461446][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690541617.461454][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFD DataVersion: 2744454868 + [1690541617.461456][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690541617.461464][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFD DataVersion: 463823876 + [1690541617.461467][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690541617.461475][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFFD DataVersion: 115397017 + [1690541617.461477][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690541617.461485][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_FFFD DataVersion: 85684249 + [1690541617.461488][9488:9490] CHIP:TOO: ClusterRevision: 2 + [1690541617.461496][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_FFFD DataVersion: 75615160 + [1690541617.461498][9488:9490] CHIP:TOO: ClusterRevision: 1 disabled: true - label: @@ -468,81 +660,107 @@ tests: attribute on an endpoint on all clusters. AttributePath = [[Attribute = Global Attribute, Endpoint = EndpointID ]]. +" verification: | - The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. - - any subscribe-by-id 0xFFFFFFFF 0xFFFD 10 300 1 0 --keepSubscriptions true + The following log is an example of the output obtained for Attribute 0x0000_FFFD on Endpoint 0 + Pls repeat this for every cluster on endpoint 0. The log represents the attribute of clusters found on endpoint 0. + + Verify the presence of mandatory global attribute ClusterRevision for every cluster on every endpoint: + + + Verification Instructions: + Please use the provided example log as a guide to verify the attributes for other clusters and endpoints in a similar manner. + + [1690542041.905545][9488:9490] CHIP:DMG: InteractionModelRevision = 1 + [1690542041.905546][9488:9490] CHIP:DMG: } + [1690542041.905621][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 124546948 + [1690542041.905625][9488:9490] CHIP:TOO: ClusterRevision: 4 + [1690542041.905634][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFD DataVersion: 1468663600 + [1690542041.905637][9488:9490] CHIP:TOO: ClusterRevision: 4 + [1690542041.905646][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 2536415407 + [1690542041.905649][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905657][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFD DataVersion: 1723648967 + [1690542041.905659][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905667][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_FFFD DataVersion: 659240739 + [1690542041.905670][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905678][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_FFFD DataVersion: 3950349597 + [1690542041.905680][9488:9490] CHIP:TOO: ClusterRevision: 2 + [1690542041.905688][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002A Attribute 0x0000_FFFD DataVersion: 1224601682 + [1690542041.905691][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905699][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFD DataVersion: 2744454868 + [1690542041.905701][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905710][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFD DataVersion: 463823876 + [1690542041.905712][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905720][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFFD DataVersion: 115397017 + [1690542041.905722][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905730][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_FFFD DataVersion: 85684249 + [1690542041.905733][9488:9490] CHIP:TOO: ClusterRevision: 2 + [1690542041.905741][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_FFFD DataVersion: 75615160 + [1690542041.905743][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905751][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFD DataVersion: 1962336111 + [1690542041.905753][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905761][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFFD DataVersion: 465381371 + [1690542041.905763][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905772][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_FFFD DataVersion: 2781452270 + [1690542041.905774][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905782][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_FFFD DataVersion: 3343308905 + [1690542041.905784][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905792][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0035 Attribute 0x0000_FFFD DataVersion: 1933667935 + [1690542041.905794][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905803][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFFD DataVersion: 1917440631 + [1690542041.905806][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905814][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_FFFD DataVersion: 2059544742 + [1690542041.905816][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905824][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0038 Attribute 0x0000_FFFD DataVersion: 292367345 + [1690542041.905826][9488:9490] CHIP:TOO: ClusterRevision: 2 + [1690542041.905835][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_FFFD DataVersion: 4275836516 + [1690542041.905837][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905845][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_FFFD DataVersion: 2334789054 + [1690542041.905848][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905856][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFFD DataVersion: 2215403935 + [1690542041.905858][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905866][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFFD DataVersion: 1171006049 + [1690542041.905868][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905877][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0041 Attribute 0x0000_FFFD DataVersion: 1339481925 + [1690542041.905879][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905887][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_FFFD DataVersion: 2155717858 + [1690542041.905889][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.905897][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0405 Attribute 0x0000_FFFD DataVersion: 2620361579 + [1690542041.906830][9488:9490] CHIP:TOO: ClusterRevision: 3 + [1690542041.906854][9488:9490] CHIP:TOO: Endpoint: 0 Cluster: 0xFFF1_FC06 Attribute 0x0000_FFFD DataVersion: 2161647034 + [1690542041.906860][9488:9490] CHIP:TOO: ClusterRevision: 1 + [1690542041.906886][9488:9490] CHIP:DMG: MoveToState ReadClient[0x7faef801d0f0]: Moving to [AwaitingSu] + [1690542041.906910][9488:9490] CHIP:EM: <<< [E:49949i S:38251 M:151709045 (Ack:20807605)] (S) Msg TX to 1:0000000000000001 [8B98] --- Type 0001:01 (IM:StatusResponse) + [1690542041.906915][9488:9490] CHIP:IN: (S) Sending msg 151709045 on secure session with LSID: 38251 + [1690542041.907098][9488:9490] CHIP:EM: >>> [E:49949i S:38251 M:20807606 (Ack:151709045)] (S) Msg RX from 1:0000000000000001 [8B98] --- Type 0001:04 (IM:SubscribeResponse) + [1690542041.907107][9488:9490] CHIP:EM: Found matching exchange: 49949i, Delegate: 0x7faef801d100 + [1690542041.907113][9488:9490] CHIP:EM: Rxd Ack; Removing MessageCounter:151709045 from Retrans Table on exchange 49949i + [1690542041.907119][9488:9490] CHIP:DMG: SubscribeResponse is received + [1690542041.907126][9488:9490] CHIP:DMG: SubscribeResponseMessage = + [1690542041.907128][9488:9490] CHIP:DMG: { + [1690542041.907131][9488:9490] CHIP:DMG: SubscriptionId = 0x9488dc04, + [1690542041.907134][9488:9490] CHIP:DMG: MaxInterval = 0x12c, + [1690542041.907137][9488:9490] CHIP:DMG: InteractionModelRevision = 1 + [1690542041.907139][9488:9490] CHIP:DMG: } + [1690542041.907144][9488:9490] CHIP:DMG: Subscription established with SubscriptionID = 0x9488dc04 MinInterval = 10s MaxInterval = 300s Peer = 01:0000000000000001 + disabled: true - - On TH(chip-tool) Verify that the Subscription succeeds and the DUT sends back the attribute values for the global attribute - - [1657451191.595630][11635:11640] CHIP:DMG: InteractionModelRevision = 1 - [1657451191.595654][11635:11640] CHIP:DMG: } - [1657451191.596003][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 1247215770 - [1657451191.596042][11635:11640] CHIP:TOO: ClusterRevision: 4 - [1657451191.596102][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFD DataVersion: 3391062846 - [1657451191.596129][11635:11640] CHIP:TOO: ClusterRevision: 4 - [1657451191.596187][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 4071202320 - [1657451191.596214][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596271][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFD DataVersion: 2618211726 - [1657451191.596299][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596356][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_FFFD DataVersion: 2563208108 - [1657451191.596382][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596439][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_FFFD DataVersion: 1504991228 - [1657451191.596466][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596523][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002A Attribute 0x0000_FFFD DataVersion: 3503114671 - [1657451191.596550][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596607][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFD DataVersion: 655424947 - [1657451191.596634][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596691][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFD DataVersion: 2421456926 - [1657451191.596717][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596774][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFFD DataVersion: 3528791487 - [1657451191.596800][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596857][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002E Attribute 0x0000_FFFD DataVersion: 968449410 - [1657451191.596883][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.596940][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_FFFD DataVersion: 2811758882 - [1657451191.596967][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597023][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_FFFD DataVersion: 1035240738 - [1657451191.597050][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597107][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFD DataVersion: 1760092942 - [1657451191.597133][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597191][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFFD DataVersion: 2220680799 - [1657451191.597217][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597275][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_FFFD DataVersion: 3326056069 - [1657451191.597301][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597360][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_FFFD DataVersion: 3433535141 - [1657451191.597386][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597443][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0035 Attribute 0x0000_FFFD DataVersion: 3003261549 - [1657451191.597470][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597526][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFFD DataVersion: 3106710214 - [1657451191.597553][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597610][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_FFFD DataVersion: 3053018824 - [1657451191.597637][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597694][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_FFFD DataVersion: 1257168122 - [1657451191.597721][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597777][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_FFFD DataVersion: 2262465581 - [1657451191.597804][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597861][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFFD DataVersion: 901334231 - [1657451191.597888][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.597945][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFFD DataVersion: 4191161303 - [1657451191.597972][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.598030][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0041 Attribute 0x0000_FFFD DataVersion: 2358987419 - [1657451191.598057][11635:11640] CHIP:TOO: ClusterRevision: 1 - [1657451191.598114][11635:11640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0405 Attribute 0x0000_FFFD DataVersion: 2403664035 - [1657451191.598141][11635:11640] CHIP:TOO: ClusterRevision: 3 - [1657451191.598261][11635:11640] CHIP:DMG: MoveToState ReadClient[0xffff94006d20]: Moving to [AwaitingSu] - [1657451191.598325][11635:11640] CHIP:EM: Piggybacking Ack for MessageCounter:11055908 on exchange: 33634i - [1657451191.598398][11635:11640] CHIP:IN: Prepared secure message 0xffff940026a8 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 33634i with MessageCounter:190733064. - [1657451191.598437][11635:11640] CHIP:IN: Sending encrypted msg 0xffff940026a8 with MessageCounter:190733064 to 0x0000000000000001 (1) at monotonic time: 0000000000B5956B msec - [1657451191.599445][11635:11640] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:11055909 on exchange 33634i - [1657451191.599480][11635:11640] CHIP:EM: Found matching exchange: 33634i, Delegate: 0xffff94006d20 - [1657451191.599517][11635:11640] CHIP:EM: Rxd Ack; Removing MessageCounter:190733064 from Retrans Table on exchange 33634i - [1657451191.599544][11635:11640] CHIP:EM: Removed CHIP MessageCounter:190733064 from RetransTable on exchange 33634i - [1657451191.599595][11635:11640] CHIP:DMG: SubscribeResponseMessage = - [1657451191.599623][11635:11640] CHIP:DMG: { - [1657451191.599647][11635:11640] CHIP:DMG: SubscriptionId = 0x22d38d78, - [1657451191.599674][11635:11640] CHIP:DMG: MaxInterval = 0x12c, - [1657451191.599700][11635:11640] CHIP:DMG: InteractionModelRevision = 1 - [1657451191.599723][11635:11640] CHIP:DMG: } - [1657451191.599751][11635:11640] CHIP:DMG: Subscription established with SubscriptionID = 0x22d38d78 MinInterval = 10s MaxInterval = 300s Peer = 01:0000000000000001 + - label: + "Step 12: TH sends a subscription request to the DUT with both + AttributeRequests and EventRequests as empty" + verification: | + Please send the following command from TH (the subscription requester) to DUT (the device under test) to activate the subscription with both AttributeRequests and EventRequests as empty + + any subscribe-none 10 100 1 --keepSubscriptions 1 + + On TH (chip-tool), verify that the DUT sends an error message, confirming that the subscription is not established successfully + [1690884829.708780][84191:84193] CHIP:EM: Rxd Ack; Removing MessageCounter:136461510 from Retrans Table on exchange 23099i + [1690884829.708861][84191:84193] CHIP:DMG: StatusResponseMessage = + [1690884829.708907][84191:84193] CHIP:DMG: { + [1690884829.708947][84191:84193] CHIP:DMG: Status = 0x80 (INVALID_ACTION), + [1690884829.708988][84191:84193] CHIP:DMG: InteractionModelRevision = 1 + [1690884829.709026][84191:84193] CHIP:DMG: } + [1690884829.709064][84191:84193] CHIP:IM: Received status response, status is 0x80 (INVALID_ACTION) + [1690884829.709196][84191:84193] CHIP:EM: <<< [E:23099i S:5058 M:136461511 (Ack:90075666)] (S) Msg TX to 1:0000000000000001 [EAE3] --- Type 0001:01 (IM:StatusResponse) + [1690884829.709252][84191:84193] CHIP:IN: (S) Sending msg 136461511 on secure session with LSID: 5058 + [1690884829.709420][84191:84193] CHIP:DMG: MoveToState ReadClient[0xffff9c005e90]: Moving to [ Idle] disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml index 393c01c3bb8db2..b0e91d442a3898 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 3.4.3. [TC-IDM-4.3] Report Data Messages post Subscription Activation from - DUT Test Cases. [{DUT_Server}] + 32.4.3. [TC-IDM-4.3] Report Data Messages post Subscription Activation from + DUT Test Cases. [DUT as Server] PICS: - MCORE.IDM.S @@ -26,17 +26,62 @@ config: endpoint: 0 tests: - - label: "Note" + - label: "Notes/Testing Considerations" + verification: | + 1. The Cluster and Commands should be based on the cluster implementation on the DUT. + 2. The cluster used in the below test steps is an example, User can use any supported chip cluster/attribute/command. + disabled: true + + - label: "Pre condition" verification: | Please use Interactive mode to Verify subscription test cases - Here the command to enter interactive mode:-- ./chip-tool interactive start + Here the command to enter interactive mode:-- ./chip-tool interactive start + disabled: true + + - label: "Step 1a: DUT and TH activate the subscription." + verification: | + Activate the Subscription between DUT and TH by sending below mentioned command + + onoff subscribe on-off 10 100 1 1 --keepSubscriptions true + + on TH(chip-tool), + 1. Verify Report Data Message Received: + On the target hardware (TH), check if a report data message is received. + + 2. Verify Subscribe Response Fields: + In the received report data message, examine the Subscribe Response to ensure it contains the following fields: + SubscriptionId + MaxInterval + + [1690479841.107906][5694:5696] CHIP:DMG: + [1690479841.107911][5694:5696] CHIP:DMG: ], + [1690479841.107923][5694:5696] CHIP:DMG: + [1690479841.107930][5694:5696] CHIP:DMG: InteractionModelRevision = 1 + [1690479841.107936][5694:5696] CHIP:DMG: } + [1690479841.107987][5694:5696] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 2332229409 + [1690479841.107999][5694:5696] CHIP:TOO: OnOff: FALSE + [1690479841.108015][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd848013240]: Moving to [AwaitingSu] + [1690479841.108061][5694:5696] CHIP:EM: <<< [E:36541i S:55497 M:232793692 (Ack:16536722)] (S) Msg TX to 1:0000000000000001 [3C19] --- Type 0001:01 (IM:StatusResponse) + [1690479841.108075][5694:5696] CHIP:IN: (S) Sending msg 232793692 on secure session with LSID: 55497 + [1690479841.108621][5694:5696] CHIP:EM: >>> [E:36541i S:55497 M:16536723 (Ack:232793692)] (S) Msg RX from 1:0000000000000001 [3C19] --- Type 0001:04 (IM:SubscribeResponse) + [1690479841.108645][5694:5696] CHIP:EM: Found matching exchange: 36541i, Delegate: 0x7fd848013250 + [1690479841.108659][5694:5696] CHIP:EM: Rxd Ack; Removing MessageCounter:232793692 from Retrans Table on exchange 36541i + [1690479841.108673][5694:5696] CHIP:DMG: SubscribeResponse is received + [1690479841.108689][5694:5696] CHIP:DMG: SubscribeResponseMessage = + [1690479841.108697][5694:5696] CHIP:DMG: { + [1690479841.108704][5694:5696] CHIP:DMG: SubscriptionId = 0x5503a5a, + [1690479841.108711][5694:5696] CHIP:DMG: MaxInterval = 0x64, + [1690479841.108718][5694:5696] CHIP:DMG: InteractionModelRevision = 1 + [1690479841.108723][5694:5696] CHIP:DMG: } + [1690479841.108732][5694:5696] CHIP:DMG: Subscription established with SubscriptionID = 0x05503a5a MinInterval = 10s MaxInterval = 100s Peer = 01:0000000000000001 + [1690479841.108743][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd848013240]: Moving to [Subscripti] disabled: true - label: - "Step 1: DUT and TH activate the subscription. Change the value of the - attribute which has been subscribed on the DUT by manually changing - some settings on the device. Example: Temperature sensor may update - the value of the room temperature. Turning on/off on a light bulb." + "Step 1b: Change the value of the attribute which has been subscribed + on the DUT by manually changing some settings on the device. Example: + Temperature sensor may update the value of the room temperature. + Turning on/off on a light bulb." verification: | DUT dependency test step is execpting to Change the value of the attribute which has been subscribed on the DUT by manually changing some settings on the device. @@ -49,6 +94,8 @@ tests: attribute which has been subscribed on the DUT by sending an IMWrite or Invoke message to the DUT from the TH. +" verification: | + Activate the Subscription between DUT and TH by sending below mentioned command + onoff subscribe start-up-on-off 30 100 1 1 --keepSubscriptions true on TH(chip-tool), verify that DUT is responds right attribute value for above command @@ -120,9 +167,11 @@ tests: disabled: true - label: - "Step 3: DUT and TH activate the subscription for an attribute. Dont + "Step 3: DUT and TH activate the subscription for an attribute. Do not change the value of the attribute which has been subscribed." verification: | + Activate the Subscription between DUT and TH by sending below mentioned command + onoff subscribe on-off 10 200 1 1 --keepSubscriptions true on TH(chip-tool) verify that DUT is responds right attribute value for above command @@ -172,7 +221,7 @@ tests: - label: "Step 4: DUT and TH activate the subscription. Change the value of the attribute which has been subscribed on the DUT. TH force sends a - status response with an 'inactive subscription'. Change the value of + status response with an 'invalid subscription'. Change the value of the attribute which has been subscribed on the DUT." verification: | Out of scope @@ -182,7 +231,7 @@ tests: "Step 5: Activate the subscription between the DUT and the TH for an attribute of data type bool. Modify that attribute on the DUT. DUT should send the report data with the modified attribute value. Modify - the attribute multiple times (3 times) before the max interval time + the attribute multiple times (3 times) before the MaxInterval time specified during the subscription activation." PICS: MCORE.IDM.S.Attribute.DataType_Bool verification: | @@ -265,7 +314,7 @@ tests: "Step 6: Activate the subscription between the DUT and the TH for an attribute of data type string. Modify that attribute on the DUT. DUT should send the report data with the modified attribute value Modify - the attribute multiple times (3 times) before the max interval time + the attribute multiple times (3 times) before the MaxInterval time specified during the subscription activation." PICS: MCORE.IDM.S.Attribute.DataType_String verification: | @@ -347,8 +396,8 @@ tests: "Step 7: Activate the subscription between the DUT and the TH for an attribute of data type 'unsigned integer'. Modify that attribute on the DUT. DUT should send the report data with the modified attribute - value. Modify the attribute multiple times (3 times) before the max - interval time specified during the subscription activation." + value. Modify the attribute multiple times (3 times) before the + MaxInterval time specified during the subscription activation." PICS: MCORE.IDM.S.Attribute.DataType_UnsignedInteger verification: | any subscribe-by-id 0x0008 0x0010 10 100 1 1 --keepSubscriptions true @@ -430,8 +479,8 @@ tests: "Step 8: Activate the subscription between the DUT and the TH for an attribute of data type 'signed integer'. Modify that attribute on the DUT. DUT should send the report data with the modified attribute - value. Modify the attribute multiple times (3 times)before the max - interval time specified during the subscription activation." + value. Modify the attribute multiple times (3 times)before the + MaxInterval time specified during the subscription activation." PICS: MCORE.IDM.S.Attribute.DataType_SignedInteger verification: | Subscribe to an attribute of type signed integer to the Harness @@ -444,8 +493,8 @@ tests: "Step 9: Activate the subscription between the DUT and the TH for an attribute of data type 'floating point'. Modify that attribute on the DUT. DUT should send the report data with the modified attribute - value. Modify the attribute multiple times (3 times) before the max - interval time specified during the subscription activation." + value. Modify the attribute multiple times (3 times) before the + MaxInterval time specified during the subscription activation." PICS: MCORE.IDM.S.Attribute.DataType_FloatingPoint verification: | Subscribe to an attribute of type floating point to the Harness @@ -458,7 +507,7 @@ tests: "Step 10: Activate the subscription between the DUT and the TH for an attribute of data type list. Modify that attribute on the DUT. DUT should send the report data with the modified attribute value. Modify - the attribute multiple times (3 times) before the max interval time + the attribute multiple times (3 times) before the MaxInterval time specified during the subscription activation." PICS: MCORE.IDM.S.Attribute.DataType_List verification: | @@ -489,10 +538,10 @@ tests: - label: "Step 11: Activate the subscription between the DUT and the TH for any - attribute. KeepSubsriptions flag should be set to False After the + attribute. KeepSubscriptions flag should be set to False After the Maximum interval time is elapsed, TH should send another subscription request message with different parameters than before. - KeepSubsriptions flag should be set to False Change the value of the + KeepSubscriptions flag should be set to False Change the value of the attribute requested on the DUT." verification: | basicinformation subscribe local-config-disabled 10 100 1 0 --keepSubscriptions 0 diff --git a/src/app/tests/suites/certification/Test_TC_ILL_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_ILL_3_1_Simulated.yaml deleted file mode 100644 index 17e4c8b93399e4..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_ILL_3_1_Simulated.yaml +++ /dev/null @@ -1,240 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 69.3.1. [TC-ILL-3.1] Attributes with client as DUT - -PICS: - - ILL.C - - ILL.C.AM-READ - - ILL.C.AO-READ - - ILL.C.AM-WRITE - - ILL.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Illuminance Measurement" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: MeasuredValue" - wait: "readAttribute" - attribute: "MeasuredValue" - - - label: "Read attribute: MinMeasuredValue" - wait: "readAttribute" - attribute: "MinMeasuredValue" - - - label: "Read attribute: MaxMeasuredValue" - wait: "readAttribute" - attribute: "MaxMeasuredValue" - - - label: "Read attribute: Tolerance" - wait: "readAttribute" - attribute: "Tolerance" - - - label: "Read attribute: LightSensorType" - wait: "readAttribute" - attribute: "LightSensorType" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool illuminancemeasurement read attribute-list 1 1 - - Verify DUT receives AttributeList response on the TH(all-clusters-minimal-app) Log: - - Received Read request - [1663070306.262953][4422:4422] CHIP:DMG: ReadRequestMessage = - [1663070281.411639][4422:4422] CHIP:DMG: { - [1663070281.411663][4422:4422] CHIP:DMG: AttributePathIBs = - [1663070281.411698][4422:4422] CHIP:DMG: [ - [1663070281.411724][4422:4422] CHIP:DMG: AttributePathIB = - [1663070281.411757][4422:4422] CHIP:DMG: { - [1663070281.411794][4422:4422] CHIP:DMG: Endpoint = 0x1, - [1663070281.411830][4422:4422] CHIP:DMG: Cluster = 0x400, - [1663070281.411865][4422:4422] CHIP:DMG: Attribute = 0x0000_FFFB, - [1663070281.411898][4422:4422] CHIP:DMG: } - [1663070281.411930][4422:4422] CHIP:DMG: - [1663070281.411962][4422:4422] CHIP:DMG: ], - [1663070281.411992][4422:4422] CHIP:DMG: - [1663070281.412021][4422:4422] CHIP:DMG: isFabricFiltered = true, - [1663070281.412051][4422:4422] CHIP:DMG: InteractionModelRevision = 1 - [1663070281.412078][4422:4422] CHIP:DMG: }, - [1663070281.412158][4422:4422] CHIP:DMG: IM RH moving to [GeneratingReports] - [1663070281.412262][4422:4422] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1663070281.412293][4422:4422] CHIP:DMG: Cluster 400, Attribute fffb is dirty - [1663070281.412317][4422:4422] CHIP:DMG: Reading attribute: Cluster=0x0000_0400 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) - [1663070281.412345][4422:4422] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0400 e=1 p=v - - - ./chip-tool illuminancemeasurement read feature-map 1 1 - - Verify DUT receives FeatureMap attribute response on the TH(all-clusters-minimal-app) Log: - - Received Read request - [1663070306.262953][4422:4422] CHIP:DMG: ReadRequestMessage = - [1663070306.262953][4422:4422] CHIP:DMG: ReadRequestMessage = - [1663070306.262984][4422:4422] CHIP:DMG: { - [1663070306.263008][4422:4422] CHIP:DMG: AttributePathIBs = - [1663070306.263041][4422:4422] CHIP:DMG: [ - [1663070306.263067][4422:4422] CHIP:DMG: AttributePathIB = - [1663070306.263103][4422:4422] CHIP:DMG: { - [1663070306.263140][4422:4422] CHIP:DMG: Endpoint = 0x1, - [1663070306.263175][4422:4422] CHIP:DMG: Cluster = 0x400, - [1663070306.263212][4422:4422] CHIP:DMG: Attribute = 0x0000_FFFC, - [1663070306.263244][4422:4422] CHIP:DMG: } - [1663070306.263277][4422:4422] CHIP:DMG: - [1663070306.263307][4422:4422] CHIP:DMG: ], - [1663070306.263339][4422:4422] CHIP:DMG: - [1663070306.263370][4422:4422] CHIP:DMG: isFabricFiltered = true, - [1663070306.263399][4422:4422] CHIP:DMG: InteractionModelRevision = 1 - [1663070306.263426][4422:4422] CHIP:DMG: }, - [1663070306.263508][4422:4422] CHIP:DMG: IM RH moving to [GeneratingReports] - [1663070306.263608][4422:4422] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1663070306.263640][4422:4422] CHIP:DMG: Cluster 400, Attribute fffc is dirty - [1663070306.263663][4422:4422] CHIP:DMG: Reading attribute: Cluster=0x0000_0400 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - [1663070306.263695][4422:4422] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0400 e=1 p=v - - - - - ./chip-tool illuminancemeasurement read min-measured-value 1 1 - - Verify DUT receives min-measured-value attribute response on the TH(all-clusters-minimal-app) Log: - - [1658142106.966504][13946:13946] CHIP:IM: Received Read request - [1658142106.966671][13946:13946] CHIP:DMG: ReadRequestMessage = - [1658142106.966738][13946:13946] CHIP:DMG: { - [1658142106.966821][13946:13946] CHIP:DMG: AttributePathIBs = - [1658142106.966887][13946:13946] CHIP:DMG: [ - [1658142106.966947][13946:13946] CHIP:DMG: AttributePathIB = - [1658142106.967035][13946:13946] CHIP:DMG: { - [1658142106.967105][13946:13946] CHIP:DMG: Endpoint = 0x1, - [1658142106.967209][13946:13946] CHIP:DMG: Cluster = 0x400, - [1658142106.967254][13946:13946] CHIP:DMG: Attribute = 0x0000_0001, - [1658142106.967281][13946:13946] CHIP:DMG: } - [1658142106.967320][13946:13946] CHIP:DMG: - [1658142106.967346][13946:13946] CHIP:DMG: ], - [1658142106.967384][13946:13946] CHIP:DMG: - [1658142106.967413][13946:13946] CHIP:DMG: isFabricFiltered = true, - [1658142106.967447][13946:13946] CHIP:DMG: InteractionModelRevision = 1 - [1658142106.967471][13946:13946] CHIP:DMG: }, - [1658142106.967568][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] - [1658142106.967676][13946:13946] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - - - ./chip-tool illuminancemeasurement read max-measured-value 1 1 - - Verify DUT receives max-measured-value attribute response on the TH(all-clusters-minimal-app) Log: - [1658142397.298817][13946:13946] CHIP:IM: Received Read request - [1658142397.298895][13946:13946] CHIP:DMG: ReadRequestMessage = - [1658142397.298932][13946:13946] CHIP:DMG: { - [1658142397.298960][13946:13946] CHIP:DMG: AttributePathIBs = - [1658142397.298986][13946:13946] CHIP:DMG: [ - [1658142397.299020][13946:13946] CHIP:DMG: AttributePathIB = - [1658142397.299047][13946:13946] CHIP:DMG: { - [1658142397.299085][13946:13946] CHIP:DMG: Endpoint = 0x1, - [1658142397.299125][13946:13946] CHIP:DMG: Cluster = 0x400, - [1658142397.299158][13946:13946] CHIP:DMG: Attribute = 0x0000_0002, - [1658142397.299195][13946:13946] CHIP:DMG: } - [1658142397.299223][13946:13946] CHIP:DMG: - [1658142397.299258][13946:13946] CHIP:DMG: ], - [1658142397.299286][13946:13946] CHIP:DMG: - [1658142397.299321][13946:13946] CHIP:DMG: isFabricFiltered = true, - [1658142397.299346][13946:13946] CHIP:DMG: InteractionModelRevision = 1 - [1658142397.299378][13946:13946] CHIP:DMG: }, - [1658142397.299462][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] - [1658142397.299556][13946:13946] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - - - ./chip-tool illuminancemeasurement read measured-value 1 1 - - Verify DUT receives measured-value attribute response on the TH(all-clusters-minimal-app) Log: - - [1658142471.266188][13946:13946] CHIP:IM: Received Read request - [1658142471.266273][13946:13946] CHIP:DMG: ReadRequestMessage = - [1658142471.266303][13946:13946] CHIP:DMG: { - [1658142471.266329][13946:13946] CHIP:DMG: AttributePathIBs = - [1658142471.266358][13946:13946] CHIP:DMG: [ - [1658142471.266386][13946:13946] CHIP:DMG: AttributePathIB = - [1658142471.266417][13946:13946] CHIP:DMG: { - [1658142471.266449][13946:13946] CHIP:DMG: Endpoint = 0x1, - [1658142471.266486][13946:13946] CHIP:DMG: Cluster = 0x400, - [1658142471.266521][13946:13946] CHIP:DMG: Attribute = 0x0000_0000, - [1658142471.266558][13946:13946] CHIP:DMG: } - [1658142471.266593][13946:13946] CHIP:DMG: - [1658142471.266624][13946:13946] CHIP:DMG: ], - [1658142471.266656][13946:13946] CHIP:DMG: - [1658142471.266686][13946:13946] CHIP:DMG: isFabricFiltered = true, - [1658142471.266714][13946:13946] CHIP:DMG: InteractionModelRevision = 1 - [1658142471.266740][13946:13946] CHIP:DMG: }, - [1658142471.266826][13946:13946] CHIP:DMG: IM RH moving to [GeneratingReports] - [1658142471.266939][13946:13946] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool illuminancemeasurement read tolerance 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool illuminancemeasurement read light-sensor-type 1 1 - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_I_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_I_3_1_Simulated.yaml deleted file mode 100644 index 408b2fbf46ae9d..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_I_3_1_Simulated.yaml +++ /dev/null @@ -1,527 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 59.3.1. [TC-I-3.1] Attributes with Client as DUT - -PICS: - - I.C - - I.C.AM-READ - - I.C.AO-READ - - I.C.AM-WRITE - - I.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Identify" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: IdentifyTime" - PICS: I.C.AM-READ - wait: "readAttribute" - attribute: "IdentifyTime" - - - label: "Read attribute: identifytype" - PICS: I.C.AM-READ - wait: "readAttribute" - attribute: "IdentifyType" - - - label: "write attribute: IdentifyTime" - PICS: I.C.AM-WRITE - wait: "writeAttribute" - attribute: "IdentifyTime" - arguments: - value: - - - label: "Readback attribute: IdentifyTime" - PICS: I.C.AM-READ - wait: "readAttribute" - attribute: "IdentifyTime" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool identify read feature-map 1 1 - - Verify none of the optional feature of the server-side of the cluster is listed on TH(all-clusters-minnimal-app) Log - - [1667198019.683786][11390:11390] CHIP:EM: Handling via exchange: 36421r, Delegate: 0xaaaaad555148 - [1667198019.683892][11390:11390] CHIP:IM: Received Read request - [1667198019.684067][11390:11390] CHIP:DMG: ReadRequestMessage = - [1667198019.684135][11390:11390] CHIP:DMG: { - [1667198019.684186][11390:11390] CHIP:DMG: AttributePathIBs = - [1667198019.684252][11390:11390] CHIP:DMG: [ - [1667198019.684313][11390:11390] CHIP:DMG: AttributePathIB = - [1667198019.684383][11390:11390] CHIP:DMG: { - [1667198019.684453][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198019.684537][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198019.684611][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFC, - [1667198019.684695][11390:11390] CHIP:DMG: } - [1667198019.684767][11390:11390] CHIP:DMG: - [1667198019.684826][11390:11390] CHIP:DMG: ], - [1667198019.684896][11390:11390] CHIP:DMG: - [1667198019.684962][11390:11390] CHIP:DMG: isFabricFiltered = true, - [1667198019.685032][11390:11390] CHIP:DMG: InteractionModelRevision = 1 - [1667198019.685092][11390:11390] CHIP:DMG: }, - [1667198019.685252][11390:11390] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667198019.685482][11390:11390] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667198019.685556][11390:11390] CHIP:DMG: Cluster 3, Attribute fffc is dirty - [1667198019.685625][11390:11390] CHIP:DMG: Reading attribute: Cluster=0x0000_0003 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - [1667198019.685693][11390:11390] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=v - [1667198019.685770][11390:11390] CHIP:DMG: AccessControl: allowed - [1667198019.685889][11390:11390] CHIP:DMG: Sending report (payload has 37 bytes)... - [1667198019.686450][11390:11390] CHIP:EM: <<< [E:36421r M:134293096 (Ack:90102725)] (S) Msg TX to 1:000000000001B669 [CA2D] --- Type 0001:05 (IM:ReportData) - [1667198019.686596][11390:11390] CHIP:IN: (S) Sending msg 134293096 on secure session with LSID: 13942 - [1667198019.687274][11390:11390] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:34895 | 134293096 | [Interaction Model (1) / Report Data (0x05) / Session = 39691 / Exchange = 36421] - [1667198019.687369][11390:11390] CHIP:DMG: Header Flags = - [1667198019.687425][11390:11390] CHIP:DMG: { - [1667198019.687511][11390:11390] CHIP:DMG: Exchange (0x06) = - [1667198019.687567][11390:11390] CHIP:DMG: { - [1667198019.687627][11390:11390] CHIP:DMG: AckMsg = 90102725 - [1667198019.687685][11390:11390] CHIP:DMG: NeedsAck = true - [1667198019.687738][11390:11390] CHIP:DMG: } - [1667198019.687809][11390:11390] CHIP:DMG: } - [1667198019.687860][11390:11390] CHIP:DMG: - [1667198019.687923][11390:11390] CHIP:DMG: Encrypted Payload (71 bytes) = - [1667198019.687979][11390:11390] CHIP:DMG: { - [1667198019.688033][11390:11390] CHIP:DMG: data = 000b9b00682601088051c3accb764025501e3a98907ee49fde00fb52eb4376fe15e852d2a6496f2f1e303426d75480b16676e4703eef4fa5faeafdd8cbbe06a5b89a6ed3bb5380 - [1667198019.688086][11390:11390] CHIP:DMG: buffer_ptr = 187650200610416 - [1667198019.688139][11390:11390] CHIP:DMG: } - [1667198019.688190][11390:11390] CHIP:DMG: - [1667198019.688266][11390:11390] CHIP:DMG: Decrypted Payload (37 bytes) = - [1667198019.688323][11390:11390] CHIP:DMG: { - [1667198019.688371][11390:11390] CHIP:DMG: data = 1536011535012600810a313837012402012403032504fcff18240200181818290424ff0118 - [1667198019.688426][11390:11390] CHIP:DMG: } - [1667198019.688484][11390:11390] CHIP:DMG: - [1667198019.688635][11390:11390] CHIP:DMG: ReportDataMessage = - [1667198019.688702][11390:11390] CHIP:DMG: { - [1667198019.688756][11390:11390] CHIP:DMG: AttributeReportIBs = - [1667198019.688833][11390:11390] CHIP:DMG: [ - [1667198019.688891][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198019.688971][11390:11390] CHIP:DMG: { - [1667198019.689038][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198019.689104][11390:11390] CHIP:DMG: { - [1667198019.689187][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198019.689278][11390:11390] CHIP:DMG: AttributePathIB = - [1667198019.689364][11390:11390] CHIP:DMG: { - [1667198019.689444][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198019.689543][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198019.689645][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFC, - [1667198019.689741][11390:11390] CHIP:DMG: } - [1667198019.689839][11390:11390] CHIP:DMG: - [1667198019.689936][11390:11390] CHIP:DMG: Data = 0, - [1667198019.690003][11390:11390] CHIP:DMG: }, - [1667198019.690087][11390:11390] CHIP:DMG: - [1667198019.690159][11390:11390] CHIP:DMG: }, - - ./chip-tool identify read attribute-list 1 1 - - Verify none of the optional attribute of the server-side of the cluster is listed on TH(all-clusters-minnimal-app) Log - - [1667198224.933982][11390:11390] CHIP:EM: Handling via exchange: 27925r, Delegate: 0xaaaaad555148 - [1667198224.934084][11390:11390] CHIP:IM: Received Read request - [1667198224.934251][11390:11390] CHIP:DMG: ReadRequestMessage = - [1667198224.934318][11390:11390] CHIP:DMG: { - [1667198224.934373][11390:11390] CHIP:DMG: AttributePathIBs = - [1667198224.934439][11390:11390] CHIP:DMG: [ - [1667198224.934546][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.934627][11390:11390] CHIP:DMG: { - [1667198224.934699][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.934793][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.934877][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.934954][11390:11390] CHIP:DMG: } - [1667198224.935024][11390:11390] CHIP:DMG: - [1667198224.935089][11390:11390] CHIP:DMG: ], - [1667198224.935161][11390:11390] CHIP:DMG: - [1667198224.935221][11390:11390] CHIP:DMG: isFabricFiltered = true, - [1667198224.935286][11390:11390] CHIP:DMG: InteractionModelRevision = 1 - [1667198224.935347][11390:11390] CHIP:DMG: }, - [1667198224.935508][11390:11390] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667198224.935740][11390:11390] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667198224.935813][11390:11390] CHIP:DMG: Cluster 3, Attribute fffb is dirty - [1667198224.935870][11390:11390] CHIP:DMG: Reading attribute: Cluster=0x0000_0003 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) - [1667198224.935933][11390:11390] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=v - [1667198224.936010][11390:11390] CHIP:DMG: AccessControl: allowed - [1667198224.936182][11390:11390] CHIP:DMG: Sending report (payload has 245 bytes)... - [1667198224.936812][11390:11390] CHIP:EM: <<< [E:27925r M:151663564 (Ack:200483580)] (S) Msg TX to 1:000000000001B669 [CA2D] --- Type 0001:05 (IM:ReportData) - [1667198224.936917][11390:11390] CHIP:IN: (S) Sending msg 151663564 on secure session with LSID: 13943 - [1667198224.937653][11390:11390] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:59621 | 151663564 | [Interaction Model (1) / Report Data (0x05) / Session = 56997 / Exchange = 27925] - [1667198224.937751][11390:11390] CHIP:DMG: Header Flags = - [1667198224.937807][11390:11390] CHIP:DMG: { - [1667198224.937893][11390:11390] CHIP:DMG: Exchange (0x06) = - [1667198224.937950][11390:11390] CHIP:DMG: { - [1667198224.938010][11390:11390] CHIP:DMG: AckMsg = 200483580 - [1667198224.938065][11390:11390] CHIP:DMG: NeedsAck = true - [1667198224.938118][11390:11390] CHIP:DMG: } - [1667198224.938190][11390:11390] CHIP:DMG: } - [1667198224.938245][11390:11390] CHIP:DMG: - [1667198224.938314][11390:11390] CHIP:DMG: Encrypted Payload (279 bytes) = - [1667198224.938371][11390:11390] CHIP:DMG: { - [1667198224.938426][11390:11390] CHIP:DMG: data = 00a5de00cc330a0959e5cf9c38a602566830c8a854f61a764c38778932202dbd2459c7421e99d13982ea64c4e9bb13abe2b6498a67680727ab75ab029010bfd8fe9c1d4d4eac5573df7aca513dbb5727f27e9be48c11180cc3fb57985e446e60fca1454f3438ae974d7674570e60b9a7dbcd99d49a18ae607bbf2ee937d164399a5c1104322d44e8e48adf1fe35fee2a415705c74244709303c1373991d1f116ce5b3d7c9e0c03770c460fa43681d72ae6460cf825f333984a4d749f723e0c962ce57c2ad29c4abfa75c2fa89c59c8ef37843738fbb8dd7eab026ed10e790cc57558baa64c36994e7d06d27e6a43d324923dcb03f95e2f2e35a81a49cbef0afd9c3cc14ff156c3c6c0bea876ad4f3b3dad37d591f25cf0 - [1667198224.938547][11390:11390] CHIP:DMG: buffer_ptr = 187650200610672 - [1667198224.938609][11390:11390] CHIP:DMG: } - [1667198224.938661][11390:11390] CHIP:DMG: - [1667198224.938740][11390:11390] CHIP:DMG: Decrypted Payload (245 bytes) = - [1667198224.938794][11390:11390] CHIP:DMG: { - [1667198224.938848][11390:11390] CHIP:DMG: data = 1536011535012600810a313837012402012403032504fbff1836021818181535012600810a313837012402012403032504fbff34051824020018181535012600810a313837012402012403032504fbff34051824020118181535012600810a313837012402012403032504fbff3405182502f8ff18181535012600810a313837012402012403032504fbff3405182502f9ff18181535012600810a313837012402012403032504fbff3405182502fbff18181535012600810a313837012402012403032504fbff3405182502fcff18181535012600810a313837012402012403032504fbff3405182502fdff181818290424ff0118 - [1667198224.938912][11390:11390] CHIP:DMG: } - [1667198224.938963][11390:11390] CHIP:DMG: - [1667198224.939380][11390:11390] CHIP:DMG: ReportDataMessage = - [1667198224.939446][11390:11390] CHIP:DMG: { - [1667198224.939500][11390:11390] CHIP:DMG: AttributeReportIBs = - [1667198224.939585][11390:11390] CHIP:DMG: [ - [1667198224.939647][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.939745][11390:11390] CHIP:DMG: { - [1667198224.939817][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.939897][11390:11390] CHIP:DMG: { - [1667198224.939988][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.940059][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.940154][11390:11390] CHIP:DMG: { - [1667198224.940250][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.940327][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.940426][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.940521][11390:11390] CHIP:DMG: } - [1667198224.940603][11390:11390] CHIP:DMG: - [1667198224.940686][11390:11390] CHIP:DMG: Data = [ - [1667198224.940779][11390:11390] CHIP:DMG: - [1667198224.940855][11390:11390] CHIP:DMG: ], - [1667198224.940943][11390:11390] CHIP:DMG: }, - [1667198224.941038][11390:11390] CHIP:DMG: - [1667198224.941108][11390:11390] CHIP:DMG: }, - [1667198224.941204][11390:11390] CHIP:DMG: - [1667198224.941273][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.941353][11390:11390] CHIP:DMG: { - [1667198224.941425][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.941493][11390:11390] CHIP:DMG: { - [1667198224.941583][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.941672][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.941764][11390:11390] CHIP:DMG: { - [1667198224.941858][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.941954][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.942032][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.942118][11390:11390] CHIP:DMG: ListIndex = Null, - [1667198224.942212][11390:11390] CHIP:DMG: } - [1667198224.942310][11390:11390] CHIP:DMG: - [1667198224.942408][11390:11390] CHIP:DMG: Data = 0, - [1667198224.942519][11390:11390] CHIP:DMG: }, - [1667198224.942595][11390:11390] CHIP:DMG: - [1667198224.942658][11390:11390] CHIP:DMG: }, - [1667198224.942746][11390:11390] CHIP:DMG: - [1667198224.942808][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.942895][11390:11390] CHIP:DMG: { - [1667198224.942957][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.943034][11390:11390] CHIP:DMG: { - [1667198224.943125][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.943215][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.943306][11390:11390] CHIP:DMG: { - [1667198224.943382][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.943478][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.943580][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.943675][11390:11390] CHIP:DMG: ListIndex = Null, - [1667198224.943756][11390:11390] CHIP:DMG: } - [1667198224.943838][11390:11390] CHIP:DMG: - [1667198224.943919][11390:11390] CHIP:DMG: Data = 1, - [1667198224.944009][11390:11390] CHIP:DMG: }, - [1667198224.944089][11390:11390] CHIP:DMG: - [1667198224.944159][11390:11390] CHIP:DMG: }, - [1667198224.944248][11390:11390] CHIP:DMG: - [1667198224.944303][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.944382][11390:11390] CHIP:DMG: { - [1667198224.944447][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.944525][11390:11390] CHIP:DMG: { - [1667198224.944616][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.944706][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.944776][11390:11390] CHIP:DMG: { - [1667198224.944868][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.944968][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.945068][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.945165][11390:11390] CHIP:DMG: ListIndex = Null, - [1667198224.945247][11390:11390] CHIP:DMG: } - [1667198224.945328][11390:11390] CHIP:DMG: - [1667198224.945414][11390:11390] CHIP:DMG: Data = 65528, - [1667198224.945501][11390:11390] CHIP:DMG: }, - [1667198224.945586][11390:11390] CHIP:DMG: - [1667198224.945644][11390:11390] CHIP:DMG: }, - [1667198224.945732][11390:11390] CHIP:DMG: - [1667198224.945794][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.945875][11390:11390] CHIP:DMG: { - [1667198224.945940][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.946011][11390:11390] CHIP:DMG: { - [1667198224.946091][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.946183][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.946266][11390:11390] CHIP:DMG: { - [1667198224.946360][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.946580][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.946689][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.946777][11390:11390] CHIP:DMG: ListIndex = Null, - [1667198224.946856][11390:11390] CHIP:DMG: } - [1667198224.946940][11390:11390] CHIP:DMG: - [1667198224.947019][11390:11390] CHIP:DMG: Data = 65529, - [1667198224.947091][11390:11390] CHIP:DMG: }, - [1667198224.947172][11390:11390] CHIP:DMG: - [1667198224.947233][11390:11390] CHIP:DMG: }, - [1667198224.947324][11390:11390] CHIP:DMG: - [1667198224.947386][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.947467][11390:11390] CHIP:DMG: { - [1667198224.947534][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.947606][11390:11390] CHIP:DMG: { - [1667198224.947680][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.947752][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.947828][11390:11390] CHIP:DMG: { - [1667198224.947902][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.947987][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.948073][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.948153][11390:11390] CHIP:DMG: ListIndex = Null, - [1667198224.948233][11390:11390] CHIP:DMG: } - [1667198224.948317][11390:11390] CHIP:DMG: - [1667198224.948399][11390:11390] CHIP:DMG: Data = 65531, - [1667198224.948473][11390:11390] CHIP:DMG: }, - [1667198224.948549][11390:11390] CHIP:DMG: - [1667198224.948614][11390:11390] CHIP:DMG: }, - [1667198224.948699][11390:11390] CHIP:DMG: - [1667198224.948760][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.948841][11390:11390] CHIP:DMG: { - [1667198224.948902][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.948973][11390:11390] CHIP:DMG: { - [1667198224.949042][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.949118][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.949196][11390:11390] CHIP:DMG: { - [1667198224.949274][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.949359][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.949444][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.949526][11390:11390] CHIP:DMG: ListIndex = Null, - [1667198224.949606][11390:11390] CHIP:DMG: } - [1667198224.949685][11390:11390] CHIP:DMG: - [1667198224.949765][11390:11390] CHIP:DMG: Data = 65532, - [1667198224.949841][11390:11390] CHIP:DMG: }, - [1667198224.949915][11390:11390] CHIP:DMG: - [1667198224.949981][11390:11390] CHIP:DMG: }, - [1667198224.950072][11390:11390] CHIP:DMG: - [1667198224.950133][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198224.950214][11390:11390] CHIP:DMG: { - [1667198224.950274][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198224.950346][11390:11390] CHIP:DMG: { - [1667198224.950420][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198224.950536][11390:11390] CHIP:DMG: AttributePathIB = - [1667198224.950625][11390:11390] CHIP:DMG: { - [1667198224.950715][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198224.950805][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198224.950890][11390:11390] CHIP:DMG: Attribute = 0x0000_FFFB, - [1667198224.950978][11390:11390] CHIP:DMG: ListIndex = Null, - [1667198224.951062][11390:11390] CHIP:DMG: } - [1667198224.951145][11390:11390] CHIP:DMG: - [1667198224.951231][11390:11390] CHIP:DMG: Data = 65533, - [1667198224.951310][11390:11390] CHIP:DMG: }, - [1667198224.951385][11390:11390] CHIP:DMG: - [1667198224.951455][11390:11390] CHIP:DMG: }, - [1667198224.951534][11390:11390] CHIP:DMG: - - - ./chip-tool identify read identify-time 1 1 - - Verify DUT receives identify-time attribute response on theTH(all-clusters-minimal-app) - - [1667198339.074575][11390:11390] CHIP:EM: Handling via exchange: 6451r, Delegate: 0xaaaaad555148 - [1667198339.074679][11390:11390] CHIP:IM: Received Read request - [1667198339.074858][11390:11390] CHIP:DMG: ReadRequestMessage = - [1667198339.074925][11390:11390] CHIP:DMG: { - [1667198339.074984][11390:11390] CHIP:DMG: AttributePathIBs = - [1667198339.075050][11390:11390] CHIP:DMG: [ - [1667198339.075110][11390:11390] CHIP:DMG: AttributePathIB = - [1667198339.075186][11390:11390] CHIP:DMG: { - [1667198339.075265][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198339.075356][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198339.075447][11390:11390] CHIP:DMG: Attribute = 0x0000_0000, - [1667198339.075531][11390:11390] CHIP:DMG: } - [1667198339.075604][11390:11390] CHIP:DMG: - [1667198339.075671][11390:11390] CHIP:DMG: ], - [1667198339.075742][11390:11390] CHIP:DMG: - [1667198339.075809][11390:11390] CHIP:DMG: isFabricFiltered = true, - [1667198339.075875][11390:11390] CHIP:DMG: InteractionModelRevision = 1 - [1667198339.075934][11390:11390] CHIP:DMG: }, - [1667198339.076096][11390:11390] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667198339.076326][11390:11390] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667198339.076400][11390:11390] CHIP:DMG: Cluster 3, Attribute 0 is dirty - [1667198339.076456][11390:11390] CHIP:DMG: Reading attribute: Cluster=0x0000_0003 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1667198339.076522][11390:11390] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=v - [1667198339.076600][11390:11390] CHIP:DMG: AccessControl: allowed - [1667198339.076716][11390:11390] CHIP:DMG: Sending report (payload has 36 bytes)... - [1667198339.077270][11390:11390] CHIP:EM: <<< [E:6451r M:222156074 (Ack:7059472)] (S) Msg TX to 1:000000000001B669 [CA2D] --- Type 0001:05 (IM:ReportData) - [1667198339.077372][11390:11390] CHIP:IN: (S) Sending msg 222156074 on secure session with LSID: 13945 - [1667198339.078057][11390:11390] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:46790 | 222156074 | [Interaction Model (1) / Report Data (0x05) / Session = 2802 / Exchange = 6451] - [1667198339.078153][11390:11390] CHIP:DMG: Header Flags = - [1667198339.078211][11390:11390] CHIP:DMG: { - [1667198339.078298][11390:11390] CHIP:DMG: Exchange (0x06) = - [1667198339.078355][11390:11390] CHIP:DMG: { - [1667198339.078414][11390:11390] CHIP:DMG: AckMsg = 7059472 - [1667198339.078523][11390:11390] CHIP:DMG: NeedsAck = true - [1667198339.078581][11390:11390] CHIP:DMG: } - [1667198339.078654][11390:11390] CHIP:DMG: } - [1667198339.078703][11390:11390] CHIP:DMG: - [1667198339.078772][11390:11390] CHIP:DMG: Encrypted Payload (70 bytes) = - [1667198339.078828][11390:11390] CHIP:DMG: { - [1667198339.078882][11390:11390] CHIP:DMG: data = 00f20a002ad53d0dbfe9edb13d868a05c798791f5f8fdd9da1275c3e8b4a0e90d79afa29de34e027d2151f9b8eddefe41084248d0eb87df77fff3e74845f815637f1d35bdbf5 - [1667198339.078940][11390:11390] CHIP:DMG: buffer_ptr = 187650200611616 - [1667198339.078993][11390:11390] CHIP:DMG: } - [1667198339.079044][11390:11390] CHIP:DMG: - [1667198339.079118][11390:11390] CHIP:DMG: Decrypted Payload (36 bytes) = - [1667198339.079177][11390:11390] CHIP:DMG: { - [1667198339.079230][11390:11390] CHIP:DMG: data = 1536011535012600810a3138370124020124030324040018240200181818290424ff0118 - [1667198339.079286][11390:11390] CHIP:DMG: } - [1667198339.079337][11390:11390] CHIP:DMG: - [1667198339.079498][11390:11390] CHIP:DMG: ReportDataMessage = - [1667198339.079557][11390:11390] CHIP:DMG: { - [1667198339.079613][11390:11390] CHIP:DMG: AttributeReportIBs = - [1667198339.079699][11390:11390] CHIP:DMG: [ - [1667198339.079762][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198339.079843][11390:11390] CHIP:DMG: { - [1667198339.079916][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198339.080009][11390:11390] CHIP:DMG: { - [1667198339.080102][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198339.080193][11390:11390] CHIP:DMG: AttributePathIB = - [1667198339.080287][11390:11390] CHIP:DMG: { - [1667198339.080384][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198339.080467][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198339.080567][11390:11390] CHIP:DMG: Attribute = 0x0000_0000, - [1667198339.080648][11390:11390] CHIP:DMG: } - [1667198339.080752][11390:11390] CHIP:DMG: - [1667198339.080853][11390:11390] CHIP:DMG: Data = 0, - [1667198339.080927][11390:11390] CHIP:DMG: }, - [1667198339.081022][11390:11390] CHIP:DMG: - [1667198339.081103][11390:11390] CHIP:DMG: }, - - - - ./chip-tool identify read identify-type 1 1 - - Verify DUT receives identify-type attribute response on theTH(all-clusters-minimal-app) - - [1667198289.735862][11390:11390] CHIP:EM: Handling via exchange: 64741r, Delegate: 0xaaaaad555148 - [1667198289.735963][11390:11390] CHIP:IM: Received Read request - [1667198289.736138][11390:11390] CHIP:DMG: ReadRequestMessage = - [1667198289.736198][11390:11390] CHIP:DMG: { - [1667198289.736254][11390:11390] CHIP:DMG: AttributePathIBs = - [1667198289.736320][11390:11390] CHIP:DMG: [ - [1667198289.736375][11390:11390] CHIP:DMG: AttributePathIB = - [1667198289.736452][11390:11390] CHIP:DMG: { - [1667198289.736528][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198289.736602][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198289.736682][11390:11390] CHIP:DMG: Attribute = 0x0000_0001, - [1667198289.736754][11390:11390] CHIP:DMG: } - [1667198289.736827][11390:11390] CHIP:DMG: - [1667198289.736899][11390:11390] CHIP:DMG: ], - [1667198289.736964][11390:11390] CHIP:DMG: - [1667198289.737029][11390:11390] CHIP:DMG: isFabricFiltered = true, - [1667198289.737095][11390:11390] CHIP:DMG: InteractionModelRevision = 1 - [1667198289.737155][11390:11390] CHIP:DMG: }, - [1667198289.737319][11390:11390] CHIP:DMG: IM RH moving to [GeneratingReports] - [1667198289.737548][11390:11390] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1667198289.737622][11390:11390] CHIP:DMG: Cluster 3, Attribute 1 is dirty - [1667198289.737678][11390:11390] CHIP:DMG: Reading attribute: Cluster=0x0000_0003 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) - [1667198289.737744][11390:11390] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=v - [1667198289.737815][11390:11390] CHIP:DMG: AccessControl: allowed - [1667198289.737932][11390:11390] CHIP:DMG: Sending report (payload has 36 bytes)... - [1667198289.738541][11390:11390] CHIP:EM: <<< [E:64741r M:69392004 (Ack:178331771)] (S) Msg TX to 1:000000000001B669 [CA2D] --- Type 0001:05 (IM:ReportData) - [1667198289.738642][11390:11390] CHIP:IN: (S) Sending msg 69392004 on secure session with LSID: 13944 - [1667198289.739330][11390:11390] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:42392 | 69392004 | [Interaction Model (1) / Report Data (0x05) / Session = 32014 / Exchange = 64741] - [1667198289.739426][11390:11390] CHIP:DMG: Header Flags = - [1667198289.739484][11390:11390] CHIP:DMG: { - [1667198289.739569][11390:11390] CHIP:DMG: Exchange (0x06) = - [1667198289.739626][11390:11390] CHIP:DMG: { - [1667198289.739683][11390:11390] CHIP:DMG: AckMsg = 178331771 - [1667198289.739739][11390:11390] CHIP:DMG: NeedsAck = true - [1667198289.739793][11390:11390] CHIP:DMG: } - [1667198289.739864][11390:11390] CHIP:DMG: } - [1667198289.739913][11390:11390] CHIP:DMG: - [1667198289.739975][11390:11390] CHIP:DMG: Encrypted Payload (70 bytes) = - [1667198289.740036][11390:11390] CHIP:DMG: { - [1667198289.740090][11390:11390] CHIP:DMG: data = 000e7d0084d62204cbd01ef8fb96fef21446fb254f4ff23fac8a52c2dd91613eab078272abd47216595fafa1d635d39acb95eb86803156e59f4b8355e1b58b60cee20904a1f2 - [1667198289.740142][11390:11390] CHIP:DMG: buffer_ptr = 187650200612528 - [1667198289.740194][11390:11390] CHIP:DMG: } - [1667198289.740245][11390:11390] CHIP:DMG: - [1667198289.740321][11390:11390] CHIP:DMG: Decrypted Payload (36 bytes) = - [1667198289.740379][11390:11390] CHIP:DMG: { - [1667198289.740431][11390:11390] CHIP:DMG: data = 1536011535012600810a3138370124020124030324040118240202181818290424ff0118 - [1667198289.740486][11390:11390] CHIP:DMG: } - [1667198289.740532][11390:11390] CHIP:DMG: - [1667198289.740692][11390:11390] CHIP:DMG: ReportDataMessage = - [1667198289.740749][11390:11390] CHIP:DMG: { - [1667198289.740794][11390:11390] CHIP:DMG: AttributeReportIBs = - [1667198289.740861][11390:11390] CHIP:DMG: [ - [1667198289.740913][11390:11390] CHIP:DMG: AttributeReportIB = - [1667198289.740984][11390:11390] CHIP:DMG: { - [1667198289.741055][11390:11390] CHIP:DMG: AttributeDataIB = - [1667198289.741135][11390:11390] CHIP:DMG: { - [1667198289.741217][11390:11390] CHIP:DMG: DataVersion = 0x38310a81, - [1667198289.741305][11390:11390] CHIP:DMG: AttributePathIB = - [1667198289.741389][11390:11390] CHIP:DMG: { - [1667198289.741484][11390:11390] CHIP:DMG: Endpoint = 0x1, - [1667198289.741588][11390:11390] CHIP:DMG: Cluster = 0x3, - [1667198289.741688][11390:11390] CHIP:DMG: Attribute = 0x0000_0001, - [1667198289.741782][11390:11390] CHIP:DMG: } - [1667198289.741858][11390:11390] CHIP:DMG: - [1667198289.741946][11390:11390] CHIP:DMG: Data = 2, - [1667198289.742034][11390:11390] CHIP:DMG: }, - [1667198289.742120][11390:11390] CHIP:DMG: - [1667198289.742180][11390:11390] CHIP:DMG: }, - [1667198289.742256][11390:11390] CHIP:DMG: - [1667198289.742317][11390:11390] CHIP:DMG: ], - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - There is no optional attribute for this cluster - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_LCFG_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_LCFG_3_1_Simulated.yaml deleted file mode 100644 index a004c2c02a0021..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LCFG_3_1_Simulated.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: - 101.3.1. [TC-LCFG-3.1] Localization Configuration Cluster - Attributes[DUT-Client] - -PICS: - - LCFG.C - -config: - nodeId: 0x12344321 - cluster: "Localization Configuration" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads SupportedLocales attribute from TH" - PICS: LCFG.C.A0001 - wait: "readAttribute" - attribute: "SupportedLocales" - - - label: "DUT reads ActiveLocale attribute from TH" - PICS: LCFG.C.A0000 - wait: "readAttribute" - attribute: "ActiveLocale" diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_1_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_1_Simulated.yaml deleted file mode 100644 index 5d315c8c3cf9bc..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LTIME_1_1_Simulated.yaml +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 108.1.1. [TC-LTIME-1.1] Global Attributes [DUT as Client] - -PICS: - - LTIME.C - -config: - nodeId: 0x12344321 - cluster: "Time Format Localization" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT read (0xFFFD) ClusterRevision attribute" - PICS: LTIME.C.Afffd - wait: "readAttribute" - attribute: "ClusterRevision" - - - label: "DUT read (0xFFFC) FeatureMap attribute" - PICS: LTIME.C.Afffc - wait: "readAttribute" - attribute: "FeatureMap" - - - label: "DUT read (0xFFFB) AttributeList attribute" - PICS: LTIME.C.Afffb - wait: "readAttribute" - attribute: "AttributeList" - - #Commenting out the step EventList attribute which is out of scope for matter V1.0 - #- label: "DUT read (0xFFFA) EventList attribute" - # PICS: LTIME.C.Afffa - # wait: "readAttribute" - # attribute: "EventList" - - - label: "DUT read (0xFFF9) AcceptedCommandList attribute" - PICS: LTIME.C.Afff9 - wait: "readAttribute" - attribute: "AcceptedCommandList" - - - label: "DUT read (0xFFF8) GeneratedCommandList attribute" - PICS: LTIME.C.Afff8 - wait: "readAttribute" - attribute: "GeneratedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_2_1.yaml deleted file mode 100644 index de3b799ac2bc7d..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LTIME_2_1.yaml +++ /dev/null @@ -1,938 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 4.2.1. [TC-LTIME-2.1] Read and Write Time Format Localization Cluster - Attributes [DUT as Client] - -PICS: - - LTIME.C - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - Commission TH(all-clusters-app) to DUT(chip-tool) using below command - - TH(all-clusters-app) : ./chip-all-clusters-app --trace_decode 1 - DUT(chip-tool) : ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 - disabled: true - - - label: "Step 1: DUT reads HourFormat attribute from TH" - PICS: LTIME.C.A0000 - verification: | - ./chip-tool timeformatlocalization read hour-format 1 0 - - Verify HourFormat attribute read request is successful on the TH(all-clusters-app) Log and below is the sample log provided for raspi platform: - - [1686897742.935624][12411:12411] CHIP:DMG: ReadRequestMessage = - [1686897742.935627][12411:12411] CHIP:DMG: { - [1686897742.935630][12411:12411] CHIP:DMG: AttributePathIBs = - [1686897742.935633][12411:12411] CHIP:DMG: [ - [1686897742.935636][12411:12411] CHIP:DMG: AttributePathIB = - [1686897742.935640][12411:12411] CHIP:DMG: { - [1686897742.935643][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686897742.935646][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686897742.935650][12411:12411] CHIP:DMG: Attribute = 0x0000_0000, - [1686897742.935652][12411:12411] CHIP:DMG: } - [1686897742.935656][12411:12411] CHIP:DMG: - [1686897742.935658][12411:12411] CHIP:DMG: ], - [1686897742.935662][12411:12411] CHIP:DMG: - [1686897742.935665][12411:12411] CHIP:DMG: isFabricFiltered = true, - [1686897742.935668][12411:12411] CHIP:DMG: InteractionModelRevision = 1 - [1686897742.935670][12411:12411] CHIP:DMG: }, - disabled: true - - - label: - "Step 2: If (LTIME.C.A0000.12HR) DUT writes 0 to HourFormat attribute - on TH" - PICS: LTIME.C.A0000.12HR - verification: | - ./chip-tool timeformatlocalization write hour-format 0 1 0 - - Verify TH receives HourFormat attribute write command and updates value to 0 on the TH(all-clusters-app) Log and below is the sample log provided for raspi platform: - - [1686897823.291113][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686897823.291116][12411:12411] CHIP:DMG: { - [1686897823.291119][12411:12411] CHIP:DMG: suppressResponse = false, - [1686897823.291122][12411:12411] CHIP:DMG: timedRequest = false, - [1686897823.291124][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686897823.291128][12411:12411] CHIP:DMG: [ - [1686897823.291131][12411:12411] CHIP:DMG: AttributeDataIB = - [1686897823.291134][12411:12411] CHIP:DMG: { - [1686897823.291137][12411:12411] CHIP:DMG: AttributePathIB = - [1686897823.291140][12411:12411] CHIP:DMG: { - [1686897823.291144][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686897823.291147][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686897823.291150][12411:12411] CHIP:DMG: Attribute = 0x0000_0000, - [1686897823.291153][12411:12411] CHIP:DMG: } - [1686897823.291156][12411:12411] CHIP:DMG: - [1686897823.291160][12411:12411] CHIP:DMG: Data = 0, - [1686897823.291163][12411:12411] CHIP:DMG: }, - [1686897823.291167][12411:12411] CHIP:DMG: - [1686897823.291169][12411:12411] CHIP:DMG: ], - [1686897823.291173][12411:12411] CHIP:DMG: - [1686897823.291176][12411:12411] CHIP:DMG: moreChunkedMessages = false, - [1686897823.291179][12411:12411] CHIP:DMG: InteractionModelRevision = 1 - [1686897823.291181][12411:12411] CHIP:DMG: }, - disabled: true - - - label: "Step 3: DUT reads HourFormat attribute from TH" - PICS: LTIME.C.A0000 - verification: | - ./chip-tool timeformatlocalization read hour-format 1 0 - - Verify HourFormat attribute value is same as one that was set in the step 2 on the TH(all-clusters-app) Log: - - ReportDataMessage = - [1666853805.326001][20237:20237] CHIP:DMG: { - [1666853805.326004][20237:20237] CHIP:DMG: AttributeReportIBs = - [1666853805.326009][20237:20237] CHIP:DMG: [ - [1666853805.326012][20237:20237] CHIP:DMG: AttributeReportIB = - [1666853805.326016][20237:20237] CHIP:DMG: { - [1666853805.326020][20237:20237] CHIP:DMG: AttributeDataIB = - [1666853805.326023][20237:20237] CHIP:DMG: { - [1666853805.326026][20237:20237] CHIP:DMG: DataVersion = 0xbeb406dc, - [1666853805.326030][20237:20237] CHIP:DMG: AttributePathIB = - [1666853805.326034][20237:20237] CHIP:DMG: { - [1666853805.326040][20237:20237] CHIP:DMG: Endpoint = 0x0, - [1666853805.326044][20237:20237] CHIP:DMG: Cluster = 0x2c, - [1666853805.326049][20237:20237] CHIP:DMG: Attribute = 0x0000_0000, - [1666853805.326054][20237:20237] CHIP:DMG: } - [1666853805.326059][20237:20237] CHIP:DMG: - [1666853805.326062][20237:20237] CHIP:DMG: Data = 0, - [1666853805.326066][20237:20237] CHIP:DMG: }, - [1666853805.326070][20237:20237] CHIP:DMG: - [1666853805.326073][20237:20237] CHIP:DMG: }, - [1666853805.326076][20237:20237] CHIP:DMG: - [1666853805.326079][20237:20237] CHIP:DMG: ], - [1666853805.326085][20237:20237] CHIP:DMG: - [1666853805.326088][20237:20237] CHIP:DMG: SuppressResponse = true, - [1666853805.326090][20237:20237] CHIP:DMG: InteractionModelRevision = 1 - [1666853805.326093][20237:20237] CHIP:DMG: } - disabled: true - - - label: - "Step 4: If (LTIME.C.A0000.24HR) DUT writes 1 to HourFormat attribute - on TH" - PICS: LTIME.C.A0000.24HR - verification: | - ./chip-tool timeformatlocalization write hour-format 1 1 0 - - Verify TH receives HourFormat attribute write command and updates value to 1 on the TH(all-clusters-app) Log and below is the sample log provided for raspi platform: - - [1686897976.668257][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686897976.668269][12411:12411] CHIP:DMG: { - [1686897976.668279][12411:12411] CHIP:DMG: suppressResponse = false, - [1686897976.668291][12411:12411] CHIP:DMG: timedRequest = false, - [1686897976.668305][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686897976.668327][12411:12411] CHIP:DMG: [ - [1686897976.668341][12411:12411] CHIP:DMG: AttributeDataIB = - [1686897976.668360][12411:12411] CHIP:DMG: { - [1686897976.668369][12411:12411] CHIP:DMG: AttributePathIB = - [1686897976.668403][12411:12411] CHIP:DMG: { - [1686897976.668407][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686897976.668410][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686897976.668415][12411:12411] CHIP:DMG: Attribute = 0x0000_0000, - [1686897976.668419][12411:12411] CHIP:DMG: } - [1686897976.668424][12411:12411] CHIP:DMG: - [1686897976.668429][12411:12411] CHIP:DMG: Data = 1, - [1686897976.668432][12411:12411] CHIP:DMG: }, - [1686897976.668438][12411:12411] CHIP:DMG: - [1686897976.668442][12411:12411] CHIP:DMG: ], - [1686897976.668446][12411:12411] CHIP:DMG: - [1686897976.668449][12411:12411] CHIP:DMG: moreChunkedMessages = false, - [1686897976.668452][12411:12411] CHIP:DMG: InteractionModelRevision = 1 - [1686897976.668454][12411:12411] CHIP:DMG: }, - disabled: true - - - label: "Step 5: DUT reads HourFormat attribute on TH" - PICS: LTIME.C.A0000 - verification: | - ./chip-tool timeformatlocalization read hour-format 1 0 - - Verify HourFormat attribute value is same as one that was set in the step 5 on the TH(all-clusters-app) Log and below is the sample log provided for raspi platform: - - ReportDataMessage = - [1666853879.264685][20237:20237] CHIP:DMG: { - [1666853879.264688][20237:20237] CHIP:DMG: AttributeReportIBs = - [1666853879.264695][20237:20237] CHIP:DMG: [ - [1666853879.264698][20237:20237] CHIP:DMG: AttributeReportIB = - [1666853879.264706][20237:20237] CHIP:DMG: { - [1666853879.264709][20237:20237] CHIP:DMG: AttributeDataIB = - [1666853879.264713][20237:20237] CHIP:DMG: { - [1666853879.264717][20237:20237] CHIP:DMG: DataVersion = 0xbeb406dd, - [1666853879.264720][20237:20237] CHIP:DMG: AttributePathIB = - [1666853879.264724][20237:20237] CHIP:DMG: { - [1666853879.264727][20237:20237] CHIP:DMG: Endpoint = 0x0, - [1666853879.264730][20237:20237] CHIP:DMG: Cluster = 0x2c, - [1666853879.264734][20237:20237] CHIP:DMG: Attribute = 0x0000_0000, - [1666853879.264740][20237:20237] CHIP:DMG: } - [1666853879.264745][20237:20237] CHIP:DMG: - [1666853879.264749][20237:20237] CHIP:DMG: Data = 1, - [1666853879.264753][20237:20237] CHIP:DMG: }, - [1666853879.264759][20237:20237] CHIP:DMG: - [1666853879.264763][20237:20237] CHIP:DMG: }, - [1666853879.264769][20237:20237] CHIP:DMG: - [1666853879.264772][20237:20237] CHIP:DMG: ], - [1666853879.264779][20237:20237] CHIP:DMG: - [1666853879.264782][20237:20237] CHIP:DMG: SuppressResponse = true, - [1666853879.264785][20237:20237] CHIP:DMG: InteractionModelRevision = 1 - [1666853879.264788][20237:20237] CHIP:DMG: } - disabled: true - - - label: "Step 6: DUT reads ActiveCalendarType attribute on TH" - PICS: LTIME.C.A0001 - verification: | - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify active-calendar-type attribute read request is successful on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898051.422884][12411:12411] CHIP:DMG: ReadRequestMessage = - [1686898051.422888][12411:12411] CHIP:DMG: { - [1686898051.422890][12411:12411] CHIP:DMG: AttributePathIBs = - [1686898051.422893][12411:12411] CHIP:DMG: [ - [1686898051.422896][12411:12411] CHIP:DMG: AttributePathIB = - [1686898051.422900][12411:12411] CHIP:DMG: { - [1686898051.422903][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898051.422906][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898051.422909][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898051.422911][12411:12411] CHIP:DMG: } - [1686898051.422915][12411:12411] CHIP:DMG: - [1686898051.422917][12411:12411] CHIP:DMG: ], - [1686898051.422921][12411:12411] CHIP:DMG: - [1686898051.422924][12411:12411] CHIP:DMG: isFabricFiltered = true, - [1686898051.422926][12411:12411] CHIP:DMG: InteractionModelRevision = 1 - [1686898051.422929][12411:12411] CHIP:DMG: }, - disabled: true - - - label: "Step 7: DUT reads SupportedCalendarTypes attribute TH" - PICS: LTIME.C.A0002 - verification: | - ./chip-tool timeformatlocalization read supported-calendar-types 1 0 - - Verify SupportedCalendarTypes attribute read request is successful on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898103.035536][12411:12411] CHIP:DMG: ReadRequestMessage = - [1686898103.035540][12411:12411] CHIP:DMG: { - [1686898103.035542][12411:12411] CHIP:DMG: AttributePathIBs = - [1686898103.035546][12411:12411] CHIP:DMG: [ - [1686898103.035548][12411:12411] CHIP:DMG: AttributePathIB = - [1686898103.035551][12411:12411] CHIP:DMG: { - [1686898103.035554][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898103.035557][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898103.035560][12411:12411] CHIP:DMG: Attribute = 0x0000_0002, - [1686898103.035563][12411:12411] CHIP:DMG: } - [1686898103.035566][12411:12411] CHIP:DMG: - [1686898103.035568][12411:12411] CHIP:DMG: ], - [1686898103.035572][12411:12411] CHIP:DMG: - [1686898103.035575][12411:12411] CHIP:DMG: isFabricFiltered = true, - [1686898103.035579][12411:12411] CHIP:DMG: InteractionModelRevision = 1 - [1686898103.035581][12411:12411] CHIP:DMG: }, - disabled: true - - - label: - "Step 8: DUT writes value in PIXIT.LTIME.SCT to ActiveCalendarType - attribute on TH, followed by reading the ActiveCalendarType attribute - from TH" - PICS: LTIME.C.A0001 - verification: | - ./chip-tool timeformatlocalization write active-calendar-type 0 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 0 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898167.800454][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686898167.800468][12411:12411] CHIP:DMG: { - [1686898167.800483][12411:12411] CHIP:DMG: suppressResponse = false, - [1686898167.800501][12411:12411] CHIP:DMG: timedRequest = false, - [1686898167.800511][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686898167.800529][12411:12411] CHIP:DMG: [ - [1686898167.800540][12411:12411] CHIP:DMG: AttributeDataIB = - [1686898167.800552][12411:12411] CHIP:DMG: { - [1686898167.800563][12411:12411] CHIP:DMG: AttributePathIB = - [1686898167.800575][12411:12411] CHIP:DMG: { - [1686898167.800589][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898167.800604][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898167.800620][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898167.800630][12411:12411] CHIP:DMG: } - [1686898167.800649][12411:12411] CHIP:DMG: - [1686898167.800662][12411:12411] CHIP:DMG: Data = 0, - [1686898167.800672][12411:12411] CHIP:DMG: }, - [1686898167.800687][12411:12411] CHIP:DMG: - [1686898167.800696][12411:12411] CHIP:DMG: ], - [1686898167.800710][12411:12411] CHIP:DMG: - [1686898167.800721][12411:12411] CHIP:DMG: moreChunkedMessages = false, - [1686898167.800734][12411:12411] CHIP:DMG: InteractionModelRevision = 1 - [1686898167.800742][12411:12411] CHIP:DMG: }, - disabled: true - - - label: "Step 9: Repeat step 8 for all the values in PIXIT.LTIME.SCT" - PICS: LTIME.C.A0001 - verification: | - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is same as the value that was set before on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - ReportDataMessage = - [1666854060.848201][20237:20237] CHIP:DMG: { - [1666854060.848204][20237:20237] CHIP:DMG: AttributeReportIBs = - [1666854060.848211][20237:20237] CHIP:DMG: [ - [1666854060.848215][20237:20237] CHIP:DMG: AttributeReportIB = - [1666854060.848222][20237:20237] CHIP:DMG: { - [1666854060.848225][20237:20237] CHIP:DMG: AttributeDataIB = - [1666854060.848229][20237:20237] CHIP:DMG: { - [1666854060.848234][20237:20237] CHIP:DMG: DataVersion = 0xbeb406de, - [1666854060.848238][20237:20237] CHIP:DMG: AttributePathIB = - [1666854060.848244][20237:20237] CHIP:DMG: { - [1666854060.848248][20237:20237] CHIP:DMG: Endpoint = 0x0, - [1666854060.848253][20237:20237] CHIP:DMG: Cluster = 0x2c, - [1666854060.848257][20237:20237] CHIP:DMG: Attribute = 0x0000_0001, - [1666854060.848260][20237:20237] CHIP:DMG: } - [1666854060.848266][20237:20237] CHIP:DMG: - [1666854060.848269][20237:20237] CHIP:DMG: Data = 0, - [1666854060.848272][20237:20237] CHIP:DMG: }, - [1666854060.848276][20237:20237] CHIP:DMG: - [1666854060.848279][20237:20237] CHIP:DMG: }, - [1666854060.848284][20237:20237] CHIP:DMG: - [1666854060.848287][20237:20237] CHIP:DMG: ], - [1666854060.848294][20237:20237] CHIP:DMG: - [1666854060.848298][20237:20237] CHIP:DMG: SuppressResponse = true, - [1666854060.848301][20237:20237] CHIP:DMG: InteractionModelRevision = 1 - [1666854060.848304][20237:20237] CHIP:DMG: } - disabled: true - - - label: "Step 10: Repeat step 8 for all the values in PIXIT.LTIME.SCT" - PICS: LTIME.C.A0001 - verification: | - ./chip-tool timeformatlocalization write active-calendar-type 1 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 1 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898332.358543][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686898332.358546][12411:12411] CHIP:DMG: { - [1686898332.358550][12411:12411] CHIP:DMG: suppressResponse = false, - [1686898332.358555][12411:12411] CHIP:DMG: timedRequest = false, - [1686898332.358559][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686898332.358567][12411:12411] CHIP:DMG: [ - [1686898332.358570][12411:12411] CHIP:DMG: AttributeDataIB = - [1686898332.358577][12411:12411] CHIP:DMG: { - [1686898332.358579][12411:12411] CHIP:DMG: AttributePathIB = - [1686898332.358586][12411:12411] CHIP:DMG: { - [1686898332.358590][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898332.358595][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898332.358598][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898332.358600][12411:12411] CHIP:DMG: } - [1686898332.358604][12411:12411] CHIP:DMG: - [1686898332.358607][12411:12411] CHIP:DMG: Data = 1, - [1686898332.358609][12411:12411] CHIP:DMG: }, - [1686898332.358613][12411:12411] CHIP:DMG: - [1686898332.358615][12411:12411] CHIP:DMG: ], - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 1 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898454.639136][12687:12689] CHIP:DMG: ReportDataMessage = - [1686898454.639140][12687:12689] CHIP:DMG: { - [1686898454.639142][12687:12689] CHIP:DMG: AttributeReportIBs = - [1686898454.639148][12687:12689] CHIP:DMG: [ - [1686898454.639150][12687:12689] CHIP:DMG: AttributeReportIB = - [1686898454.639155][12687:12689] CHIP:DMG: { - [1686898454.639158][12687:12689] CHIP:DMG: AttributeDataIB = - [1686898454.639163][12687:12689] CHIP:DMG: { - [1686898454.639166][12687:12689] CHIP:DMG: DataVersion = 0x68385037, - [1686898454.639170][12687:12689] CHIP:DMG: AttributePathIB = - [1686898454.639174][12687:12689] CHIP:DMG: { - [1686898454.639177][12687:12689] CHIP:DMG: Endpoint = 0x0, - [1686898454.639180][12687:12689] CHIP:DMG: Cluster = 0x2c, - [1686898454.639183][12687:12689] CHIP:DMG: Attribute = 0x0000_0001, - [1686898454.639186][12687:12689] CHIP:DMG: } - [1686898454.639192][12687:12689] CHIP:DMG: - [1686898454.639196][12687:12689] CHIP:DMG: Data = 1, - [1686898454.639199][12687:12689] CHIP:DMG: }, - [1686898454.639203][12687:12689] CHIP:DMG: - [1686898454.639205][12687:12689] CHIP:DMG: }, - [1686898454.639210][12687:12689] CHIP:DMG: - [1686898454.639213][12687:12689] CHIP:DMG: ], - [1686898454.639217][12687:12689] CHIP:DMG: - [1686898454.639220][12687:12689] CHIP:DMG: SuppressResponse = true, - [1686898454.639223][12687:12689] CHIP:DMG: InteractionModelRevision = 1 - [1686898454.639225][12687:12689] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 2 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 2 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898499.368660][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686898499.368664][12411:12411] CHIP:DMG: { - [1686898499.368667][12411:12411] CHIP:DMG: suppressResponse = false, - [1686898499.368671][12411:12411] CHIP:DMG: timedRequest = false, - [1686898499.368675][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686898499.368682][12411:12411] CHIP:DMG: [ - [1686898499.368684][12411:12411] CHIP:DMG: AttributeDataIB = - [1686898499.368688][12411:12411] CHIP:DMG: { - [1686898499.368690][12411:12411] CHIP:DMG: AttributePathIB = - [1686898499.368694][12411:12411] CHIP:DMG: { - [1686898499.368697][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898499.368701][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898499.368704][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898499.368706][12411:12411] CHIP:DMG: } - [1686898499.368711][12411:12411] CHIP:DMG: - [1686898499.368716][12411:12411] CHIP:DMG: Data = 2, - [1686898499.368718][12411:12411] CHIP:DMG: }, - [1686898499.368722][12411:12411] CHIP:DMG: - [1686898499.368725][12411:12411] CHIP:DMG: ], - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 2 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898544.231876][12718:12720] CHIP:DMG: ReportDataMessage = - [1686898544.231879][12718:12720] CHIP:DMG: { - [1686898544.231881][12718:12720] CHIP:DMG: AttributeReportIBs = - [1686898544.231887][12718:12720] CHIP:DMG: [ - [1686898544.231889][12718:12720] CHIP:DMG: AttributeReportIB = - [1686898544.231895][12718:12720] CHIP:DMG: { - [1686898544.231898][12718:12720] CHIP:DMG: AttributeDataIB = - [1686898544.231901][12718:12720] CHIP:DMG: { - [1686898544.231905][12718:12720] CHIP:DMG: DataVersion = 0x68385038, - [1686898544.231908][12718:12720] CHIP:DMG: AttributePathIB = - [1686898544.231911][12718:12720] CHIP:DMG: { - [1686898544.231915][12718:12720] CHIP:DMG: Endpoint = 0x0, - [1686898544.231919][12718:12720] CHIP:DMG: Cluster = 0x2c, - [1686898544.231922][12718:12720] CHIP:DMG: Attribute = 0x0000_0001, - [1686898544.231925][12718:12720] CHIP:DMG: } - [1686898544.231928][12718:12720] CHIP:DMG: - [1686898544.231932][12718:12720] CHIP:DMG: Data = 2, - [1686898544.231935][12718:12720] CHIP:DMG: }, - [1686898544.231939][12718:12720] CHIP:DMG: - [1686898544.231942][12718:12720] CHIP:DMG: }, - [1686898544.231946][12718:12720] CHIP:DMG: - [1686898544.231949][12718:12720] CHIP:DMG: ], - [1686898544.231953][12718:12720] CHIP:DMG: - [1686898544.231956][12718:12720] CHIP:DMG: SuppressResponse = true, - [1686898544.231959][12718:12720] CHIP:DMG: InteractionModelRevision = 1 - [1686898544.231961][12718:12720] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 3 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 3 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898582.764639][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686898582.764656][12411:12411] CHIP:DMG: { - [1686898582.764670][12411:12411] CHIP:DMG: suppressResponse = false, - [1686898582.764687][12411:12411] CHIP:DMG: timedRequest = false, - [1686898582.764698][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686898582.764716][12411:12411] CHIP:DMG: [ - [1686898582.764726][12411:12411] CHIP:DMG: AttributeDataIB = - [1686898582.764738][12411:12411] CHIP:DMG: { - [1686898582.764748][12411:12411] CHIP:DMG: AttributePathIB = - [1686898582.764760][12411:12411] CHIP:DMG: { - [1686898582.764773][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898582.764785][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898582.764798][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898582.764809][12411:12411] CHIP:DMG: } - [1686898582.764823][12411:12411] CHIP:DMG: - [1686898582.764836][12411:12411] CHIP:DMG: Data = 3, - [1686898582.764846][12411:12411] CHIP:DMG: }, - [1686898582.764859][12411:12411] CHIP:DMG: - [1686898582.764868][12411:12411] CHIP:DMG: - - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 3 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898658.627985][12740:12742] CHIP:DMG: ReportDataMessage = - [1686898658.628004][12740:12742] CHIP:DMG: { - [1686898658.628017][12740:12742] CHIP:DMG: AttributeReportIBs = - [1686898658.628042][12740:12742] CHIP:DMG: [ - [1686898658.628051][12740:12742] CHIP:DMG: AttributeReportIB = - [1686898658.628072][12740:12742] CHIP:DMG: { - [1686898658.628082][12740:12742] CHIP:DMG: AttributeDataIB = - [1686898658.628094][12740:12742] CHIP:DMG: { - [1686898658.628107][12740:12742] CHIP:DMG: DataVersion = 0x68385039, - [1686898658.628121][12740:12742] CHIP:DMG: AttributePathIB = - [1686898658.628134][12740:12742] CHIP:DMG: { - [1686898658.628148][12740:12742] CHIP:DMG: Endpoint = 0x0, - [1686898658.628161][12740:12742] CHIP:DMG: Cluster = 0x2c, - [1686898658.628173][12740:12742] CHIP:DMG: Attribute = 0x0000_0001, - [1686898658.628183][12740:12742] CHIP:DMG: } - [1686898658.628198][12740:12742] CHIP:DMG: - [1686898658.628211][12740:12742] CHIP:DMG: Data = 3, - [1686898658.628226][12740:12742] CHIP:DMG: }, - [1686898658.628243][12740:12742] CHIP:DMG: - [1686898658.628252][12740:12742] CHIP:DMG: }, - [1686898658.628266][12740:12742] CHIP:DMG: - [1686898658.628275][12740:12742] CHIP:DMG: ], - [1686898658.628293][12740:12742] CHIP:DMG: - [1686898658.628304][12740:12742] CHIP:DMG: SuppressResponse = true, - [1686898658.628312][12740:12742] CHIP:DMG: InteractionModelRevision = 1 - [1686898658.628319][12740:12742] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 4 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 4 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898760.973271][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686898760.973274][12411:12411] CHIP:DMG: { - [1686898760.973277][12411:12411] CHIP:DMG: suppressResponse = false, - [1686898760.973282][12411:12411] CHIP:DMG: timedRequest = false, - [1686898760.973285][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686898760.973291][12411:12411] CHIP:DMG: [ - [1686898760.973294][12411:12411] CHIP:DMG: AttributeDataIB = - [1686898760.973299][12411:12411] CHIP:DMG: { - [1686898760.973301][12411:12411] CHIP:DMG: AttributePathIB = - [1686898760.973308][12411:12411] CHIP:DMG: { - [1686898760.973311][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898760.973315][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898760.973317][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898760.973320][12411:12411] CHIP:DMG: } - [1686898760.973326][12411:12411] CHIP:DMG: - [1686898760.973331][12411:12411] CHIP:DMG: Data = 4, - [1686898760.973335][12411:12411] CHIP:DMG: }, - [1686898760.973340][12411:12411] CHIP:DMG: - [1686898760.973342][12411:12411] CHIP:DMG: ], - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 4 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898820.179173][12799:12801] CHIP:DMG: ReportDataMessage = - [1686898820.179178][12799:12801] CHIP:DMG: { - [1686898820.179180][12799:12801] CHIP:DMG: AttributeReportIBs = - [1686898820.179185][12799:12801] CHIP:DMG: [ - [1686898820.179188][12799:12801] CHIP:DMG: AttributeReportIB = - [1686898820.179193][12799:12801] CHIP:DMG: { - [1686898820.179196][12799:12801] CHIP:DMG: AttributeDataIB = - [1686898820.179200][12799:12801] CHIP:DMG: { - [1686898820.179203][12799:12801] CHIP:DMG: DataVersion = 0x6838503a, - [1686898820.179206][12799:12801] CHIP:DMG: AttributePathIB = - [1686898820.179209][12799:12801] CHIP:DMG: { - [1686898820.179213][12799:12801] CHIP:DMG: Endpoint = 0x0, - [1686898820.179217][12799:12801] CHIP:DMG: Cluster = 0x2c, - [1686898820.179220][12799:12801] CHIP:DMG: Attribute = 0x0000_0001, - [1686898820.179223][12799:12801] CHIP:DMG: } - [1686898820.179226][12799:12801] CHIP:DMG: - [1686898820.179231][12799:12801] CHIP:DMG: Data = 4, - [1686898820.179235][12799:12801] CHIP:DMG: }, - [1686898820.179239][12799:12801] CHIP:DMG: - [1686898820.179241][12799:12801] CHIP:DMG: }, - [1686898820.179246][12799:12801] CHIP:DMG: - [1686898820.179248][12799:12801] CHIP:DMG: ], - [1686898820.179253][12799:12801] CHIP:DMG: - [1686898820.179255][12799:12801] CHIP:DMG: SuppressResponse = true, - [1686898820.179258][12799:12801] CHIP:DMG: InteractionModelRevision = 1 - [1686898820.179260][12799:12801] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 5 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 5 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898866.001997][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686898866.002000][12411:12411] CHIP:DMG: { - [1686898866.002002][12411:12411] CHIP:DMG: suppressResponse = false, - [1686898866.002004][12411:12411] CHIP:DMG: timedRequest = false, - [1686898866.002007][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686898866.002012][12411:12411] CHIP:DMG: [ - [1686898866.002014][12411:12411] CHIP:DMG: AttributeDataIB = - [1686898866.002018][12411:12411] CHIP:DMG: { - [1686898866.002021][12411:12411] CHIP:DMG: AttributePathIB = - [1686898866.002025][12411:12411] CHIP:DMG: { - [1686898866.002029][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898866.002032][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898866.002036][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898866.002039][12411:12411] CHIP:DMG: } - [1686898866.002042][12411:12411] CHIP:DMG: - [1686898866.002046][12411:12411] CHIP:DMG: Data = 5, - [1686898866.002048][12411:12411] CHIP:DMG: }, - [1686898866.002052][12411:12411] CHIP:DMG: - [1686898866.002055][12411:12411] CHIP:DMG: ], - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 5 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898936.936445][12826:12828] CHIP:DMG: ReportDataMessage = - [1686898936.936449][12826:12828] CHIP:DMG: { - [1686898936.936452][12826:12828] CHIP:DMG: AttributeReportIBs = - [1686898936.936458][12826:12828] CHIP:DMG: [ - [1686898936.936461][12826:12828] CHIP:DMG: AttributeReportIB = - [1686898936.936466][12826:12828] CHIP:DMG: { - [1686898936.936468][12826:12828] CHIP:DMG: AttributeDataIB = - [1686898936.936473][12826:12828] CHIP:DMG: { - [1686898936.936478][12826:12828] CHIP:DMG: DataVersion = 0x6838503b, - [1686898936.936482][12826:12828] CHIP:DMG: AttributePathIB = - [1686898936.936487][12826:12828] CHIP:DMG: { - [1686898936.936492][12826:12828] CHIP:DMG: Endpoint = 0x0, - [1686898936.936496][12826:12828] CHIP:DMG: Cluster = 0x2c, - [1686898936.936501][12826:12828] CHIP:DMG: Attribute = 0x0000_0001, - [1686898936.936505][12826:12828] CHIP:DMG: } - [1686898936.936510][12826:12828] CHIP:DMG: - [1686898936.936515][12826:12828] CHIP:DMG: Data = 5, - [1686898936.936518][12826:12828] CHIP:DMG: }, - [1686898936.936524][12826:12828] CHIP:DMG: - [1686898936.936528][12826:12828] CHIP:DMG: }, - [1686898936.936533][12826:12828] CHIP:DMG: - [1686898936.936536][12826:12828] CHIP:DMG: ], - [1686898936.936542][12826:12828] CHIP:DMG: - [1686898936.936546][12826:12828] CHIP:DMG: SuppressResponse = true, - [1686898936.936549][12826:12828] CHIP:DMG: InteractionModelRevision = 1 - [1686898936.936552][12826:12828] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 6 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 6 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686898992.461667][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686898992.461679][12411:12411] CHIP:DMG: { - [1686898992.461690][12411:12411] CHIP:DMG: suppressResponse = false, - [1686898992.461702][12411:12411] CHIP:DMG: timedRequest = false, - [1686898992.461716][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686898992.461733][12411:12411] CHIP:DMG: [ - [1686898992.461742][12411:12411] CHIP:DMG: AttributeDataIB = - [1686898992.461755][12411:12411] CHIP:DMG: { - [1686898992.461765][12411:12411] CHIP:DMG: AttributePathIB = - [1686898992.461778][12411:12411] CHIP:DMG: { - [1686898992.461794][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686898992.461806][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686898992.461825][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686898992.461835][12411:12411] CHIP:DMG: } - [1686898992.461849][12411:12411] CHIP:DMG: - [1686898992.461862][12411:12411] CHIP:DMG: Data = 6, - [1686898992.461872][12411:12411] CHIP:DMG: }, - [1686898992.461887][12411:12411] CHIP:DMG: - [1686898992.461896][12411:12411] CHIP:DMG: ], - - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 6 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899048.031912][12884:12886] CHIP:DMG: ReportDataMessage = - [1686899048.031916][12884:12886] CHIP:DMG: { - [1686899048.031918][12884:12886] CHIP:DMG: AttributeReportIBs = - [1686899048.031924][12884:12886] CHIP:DMG: [ - [1686899048.031927][12884:12886] CHIP:DMG: AttributeReportIB = - [1686899048.031932][12884:12886] CHIP:DMG: { - [1686899048.031934][12884:12886] CHIP:DMG: AttributeDataIB = - [1686899048.031940][12884:12886] CHIP:DMG: { - [1686899048.031943][12884:12886] CHIP:DMG: DataVersion = 0x6838503c, - [1686899048.031946][12884:12886] CHIP:DMG: AttributePathIB = - [1686899048.031950][12884:12886] CHIP:DMG: { - [1686899048.031953][12884:12886] CHIP:DMG: Endpoint = 0x0, - [1686899048.031957][12884:12886] CHIP:DMG: Cluster = 0x2c, - [1686899048.031961][12884:12886] CHIP:DMG: Attribute = 0x0000_0001, - [1686899048.031964][12884:12886] CHIP:DMG: } - [1686899048.031969][12884:12886] CHIP:DMG: - [1686899048.031975][12884:12886] CHIP:DMG: Data = 6, - [1686899048.031979][12884:12886] CHIP:DMG: }, - [1686899048.031983][12884:12886] CHIP:DMG: - [1686899048.031985][12884:12886] CHIP:DMG: }, - [1686899048.031989][12884:12886] CHIP:DMG: - [1686899048.031992][12884:12886] CHIP:DMG: ], - [1686899048.031996][12884:12886] CHIP:DMG: - [1686899048.031999][12884:12886] CHIP:DMG: SuppressResponse = true, - [1686899048.032002][12884:12886] CHIP:DMG: InteractionModelRevision = 1 - [1686899048.032004][12884:12886] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 7 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 7 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899076.211353][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686899076.211357][12411:12411] CHIP:DMG: { - [1686899076.211360][12411:12411] CHIP:DMG: suppressResponse = false, - [1686899076.211364][12411:12411] CHIP:DMG: timedRequest = false, - [1686899076.211368][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686899076.211374][12411:12411] CHIP:DMG: [ - [1686899076.211377][12411:12411] CHIP:DMG: AttributeDataIB = - [1686899076.211382][12411:12411] CHIP:DMG: { - [1686899076.211386][12411:12411] CHIP:DMG: AttributePathIB = - [1686899076.211391][12411:12411] CHIP:DMG: { - [1686899076.211396][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686899076.211400][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686899076.211405][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686899076.211409][12411:12411] CHIP:DMG: } - [1686899076.211417][12411:12411] CHIP:DMG: - [1686899076.211425][12411:12411] CHIP:DMG: Data = 7, - [1686899076.211430][12411:12411] CHIP:DMG: }, - [1686899076.211435][12411:12411] CHIP:DMG: - [1686899076.211438][12411:12411] CHIP:DMG: ], - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 7 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899229.897526][12933:12935] CHIP:DMG: ReportDataMessage = - [1686899229.897531][12933:12935] CHIP:DMG: { - [1686899229.897534][12933:12935] CHIP:DMG: AttributeReportIBs = - [1686899229.897542][12933:12935] CHIP:DMG: [ - [1686899229.897545][12933:12935] CHIP:DMG: AttributeReportIB = - [1686899229.897552][12933:12935] CHIP:DMG: { - [1686899229.897557][12933:12935] CHIP:DMG: AttributeDataIB = - [1686899229.897563][12933:12935] CHIP:DMG: { - [1686899229.897569][12933:12935] CHIP:DMG: DataVersion = 0x6838503e, - [1686899229.897574][12933:12935] CHIP:DMG: AttributePathIB = - [1686899229.897580][12933:12935] CHIP:DMG: { - [1686899229.897585][12933:12935] CHIP:DMG: Endpoint = 0x0, - [1686899229.897590][12933:12935] CHIP:DMG: Cluster = 0x2c, - [1686899229.897596][12933:12935] CHIP:DMG: Attribute = 0x0000_0001, - [1686899229.897600][12933:12935] CHIP:DMG: } - [1686899229.897606][12933:12935] CHIP:DMG: - [1686899229.897611][12933:12935] CHIP:DMG: Data = 7, - [1686899229.897615][12933:12935] CHIP:DMG: }, - [1686899229.897621][12933:12935] CHIP:DMG: - [1686899229.897624][12933:12935] CHIP:DMG: }, - [1686899229.897630][12933:12935] CHIP:DMG: - [1686899229.897634][12933:12935] CHIP:DMG: ], - [1686899229.897640][12933:12935] CHIP:DMG: - [1686899229.897644][12933:12935] CHIP:DMG: SuppressResponse = true, - [1686899229.897648][12933:12935] CHIP:DMG: InteractionModelRevision = 1 - [1686899229.897651][12933:12935] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 8 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 8 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899312.894890][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686899312.894893][12411:12411] CHIP:DMG: { - [1686899312.894896][12411:12411] CHIP:DMG: suppressResponse = false, - [1686899312.894898][12411:12411] CHIP:DMG: timedRequest = false, - [1686899312.894901][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686899312.894905][12411:12411] CHIP:DMG: [ - [1686899312.894908][12411:12411] CHIP:DMG: AttributeDataIB = - [1686899312.894911][12411:12411] CHIP:DMG: { - [1686899312.894914][12411:12411] CHIP:DMG: AttributePathIB = - [1686899312.894918][12411:12411] CHIP:DMG: { - [1686899312.894921][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686899312.894924][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686899312.894927][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686899312.894930][12411:12411] CHIP:DMG: } - [1686899312.894933][12411:12411] CHIP:DMG: - [1686899312.894938][12411:12411] CHIP:DMG: Data = 8, - [1686899312.894940][12411:12411] CHIP:DMG: }, - [1686899312.894944][12411:12411] CHIP:DMG: - [1686899312.894946][12411:12411] CHIP:DMG: ], - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 8 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899353.959365][12994:12996] CHIP:DMG: ReportDataMessage = - [1686899353.959370][12994:12996] CHIP:DMG: { - [1686899353.959374][12994:12996] CHIP:DMG: AttributeReportIBs = - [1686899353.959381][12994:12996] CHIP:DMG: [ - [1686899353.959384][12994:12996] CHIP:DMG: AttributeReportIB = - [1686899353.959391][12994:12996] CHIP:DMG: { - [1686899353.959395][12994:12996] CHIP:DMG: AttributeDataIB = - [1686899353.959400][12994:12996] CHIP:DMG: { - [1686899353.959404][12994:12996] CHIP:DMG: DataVersion = 0x6838503f, - [1686899353.959409][12994:12996] CHIP:DMG: AttributePathIB = - [1686899353.959413][12994:12996] CHIP:DMG: { - [1686899353.959418][12994:12996] CHIP:DMG: Endpoint = 0x0, - [1686899353.959423][12994:12996] CHIP:DMG: Cluster = 0x2c, - [1686899353.959428][12994:12996] CHIP:DMG: Attribute = 0x0000_0001, - [1686899353.959433][12994:12996] CHIP:DMG: } - [1686899353.959438][12994:12996] CHIP:DMG: - [1686899353.959443][12994:12996] CHIP:DMG: Data = 8, - [1686899353.959447][12994:12996] CHIP:DMG: }, - [1686899353.959455][12994:12996] CHIP:DMG: - [1686899353.959459][12994:12996] CHIP:DMG: }, - [1686899353.959465][12994:12996] CHIP:DMG: - [1686899353.959469][12994:12996] CHIP:DMG: ], - [1686899353.959476][12994:12996] CHIP:DMG: - [1686899353.959480][12994:12996] CHIP:DMG: SuppressResponse = true, - [1686899353.959484][12994:12996] CHIP:DMG: InteractionModelRevision = 1 - [1686899353.959488][12994:12996] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 9 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 9 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899403.683238][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686899403.683243][12411:12411] CHIP:DMG: { - [1686899403.683246][12411:12411] CHIP:DMG: suppressResponse = false, - [1686899403.683250][12411:12411] CHIP:DMG: timedRequest = false, - [1686899403.683254][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686899403.683258][12411:12411] CHIP:DMG: [ - [1686899403.683261][12411:12411] CHIP:DMG: AttributeDataIB = - [1686899403.683265][12411:12411] CHIP:DMG: { - [1686899403.683267][12411:12411] CHIP:DMG: AttributePathIB = - [1686899403.683271][12411:12411] CHIP:DMG: { - [1686899403.683274][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686899403.683277][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686899403.683281][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686899403.683283][12411:12411] CHIP:DMG: } - [1686899403.683287][12411:12411] CHIP:DMG: - [1686899403.683290][12411:12411] CHIP:DMG: Data = 9, - [1686899403.683293][12411:12411] CHIP:DMG: }, - [1686899403.683298][12411:12411] CHIP:DMG: - [1686899403.683300][12411:12411] CHIP:DMG: ], - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 9 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899465.353959][13019:13021] CHIP:DMG: ReportDataMessage = - [1686899465.353962][13019:13021] CHIP:DMG: { - [1686899465.353964][13019:13021] CHIP:DMG: AttributeReportIBs = - [1686899465.353970][13019:13021] CHIP:DMG: [ - [1686899465.353972][13019:13021] CHIP:DMG: AttributeReportIB = - [1686899465.353978][13019:13021] CHIP:DMG: { - [1686899465.353982][13019:13021] CHIP:DMG: AttributeDataIB = - [1686899465.353987][13019:13021] CHIP:DMG: { - [1686899465.353992][13019:13021] CHIP:DMG: DataVersion = 0x68385040, - [1686899465.353997][13019:13021] CHIP:DMG: AttributePathIB = - [1686899465.354001][13019:13021] CHIP:DMG: { - [1686899465.354006][13019:13021] CHIP:DMG: Endpoint = 0x0, - [1686899465.354011][13019:13021] CHIP:DMG: Cluster = 0x2c, - [1686899465.354014][13019:13021] CHIP:DMG: Attribute = 0x0000_0001, - [1686899465.354019][13019:13021] CHIP:DMG: } - [1686899465.354024][13019:13021] CHIP:DMG: - [1686899465.354030][13019:13021] CHIP:DMG: Data = 9, - [1686899465.354034][13019:13021] CHIP:DMG: }, - [1686899465.354039][13019:13021] CHIP:DMG: - [1686899465.354043][13019:13021] CHIP:DMG: }, - [1686899465.354049][13019:13021] CHIP:DMG: - [1686899465.354053][13019:13021] CHIP:DMG: ], - [1686899465.354059][13019:13021] CHIP:DMG: - [1686899465.354063][13019:13021] CHIP:DMG: SuppressResponse = true, - [1686899465.354066][13019:13021] CHIP:DMG: InteractionModelRevision = 1 - [1686899465.354069][13019:13021] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 10 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 10 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899526.841349][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686899526.841354][12411:12411] CHIP:DMG: { - [1686899526.841357][12411:12411] CHIP:DMG: suppressResponse = false, - [1686899526.841361][12411:12411] CHIP:DMG: timedRequest = false, - [1686899526.841364][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686899526.841370][12411:12411] CHIP:DMG: [ - [1686899526.841374][12411:12411] CHIP:DMG: AttributeDataIB = - [1686899526.841379][12411:12411] CHIP:DMG: { - [1686899526.841382][12411:12411] CHIP:DMG: AttributePathIB = - [1686899526.841387][12411:12411] CHIP:DMG: { - [1686899526.841392][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686899526.841396][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686899526.841401][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686899526.841405][12411:12411] CHIP:DMG: } - [1686899526.841410][12411:12411] CHIP:DMG: - [1686899526.841415][12411:12411] CHIP:DMG: Data = 10, - [1686899526.841419][12411:12411] CHIP:DMG: }, - [1686899526.841425][12411:12411] CHIP:DMG: - [1686899526.841429][12411:12411] CHIP:DMG: ], - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 10 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899615.016743][13059:13061] CHIP:DMG: ReportDataMessage = - [1686899615.016748][13059:13061] CHIP:DMG: { - [1686899615.016751][13059:13061] CHIP:DMG: AttributeReportIBs = - [1686899615.016759][13059:13061] CHIP:DMG: [ - [1686899615.016762][13059:13061] CHIP:DMG: AttributeReportIB = - [1686899615.016769][13059:13061] CHIP:DMG: { - [1686899615.016773][13059:13061] CHIP:DMG: AttributeDataIB = - [1686899615.016777][13059:13061] CHIP:DMG: { - [1686899615.016781][13059:13061] CHIP:DMG: DataVersion = 0x68385041, - [1686899615.016786][13059:13061] CHIP:DMG: AttributePathIB = - [1686899615.016791][13059:13061] CHIP:DMG: { - [1686899615.016796][13059:13061] CHIP:DMG: Endpoint = 0x0, - [1686899615.016801][13059:13061] CHIP:DMG: Cluster = 0x2c, - [1686899615.016806][13059:13061] CHIP:DMG: Attribute = 0x0000_0001, - [1686899615.016810][13059:13061] CHIP:DMG: } - [1686899615.016816][13059:13061] CHIP:DMG: - [1686899615.016821][13059:13061] CHIP:DMG: Data = 10, - [1686899615.016824][13059:13061] CHIP:DMG: }, - [1686899615.016830][13059:13061] CHIP:DMG: - [1686899615.016833][13059:13061] CHIP:DMG: }, - [1686899615.016839][13059:13061] CHIP:DMG: - [1686899615.016842][13059:13061] CHIP:DMG: ], - [1686899615.016848][13059:13061] CHIP:DMG: - [1686899615.016852][13059:13061] CHIP:DMG: SuppressResponse = true, - [1686899615.016856][13059:13061] CHIP:DMG: InteractionModelRevision = 1 - [1686899615.016859][13059:13061] CHIP:DMG: } - - ./chip-tool timeformatlocalization write active-calendar-type 11 1 0 - - Verify TH receives the ActiveCalendarType attribute write command and updates the value to 11 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899658.971405][12411:12411] CHIP:DMG: WriteRequestMessage = - [1686899658.971421][12411:12411] CHIP:DMG: { - [1686899658.971437][12411:12411] CHIP:DMG: suppressResponse = false, - [1686899658.971450][12411:12411] CHIP:DMG: timedRequest = false, - [1686899658.971459][12411:12411] CHIP:DMG: AttributeDataIBs = - [1686899658.971477][12411:12411] CHIP:DMG: [ - [1686899658.971493][12411:12411] CHIP:DMG: AttributeDataIB = - [1686899658.971510][12411:12411] CHIP:DMG: { - [1686899658.971520][12411:12411] CHIP:DMG: AttributePathIB = - [1686899658.971534][12411:12411] CHIP:DMG: { - [1686899658.971547][12411:12411] CHIP:DMG: Endpoint = 0x0, - [1686899658.971560][12411:12411] CHIP:DMG: Cluster = 0x2c, - [1686899658.971575][12411:12411] CHIP:DMG: Attribute = 0x0000_0001, - [1686899658.971586][12411:12411] CHIP:DMG: } - [1686899658.971600][12411:12411] CHIP:DMG: - [1686899658.971613][12411:12411] CHIP:DMG: Data = 11, - [1686899658.971624][12411:12411] CHIP:DMG: }, - [1686899658.971637][12411:12411] CHIP:DMG: - [1686899658.971646][12411:12411] CHIP:DMG: ], - - - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify ActiveCalendarType attribute value is 11 on the TH(all-clusters-app) Log and and below is the sample log provided for raspi platform: - - [1686899707.460046][13108:13110] CHIP:DMG: ReportDataMessage = - [1686899707.460059][13108:13110] CHIP:DMG: { - [1686899707.460066][13108:13110] CHIP:DMG: AttributeReportIBs = - [1686899707.460087][13108:13110] CHIP:DMG: [ - [1686899707.460097][13108:13110] CHIP:DMG: AttributeReportIB = - [1686899707.460116][13108:13110] CHIP:DMG: { - [1686899707.460132][13108:13110] CHIP:DMG: AttributeDataIB = - [1686899707.460148][13108:13110] CHIP:DMG: { - [1686899707.460168][13108:13110] CHIP:DMG: DataVersion = 0x68385042, - [1686899707.460183][13108:13110] CHIP:DMG: AttributePathIB = - [1686899707.460202][13108:13110] CHIP:DMG: { - [1686899707.460221][13108:13110] CHIP:DMG: Endpoint = 0x0, - [1686899707.460239][13108:13110] CHIP:DMG: Cluster = 0x2c, - [1686899707.460259][13108:13110] CHIP:DMG: Attribute = 0x0000_0001, - [1686899707.460276][13108:13110] CHIP:DMG: } - [1686899707.460297][13108:13110] CHIP:DMG: - [1686899707.460318][13108:13110] CHIP:DMG: Data = 11, - [1686899707.460333][13108:13110] CHIP:DMG: }, - [1686899707.460352][13108:13110] CHIP:DMG: - [1686899707.460368][13108:13110] CHIP:DMG: }, - [1686899707.460391][13108:13110] CHIP:DMG: - [1686899707.460405][13108:13110] CHIP:DMG: ], - [1686899707.460434][13108:13110] CHIP:DMG: - [1686899707.460450][13108:13110] CHIP:DMG: SuppressResponse = true, - [1686899707.460467][13108:13110] CHIP:DMG: InteractionModelRevision = 1 - [1686899707.460480][13108:13110] CHIP:DMG: } - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_1_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_1_1_Simulated.yaml deleted file mode 100644 index ee5159751bbf42..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_1_1_Simulated.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 104.1.1. [TC-LUNIT-1.1] Global Attributes [DUT as Client] - -PICS: - - LUNIT.C - -config: - nodeId: 0x12344321 - cluster: "Unit Localization" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT read (0xFFFD) ClusterRevision attribute" - PICS: LUNIT.C.Afffd - wait: "readAttribute" - attribute: "ClusterRevision" - - - label: "DUT read (0xFFFC) FeatureMap attribute" - PICS: LUNIT.C.Afffc - wait: "readAttribute" - attribute: "FeatureMap" - - - label: "DUT read (0xFFFB) AttributeList attribute" - PICS: LUNIT.C.Afffb - wait: "readAttribute" - attribute: "AttributeList" - - - label: "DUT read (0xFFF9) AcceptedCommandList attribute" - PICS: LUNIT.C.Afff9 - wait: "readAttribute" - attribute: "AcceptedCommandList" - - - label: "DUT read (0xFFF8) GeneratedCommandList attribute" - PICS: LUNIT.C.Afff8 - wait: "readAttribute" - attribute: "GeneratedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_2_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_2_1_Simulated.yaml deleted file mode 100644 index 9030404b43cc1c..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_2_1_Simulated.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 104.2.1. [TC-LUNIT-2.1] Read and Write Unit Localization Cluster Attributes - [DUT as Client] - -PICS: - - LUNIT.C - -config: - nodeId: 0x12344321 - cluster: "Unit Localization" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads TemperatureUnit attribute from TH" - PICS: LUNIT.C.A0000 - wait: "readAttribute" - attribute: "TemperatureUnit" - - - label: "DUT writes 2 to TemperatureUnit attribute on TH" - PICS: LUNIT.C.A0000 - wait: "writeAttribute" - attribute: "TemperatureUnit" - arguments: - value: - - - label: "DUT reads TemperatureUnit attribute from TH" - PICS: LUNIT.C.A0000 - wait: "readAttribute" - attribute: "TemperatureUnit" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_8_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_8_1.yaml deleted file mode 100644 index 7691c62dc07f7d..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LVL_8_1.yaml +++ /dev/null @@ -1,314 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 22.6.3. [TC-LVL-8.1] Verification of commands (DUT as Client) - -PICS: - - LVL.C - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: - "Step 1: TH prompts the operator to make the DUT send one or more - supported commands from the Level Control cluster" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - ./chip-tool levelcontrol move-to-level 125 10 0 0 1 1 - Verify DUT receives move-to-level command response on the TH(all-clusters-app) Log: - [1657915209.151256][3245:3245] CHIP:DMG: InvokeRequestMessage = - [1657915209.151306][3245:3245] CHIP:DMG: { - [1657915209.151348][3245:3245] CHIP:DMG: suppressResponse = false, - [1657915209.151397][3245:3245] CHIP:DMG: timedRequest = false, - [1657915209.151441][3245:3245] CHIP:DMG: InvokeRequests = - [1657915209.151498][3245:3245] CHIP:DMG: [ - [1657915209.151543][3245:3245] CHIP:DMG: CommandDataIB = - [1657915209.151594][3245:3245] CHIP:DMG: { - [1657915209.151642][3245:3245] CHIP:DMG: CommandPathIB = - [1657915209.151699][3245:3245] CHIP:DMG: { - [1657915209.151752][3245:3245] CHIP:DMG: EndpointId = 0x1, - [1657915209.151814][3245:3245] CHIP:DMG: ClusterId = 0x8, - [1657915209.151874][3245:3245] CHIP:DMG: CommandId = 0x0, - [1657915209.151929][3245:3245] CHIP:DMG: }, - [1657915209.151993][3245:3245] CHIP:DMG: - [1657915209.152041][3245:3245] CHIP:DMG: CommandFields = - [1657915209.152128][3245:3245] CHIP:DMG: { - [1657915209.152190][3245:3245] CHIP:DMG: 0x0 = 125, - [1657915209.152251][3245:3245] CHIP:DMG: 0x1 = 10, - [1657915209.152311][3245:3245] CHIP:DMG: 0x2 = 0, - [1657915209.152370][3245:3245] CHIP:DMG: 0x3 = 0, - [1657915209.152424][3245:3245] CHIP:DMG: }, - [1657915209.152474][3245:3245] CHIP:DMG: }, - [1657915209.152530][3245:3245] CHIP:DMG: - [1657915209.152574][3245:3245] CHIP:DMG: ], - [1657915209.152630][3245:3245] CHIP:DMG: - [1657915209.152674][3245:3245] CHIP:DMG: InteractionModelRevision = 1 - [1657915209.152717][3245:3245] CHIP:DMG: }, - - - ./chip-tool levelcontrol move 1 5 0 0 1 1 - Verify DUT receives move command response on the TH(all-clusters-app) Log: - [1657915236.437571][3245:3245] CHIP:DMG: InvokeRequestMessage = - [1657915236.437601][3245:3245] CHIP:DMG: { - [1657915236.437624][3245:3245] CHIP:DMG: suppressResponse = false, - [1657915236.437658][3245:3245] CHIP:DMG: timedRequest = false, - [1657915236.437684][3245:3245] CHIP:DMG: InvokeRequests = - [1657915236.437719][3245:3245] CHIP:DMG: [ - [1657915236.437747][3245:3245] CHIP:DMG: CommandDataIB = - [1657915236.437779][3245:3245] CHIP:DMG: { - [1657915236.437809][3245:3245] CHIP:DMG: CommandPathIB = - [1657915236.437842][3245:3245] CHIP:DMG: { - [1657915236.437876][3245:3245] CHIP:DMG: EndpointId = 0x1, - [1657915236.437909][3245:3245] CHIP:DMG: ClusterId = 0x8, - [1657915236.437942][3245:3245] CHIP:DMG: CommandId = 0x1, - [1657915236.437972][3245:3245] CHIP:DMG: }, - [1657915236.438005][3245:3245] CHIP:DMG: - [1657915236.438035][3245:3245] CHIP:DMG: CommandFields = - [1657915236.438066][3245:3245] CHIP:DMG: { - [1657915236.438099][3245:3245] CHIP:DMG: 0x0 = 1, - [1657915236.438133][3245:3245] CHIP:DMG: 0x1 = 5, - [1657915236.438167][3245:3245] CHIP:DMG: 0x2 = 0, - [1657915236.438199][3245:3245] CHIP:DMG: 0x3 = 0, - [1657915236.438232][3245:3245] CHIP:DMG: }, - [1657915236.438261][3245:3245] CHIP:DMG: }, - [1657915236.438295][3245:3245] CHIP:DMG: - [1657915236.438321][3245:3245] CHIP:DMG: ], - [1657915236.438352][3245:3245] CHIP:DMG: - [1657915236.438376][3245:3245] CHIP:DMG: InteractionModelRevision = 1 - [1657915236.438402][3245:3245] CHIP:DMG: }, - - - ./chip-tool levelcontrol step 1 10 0 0 0 1 1 - Verify DUT receives step command response on the TH(all-clusters-app) Log: - [1659607055.170850][3434:3434] CHIP:DMG: InvokeRequestMessage = - [1659607055.170877][3434:3434] CHIP:DMG: { - [1659607055.170900][3434:3434] CHIP:DMG: suppressResponse = false, - [1659607055.170927][3434:3434] CHIP:DMG: timedRequest = false, - [1659607055.170952][3434:3434] CHIP:DMG: InvokeRequests = - [1659607055.170983][3434:3434] CHIP:DMG: [ - [1659607055.171008][3434:3434] CHIP:DMG: CommandDataIB = - [1659607055.171035][3434:3434] CHIP:DMG: { - [1659607055.171061][3434:3434] CHIP:DMG: CommandPathIB = - [1659607055.171093][3434:3434] CHIP:DMG: { - [1659607055.171124][3434:3434] CHIP:DMG: EndpointId = 0x1, - [1659607055.171160][3434:3434] CHIP:DMG: ClusterId = 0x8, - [1659607055.171193][3434:3434] CHIP:DMG: CommandId = 0x2, - [1659607055.171219][3434:3434] CHIP:DMG: }, - [1659607055.171251][3434:3434] CHIP:DMG: - [1659607055.171277][3434:3434] CHIP:DMG: CommandFields = - [1659607055.171307][3434:3434] CHIP:DMG: { - [1659607055.171340][3434:3434] CHIP:DMG: 0x0 = 1, - [1659607055.171373][3434:3434] CHIP:DMG: 0x1 = 10, - [1659607055.171409][3434:3434] CHIP:DMG: 0x2 = 0, - [1659607055.171439][3434:3434] CHIP:DMG: 0x3 = 0, - [1659607055.171474][3434:3434] CHIP:DMG: 0x4 = 0, - [1659607055.171504][3434:3434] CHIP:DMG: }, - [1659607055.171532][3434:3434] CHIP:DMG: }, - [1659607055.171563][3434:3434] CHIP:DMG: - [1659607055.171586][3434:3434] CHIP:DMG: ], - [1659607055.171617][3434:3434] CHIP:DMG: - [1659607055.171641][3434:3434] CHIP:DMG: InteractionModelRevision = 1 - [1659607055.171665][3434:3434] CHIP:DMG: }, - [1659607055.171731][3434:3434] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o - - - - ./chip-tool levelcontrol stop 0 0 1 1 - Verify DUT receives stop command response on the TH(all-clusters-app) Log: - [1657915273.417099][3245:3245] CHIP:DMG: InvokeRequestMessage = - [1657915273.417157][3245:3245] CHIP:DMG: { - [1657915273.417205][3245:3245] CHIP:DMG: suppressResponse = false, - [1657915273.417260][3245:3245] CHIP:DMG: timedRequest = false, - [1657915273.417311][3245:3245] CHIP:DMG: InvokeRequests = - [1657915273.417376][3245:3245] CHIP:DMG: [ - [1657915273.417428][3245:3245] CHIP:DMG: CommandDataIB = - [1657915273.417484][3245:3245] CHIP:DMG: { - [1657915273.417545][3245:3245] CHIP:DMG: CommandPathIB = - [1657915273.417605][3245:3245] CHIP:DMG: { - [1657915273.417669][3245:3245] CHIP:DMG: EndpointId = 0x1, - [1657915273.417739][3245:3245] CHIP:DMG: ClusterId = 0x8, - [1657915273.417806][3245:3245] CHIP:DMG: CommandId = 0x3, - [1657915273.417871][3245:3245] CHIP:DMG: }, - [1657915273.417934][3245:3245] CHIP:DMG: - [1657915273.417988][3245:3245] CHIP:DMG: CommandFields = - [1657915273.418051][3245:3245] CHIP:DMG: { - [1657915273.418117][3245:3245] CHIP:DMG: 0x0 = 0, - [1657915273.418185][3245:3245] CHIP:DMG: 0x1 = 0, - [1657915273.418246][3245:3245] CHIP:DMG: }, - [1657915273.418298][3245:3245] CHIP:DMG: }, - [1657915273.418327][3245:3245] CHIP:DMG: - [1657915273.418350][3245:3245] CHIP:DMG: ], - [1657915273.418380][3245:3245] CHIP:DMG: - [1657915273.418458][3245:3245] CHIP:DMG: InteractionModelRevision = 1 - [1657915273.418483][3245:3245] CHIP:DMG: }, - - - ./chip-tool levelcontrol move-to-level-with-on-off 1 0 0 0 1 1 - Verify DUT receives move-to-level-with-on-off command response on the TH(all-clusters-app) Log: - [1659607213.257973][3434:3434] CHIP:DMG: InvokeRequestMessage = - [1659607213.258015][3434:3434] CHIP:DMG: { - [1659607213.258039][3434:3434] CHIP:DMG: suppressResponse = false, - [1659607213.258066][3434:3434] CHIP:DMG: timedRequest = false, - [1659607213.258090][3434:3434] CHIP:DMG: InvokeRequests = - [1659607213.258132][3434:3434] CHIP:DMG: [ - [1659607213.258158][3434:3434] CHIP:DMG: CommandDataIB = - [1659607213.258219][3434:3434] CHIP:DMG: { - [1659607213.258254][3434:3434] CHIP:DMG: CommandPathIB = - [1659607213.258300][3434:3434] CHIP:DMG: { - [1659607213.258339][3434:3434] CHIP:DMG: EndpointId = 0x1, - [1659607213.258387][3434:3434] CHIP:DMG: ClusterId = 0x8, - [1659607213.258432][3434:3434] CHIP:DMG: CommandId = 0x4, - [1659607213.258467][3434:3434] CHIP:DMG: }, - [1659607213.258512][3434:3434] CHIP:DMG: - [1659607213.258550][3434:3434] CHIP:DMG: CommandFields = - [1659607213.258587][3434:3434] CHIP:DMG: { - [1659607213.258629][3434:3434] CHIP:DMG: 0x0 = 1, - [1659607213.258677][3434:3434] CHIP:DMG: 0x1 = 0, - [1659607213.258715][3434:3434] CHIP:DMG: 0x2 = 0, - [1659607213.258761][3434:3434] CHIP:DMG: 0x3 = 0, - [1659607213.258801][3434:3434] CHIP:DMG: }, - [1659607213.258834][3434:3434] CHIP:DMG: }, - [1659607213.258876][3434:3434] CHIP:DMG: - [1659607213.258909][3434:3434] CHIP:DMG: ], - [1659607213.258942][3434:3434] CHIP:DMG: - [1659607213.258974][3434:3434] CHIP:DMG: InteractionModelRevision = 1 - [1659607213.258999][3434:3434] CHIP:DMG: }, - [1659607213.259078][3434:3434] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o - [1659607213.259117][3434:3434] CHIP:DMG: AccessControl: allowed - [1659607213.259146][3434:3434] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0008 Command=0x0000_0004 - [1659607213.259181][3434:3434] CHIP:ZCL: 0xaaaad3c4a860MOVE_TO_LEVEL_WITH_ON_OFF 1 0 - [1659607213.259217][3434:3434] CHIP:ZCL: Setting on/off to 0xaaaad3c4a800 due to level change - - - - ./chip-tool levelcontrol move-with-on-off 1 5 0 0 1 1 - Verify DUT receives move-with-on-off command response on the TH(all-clusters-app) Log: - [1659607307.208156][3434:3434] CHIP:DMG: InvokeRequestMessage = - [1659607307.208184][3434:3434] CHIP:DMG: { - [1659607307.208208][3434:3434] CHIP:DMG: suppressResponse = false, - [1659607307.208234][3434:3434] CHIP:DMG: timedRequest = false, - [1659607307.208258][3434:3434] CHIP:DMG: InvokeRequests = - [1659607307.208290][3434:3434] CHIP:DMG: [ - [1659607307.208315][3434:3434] CHIP:DMG: CommandDataIB = - [1659607307.208343][3434:3434] CHIP:DMG: { - [1659607307.208368][3434:3434] CHIP:DMG: CommandPathIB = - [1659607307.208420][3434:3434] CHIP:DMG: { - [1659607307.208457][3434:3434] CHIP:DMG: EndpointId = 0x1, - [1659607307.208496][3434:3434] CHIP:DMG: ClusterId = 0x8, - [1659607307.208533][3434:3434] CHIP:DMG: CommandId = 0x5, - [1659607307.208568][3434:3434] CHIP:DMG: }, - [1659607307.208601][3434:3434] CHIP:DMG: - [1659607307.208628][3434:3434] CHIP:DMG: CommandFields = - [1659607307.208659][3434:3434] CHIP:DMG: { - [1659607307.208694][3434:3434] CHIP:DMG: 0x0 = 1, - [1659607307.208731][3434:3434] CHIP:DMG: 0x1 = 5, - [1659607307.208769][3434:3434] CHIP:DMG: 0x2 = 0, - [1659607307.208806][3434:3434] CHIP:DMG: 0x3 = 0, - [1659607307.208842][3434:3434] CHIP:DMG: }, - [1659607307.208871][3434:3434] CHIP:DMG: }, - [1659607307.208902][3434:3434] CHIP:DMG: - [1659607307.208926][3434:3434] CHIP:DMG: ], - [1659607307.208956][3434:3434] CHIP:DMG: - [1659607307.208980][3434:3434] CHIP:DMG: InteractionModelRevision = 1 - [1659607307.209004][3434:3434] CHIP:DMG: }, - [1659607307.209073][3434:3434] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o - [1659607307.209111][3434:3434] CHIP:DMG: AccessControl: allowed - [1659607307.209139][3434:3434] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0008 Command=0x0000_0005 - [1659607307.209176][3434:3434] CHIP:ZCL: 0xaaaad3c4a860MOVE_WITH_ON_OFF 1 5 - - - - ./chip-tool levelcontrol step-with-on-off 1 15 123 0 0 1 1 - Verify DUT receives step-with-on-off command response on the TH(all-clusters-app) Log: - [1659607424.990107][3434:3434] CHIP:DMG: InvokeRequestMessage = - [1659607424.990142][3434:3434] CHIP:DMG: { - [1659607424.990173][3434:3434] CHIP:DMG: suppressResponse = false, - [1659607424.990235][3434:3434] CHIP:DMG: timedRequest = false, - [1659607424.990282][3434:3434] CHIP:DMG: InvokeRequests = - [1659607424.990326][3434:3434] CHIP:DMG: [ - [1659607424.990360][3434:3434] CHIP:DMG: CommandDataIB = - [1659607424.990397][3434:3434] CHIP:DMG: { - [1659607424.990431][3434:3434] CHIP:DMG: CommandPathIB = - [1659607424.990470][3434:3434] CHIP:DMG: { - [1659607424.990512][3434:3434] CHIP:DMG: EndpointId = 0x1, - [1659607424.990557][3434:3434] CHIP:DMG: ClusterId = 0x8, - [1659607424.990602][3434:3434] CHIP:DMG: CommandId = 0x6, - [1659607424.990648][3434:3434] CHIP:DMG: }, - [1659607424.990692][3434:3434] CHIP:DMG: - [1659607424.990727][3434:3434] CHIP:DMG: CommandFields = - [1659607424.990773][3434:3434] CHIP:DMG: { - [1659607424.990816][3434:3434] CHIP:DMG: 0x0 = 1, - [1659607424.990862][3434:3434] CHIP:DMG: 0x1 = 15, - [1659607424.990910][3434:3434] CHIP:DMG: 0x2 = 123, - [1659607424.990951][3434:3434] CHIP:DMG: 0x3 = 0, - [1659607424.990996][3434:3434] CHIP:DMG: 0x4 = 0, - [1659607424.991035][3434:3434] CHIP:DMG: }, - [1659607424.991073][3434:3434] CHIP:DMG: }, - [1659607424.991118][3434:3434] CHIP:DMG: - [1659607424.991150][3434:3434] CHIP:DMG: ], - [1659607424.991192][3434:3434] CHIP:DMG: - [1659607424.991225][3434:3434] CHIP:DMG: InteractionModelRevision = 1 - [1659607424.991260][3434:3434] CHIP:DMG: }, - [1659607424.991350][3434:3434] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o - [1659607424.991400][3434:3434] CHIP:DMG: AccessControl: allowed - [1659607424.991438][3434:3434] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0008 Command=0x0000_0006 - [1659607424.991490][3434:3434] CHIP:ZCL: 0xaaaad3c4a860STEP_WITH_ON_OFF 1 f 7b - - - ./chip-tool levelcontrol stop-with-on-off 0 0 1 1 - Verify DUT receives stop-with-on-off command response on the TH(all-clusters-app) Log: - Verify in TH all-clusters-app[1659607566.304117][3434:3434] CHIP:DMG: InvokeRequestMessage = - [1659607566.304146][3434:3434] CHIP:DMG: { - [1659607566.304169][3434:3434] CHIP:DMG: suppressResponse = false, - [1659607566.304196][3434:3434] CHIP:DMG: timedRequest = false, - [1659607566.304220][3434:3434] CHIP:DMG: InvokeRequests = - [1659607566.304252][3434:3434] CHIP:DMG: [ - [1659607566.304276][3434:3434] CHIP:DMG: CommandDataIB = - [1659607566.304303][3434:3434] CHIP:DMG: { - [1659607566.304328][3434:3434] CHIP:DMG: CommandPathIB = - [1659607566.304363][3434:3434] CHIP:DMG: { - [1659607566.304396][3434:3434] CHIP:DMG: EndpointId = 0x1, - [1659607566.304434][3434:3434] CHIP:DMG: ClusterId = 0x8, - [1659607566.304471][3434:3434] CHIP:DMG: CommandId = 0x7, - [1659607566.304506][3434:3434] CHIP:DMG: }, - [1659607566.304539][3434:3434] CHIP:DMG: - [1659607566.304565][3434:3434] CHIP:DMG: CommandFields = - [1659607566.304596][3434:3434] CHIP:DMG: { - [1659607566.304629][3434:3434] CHIP:DMG: 0x0 = 0, - [1659607566.304667][3434:3434] CHIP:DMG: 0x1 = 0, - [1659607566.304703][3434:3434] CHIP:DMG: }, - [1659607566.304733][3434:3434] CHIP:DMG: }, - [1659607566.304762][3434:3434] CHIP:DMG: - [1659607566.304786][3434:3434] CHIP:DMG: ], - [1659607566.304817][3434:3434] CHIP:DMG: - [1659607566.304841][3434:3434] CHIP:DMG: InteractionModelRevision = 1 - [1659607566.304865][3434:3434] CHIP:DMG: }, - [1659607566.304932][3434:3434] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o - [1659607566.304970][3434:3434] CHIP:DMG: AccessControl: allowed - [1659607566.304999][3434:3434] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0008 Command=0x0000_0007 - [1659607566.305032][3434:3434] CHIP:ZCL: 0xaaaad3c4a860STOP_WITH_ON_OFF - [1659607566.305069][3434:3434] CHIP:DMG: Endpoint 1, Cluster 0x0000_0008 update version to 671abea5 - [1659607566.305110][3434:3434] CHIP:DMG: ICR moving to [ Preparing] - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LWM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LWM_1_1.yaml index 8d8d34d82f591b..e68e3f8ad88709 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_1_1.yaml @@ -33,65 +33,75 @@ tests: - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." verification: | - Verify that the DUT response contains the ClusterRevision attribute and has the value 1. + ./chip-tool laundrywashermode read cluster-revision 1 1 + + Verify the "ClusterRevision" value is of unit16 and reflects the highest revision number 1 on the TH(Chip-tool) and below is the sample log provided for the raspi platform: + + [1690184527.689706][15400:15402] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFFD DataVersion: 3075628268 + [1690184527.689762][15400:15402] CHIP:TOO: ClusterRevision: 1 disabled: true - label: "Step 3: TH reads from the DUT the FeatureMap attribute." verification: | - Verify that the DUT response contains the FeatureMap attribute and have the following bit set: + ./chip-tool laundrywashermode read feature-map 1 1 - bit 0: SHALL be 1 if and only if LWM.S.F00(DEPONOFF) + On the TH(Chip-tool) Log, Verify featureMap value is 1 If TCCM.S.F00(DEPONOFF) true, Otherwise 0, and below is the sample log provided for the raspi platform: + + [1690184539.350009][15403:15405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFFC DataVersion: 3075628268 + [1690184539.350062][15403:15405] CHIP:TOO: FeatureMap: 1 disabled: true - label: "Step 4: TH reads from the DUT the AttributeList attribute." verification: | - Verify that the DUT response contains the AttributeList attribute and have the list of supported attributes: - - The list SHALL include all the mandatory entries: - 0x0000, 0x0001, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd. - - The list MAY include these optional entries: - - 0x0002: SHALL be included if and only if LWM.S.A0002(StartUpMode) - - The list include entries based on feature support: - - - 0x0003 SHALL be included if and only if LWM.S.F00(DEPONOFF) - - - and SHALL NOT be included otherwise. - - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) - + ./chip-tool laundrywashermode read attribute-list 1 1 + + Verify the "AttributeList " should include the mandatory attributes (values 0, 1), + - global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528) and + - list may include optional attribute(value 0x0002), if MOD.S.A0004(StartUpMode) supports, + - list contains feature dependent attribute (values 0x0003), if MOD.S.F00(DEPONOFF) is true on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1690184549.210762][15408:15410] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFFB DataVersion: 3075628268 + [1690184549.210786][15408:15410] CHIP:TOO: AttributeList: 10 entries + [1690184549.210792][15408:15410] CHIP:TOO: [1]: 0 + [1690184549.210797][15408:15410] CHIP:TOO: [2]: 1 + [1690184549.210802][15408:15410] CHIP:TOO: [3]: 2 + [1690184549.210806][15408:15410] CHIP:TOO: [4]: 3 + [1690184549.210810][15408:15410] CHIP:TOO: [5]: 65528 + [1690184549.210815][15408:15410] CHIP:TOO: [6]: 65529 + [1690184549.210819][15408:15410] CHIP:TOO: [7]: 65530 + [1690184549.210823][15408:15410] CHIP:TOO: [8]: 65531 + [1690184549.210827][15408:15410] CHIP:TOO: [9]: 65532 + [1690184549.210831][15408:15410] CHIP:TOO: [10]: 65533 + disabled: true - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. + - label: "Step 5: TH reads from the DUT the EventList attribute." + verification: | + ./chip-tool laundrywashermode read event-list 1 1 + Verify "EventList" contains a list of supported events, for this cluster the list is emty(0 entries) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + [1690184560.096147][15413:15415] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFFA DataVersion: 3075628268 + [1690184560.096165][15413:15415] CHIP:TOO: EventList: 0 entries disabled: true - - label: "Step 5: TH reads from the DUT the AcceptedCommandList attribute." + - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." verification: | - Verify that the DUT response contains the AcceptedCommandList attribute and have the list of Accepted Command: - The list SHALL include all the mandatory entries: + ./chip-tool laundrywashermode read accepted-command-list 1 1 - 0x00 - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF) + Verify the "AcceptedCommandList" contains a list of mandatory commands (value 0) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. - - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + [1690184572.184880][15416:15418] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFF9 DataVersion: 3075628268 + [1690184572.184896][15416:15418] CHIP:TOO: AcceptedCommandList: 1 entries + [1690184572.184901][15416:15418] CHIP:TOO: [1]: 0 disabled: true - - label: "Step 6: TH reads from the DUT the GeneratedCommandList attribute." + - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." verification: | - Verify that the DUT response contains the GeneratedCommandList attribute and have the list of Generated Command: - The list SHALL include all the mandatory entries: - - 0x01 - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF) + ./chip-tool laundrywashermode read generated-command-list 1 1 - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. + Verify " GeneratedCommandList" contains a list of mandatory commands (value 1) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + [1690184586.309954][15419:15421] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFF8 DataVersion: 3075628268 + [1690184586.310020][15419:15421] CHIP:TOO: GeneratedCommandList: 1 entries + [1690184586.310043][15419:15421] CHIP:TOO: [1]: 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml index 411340898b769b..d5ccf5a9d956ca 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml @@ -34,42 +34,90 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: LWM.S.A0000 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has at least one entry - - Verify that each ModeOptionsStruct entry has a unique Mode field value - - Verify that each ModeOptionsStruct entry has a unique Label field value - - Verify that each ModeOptionsStruct entry’s ModeTags field, if not empty, has: - the values of the Value fields that are not larger than 16 bits - - for each Value field: Is the mode tag value a defined common tag value ( Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster derived tag value ( Normal, Heavy, {T_LIGHT}) or in the MfgTags (0x8000 to 0xBFFF) range - - if the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 - - - - Verify that at least one ModeOptionsStruct entry includes the Normal mode tag - - Save the Mode field values as supported_modes_dut + ./chip-tool laundrywashermode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries. + - Verify that list should contain at least one entry + - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value + - ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range + - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 + - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690184598.426478][15422:15424] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0000 DataVersion: 3075628268 + [1690184598.426516][15422:15424] CHIP:TOO: SupportedModes: 4 entries + [1690184598.426540][15422:15424] CHIP:TOO: [1]: { + [1690184598.426545][15422:15424] CHIP:TOO: Label: Normal + [1690184598.426552][15422:15424] CHIP:TOO: Mode: 0 + [1690184598.426558][15422:15424] CHIP:TOO: ModeTags: 1 entries + [1690184598.426565][15422:15424] CHIP:TOO: [1]: { + [1690184598.426569][15422:15424] CHIP:TOO: Value: 16384 + [1690184598.426572][15422:15424] CHIP:TOO: } + [1690184598.426576][15422:15424] CHIP:TOO: } + [1690184598.426585][15422:15424] CHIP:TOO: [2]: { + [1690184598.426589][15422:15424] CHIP:TOO: Label: Delicate + [1690184598.426593][15422:15424] CHIP:TOO: Mode: 1 + [1690184598.426599][15422:15424] CHIP:TOO: ModeTags: 3 entries + [1690184598.426605][15422:15424] CHIP:TOO: [1]: { + [1690184598.426609][15422:15424] CHIP:TOO: Value: 16385 + [1690184598.426612][15422:15424] CHIP:TOO: } + [1690184598.426617][15422:15424] CHIP:TOO: [2]: { + [1690184598.426621][15422:15424] CHIP:TOO: Value: 8 + [1690184598.426624][15422:15424] CHIP:TOO: } + [1690184598.426629][15422:15424] CHIP:TOO: [3]: { + [1690184598.426633][15422:15424] CHIP:TOO: Value: 2 + [1690184598.426637][15422:15424] CHIP:TOO: } + [1690184598.426640][15422:15424] CHIP:TOO: } + [1690184598.426648][15422:15424] CHIP:TOO: [3]: { + [1690184598.426652][15422:15424] CHIP:TOO: Label: Heavy + [1690184598.426655][15422:15424] CHIP:TOO: Mode: 2 + [1690184598.426661][15422:15424] CHIP:TOO: ModeTags: 2 entries + [1690184598.426666][15422:15424] CHIP:TOO: [1]: { + [1690184598.426669][15422:15424] CHIP:TOO: Value: 7 + [1690184598.426672][15422:15424] CHIP:TOO: } + [1690184598.426677][15422:15424] CHIP:TOO: [2]: { + [1690184598.426680][15422:15424] CHIP:TOO: Value: 16386 + [1690184598.426683][15422:15424] CHIP:TOO: } + [1690184598.426687][15422:15424] CHIP:TOO: } + [1690184598.426693][15422:15424] CHIP:TOO: [4]: { + [1690184598.426697][15422:15424] CHIP:TOO: Label: Whites + [1690184598.426700][15422:15424] CHIP:TOO: Mode: 3 + [1690184598.426705][15422:15424] CHIP:TOO: ModeTags: 1 entries + [1690184598.426710][15422:15424] CHIP:TOO: [1]: { + [1690184598.426713][15422:15424] CHIP:TOO: Value: 16387 + [1690184598.426716][15422:15424] CHIP:TOO: } + [1690184598.426720][15422:15424] CHIP:TOO: } disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer from supported_modes_dut + ./chip-tool laundrywashermode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + + [1690184642.211028][15428:15430] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628268 + [1690184642.211042][15428:15430] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the OnMode attribute." PICS: LWM.S.A0003 verification: | - Verify that the DUT response contains an integer from supported_modes_dut + ./chip-tool laundrywashermode read on-mode 1 1 + + Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform, Here OnMode attribute value is Null + + [1690184668.519026][15432:15434] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0003 DataVersion: 3075628268 + [1690184668.519041][15432:15434] CHIP:TOO: OnMode: null disabled: true - label: "Step 5: TH reads from the DUT the StartUpMode attribute." PICS: LWM.S.A0002 verification: | - Verify that the DUT response contains an integer from supported_modes_dut + ./chip-tool laundrywashermode read start-up-mode 1 1 + + Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer(As per spec default value is null) and value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null + + [1690184690.235037][15436:15438] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0002 DataVersion: 3075628268 + [1690184690.235048][15436:15438] CHIP:TOO: StartUpMode: null disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml index f980951d223a86..6ae4fce0d5d6f5 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml @@ -34,107 +34,201 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: LWM.S.A0000 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut + ./chip-tool laundrywashermode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690184703.795207][15439:15441] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0000 DataVersion: 3075628268 + [1690184703.795262][15439:15441] CHIP:TOO: SupportedModes: 4 entries + [1690184703.795291][15439:15441] CHIP:TOO: [1]: { + [1690184703.795296][15439:15441] CHIP:TOO: Label: Normal + [1690184703.795309][15439:15441] CHIP:TOO: Mode: 0 + [1690184703.795314][15439:15441] CHIP:TOO: ModeTags: 1 entries + [1690184703.795331][15439:15441] CHIP:TOO: [1]: { + [1690184703.795335][15439:15441] CHIP:TOO: Value: 16384 + [1690184703.795338][15439:15441] CHIP:TOO: } + [1690184703.795342][15439:15441] CHIP:TOO: } + [1690184703.795350][15439:15441] CHIP:TOO: [2]: { + [1690184703.795353][15439:15441] CHIP:TOO: Label: Delicate + [1690184703.795355][15439:15441] CHIP:TOO: Mode: 1 + [1690184703.795360][15439:15441] CHIP:TOO: ModeTags: 3 entries + [1690184703.795364][15439:15441] CHIP:TOO: [1]: { + [1690184703.795366][15439:15441] CHIP:TOO: Value: 16385 + [1690184703.795369][15439:15441] CHIP:TOO: } + [1690184703.795373][15439:15441] CHIP:TOO: [2]: { + [1690184703.795376][15439:15441] CHIP:TOO: Value: 8 + [1690184703.795379][15439:15441] CHIP:TOO: } + [1690184703.795382][15439:15441] CHIP:TOO: [3]: { + [1690184703.795386][15439:15441] CHIP:TOO: Value: 2 + [1690184703.795389][15439:15441] CHIP:TOO: } + [1690184703.795391][15439:15441] CHIP:TOO: } + [1690184703.795397][15439:15441] CHIP:TOO: [3]: { + [1690184703.795399][15439:15441] CHIP:TOO: Label: Heavy + [1690184703.795402][15439:15441] CHIP:TOO: Mode: 2 + [1690184703.795406][15439:15441] CHIP:TOO: ModeTags: 2 entries + [1690184703.795410][15439:15441] CHIP:TOO: [1]: { + [1690184703.795412][15439:15441] CHIP:TOO: Value: 7 + [1690184703.795414][15439:15441] CHIP:TOO: } + [1690184703.795418][15439:15441] CHIP:TOO: [2]: { + [1690184703.795422][15439:15441] CHIP:TOO: Value: 16386 + [1690184703.795424][15439:15441] CHIP:TOO: } + [1690184703.795426][15439:15441] CHIP:TOO: } + [1690184703.795432][15439:15441] CHIP:TOO: [4]: { + [1690184703.795435][15439:15441] CHIP:TOO: Label: Whites + [1690184703.795437][15439:15441] CHIP:TOO: Mode: 3 + [1690184703.795441][15439:15441] CHIP:TOO: ModeTags: 1 entries + [1690184703.795444][15439:15441] CHIP:TOO: [1]: { + [1690184703.795447][15439:15441] CHIP:TOO: Value: 16387 + [1690184703.795449][15439:15441] CHIP:TOO: } + [1690184703.795452][15439:15441] CHIP:TOO: } disabled: true - - label: "Step 2: TH reads from the DUT the CurrentMode attribute." + - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read current-mode 1 1 - Save the value as old_current_mode_dut + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut + - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th + [1690184717.887506][15442:15444] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628268 + [1690184717.887558][15442:15444] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 3: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 4: TH sends a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut" PICS: LWM.S.C00.Rsp verification: | - Verify that the DUT response contains a ChangeToModeResponse command w/ data fields: * Status, set to Success(0x00). + ./chip-tool laundrywashermode change-to-mode 0 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690184772.736083][15449:15451] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Command 0x0000_0001 + [1690184772.736098][15449:15451] CHIP:TOO: ChangeToModeResponse: { + [1690184772.736102][15449:15451] CHIP:TOO: status: 0 + [1690184772.736105][15449:15451] CHIP:TOO: } disabled: true - label: - "Step 4: Manually put the device in a state from which it will FAIL to + "Step 5: Manually put the device in a state from which it will FAIL to transition to PIXIT.LWM.MODE_CHANGE_FAIL" + PICS: PIXIT.LWM.CAN_TEST_MODE_FAILURE verification: | - + Manual operation required disabled: true - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + - label: "Step 6: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read current-mode 1 1 - Save the value as old_current_mode_dut + Verify on TH(chip-tool), Current modes attribute value is an integer value. + - Save the mode values for usage in steps 3 and below is the sample log provided for the raspi platform + + [1690184717.887506][15442:15444] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628268 + [1690184717.887558][15442:15444] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 6: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.LWM.MODE_CHANGE_FAIL" - PICS: LWM.S.C00.Rsp + PICS: PIXIT.LWM.CAN_TEST_MODE_FAILURE && LWM.S.C00.Rsp verification: | - Verify that the DUT responds with a ChangeToModeResponse command. + Note : Please skip this step as SDK is not enabled with this failure response - Verify that the Status field is set to GenericFailure(0x02) or in the MfgCodes (0x80 to 0xBF) range + ./chip-tool laundrywashermode change-to-mode 2 1 1 - Verify that the StatusText field has a length between 1 and 64 + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a GenericFailure(0x02) status response and below is the sample log provided for the raspi platform: + + [1690270057.274893][31185:31187] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0051 Command=0x0000_0001 + [1690270057.274901][31185:31187] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Command 0x0000_0001 + [1690270057.274915][31185:31187] CHIP:TOO: ChangeToModeResponse: { + [1690270057.274921][31185:31187] CHIP:TOO: status: 0 + [1690270057.274924][31185:31187] CHIP:TOO: } disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer value equal to old_current_mode_dut + ./chip-tool laundrywashermode read current-mode 1 1 + + Verify on TH(chip-tool), CurrentMode attribute value is an integer value and equal to old_current_mode_dut below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + + [1690184717.887506][15442:15444] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628268 + [1690184717.887558][15442:15444] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 8: Manually put the device in a state from which it will + "Step 9: Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.LWM.MODE_CHANGE_OK" verification: | - + Manual operation required disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - Save the value as old_current_mode_dut + [1690184717.887506][15442:15444] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628268 + [1690184717.887558][15442:15444] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 10: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 11: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.LWM.MODE_CHANGE_OK" PICS: LWM.S.C00.Rsp verification: | - Verify that the DUT responds with a ChangeToModeResponse command. + ./chip-tool laundrywashermode change-to-mode 3 1 1 - Verify that the Status field is set to Success(0x00) + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690185119.954667][15519:15521] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Command 0x0000_0001 + [1690185119.954682][15519:15521] CHIP:TOO: ChangeToModeResponse: { + [1690185119.954686][15519:15521] CHIP:TOO: status: 0 + [1690185119.954689][15519:15521] CHIP:TOO: } disabled: true - - label: "Step 11: TH reads from the DUT the CurrentMode attribute." + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer value equal to PIXIT.LWM.MODE_CHANGE_OK + ./chip-tool laundrywashermode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 11, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 3 + + [1690185143.611836][15523:15525] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628273 + [1690185143.611850][15523:15525] CHIP:TOO: CurrentMode: 3 disabled: true - label: - "Step 12: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 13: TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th" PICS: LWM.S.C00.Rsp verification: | - Verify that the DUT responds with a ChangeToModeResponse command. + ./chip-tool laundrywashermode change-to-mode 5 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a UnsupportedMode(0x01) status response and below is the sample log provided for the raspi platform: - Verify that the Status field is set to UnsupportedMode(0x01). + [1690185176.658256][15528:15530] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Command 0x0000_0001 + [1690185176.658275][15528:15530] CHIP:TOO: ChangeToModeResponse: { + [1690185176.658280][15528:15530] CHIP:TOO: status: 1 + [1690185176.658284][15528:15530] CHIP:TOO: } disabled: true - - label: "Step 13: TH reads from the DUT the CurrentMode attribute." + - label: "Step 14: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer value equal to PIXIT.LWM.MODE_CHANGE_OK + ./chip-tool laundrywashermode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 12, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 3 + + [1690185143.611836][15523:15525] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628273 + [1690185143.611850][15523:15525] CHIP:TOO: CurrentMode: 3 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml index 08a2b191a6ec85..7ce1d6da60ce93 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml @@ -24,6 +24,27 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To execute this test case set onmode to any integer value because as default it value has null. + + ./chip-tool laundrywashermode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690185319.728749][15566:15568] CHIP:DMG: StatusIB = + [1690185319.728752][15566:15568] CHIP:DMG: { + [1690185319.728755][15566:15568] CHIP:DMG: status = 0x00 (SUCCESS), + [1690185319.728758][15566:15568] CHIP:DMG: }, + disabled: true + + - label: "Precondition" + verification: | + 1. Laundry Washer Mode and OnOff clusters are available on the same endpoint + + 2. The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,31 +55,82 @@ tests: - label: "Step 2: TH reads from the DUT the OnMode attribute." PICS: LWM.S.A0003 && LWM.S.F00 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read on-mode 1 1 + + On TH(chip-tool), Verify that OnMode attribute value is an integer or Null + Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - Save the value as on_mode_dut + [1690185340.696395][15570:15572] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0003 DataVersion: 3936986762 + [1690185340.696410][15570:15572] CHIP:TOO: OnMode: 0 disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 && LWM.S.F00 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read current-mode 1 1 - Save the value as old_current_mode_dut + On TH(chip-tool), Verify that CurrentMode attribute is an integer. + Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - If on_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + NOTE: If on_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + + [1690185351.764944][15576:15578] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3936986762 + [1690185351.764982][15576:15578] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: LWM.S.A0000 && LWM.S.F00 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th. + ./chip-tool laundrywashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690185380.248193][15579:15581] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0000 DataVersion: 3936986762 + [1690185380.248223][15579:15581] CHIP:TOO: SupportedModes: 4 entries + [1690185380.248237][15579:15581] CHIP:TOO: [1]: { + [1690185380.248240][15579:15581] CHIP:TOO: Label: Normal + [1690185380.248246][15579:15581] CHIP:TOO: Mode: 0 + [1690185380.248250][15579:15581] CHIP:TOO: ModeTags: 1 entries + [1690185380.248255][15579:15581] CHIP:TOO: [1]: { + [1690185380.248258][15579:15581] CHIP:TOO: Value: 16384 + [1690185380.248261][15579:15581] CHIP:TOO: } + [1690185380.248264][15579:15581] CHIP:TOO: } + [1690185380.248271][15579:15581] CHIP:TOO: [2]: { + [1690185380.248273][15579:15581] CHIP:TOO: Label: Delicate + [1690185380.248276][15579:15581] CHIP:TOO: Mode: 1 + [1690185380.248281][15579:15581] CHIP:TOO: ModeTags: 3 entries + [1690185380.248285][15579:15581] CHIP:TOO: [1]: { + [1690185380.248288][15579:15581] CHIP:TOO: Value: 16385 + [1690185380.248290][15579:15581] CHIP:TOO: } + [1690185380.248294][15579:15581] CHIP:TOO: [2]: { + [1690185380.248296][15579:15581] CHIP:TOO: Value: 8 + [1690185380.248299][15579:15581] CHIP:TOO: } + [1690185380.248302][15579:15581] CHIP:TOO: [3]: { + [1690185380.248305][15579:15581] CHIP:TOO: Value: 2 + [1690185380.248307][15579:15581] CHIP:TOO: } + [1690185380.248310][15579:15581] CHIP:TOO: } + [1690185380.248315][15579:15581] CHIP:TOO: [3]: { + [1690185380.248318][15579:15581] CHIP:TOO: Label: Heavy + [1690185380.248320][15579:15581] CHIP:TOO: Mode: 2 + [1690185380.248324][15579:15581] CHIP:TOO: ModeTags: 2 entries + [1690185380.248328][15579:15581] CHIP:TOO: [1]: { + [1690185380.248330][15579:15581] CHIP:TOO: Value: 7 + [1690185380.248333][15579:15581] CHIP:TOO: } + [1690185380.248336][15579:15581] CHIP:TOO: [2]: { + [1690185380.248339][15579:15581] CHIP:TOO: Value: 16386 + [1690185380.248341][15579:15581] CHIP:TOO: } + [1690185380.248344][15579:15581] CHIP:TOO: } + [1690185380.248349][15579:15581] CHIP:TOO: [4]: { + [1690185380.248351][15579:15581] CHIP:TOO: Label: Whites + [1690185380.248354][15579:15581] CHIP:TOO: Mode: 3 + [1690185380.248357][15579:15581] CHIP:TOO: ModeTags: 1 entries + [1690185380.248361][15579:15581] CHIP:TOO: [1]: { + [1690185380.248363][15579:15581] CHIP:TOO: Value: 16387 + [1690185380.248366][15579:15581] CHIP:TOO: } + [1690185380.248368][15579:15581] CHIP:TOO: } disabled: true - label: @@ -66,25 +138,51 @@ tests: to new_mode_th" PICS: LWM.S.C00.Rsp && LWM.S.F00 verification: | - Verify that the DUT response contains a ChangeToModeResponse command w/ data fields: * Status, set to Success(0x00). + ./chip-tool laundrywashermode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931013.571019][20667:20669] CHIP:DMG: + [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = + [1684931013.571024][20667:20669] CHIP:DMG: { + [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931013.571030][20667:20669] CHIP:DMG: }, + [1684931013.571034][20667:20669] CHIP:DMG: disabled: true - label: "Step 6: TH sends a Off command to the DUT" PICS: OO.S.C00.Rsp && LWM.S.F00 verification: | - Verify DUT responds w/ status SUCCESS(0x00) + ./chip-tool onoff off 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931101.118656][20709:20711] CHIP:DMG: StatusIB = + [1684931101.118659][20709:20711] CHIP:DMG: { + [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931101.118665][20709:20711] CHIP:DMG: }, disabled: true - label: "Step 7: TH sends a On command to the DUT" PICS: OO.S.C01.Rsp && LWM.S.F00 verification: | - Verify DUT responds w/ status SUCCESS(0x00) + ./chip-tool onoff on 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931217.055514][20729:20731] CHIP:DMG: StatusIB = + [1684931217.055517][20729:20731] CHIP:DMG: { + [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931217.055523][20729:20731] CHIP:DMG: }, disabled: true - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 && LWM.S.F00 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 - The value is equal to on_mode_dut + [1690185481.653384][15610:15612] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3936986766 + [1690185481.653431][15610:15612] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml index a57017a25562df..2359c29402a4ff 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml @@ -24,6 +24,19 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To Execute the TC-LWM-3.2 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,50 +47,193 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: LWM.S.A0002 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer or null + - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is null - Save the value as startup_mode_dut + [1690185689.626227][15652:15654] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0002 DataVersion: 869931348 + [1690185689.626269][15652:15654] CHIP:TOO: StartUpMode: null disabled: true - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: LWM.S.A0001 + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: LWM.S.A0000 + verification: | + ./chip-tool laundrywashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690185724.484514][15658:15660] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0000 DataVersion: 869931348 + [1690185724.484543][15658:15660] CHIP:TOO: SupportedModes: 4 entries + [1690185724.484552][15658:15660] CHIP:TOO: [1]: { + [1690185724.484555][15658:15660] CHIP:TOO: Label: Normal + [1690185724.484561][15658:15660] CHIP:TOO: Mode: 0 + [1690185724.484565][15658:15660] CHIP:TOO: ModeTags: 1 entries + [1690185724.484570][15658:15660] CHIP:TOO: [1]: { + [1690185724.484573][15658:15660] CHIP:TOO: Value: 16384 + [1690185724.484576][15658:15660] CHIP:TOO: } + [1690185724.484579][15658:15660] CHIP:TOO: } + [1690185724.484585][15658:15660] CHIP:TOO: [2]: { + [1690185724.484588][15658:15660] CHIP:TOO: Label: Delicate + [1690185724.484590][15658:15660] CHIP:TOO: Mode: 1 + [1690185724.484595][15658:15660] CHIP:TOO: ModeTags: 3 entries + [1690185724.484598][15658:15660] CHIP:TOO: [1]: { + [1690185724.484601][15658:15660] CHIP:TOO: Value: 16385 + [1690185724.484603][15658:15660] CHIP:TOO: } + [1690185724.484607][15658:15660] CHIP:TOO: [2]: { + [1690185724.484609][15658:15660] CHIP:TOO: Value: 8 + [1690185724.484612][15658:15660] CHIP:TOO: } + [1690185724.484615][15658:15660] CHIP:TOO: [3]: { + [1690185724.484617][15658:15660] CHIP:TOO: Value: 2 + [1690185724.484620][15658:15660] CHIP:TOO: } + [1690185724.484622][15658:15660] CHIP:TOO: } + [1690185724.484627][15658:15660] CHIP:TOO: [3]: { + [1690185724.484630][15658:15660] CHIP:TOO: Label: Heavy + [1690185724.484632][15658:15660] CHIP:TOO: Mode: 2 + [1690185724.484636][15658:15660] CHIP:TOO: ModeTags: 2 entries + [1690185724.484639][15658:15660] CHIP:TOO: [1]: { + [1690185724.484642][15658:15660] CHIP:TOO: Value: 7 + [1690185724.484644][15658:15660] CHIP:TOO: } + [1690185724.484647][15658:15660] CHIP:TOO: [2]: { + [1690185724.484649][15658:15660] CHIP:TOO: Value: 16386 + [1690185724.484652][15658:15660] CHIP:TOO: } + [1690185724.484654][15658:15660] CHIP:TOO: } + [1690185724.484659][15658:15660] CHIP:TOO: [4]: { + [1690185724.484662][15658:15660] CHIP:TOO: Label: Whites + [1690185724.484664][15658:15660] CHIP:TOO: Mode: 3 + [1690185724.484667][15658:15660] CHIP:TOO: ModeTags: 1 entries + [1690185724.484670][15658:15660] CHIP:TOO: [1]: { + [1690185724.484673][15658:15660] CHIP:TOO: Value: 16387 + [1690185724.484675][15658:15660] CHIP:TOO: } + [1690185724.484678][15658:15660] CHIP:TOO: } + disabled: true + + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: LWM.S.A0002 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode write start-up-mode 0 1 1 - Save the value as old_current_mode_dut + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + [1690185636.156858][15647:15649] CHIP:DMG: StatusIB = + [1690185636.156870][15647:15649] CHIP:DMG: { + [1690185636.156881][15647:15649] CHIP:DMG: status = 0x00 (SUCCESS), + [1690185636.156892][15647:15649] CHIP:DMG: }, disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - PICS: LWM.S.A0000 + - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries + ./chip-tool laundrywashermode read current-mode 1 1 - Verify that the list has two or more entries + On TH(chip-tool), Verify CurrentMode attribute value is an integer, + - Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: - Save the Mode field values as supported_modes_dut + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8. - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th. + [1690185713.364316][15655:15657] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 869931348 + [1690185713.364364][15655:15657] CHIP:TOO: CurrentMode: 0 + disabled: true + + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." + PICS: LWM.S.A0000 + verification: | + ./chip-tool laundrywashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690185724.484514][15658:15660] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0000 DataVersion: 869931348 + [1690185724.484543][15658:15660] CHIP:TOO: SupportedModes: 4 entries + [1690185724.484552][15658:15660] CHIP:TOO: [1]: { + [1690185724.484555][15658:15660] CHIP:TOO: Label: Normal + [1690185724.484561][15658:15660] CHIP:TOO: Mode: 0 + [1690185724.484565][15658:15660] CHIP:TOO: ModeTags: 1 entries + [1690185724.484570][15658:15660] CHIP:TOO: [1]: { + [1690185724.484573][15658:15660] CHIP:TOO: Value: 16384 + [1690185724.484576][15658:15660] CHIP:TOO: } + [1690185724.484579][15658:15660] CHIP:TOO: } + [1690185724.484585][15658:15660] CHIP:TOO: [2]: { + [1690185724.484588][15658:15660] CHIP:TOO: Label: Delicate + [1690185724.484590][15658:15660] CHIP:TOO: Mode: 1 + [1690185724.484595][15658:15660] CHIP:TOO: ModeTags: 3 entries + [1690185724.484598][15658:15660] CHIP:TOO: [1]: { + [1690185724.484601][15658:15660] CHIP:TOO: Value: 16385 + [1690185724.484603][15658:15660] CHIP:TOO: } + [1690185724.484607][15658:15660] CHIP:TOO: [2]: { + [1690185724.484609][15658:15660] CHIP:TOO: Value: 8 + [1690185724.484612][15658:15660] CHIP:TOO: } + [1690185724.484615][15658:15660] CHIP:TOO: [3]: { + [1690185724.484617][15658:15660] CHIP:TOO: Value: 2 + [1690185724.484620][15658:15660] CHIP:TOO: } + [1690185724.484622][15658:15660] CHIP:TOO: } + [1690185724.484627][15658:15660] CHIP:TOO: [3]: { + [1690185724.484630][15658:15660] CHIP:TOO: Label: Heavy + [1690185724.484632][15658:15660] CHIP:TOO: Mode: 2 + [1690185724.484636][15658:15660] CHIP:TOO: ModeTags: 2 entries + [1690185724.484639][15658:15660] CHIP:TOO: [1]: { + [1690185724.484642][15658:15660] CHIP:TOO: Value: 7 + [1690185724.484644][15658:15660] CHIP:TOO: } + [1690185724.484647][15658:15660] CHIP:TOO: [2]: { + [1690185724.484649][15658:15660] CHIP:TOO: Value: 16386 + [1690185724.484652][15658:15660] CHIP:TOO: } + [1690185724.484654][15658:15660] CHIP:TOO: } + [1690185724.484659][15658:15660] CHIP:TOO: [4]: { + [1690185724.484662][15658:15660] CHIP:TOO: Label: Whites + [1690185724.484664][15658:15660] CHIP:TOO: Mode: 3 + [1690185724.484667][15658:15660] CHIP:TOO: ModeTags: 1 entries + [1690185724.484670][15658:15660] CHIP:TOO: [1]: { + [1690185724.484673][15658:15660] CHIP:TOO: Value: 16387 + [1690185724.484675][15658:15660] CHIP:TOO: } + [1690185724.484678][15658:15660] CHIP:TOO: } disabled: true - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: LWM.S.C00.Rsp verification: | - Verify that the DUT response contains a ChangeToModeResponse command w/ data fields: * Status, set to Success(0x00). + ./chip-tool laundrywashermode change-to-mode 1 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690185742.384243][15661:15663] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Command 0x0000_0001 + [1690185742.384257][15661:15663] CHIP:TOO: ChangeToModeResponse: { + [1690185742.384264][15661:15663] CHIP:TOO: status: 0 + [1690185742.384267][15661:15663] CHIP:TOO: } + disabled: true + + - label: "Step 8: Physically power cycle the device" + verification: | + Physically power cycle the device disabled: true - - label: "Step 6: Physically power cycle the device" + - label: "Step 9: TH reads from the DUT the StartUpMode attribute." + PICS: LWM.S.A0002 verification: | + ./chip-tool laundrywashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer value + - Save the value as new_start_up_mode_dut and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform, Here StartUpMode value is 0 + [1690185689.626227][15652:15654] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0002 DataVersion: 869931348 + [1690185689.626269][15652:15654] CHIP:TOO: StartUpMode: 0 disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool laundrywashermode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - The value is equal to startup_mode_dut + [1690185777.021610][15671:15673] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 2000229067 + [1690185777.021664][15671:15673] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml index af7a3a19f81f3d..7b50bfd9a06f9b 100644 --- a/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: NDOCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !NDOCONC.S.F00 && !NDOCONC.S.F01 && !NDOCONC.S.F02 && !NDOCONC.S.F03 + && !NDOCONC.S.F04 && !NDOCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given NDOCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && NDOCONC.S.F00 + PICS: NDOCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && !NDOCONC.S.F00 + PICS: " !NDOCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && NDOCONC.S.F01 + PICS: NDOCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && !NDOCONC.S.F01 + PICS: " !NDOCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && NDOCONC.S.F02 + PICS: NDOCONC.S.F02 && NDOCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && !NDOCONC.S.F02 + PICS: " !NDOCONC.S.F02 && !NDOCONC.S.F01 " response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && NDOCONC.S.F03 + PICS: NDOCONC.S.F03 && NDOCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && !NDOCONC.S.F03 + PICS: " !NDOCONC.S.F03 && !NDOCONC.S.F01 " response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && NDOCONC.S.F04 + PICS: NDOCONC.S.F04 && NDOCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && !NDOCONC.S.F04 + PICS: " !NDOCONC.S.F04 && NDOCONC.S.F00 " response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && NDOCONC.S.F05 + PICS: NDOCONC.S.F05 && NDOCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: NDOCONC.S.Afffc && !NDOCONC.S.F05 + PICS: " !NDOCONC.S.F05 && !NDOCONC.S.F00" response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && NDOCONC.S.A0007 && NDOCONC.S.F00 + PICS: NDOCONC.S.A0007 && NDOCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when NDOCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && !NDOCONC.S.A0007 + PICS: " !NDOCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && NDOCONC.S.F00 + PICS: NDOCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when NDOCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && !NDOCONC.S.F00 + PICS: " !NDOCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && NDOCONC.S.F04 + PICS: NDOCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when NDOCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && !NDOCONC.S.F04 + PICS: " !NDOCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && NDOCONC.S.F05 + PICS: NDOCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: NDOCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && !NDOCONC.S.F05 + PICS: " !NDOCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && NDOCONC.S.F01 + PICS: NDOCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: NDOCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: NDOCONC.S.Afffb && !NDOCONC.S.F01 + PICS: " !NDOCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: NDOCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: NDOCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_2_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_2_Simulated.yaml deleted file mode 100644 index 92d62439f7e8f0..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_2_Simulated.yaml +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 28.2.2. [TC-OCC-2.2] Attributes with client as DUT - -PICS: - - OCC.C - -config: - nodeId: 0x12344321 - cluster: "Occupancy Sensing" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads from the TH the (0x0000) Occupancy attribute" - PICS: OCC.C.A0000 - wait: "readAttribute" - attribute: "Occupancy" - - - label: "DUT reads from the TH the (0x0001) OccupancySensorType attribute" - PICS: OCC.C.A0001 - wait: "readAttribute" - attribute: "OccupancySensorType" - - - label: - "DUT reads from the TH the (0x0002) OccupancySensorTypeBitmap - attribute" - PICS: OCC.C.A0002 - wait: "readAttribute" - attribute: "OccupancySensorTypeBitmap" - - - label: - "DUT reads from the TH the (0x0010) PIROccupiedToUnoccupiedDelay - optional attribute" - PICS: OCC.C.A0010 - wait: "readAttribute" - attribute: "PIROccupiedToUnoccupiedDelay" - - - label: - "DUT reads from the TH the (0x0011) PIRUnoccupiedToOccupiedDelay - optional attribute" - PICS: OCC.C.A0011 - wait: "readAttribute" - attribute: "PIRUnoccupiedToOccupiedDelay" - - - label: - "DUT reads from the TH the (0x0012) PIRUnoccupiedToOccupiedThreshold - optional attribute" - PICS: OCC.C.A0012 - wait: "readAttribute" - attribute: "PIRUnoccupiedToOccupiedThreshold" - - - label: - "DUT reads from the TH the (0x0020) - UltrasonicOccupiedToUnoccupiedDelay optional attribute" - PICS: OCC.C.A0020 - wait: "readAttribute" - attribute: "UltrasonicOccupiedToUnoccupiedDelay" - - - label: - "DUT reads from the TH the (0x0021) - UltrasonicUnoccupiedToOccupiedDelay optional attribute" - PICS: OCC.C.A0021 - wait: "readAttribute" - attribute: "UltrasonicUnoccupiedToOccupiedDelay" - - - label: - "DUT reads from the TH the (0x0022) - UltrasonicUnoccupiedToOccupiedThreshold optional attribute" - PICS: OCC.C.A0022 - wait: "readAttribute" - attribute: "UltrasonicUnoccupiedToOccupiedThreshold" - - - label: - "DUT reads from the TH the (0x0030) - PhysicalContactOccupiedToUnoccupiedDelay optional attribute" - PICS: OCC.C.A0030 - wait: "readAttribute" - attribute: "PhysicalContactOccupiedToUnoccupiedDelay" - - - label: - "DUT reads from the TH the (0x0031) - PhysicalContactUnoccupiedToOccupiedDelay optional attribute" - PICS: OCC.C.A0031 - wait: "readAttribute" - attribute: "PhysicalContactUnoccupiedToOccupiedDelay" - - - label: - "DUT reads from the TH the (0x0032) - PhysicalContactUnoccupiedToOccupiedThreshold optional attribute" - PICS: OCC.C.A0032 - wait: "readAttribute" - attribute: "PhysicalContactUnoccupiedToOccupiedThreshold" diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_4_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_4_Simulated.yaml index 3417f29ea9fe32..03d37bcd79bff2 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_4_Simulated.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_4_Simulated.yaml @@ -22,7 +22,7 @@ PICS: config: nodeId: 0x12344321 cluster: "Occupancy Sensing" - endpoint: 0 + endpoint: 1 tests: #- label: "Wait for the device to be commissioned" diff --git a/src/app/tests/suites/certification/Test_TC_OO_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_OO_3_1_Simulated.yaml deleted file mode 100644 index e57e5b424496a8..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OO_3_1_Simulated.yaml +++ /dev/null @@ -1,374 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 3.3.1. [TC-OO-3.1] Attributes with client as DUT - -PICS: - - OO.C - - OO.C.AM-READ - - OO.C.AO-READ - - OO.C.AM-WRITE - - OO.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "On/Off" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute OnOff" - wait: "readAttribute" - attribute: "OnOff" - - - label: "Read attribute GlobalSceneControl" - wait: "readAttribute" - attribute: "GlobalSceneControl" - - - label: "Read attribute OnTime" - wait: "readAttribute" - attribute: "OnTime" - - - label: "Read attribute OffWaitTime" - wait: "readAttribute" - attribute: "OffWaitTime" - - - label: "Read attribute StartUpOnOff" - wait: "readAttribute" - attribute: "StartUpOnOff" - - - label: "Write attribute OnTime" - wait: "writeAttribute" - attribute: "OnTime" - arguments: - value: - - - label: "Write attribute OffWaitTime" - wait: "writeAttribute" - attribute: "OffWaitTime" - arguments: - value: - - - label: "Write attribute StartUpOnOff" - wait: "writeAttribute" - attribute: "StartUpOnOff" - arguments: - value: - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool onoff read attribute-list 1 1 - - Verify the " attribute-list response" on the TH (all-cluster-minimal-app) log: - - [1676891564.236044][13681:13681] CHIP:DMG: } - [1676891564.236047][13681:13681] CHIP:DMG: - [1676891564.236099][13681:13681] CHIP:DMG: ReportDataMessage = - [1676891564.236103][13681:13681] CHIP:DMG: { - [1676891564.236105][13681:13681] CHIP:DMG: AttributeReportIBs = - [1676891564.236111][13681:13681] CHIP:DMG: [ - [1676891564.236114][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236120][13681:13681] CHIP:DMG: { - [1676891564.236123][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236127][13681:13681] CHIP:DMG: { - [1676891564.236131][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236135][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236139][13681:13681] CHIP:DMG: { - [1676891564.236144][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236148][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236153][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236157][13681:13681] CHIP:DMG: } - [1676891564.236162][13681:13681] CHIP:DMG: - [1676891564.236166][13681:13681] CHIP:DMG: Data = [ - [1676891564.236170][13681:13681] CHIP:DMG: - [1676891564.236175][13681:13681] CHIP:DMG: ], - [1676891564.236179][13681:13681] CHIP:DMG: }, - [1676891564.236184][13681:13681] CHIP:DMG: - [1676891564.236188][13681:13681] CHIP:DMG: }, - [1676891564.236195][13681:13681] CHIP:DMG: - [1676891564.236199][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236205][13681:13681] CHIP:DMG: { - [1676891564.236208][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236212][13681:13681] CHIP:DMG: { - [1676891564.236216][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236220][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236225][13681:13681] CHIP:DMG: { - [1676891564.236229][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236233][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236238][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236243][13681:13681] CHIP:DMG: ListIndex = Null, - [1676891564.236247][13681:13681] CHIP:DMG: } - [1676891564.236252][13681:13681] CHIP:DMG: - [1676891564.236257][13681:13681] CHIP:DMG: Data = 0, - [1676891564.236260][13681:13681] CHIP:DMG: }, - [1676891564.236266][13681:13681] CHIP:DMG: - [1676891564.236269][13681:13681] CHIP:DMG: }, - [1676891564.236277][13681:13681] CHIP:DMG: - [1676891564.236280][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236286][13681:13681] CHIP:DMG: { - [1676891564.236290][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236294][13681:13681] CHIP:DMG: { - [1676891564.236299][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236306][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236314][13681:13681] CHIP:DMG: { - [1676891564.236321][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236330][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236337][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236344][13681:13681] CHIP:DMG: ListIndex = Null, - [1676891564.236348][13681:13681] CHIP:DMG: } - [1676891564.236354][13681:13681] CHIP:DMG: - [1676891564.236358][13681:13681] CHIP:DMG: Data = 65528, - [1676891564.236362][13681:13681] CHIP:DMG: }, - [1676891564.236367][13681:13681] CHIP:DMG: - [1676891564.236372][13681:13681] CHIP:DMG: }, - [1676891564.236380][13681:13681] CHIP:DMG: - [1676891564.236384][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236389][13681:13681] CHIP:DMG: { - [1676891564.236393][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236400][13681:13681] CHIP:DMG: { - [1676891564.236407][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236414][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236421][13681:13681] CHIP:DMG: { - [1676891564.236427][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236433][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236439][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236445][13681:13681] CHIP:DMG: ListIndex = Null, - [1676891564.236450][13681:13681] CHIP:DMG: } - [1676891564.236457][13681:13681] CHIP:DMG: - [1676891564.236463][13681:13681] CHIP:DMG: Data = 65529, - [1676891564.236468][13681:13681] CHIP:DMG: }, - [1676891564.236475][13681:13681] CHIP:DMG: - [1676891564.236480][13681:13681] CHIP:DMG: }, - [1676891564.236491][13681:13681] CHIP:DMG: - [1676891564.236495][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236503][13681:13681] CHIP:DMG: { - [1676891564.236507][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236513][13681:13681] CHIP:DMG: { - [1676891564.236518][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236523][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236529][13681:13681] CHIP:DMG: { - [1676891564.236534][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236540][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236546][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236551][13681:13681] CHIP:DMG: ListIndex = Null, - [1676891564.236557][13681:13681] CHIP:DMG: } - [1676891564.236563][13681:13681] CHIP:DMG: - [1676891564.236569][13681:13681] CHIP:DMG: Data = 65530, - [1676891564.236574][13681:13681] CHIP:DMG: }, - [1676891564.236581][13681:13681] CHIP:DMG: - [1676891564.236586][13681:13681] CHIP:DMG: }, - [1676891564.236596][13681:13681] CHIP:DMG: - [1676891564.236601][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236609][13681:13681] CHIP:DMG: { - [1676891564.236614][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236619][13681:13681] CHIP:DMG: { - [1676891564.236624][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236629][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236635][13681:13681] CHIP:DMG: { - [1676891564.236640][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236646][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236652][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236658][13681:13681] CHIP:DMG: ListIndex = Null, - [1676891564.236663][13681:13681] CHIP:DMG: } - [1676891564.236670][13681:13681] CHIP:DMG: - [1676891564.236675][13681:13681] CHIP:DMG: Data = 65531, - [1676891564.236681][13681:13681] CHIP:DMG: }, - [1676891564.236688][13681:13681] CHIP:DMG: - [1676891564.236693][13681:13681] CHIP:DMG: }, - [1676891564.236706][13681:13681] CHIP:DMG: - [1676891564.236711][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236720][13681:13681] CHIP:DMG: { - [1676891564.236728][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236736][13681:13681] CHIP:DMG: { - [1676891564.236743][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236749][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236757][13681:13681] CHIP:DMG: { - [1676891564.236765][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236772][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236780][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236787][13681:13681] CHIP:DMG: ListIndex = Null, - [1676891564.236793][13681:13681] CHIP:DMG: } - [1676891564.236802][13681:13681] CHIP:DMG: - [1676891564.236810][13681:13681] CHIP:DMG: Data = 65532, - [1676891564.236816][13681:13681] CHIP:DMG: }, - [1676891564.236825][13681:13681] CHIP:DMG: - [1676891564.236832][13681:13681] CHIP:DMG: }, - [1676891564.236846][13681:13681] CHIP:DMG: - [1676891564.236851][13681:13681] CHIP:DMG: AttributeReportIB = - [1676891564.236858][13681:13681] CHIP:DMG: { - [1676891564.236863][13681:13681] CHIP:DMG: AttributeDataIB = - [1676891564.236868][13681:13681] CHIP:DMG: { - [1676891564.236875][13681:13681] CHIP:DMG: DataVersion = 0x1b431685, - [1676891564.236883][13681:13681] CHIP:DMG: AttributePathIB = - [1676891564.236890][13681:13681] CHIP:DMG: { - [1676891564.236897][13681:13681] CHIP:DMG: Endpoint = 0x1, - [1676891564.236903][13681:13681] CHIP:DMG: Cluster = 0x6, - [1676891564.236911][13681:13681] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676891564.236918][13681:13681] CHIP:DMG: ListIndex = Null, - [1676891564.236926][13681:13681] CHIP:DMG: } - [1676891564.236936][13681:13681] CHIP:DMG: - [1676891564.236942][13681:13681] CHIP:DMG: Data = 65533, - [1676891564.236947][13681:13681] CHIP:DMG: }, - [1676891564.236955][13681:13681] CHIP:DMG: - [1676891564.236959][13681:13681] CHIP:DMG: }, - [1676891564.236967][13681:13681] CHIP:DMG: - [1676891564.236971][13681:13681] CHIP:DMG: ], - [1676891564.236999][13681:13681] CHIP:DMG: - [1676891564.237003][13681:13681] CHIP:DMG: SuppressResponse = true, - [1676891564.237008][13681:13681] CHIP:DMG: InteractionModelRevision = 1 - [1676891564.237012][13681:13681] CHIP:DMG: } - - - - ./chip-tool onoff read feature-map 1 1 - - Verify the " feature-map response" on the TH (all-cluster-minimal-app) log: - - [1666943673.928358][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943673.928360][12769:12769] CHIP:DMG: { - [1666943673.928362][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943673.928367][12769:12769] CHIP:DMG: [ - [1666943673.928369][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943673.928374][12769:12769] CHIP:DMG: { - [1666943673.928376][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943673.928379][12769:12769] CHIP:DMG: { - [1666943673.928382][12769:12769] CHIP:DMG: DataVersion = 0xfcb17157, - [1666943673.928385][12769:12769] CHIP:DMG: AttributePathIB = - [1666943673.928388][12769:12769] CHIP:DMG: { - [1666943673.928392][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943673.928395][12769:12769] CHIP:DMG: Cluster = 0x6, - [1666943673.928398][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666943673.928401][12769:12769] CHIP:DMG: } - [1666943673.928404][12769:12769] CHIP:DMG: - [1666943673.928407][12769:12769] CHIP:DMG: Data = 0, - [1666943673.928410][12769:12769] CHIP:DMG: }, - [1666943673.928413][12769:12769] CHIP:DMG: - [1666943673.928416][12769:12769] CHIP:DMG: }, - [1666943673.928419][12769:12769] CHIP:DMG: - [1666943673.928422][12769:12769] CHIP:DMG: ], - [1666943673.928425][12769:12769] CHIP:DMG: - [1666943673.928428][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943673.928430][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666943673.928432][12769:12769] CHIP:DMG: } - - - ./chip-tool onoff read on-off 1 1 - - Verify the " on-off response" on the TH (all-cluster-minimal-app) log: - - [1666943688.655282][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943688.655285][12769:12769] CHIP:DMG: { - [1666943688.655286][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943688.655290][12769:12769] CHIP:DMG: [ - [1666943688.655291][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943688.655294][12769:12769] CHIP:DMG: { - [1666943688.655296][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943688.655299][12769:12769] CHIP:DMG: { - [1666943688.655301][12769:12769] CHIP:DMG: DataVersion = 0xfcb17157, - [1666943688.655303][12769:12769] CHIP:DMG: AttributePathIB = - [1666943688.655305][12769:12769] CHIP:DMG: { - [1666943688.655307][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943688.655309][12769:12769] CHIP:DMG: Cluster = 0x6, - [1666943688.655312][12769:12769] CHIP:DMG: Attribute = 0x0000_0000, - [1666943688.655314][12769:12769] CHIP:DMG: } - [1666943688.655316][12769:12769] CHIP:DMG: - [1666943688.655319][12769:12769] CHIP:DMG: Data = false, - [1666943688.655321][12769:12769] CHIP:DMG: }, - [1666943688.655323][12769:12769] CHIP:DMG: - [1666943688.655325][12769:12769] CHIP:DMG: }, - [1666943688.655328][12769:12769] CHIP:DMG: - [1666943688.655330][12769:12769] CHIP:DMG: ], - [1666943688.655333][12769:12769] CHIP:DMG: - [1666943688.655335][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943688.655336][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666943688.655338][12769:12769] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - ./chip-tool onoff read global-scene-control 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool onoff read on-time 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool onoff read off-wait-time 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool onoff read start-up-on-off 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - ./chip-tool onoff write on-time 1 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool onoff write off-wait-time 22 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool onoff write start-up-on-off 2 1 1 - - on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_1.yaml index 576f0c51f504dc..efe99c934acb11 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_1.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verifications: | + While verifying below test case we will get 0 and null value for few attributes, as per spec 0 and null value is default for those attributes. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)" diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml index 0eec0cd3ec0763..fb0fc296d816cc 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verifications: | + This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)" diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_3.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_3.yaml index a4fd1a62876684..d0e4cf49ff83b8 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_3.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verifications: | + This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)" diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_4.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_4.yaml index 039d0bfbf8556b..7e225c5f789109 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_4.yaml @@ -32,7 +32,7 @@ tests: - label: "Step 2: Set up a subscription to the OperationalError event" PICS: OPSTATE.S.E00 verification: | - + ./chip-tool operationalstate subscribe operational-error 5 15 1 1 disabled: true - label: @@ -40,15 +40,18 @@ tests: OperationalError event" PICS: OPSTATE.S.E00 verification: | - Receive an Notify event containing an ErrorState struct populated as follows: - An ErrorStateID that shall contain an enum 8. Verify the ErrorStateID is a defined error (NoError(0x00), UnableToStartOrResume(0x01), UnableToCompleteOperation(0x02), CommandInvalidInState(0x03)) or in the range 0x8000 to 0xBFFF. - If the ErrorStateID is in the range 0x8000 to 0xBFFF, then an ErrorStateLabel that is a human readable string. - If the ErrorStateId is not in the range 0x8000 to 0xBFFF then no ErrorStateLabel shall be present. - Optionally an ErrorStateDetails. If present, this shall be a human readable string. + After the subscription interval via the TH (chip-tool) verify: + - reception of an OperationalError Event + - ErrorStateID is a defined error + - If the ErrorStateID is manufacturer specific, inclusion of an ErrorStateLabel, not present otherwise + - Optionally an ErrorStateDetails disabled: true - label: "Step 4: TH reads from the DUT the OperationalState attribute" PICS: OPSTATE.S.A0004 verification: | - Verify that the DUT response contains an enum8 set to Error(0x03). + ./chip-tool operationalstate read operational-state 1 1 + + Via the TH (chip-tool), verify: + - the response has an OperationalStateID field that is set to 0x03 (Error) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml index ea9734d4ef9a4c..3cc04f15d736cf 100644 --- a/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: OZCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !OZCONC.S.F00 && !OZCONC.S.F01 && !OZCONC.S.F02 && !OZCONC.S.F03 && + !OZCONC.S.F04 && !OZCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given OZCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && OZCONC.S.F00 + PICS: OZCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && !OZCONC.S.F00 + PICS: " !OZCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && OZCONC.S.F01 + PICS: OZCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && !OZCONC.S.F01 + PICS: " !OZCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && OZCONC.S.F02 + PICS: OZCONC.S.F02 && OZCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && !OZCONC.S.F02 + PICS: " !OZCONC.S.F02 && !OZCONC.S.F01" response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && OZCONC.S.F03 + PICS: OZCONC.S.F03 && OZCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && !OZCONC.S.F03 + PICS: " !OZCONC.S.F03 && !OZCONC.S.F01 " response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && OZCONC.S.F04 + PICS: OZCONC.S.F04 && OZCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && !OZCONC.S.F04 + PICS: " !OZCONC.S.F04 && !OZCONC.S.F00" response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && OZCONC.S.F05 + PICS: OZCONC.S.F05 && OZCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: OZCONC.S.Afffc && !OZCONC.S.F05 + PICS: " !OZCONC.S.F05 && !OZCONC.S.F00 " response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && OZCONC.S.A0007 && OZCONC.S.F00 + PICS: OZCONC.S.A0007 && OZCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when OZCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && !OZCONC.S.A0007 + PICS: " !OZCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && OZCONC.S.F00 + PICS: OZCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when OZCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && !OZCONC.S.F00 + PICS: " !OZCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && OZCONC.S.F04 + PICS: OZCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when OZCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && !OZCONC.S.F04 + PICS: " !OZCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && OZCONC.S.F05 + PICS: OZCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: OZCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && !OZCONC.S.F05 + PICS: " !OZCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && OZCONC.S.F01 + PICS: OZCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: OZCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: OZCONC.S.Afffb && !OZCONC.S.F01 + PICS: " !OZCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: OZCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: OZCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_PCC_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_PCC_3_1_Simulated.yaml deleted file mode 100644 index 3eb8f82c0146ff..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_PCC_3_1_Simulated.yaml +++ /dev/null @@ -1,494 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 15.1.1. [TC-PCC-3.1] Global attributes with server as DUT - -PICS: - - PCC.C - - PCC.C.AM-READ - - PCC.C.AO-READ - - PCC.C.AM-WRITE - - PCC.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Pump Configuration and Control" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - #Read Mandatory attributes - - label: "Read attribute MaxPressure" - PICS: PCC.C.AM-READ - wait: "readAttribute" - attribute: "MaxPressure" - - - label: "Read attribute MaxSpeed" - PICS: PCC.C.AM-READ - wait: "readAttribute" - attribute: "MaxSpeed" - - - label: "Read attribute MaxFlow" - PICS: PCC.C.AM-READ - wait: "readAttribute" - attribute: "MaxFlow" - - - label: "Read attribute EffectiveOperationMode" - PICS: PCC.C.AM-READ - wait: "readAttribute" - attribute: "EffectiveOperationMode" - - - label: "Read attribute EffectiveControlMode" - PICS: PCC.C.AM-READ - wait: "readAttribute" - attribute: "EffectiveControlMode" - - - label: "Read attribute Capacity" - PICS: PCC.C.AM-READ - wait: "readAttribute" - attribute: "Capacity" - - - label: "Read attribute OperationMode" - PICS: PCC.C.AM-READ - wait: "readAttribute" - attribute: "OperationMode" - - #Read Optional attributes - - label: "Read attribute MinConstPressure" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MinConstPressure" - - - label: "Read attribute MaxConstPressure" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MaxConstPressure" - - - label: "Read attribute MinCompPressure" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MinCompPressure" - - - label: "Read attribute MaxCompPressure" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MaxCompPressure" - - - label: "Read attribute MinConstSpeed" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MinConstSpeed" - - - label: "Read attribute MaxConstSpeed" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MaxConstSpeed" - - - label: "Read attribute MinConstFlow" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MinConstFlow" - - - label: "Read attribute MaxConstFlow" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MaxConstFlow" - - - label: "Read attribute MinConstTemp" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MinConstTemp" - - - label: "Read attribute MaxConstTemp" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "MaxConstTemp" - - - label: "Read attribute PumpStatus" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "PumpStatus" - - - label: "Read attribute Speed" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "Speed" - - - label: "Read attribute LifetimeRunningHours" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "LifetimeRunningHours" - - - label: "Read attribute Power" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "Power" - - - label: "Read attribute LifetimeEnergyConsumed" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "LifetimeEnergyConsumed" - - - label: "Read attribute ControlMode" - PICS: PCC.C.AO-READ - wait: "readAttribute" - attribute: "ControlMode" - - #Write attributes - - label: "Write attribute LifetimeRunningHours" - PICS: PCC.C.AO-WRITE - wait: "writeAttribute" - attribute: "LifetimeRunningHours" - arguments: - value: - - - label: "Write attribute LifetimeEnergyConsumed" - PICS: PCC.C.AO-WRITE - wait: "writeAttribute" - attribute: "LifetimeEnergyConsumed" - arguments: - value: - - - label: "Write attribute OperationMode" - PICS: PCC.C.AO-WRITE - wait: "writeAttribute" - attribute: "OperationMode" - arguments: - value: - - - label: "Write attribute ControlMode" - PICS: PCC.C.AO-WRITE - wait: "writeAttribute" - attribute: "ControlMode" - arguments: - value: - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool pumpconfigurationandcontrol read attribute-list 1 1 - - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1660745892.540246][3657:3657] CHIP:IM: Received Read request - [1660745892.540323][3657:3657] CHIP:DMG: ReadRequestMessage = - [1660745892.540346][3657:3657] CHIP:DMG: { - [1660745892.540364][3657:3657] CHIP:DMG: AttributePathIBs = - [1660745892.540401][3657:3657] CHIP:DMG: [ - [1660745892.540422][3657:3657] CHIP:DMG: AttributePathIB = - [1660745892.540452][3657:3657] CHIP:DMG: { - [1660745892.540487][3657:3657] CHIP:DMG: Endpoint = 0x1, - [1660745892.540517][3657:3657] CHIP:DMG: Cluster = 0x200, - [1660745892.540556][3657:3657] CHIP:DMG: Attribute = 0x0000_FFFB, - [1660745892.540582][3657:3657] CHIP:DMG: } - [1660745892.540616][3657:3657] CHIP:DMG: - [1660745892.540638][3657:3657] CHIP:DMG: ], - [1660745892.540673][3657:3657] CHIP:DMG: - [1660745892.540696][3657:3657] CHIP:DMG: isFabricFiltered = true, - [1660745892.540726][3657:3657] CHIP:DMG: InteractionModelRevision = 1 - [1660745892.540747][3657:3657] CHIP:DMG: }, - [1660745892.540821][3657:3657] CHIP:DMG: IM RH moving to [GeneratingReports] - [1660745892.540929][3657:3657] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1660745892.540954][3657:3657] CHIP:DMG: Cluster 200, Attribute fffb is dirty - [1660745892.540982][3657:3657] CHIP:DMG: Reading attribute: Cluster=0x0000_0200 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) - - ./chip-tool pumpconfigurationandcontrol read feature-map 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1660745929.334567][3657:3657] CHIP:IM: Received Read request - [1660745929.334641][3657:3657] CHIP:DMG: ReadRequestMessage = - [1660745929.334677][3657:3657] CHIP:DMG: { - [1660745929.334696][3657:3657] CHIP:DMG: AttributePathIBs = - [1660745929.334728][3657:3657] CHIP:DMG: [ - [1660745929.334750][3657:3657] CHIP:DMG: AttributePathIB = - [1660745929.334778][3657:3657] CHIP:DMG: { - [1660745929.334814][3657:3657] CHIP:DMG: Endpoint = 0x1, - [1660745929.334853][3657:3657] CHIP:DMG: Cluster = 0x200, - [1660745929.334884][3657:3657] CHIP:DMG: Attribute = 0x0000_FFFC, - [1660745929.334920][3657:3657] CHIP:DMG: } - [1660745929.334947][3657:3657] CHIP:DMG: - [1660745929.334978][3657:3657] CHIP:DMG: ], - [1660745929.335006][3657:3657] CHIP:DMG: - [1660745929.335037][3657:3657] CHIP:DMG: isFabricFiltered = true, - [1660745929.335059][3657:3657] CHIP:DMG: InteractionModelRevision = 1 - [1660745929.335079][3657:3657] CHIP:DMG: }, - [1660745929.335155][3657:3657] CHIP:DMG: IM RH moving to [GeneratingReports] - [1660745929.335256][3657:3657] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1660745929.335291][3657:3657] CHIP:DMG: Cluster 200, Attribute fffc is dirty - [1660745929.335311][3657:3657] CHIP:DMG: Reading attribute: Cluster=0x0000_0200 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - - - - ./chip-tool pumpconfigurationandcontrol read max-pressure 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1651148412.273866][2336:2336] CHIP:IM: Received Read request - [1651148412.273922][2336:2336] CHIP:DMG: ReadRequestMessage = - [1651148412.273950][2336:2336] CHIP:DMG: { - [1651148412.273972][2336:2336] CHIP:DMG: AttributePathIBs = - [1651148412.273999][2336:2336] CHIP:DMG: [ - [1651148412.274024][2336:2336] CHIP:DMG: AttributePathIB = - [1651148412.274063][2336:2336] CHIP:DMG: { - [1651148412.274093][2336:2336] CHIP:DMG: Endpoint = 0x1, - [1651148412.274126][2336:2336] CHIP:DMG: Cluster = 0x200, - [1651148412.274156][2336:2336] CHIP:DMG: Attribute = 0x0000_0000, - [1651148412.274186][2336:2336] CHIP:DMG: } - [1651148412.274216][2336:2336] CHIP:DMG: - [1651148412.274242][2336:2336] CHIP:DMG: ], - [1651148412.274271][2336:2336] CHIP:DMG: - [1651148412.274298][2336:2336] CHIP:DMG: isFabricFiltered = true, - [1651148412.274325][2336:2336] CHIP:DMG: InteractionModelRevision = 1 - [1651148412.274349][2336:2336] CHIP:DMG: }, - [1651148412.274424][2336:2336] CHIP:DMG: IM RH moving to [GeneratingReports] - - ./chip-tool pumpconfigurationandcontrol read max-speed 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1651148440.471321][2336:2336] CHIP:IM: Received Read request - [1651148440.471389][2336:2336] CHIP:DMG: ReadRequestMessage = - [1651148440.471416][2336:2336] CHIP:DMG: { - [1651148440.471438][2336:2336] CHIP:DMG: AttributePathIBs = - [1651148440.471481][2336:2336] CHIP:DMG: [ - [1651148440.471507][2336:2336] CHIP:DMG: AttributePathIB = - [1651148440.471546][2336:2336] CHIP:DMG: { - [1651148440.471571][2336:2336] CHIP:DMG: Endpoint = 0x1, - [1651148440.471609][2336:2336] CHIP:DMG: Cluster = 0x200, - [1651148440.471642][2336:2336] CHIP:DMG: Attribute = 0x0000_0001, - [1651148440.471681][2336:2336] CHIP:DMG: } - [1651148440.471719][2336:2336] CHIP:DMG: - [1651148440.471745][2336:2336] CHIP:DMG: ], - [1651148440.471770][2336:2336] CHIP:DMG: - [1651148440.471806][2336:2336] CHIP:DMG: isFabricFiltered = true, - [1651148440.471831][2336:2336] CHIP:DMG: InteractionModelRevision = 1 - [1651148440.471867][2336:2336] CHIP:DMG: }, - [1651148440.471947][2336:2336] CHIP:DMG: IM RH moving to [GeneratingReports] - [1651148440.472042][2336:2336] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - - ./chip-tool pumpconfigurationandcontrol read max-flow 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1651148472.518933][2336:2336] CHIP:IM: Received Read request - [1651148472.518993][2336:2336] CHIP:DMG: ReadRequestMessage = - [1651148472.519023][2336:2336] CHIP:DMG: { - [1651148472.519071][2336:2336] CHIP:DMG: AttributePathIBs = - [1651148472.519104][2336:2336] CHIP:DMG: [ - [1651148472.519163][2336:2336] CHIP:DMG: AttributePathIB = - [1651148472.519218][2336:2336] CHIP:DMG: { - [1651148472.519286][2336:2336] CHIP:DMG: Endpoint = 0x1, - [1651148472.519328][2336:2336] CHIP:DMG: Cluster = 0x200, - [1651148472.519364][2336:2336] CHIP:DMG: Attribute = 0x0000_0002, - [1651148472.519400][2336:2336] CHIP:DMG: } - [1651148472.519459][2336:2336] CHIP:DMG: - [1651148472.519521][2336:2336] CHIP:DMG: ], - [1651148472.519555][2336:2336] CHIP:DMG: - [1651148472.519584][2336:2336] CHIP:DMG: isFabricFiltered = true, - [1651148472.519666][2336:2336] CHIP:DMG: InteractionModelRevision = 1 - [1651148472.519695][2336:2336] CHIP:DMG: }, - [1651148472.519802][2336:2336] CHIP:DMG: IM RH moving to [GeneratingReports] - [1651148472.519971][2336:2336] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - - ./chip-tool pumpconfigurationandcontrol read effective-operation-mode 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - - [1651570515.206834][9246:9246] CHIP:IM: Received Read request - [1651570515.206917][9246:9246] CHIP:DMG: ReadRequestMessage = - [1651570515.206966][9246:9246] CHIP:DMG: { - [1651570515.207006][9246:9246] CHIP:DMG: AttributePathIBs = - [1651570515.207053][9246:9246] CHIP:DMG: [ - [1651570515.207098][9246:9246] CHIP:DMG: AttributePathIB = - [1651570515.207154][9246:9246] CHIP:DMG: { - [1651570515.207210][9246:9246] CHIP:DMG: Endpoint = 0x1, - [1651570515.207265][9246:9246] CHIP:DMG: Cluster = 0x200, - [1651570515.207322][9246:9246] CHIP:DMG: Attribute = 0x0000_0011, - [1651570515.207381][9246:9246] CHIP:DMG: } - [1651570515.207436][9246:9246] CHIP:DMG: - [1651570515.207483][9246:9246] CHIP:DMG: ], - [1651570515.207535][9246:9246] CHIP:DMG: - [1651570515.207587][9246:9246] CHIP:DMG: isFabricFiltered = true, - [1651570515.207634][9246:9246] CHIP:DMG: InteractionModelRevision = 1 - [1651570515.207677][9246:9246] CHIP:DMG: } - - ./chip-tool pumpconfigurationandcontrol read effective-control-mode 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1651570975.559213][9246:9246] CHIP:IM: Received Read request - [1651570975.559268][9246:9246] CHIP:DMG: ReadRequestMessage = - [1651570975.559295][9246:9246] CHIP:DMG: { - [1651570975.559317][9246:9246] CHIP:DMG: AttributePathIBs = - [1651570975.559343][9246:9246] CHIP:DMG: [ - [1651570975.559367][9246:9246] CHIP:DMG: AttributePathIB = - [1651570975.559400][9246:9246] CHIP:DMG: { - [1651570975.559428][9246:9246] CHIP:DMG: Endpoint = 0x1, - [1651570975.559465][9246:9246] CHIP:DMG: Cluster = 0x200, - [1651570975.559602][9246:9246] CHIP:DMG: Attribute = 0x0000_0012, - [1651570975.559626][9246:9246] CHIP:DMG: } - [1651570975.559655][9246:9246] CHIP:DMG: - [1651570975.559681][9246:9246] CHIP:DMG: ], - [1651570975.559710][9246:9246] CHIP:DMG: - - ./chip-tool pumpconfigurationandcontrol read capacity 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1651571009.295069][9246:9246] CHIP:IM: Received Read request - [1651571009.295158][9246:9246] CHIP:DMG: ReadRequestMessage = - [1651571009.295203][9246:9246] CHIP:DMG: { - [1651571009.295244][9246:9246] CHIP:DMG: AttributePathIBs = - [1651571009.295293][9246:9246] CHIP:DMG: [ - [1651571009.295339][9246:9246] CHIP:DMG: AttributePathIB = - [1651571009.295387][9246:9246] CHIP:DMG: { - [1651571009.295438][9246:9246] CHIP:DMG: Endpoint = 0x1, - [1651571009.295493][9246:9246] CHIP:DMG: Cluster = 0x200, - [1651571009.295548][9246:9246] CHIP:DMG: Attribute = 0x0000_0013, - [1651571009.295597][9246:9246] CHIP:DMG: } - [1651571009.295649][9246:9246] CHIP:DMG: - [1651571009.295696][9246:9246] CHIP:DMG: ], - [1651571009.295747][9246:9246] CHIP:DMG: - - ./chip-tool pumpconfigurationandcontrol read operation-mode 1 1 - - verify on TH all-cluster-app receives the right ReadRequest for the data sent in the above command - - [1651571334.617100][9337:9337] CHIP:IM: Received Read request - [1651571334.617155][9337:9337] CHIP:DMG: ReadRequestMessage = - [1651571334.617181][9337:9337] CHIP:DMG: { - [1651571334.617213][9337:9337] CHIP:DMG: AttributePathIBs = - [1651571334.617250][9337:9337] CHIP:DMG: [ - [1651571334.617291][9337:9337] CHIP:DMG: AttributePathIB = - [1651571334.617338][9337:9337] CHIP:DMG: { - [1651571334.617368][9337:9337] CHIP:DMG: Endpoint = 0x1, - [1651571334.617404][9337:9337] CHIP:DMG: Cluster = 0x200, - [1651571334.617433][9337:9337] CHIP:DMG: Attribute = 0x0000_0020, - [1651571334.617467][9337:9337] CHIP:DMG: } - [1651571334.617499][9337:9337] CHIP:DMG: - [1651571334.617537][9337:9337] CHIP:DMG: ], - [1651571334.617567][9337:9337] CHIP:DMG: " - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - ./chip-tool pumpconfigurationandcontrol read min-const-pressure 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read max-const-pressure 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read min-comp-pressure 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read max-comp-pressure 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read min-const-speed 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read max-const-speed 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read min-const-flow 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - - ./chip-tool pumpconfigurationandcontrol read min-const-flow 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read max-const-flow 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read min-const-temp 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read max-const-temp 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read pump-status 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read speed 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read lifetime-running-hours 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read power 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read lifetime-energy-consumed 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol read control-mode 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - ./chip-tool pumpconfigurationandcontrol write control-mode 0 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol write lifetime-running-hours 1 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool pumpconfigurationandcontrol write lifetime-energy-consumed 1 1 1 - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml index 11d21ffafccd24..e514d3e4a5ffc3 100644 --- a/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: PMHCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !PMHCONC.S.F00 && !PMHCONC.S.F01 && !PMHCONC.S.F02 && !PMHCONC.S.F03 + && !PMHCONC.S.F04 && !PMHCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given PMHCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && PMHCONC.S.F00 + PICS: PMHCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && !PMHCONC.S.F00 + PICS: " !PMHCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && PMHCONC.S.F01 + PICS: PMHCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && !PMHCONC.S.F01 + PICS: " !PMHCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && PMHCONC.S.F02 + PICS: PMHCONC.S.F02 && PMHCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && !PMHCONC.S.F02 + PICS: " !PMHCONC.S.F02 && !PMHCONC.S.F01" response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && PMHCONC.S.F03 + PICS: PMHCONC.S.F03 && PMHCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && !PMHCONC.S.F03 + PICS: " !PMHCONC.S.F03 && !PMHCONC.S.F01 " response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && PMHCONC.S.F04 + PICS: PMHCONC.S.F04 && PMHCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && !PMHCONC.S.F04 + PICS: " !PMHCONC.S.F04 && PMHCONC.S.F00 " response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && PMHCONC.S.F05 + PICS: PMHCONC.S.F05 && PMHCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMHCONC.S.Afffc && !PMHCONC.S.F05 + PICS: " !PMHCONC.S.F05 && !PMHCONC.S.F00" response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && PMHCONC.S.A0007 && PMHCONC.S.F00 + PICS: PMHCONC.S.A0007 && PMHCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when PMHCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && !PMHCONC.S.A0007 + PICS: " !PMHCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && PMHCONC.S.F00 + PICS: PMHCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when PMHCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && !PMHCONC.S.F00 + PICS: " !PMHCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && PMHCONC.S.F04 + PICS: PMHCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when PMHCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && !PMHCONC.S.F04 + PICS: " !PMHCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && PMHCONC.S.F05 + PICS: PMHCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: PMHCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && !PMHCONC.S.F05 + PICS: " !PMHCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && PMHCONC.S.F01 + PICS: PMHCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: PMHCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMHCONC.S.Afffb && !PMHCONC.S.F01 + PICS: " !PMHCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: PMHCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: PMHCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml index 1f453a6665ff74..7e1a627a869fde 100644 --- a/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml @@ -34,7 +34,6 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: PMICONC.S.Afffd response: value: 3 constraints: @@ -44,21 +43,22 @@ tests: - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !PMICONC.S.F00 && !PMICONC.S.F01 && !PMICONC.S.F02 && !PMICONC.S.F03 + && !PMICONC.S.F04 && !PMICONC.S.F05 " command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given PMICONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && PMICONC.S.F00 + PICS: PMICONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +69,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && !PMICONC.S.F00 + PICS: " !PMICONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +80,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && PMICONC.S.F01 + PICS: PMICONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +91,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && !PMICONC.S.F01 + PICS: " !PMICONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +102,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && PMICONC.S.F02 + PICS: PMICONC.S.F02 && PMICONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +113,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && !PMICONC.S.F02 + PICS: " !PMICONC.S.F02 && !PMICONC.S.F01" response: constraints: type: bitmap32 @@ -124,7 +124,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && PMICONC.S.F03 + PICS: PMICONC.S.F03 && PMICONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +135,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && !PMICONC.S.F03 + PICS: " !PMICONC.S.F03 && !PMICONC.S.F01" response: constraints: type: bitmap32 @@ -146,7 +146,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && PMICONC.S.F04 + PICS: PMICONC.S.F04 && PMICONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +157,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && !PMICONC.S.F04 + PICS: " !PMICONC.S.F04 && !PMICONC.S.F00 " response: constraints: type: bitmap32 @@ -168,7 +168,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && PMICONC.S.F05 + PICS: PMICONC.S.F05 && PMICONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +179,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMICONC.S.Afffc && !PMICONC.S.F05 + PICS: " !PMICONC.S.F05 && !PMICONC.S.F00" response: constraints: type: bitmap32 @@ -188,7 +188,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +197,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +206,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && PMICONC.S.A0007 && PMICONC.S.F00 + PICS: PMICONC.S.A0007 && PMICONC.S.F00 response: constraints: type: list @@ -217,7 +217,7 @@ tests: AttributeList when PMICONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && !PMICONC.S.A0007 + PICS: " !PMICONC.S.A0007 " response: constraints: type: list @@ -229,7 +229,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && PMICONC.S.F00 + PICS: PMICONC.S.F00 response: constraints: type: list @@ -241,7 +241,7 @@ tests: AttributeList when PMICONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && !PMICONC.S.F00 + PICS: " !PMICONC.S.F00 " response: constraints: type: list @@ -252,7 +252,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && PMICONC.S.F04 + PICS: PMICONC.S.F04 response: constraints: type: list @@ -263,7 +263,7 @@ tests: excluded from AttributeList when PMICONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && !PMICONC.S.F04 + PICS: " !PMICONC.S.F04 " response: constraints: type: list @@ -274,7 +274,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && PMICONC.S.F05 + PICS: PMICONC.S.F05 response: constraints: type: list @@ -286,7 +286,7 @@ tests: PMICONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && !PMICONC.S.F05 + PICS: " !PMICONC.S.F05 " response: constraints: type: list @@ -297,7 +297,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && PMICONC.S.F01 + PICS: PMICONC.S.F01 response: constraints: type: list @@ -308,7 +308,7 @@ tests: PMICONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMICONC.S.Afffb && !PMICONC.S.F01 + PICS: " !PMICONC.S.F01 " response: constraints: type: list @@ -317,7 +317,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +326,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: PMICONC.S.Afff9 response: value: [] constraints: @@ -335,7 +334,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: PMICONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml index cb6e896865502e..6c3ebb0be05870 100644 --- a/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: PMKCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !PMKCONC.S.F00 && !PMKCONC.S.F01 && !PMKCONC.S.F02 && !PMKCONC.S.F03 + && !PMKCONC.S.F04 && !PMKCONC.S.F05 " command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given PMKCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && PMKCONC.S.F00 + PICS: PMKCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && !PMKCONC.S.F00 + PICS: " !PMKCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && PMKCONC.S.F01 + PICS: PMKCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && !PMKCONC.S.F01 + PICS: " !PMKCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && PMKCONC.S.F02 + PICS: PMKCONC.S.F02 && PMKCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && !PMKCONC.S.F02 + PICS: " !PMKCONC.S.F02 && !PMKCONC.S.F01 " response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && PMKCONC.S.F03 + PICS: PMKCONC.S.F03 && PMKCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && !PMKCONC.S.F03 + PICS: " !PMKCONC.S.F03 && !PMKCONC.S.F01" response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && PMKCONC.S.F04 + PICS: PMKCONC.S.F04 && PMKCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && !PMKCONC.S.F04 + PICS: " !PMKCONC.S.F04 && !PMKCONC.S.F00 " response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && PMKCONC.S.F05 + PICS: PMKCONC.S.F05 && PMKCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: PMKCONC.S.Afffc && !PMKCONC.S.F05 + PICS: " !PMKCONC.S.F05 && !PMKCONC.S.F00" response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && PMKCONC.S.A0007 && PMKCONC.S.F00 + PICS: PMKCONC.S.A0007 && PMKCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when PMKCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && !PMKCONC.S.A0007 + PICS: " !PMKCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && PMKCONC.S.F00 + PICS: PMKCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when PMKCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && !PMKCONC.S.F00 + PICS: " !PMKCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && PMKCONC.S.F04 + PICS: PMKCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when PMKCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && !PMKCONC.S.F04 + PICS: " !PMKCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && PMKCONC.S.F05 + PICS: PMKCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: PMKCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && !PMKCONC.S.F05 + PICS: " !PMKCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && PMKCONC.S.F01 + PICS: PMKCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: PMKCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: PMKCONC.S.Afffb && !PMKCONC.S.F01 + PICS: " !PMKCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: PMKCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: PMKCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_PRS_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_PRS_3_1_Simulated.yaml deleted file mode 100644 index 776359626600fa..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_PRS_3_1_Simulated.yaml +++ /dev/null @@ -1,264 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 34.3.1. [TC-PRS-3.1] Attributes with Client as DUT - -PICS: - - PRS.C - - PRS.C.AM-READ - - PRS.C.AO-READ - - PRS.C.AM-WRITE - - PRS.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Pressure Measurement" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: MeasuredValue" - PICS: PRS.C.AM-READ - wait: "readAttribute" - attribute: "MeasuredValue" - - - label: "Read attribute: MinMeasuredValue" - PICS: PRS.C.AM-READ - wait: "readAttribute" - attribute: "MinMeasuredValue" - - - label: "Read attribute: MaxMeasuredValue" - PICS: PRS.C.AM-READ - wait: "readAttribute" - attribute: "MaxMeasuredValue" - - - label: "Read attribute: Tolerance" - PICS: PRS.C.AO-READ - wait: "readAttribute" - attribute: "Tolerance" - - - label: "Read attribute: ScaledValue" - PICS: PRS.C.AO-READ - wait: "readAttribute" - attribute: "ScaledValue" - - - label: "Read attribute: MinScaledValue" - PICS: PRS.C.AO-READ - wait: "readAttribute" - attribute: "MinScaledValue" - - - label: "Read attribute: MaxScaledValue" - PICS: PRS.C.AO-READ - wait: "readAttribute" - attribute: "MaxScaledValue" - - - label: "Read attribute: ScaledTolerance" - PICS: PRS.C.AO-READ - wait: "readAttribute" - attribute: "ScaledTolerance" - - - label: "Read attribute: Scale" - PICS: PRS.C.AO-READ - wait: "readAttribute" - attribute: "Scale" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again." - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - TH receives the read command and knows this attribute for this cluster and provides a plausable value, DUT processes the values and operates normally - - ./chip-tool pressuremeasurement read feature-map 1 1 - - verify the " feature-map response" on the TH (all-cluster-minimal-app) log: - - [1678873303.474810][348369:348369] CHIP:EM: Handling via exchange: 59017r, Delegate: 0x55713c07aca8 - [1678873303.474829][348369:348369] CHIP:IM: Received Read request - [1678873303.474872][348369:348369] CHIP:DMG: ReadRequestMessage = - [1678873303.474880][348369:348369] CHIP:DMG: { - [1678873303.474885][348369:348369] CHIP:DMG: AttributePathIBs = - [1678873303.474894][348369:348369] CHIP:DMG: [ - [1678873303.474900][348369:348369] CHIP:DMG: AttributePathIB = - [1678873303.474908][348369:348369] CHIP:DMG: { - [1678873303.474915][348369:348369] CHIP:DMG: Endpoint = 0x1, - [1678873303.474922][348369:348369] CHIP:DMG: Cluster = 0x403, - [1678873303.474930][348369:348369] CHIP:DMG: Attribute = 0x0000_FFFC, - [1678873303.474936][348369:348369] CHIP:DMG: } - [1678873303.474944][348369:348369] CHIP:DMG: - [1678873303.474950][348369:348369] CHIP:DMG: ], - [1678873303.474959][348369:348369] CHIP:DMG: - [1678873303.474966][348369:348369] CHIP:DMG: isFabricFiltered = true, - [1678873303.474972][348369:348369] CHIP:DMG: InteractionModelRevision = 1 - [1678873303.474978][348369:348369] CHIP:DMG: }, - [1678873303.475012][348369:348369] CHIP:DMG: IM RH moving to [GeneratingReports] - [1678873303.475045][348369:348369] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1678873303.475054][348369:348369] CHIP:DMG: Cluster 403, Attribute fffc is dirty - - ./chip-tool pressuremeasurement read attribute-list 1 1 - - verify the " attribute-list response" on the TH (all-cluster-minimal-app) log: - - [1659606175.282588][7312:7312] CHIP:EM: Handling via exchange: 12368r, Delegate: 0xaaaaad2c4f68 - [1659606175.282635][7312:7312] CHIP:IM: Received Read request - [1659606175.282718][7312:7312] CHIP:DMG: ReadRequestMessage = - [1659606175.282746][7312:7312] CHIP:DMG: { - [1659606175.282768][7312:7312] CHIP:DMG: AttributePathIBs = - [1659606175.282794][7312:7312] CHIP:DMG: [ - [1659606175.282818][7312:7312] CHIP:DMG: AttributePathIB = - [1659606175.282846][7312:7312] CHIP:DMG: { - [1659606175.282874][7312:7312] CHIP:DMG: Endpoint = 0x1, - [1659606175.282910][7312:7312] CHIP:DMG: Cluster = 0x403, - [1659606175.282946][7312:7312] CHIP:DMG: Attribute = 0x0000_FFFB, - [1659606175.282975][7312:7312] CHIP:DMG: } - [1659606175.283004][7312:7312] CHIP:DMG: - [1659606175.283029][7312:7312] CHIP:DMG: ], - [1659606175.283056][7312:7312] CHIP:DMG: - [1659606175.283083][7312:7312] CHIP:DMG: isFabricFiltered = true, - [1659606175.283108][7312:7312] CHIP:DMG: InteractionModelRevision = 1 - [1659606175.283132][7312:7312] CHIP:DMG: }, - [1659606175.283211][7312:7312] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659606175.283312][7312:7312] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659606175.283343][7312:7312] CHIP:DMG: Cluster 403, Attribute fffb is dirty - [1659606175.283364][7312:7312] CHIP:DMG: Reading attribute: Cluster=0x0000_0403 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) - - - - - ./chip-tool pressuremeasurement read measured-value 1 1 - - verify the " measured-value response" on the TH (all-cluster-minimal-app) log: - - [1653992317.047323][2347:2347] CHIP:IM: Received Read request - [1653992317.047382][2347:2347] CHIP:DMG: ReadRequestMessage = - [1653992317.047457][2347:2347] CHIP:DMG: { - [1653992317.047480][2347:2347] CHIP:DMG: AttributePathIBs = - [1653992317.047507][2347:2347] CHIP:DMG: [ - [1653992317.047531][2347:2347] CHIP:DMG: AttributePathIB = - [1653992317.047563][2347:2347] CHIP:DMG: { - [1653992317.047592][2347:2347] CHIP:DMG: Endpoint = 0x1, - [1653992317.047657][2347:2347] CHIP:DMG: Cluster = 0x403, - [1653992317.047695][2347:2347] CHIP:DMG: Attribute = 0x0000_0000, - [1653992317.047725][2347:2347] CHIP:DMG: } - [1653992317.047774][2347:2347] CHIP:DMG: - [1653992317.047803][2347:2347] CHIP:DMG: ], - [1653992317.047831][2347:2347] CHIP:DMG: - [1653992317.047859][2347:2347] CHIP:DMG: isFabricFiltered = true, - [1653992317.047884][2347:2347] CHIP:DMG: InteractionModelRevision = 1 - [1653992317.047908][2347:2347] CHIP:DMG: }, - [1653992317.047995][2347:2347] CHIP:DMG: IM RH moving to [GeneratingReports] - - ./chip-tool pressuremeasurement read min-measured-value 1 1 - - verify the " min-measured-value response" on the TH (all-cluster-minimal-app) log: - - [1653992385.759474][2347:2347] CHIP:IM: Received Read request - [1653992385.759533][2347:2347] CHIP:DMG: ReadRequestMessage = - [1653992385.759561][2347:2347] CHIP:DMG: { - [1653992385.759584][2347:2347] CHIP:DMG: AttributePathIBs = - [1653992385.759618][2347:2347] CHIP:DMG: [ - [1653992385.759647][2347:2347] CHIP:DMG: AttributePathIB = - [1653992385.759678][2347:2347] CHIP:DMG: { - [1653992385.759745][2347:2347] CHIP:DMG: Endpoint = 0x1, - [1653992385.759781][2347:2347] CHIP:DMG: Cluster = 0x403, - [1653992385.759859][2347:2347] CHIP:DMG: Attribute = 0x0000_0001, - [1653992385.759918][2347:2347] CHIP:DMG: } - [1653992385.759971][2347:2347] CHIP:DMG: - [1653992385.760000][2347:2347] CHIP:DMG: ], - [1653992385.760049][2347:2347] CHIP:DMG: - [1653992385.760100][2347:2347] CHIP:DMG: isFabricFiltered = true, - [1653992385.760125][2347:2347] CHIP:DMG: InteractionModelRevision = 1 - [1653992385.760168][2347:2347] CHIP:DMG: }, - - - ./chip-tool pressuremeasurement read max-measured-value 1 1 - - verify the " max-measured-value response" on the TH (all-cluster-minimal-app) log: - - [1653992415.580348][2347:2347] CHIP:IM: Received Read request - [1653992415.580414][2347:2347] CHIP:DMG: ReadRequestMessage = - [1653992415.580442][2347:2347] CHIP:DMG: { - [1653992415.580473][2347:2347] CHIP:DMG: AttributePathIBs = - [1653992415.580501][2347:2347] CHIP:DMG: [ - [1653992415.580534][2347:2347] CHIP:DMG: AttributePathIB = - [1653992415.580563][2347:2347] CHIP:DMG: { - [1653992415.580602][2347:2347] CHIP:DMG: Endpoint = 0x1, - [1653992415.580674][2347:2347] CHIP:DMG: Cluster = 0x403, - [1653992415.580713][2347:2347] CHIP:DMG: Attribute = 0x0000_0002, - [1653992415.580746][2347:2347] CHIP:DMG: } - [1653992415.580786][2347:2347] CHIP:DMG: - [1653992415.580812][2347:2347] CHIP:DMG: ], - [1653992415.580852][2347:2347] CHIP:DMG: - [1653992415.580879][2347:2347] CHIP:DMG: isFabricFiltered = true, - [1653992415.580913][2347:2347] CHIP:DMG: InteractionModelRevision = 1 - [1653992415.580936][2347:2347] CHIP:DMG: }," - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - TH all-clusters-minimal-app does not support optional attributes, if implemted we will get "General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" as output when we read following attributes. - - - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - TH receives the read command and knows this attribute for this cluster and provides a plausable value, DUT processes the values and operates normally - - ./chip-tool pressuremeasurement read tolerance 1 1 - ./chip-tool pressuremeasurement read scaled-value 1 1 - ./chip-tool pressuremeasurement read min-scaled-value 1 1 - ./chip-tool pressuremeasurement read max-scaled-value 1 1 - ./chip-tool pressuremeasurement read scaled-tolerance 1 1 - ./chip-tool pressuremeasurement read scale 1 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && PRS.C.AO-READ - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_PS_3_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_3_1.yaml index 87c749fe3fc8c7..d64c29714436f8 100644 --- a/src/app/tests/suites/certification/Test_TC_PS_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PS_3_1.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Project CHIP Authors +# Copyright (c) 2023 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,14 +13,10 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 62.3.1. [TC-PS-3.1] Attributes with client as DUT +name: 63.2.3. [TC-PS-3.1] Endpoint composition and EndpointList PICS: - - PS.C - - PS.C.AM-READ - - PS.C.AO-READ - - PS.C.AM-WRITE - - PS.C.AO-WRITE + - PS.S config: nodeId: 0x12344321 @@ -28,678 +24,62 @@ config: endpoint: 0 tests: - - label: "Note" - verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: - "Step 1: DUT reads all supported mandatory attributes from TH one at a - time in a manufacturer specific order" - PICS: PS.C.AM-READ - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool powersource read status 1 1 - Verify that TH recieves "status" attribute with value 0 on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - - [1686318196.431501][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318196.431509][108731:108731] CHIP:DMG: { - [1686318196.431516][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318196.431531][108731:108731] CHIP:DMG: [ - [1686318196.431538][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318196.431552][108731:108731] CHIP:DMG: { - [1686318196.431560][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318196.431570][108731:108731] CHIP:DMG: { - [1686318196.431580][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318196.431590][108731:108731] CHIP:DMG: AttributePathIB = - [1686318196.431600][108731:108731] CHIP:DMG: { - [1686318196.431611][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318196.431621][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318196.431632][108731:108731] CHIP:DMG: Attribute = 0x0000_0000, - [1686318196.431641][108731:108731] CHIP:DMG: } - [1686318196.431653][108731:108731] CHIP:DMG: - [1686318196.431664][108731:108731] CHIP:DMG: Data = 0, - [1686318196.431672][108731:108731] CHIP:DMG: }, - [1686318196.431685][108731:108731] CHIP:DMG: - [1686318196.431693][108731:108731] CHIP:DMG: }, - [1686318196.431707][108731:108731] CHIP:DMG: - [1686318196.431713][108731:108731] CHIP:DMG: ], - [1686318196.431728][108731:108731] CHIP:DMG: - [1686318196.431736][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318196.431745][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318196.431752][108731:108731] CHIP:DMG: } - [1686318196.431761][108731:108731] CHIP:DMG: - [1686318196.431820][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318196.431829][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - - ./chip-tool powersource read order 1 1 - Verify that TH recieves "order" attribute with value 2 on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - - [1686318245.206127][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318245.206130][108731:108731] CHIP:DMG: { - [1686318245.206132][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318245.206137][108731:108731] CHIP:DMG: [ - [1686318245.206139][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318245.206145][108731:108731] CHIP:DMG: { - [1686318245.206147][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318245.206151][108731:108731] CHIP:DMG: { - [1686318245.206154][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318245.206157][108731:108731] CHIP:DMG: AttributePathIB = - [1686318245.206160][108731:108731] CHIP:DMG: { - [1686318245.206164][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318245.206167][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318245.206172][108731:108731] CHIP:DMG: Attribute = 0x0000_0001, - [1686318245.206175][108731:108731] CHIP:DMG: } - [1686318245.206178][108731:108731] CHIP:DMG: - [1686318245.206182][108731:108731] CHIP:DMG: Data = 2, - [1686318245.206185][108731:108731] CHIP:DMG: }, - [1686318245.206189][108731:108731] CHIP:DMG: - [1686318245.206192][108731:108731] CHIP:DMG: }, - [1686318245.206196][108731:108731] CHIP:DMG: - [1686318245.206199][108731:108731] CHIP:DMG: ], - [1686318245.206203][108731:108731] CHIP:DMG: - [1686318245.206206][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318245.206209][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318245.206211][108731:108731] CHIP:DMG: } - [1686318245.206214][108731:108731] CHIP:DMG: - [1686318245.206239][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318245.206243][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - - - ./chip-tool powersource read description 1 1 - Verify that TH recieves "description" attribute with value B2 on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - - [1686318263.400126][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318263.400128][108731:108731] CHIP:DMG: { - [1686318263.400129][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318263.400133][108731:108731] CHIP:DMG: [ - [1686318263.400134][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318263.400137][108731:108731] CHIP:DMG: { - [1686318263.400139][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318263.400142][108731:108731] CHIP:DMG: { - [1686318263.400144][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318263.400146][108731:108731] CHIP:DMG: AttributePathIB = - [1686318263.400148][108731:108731] CHIP:DMG: { - [1686318263.400150][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318263.400153][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318263.400155][108731:108731] CHIP:DMG: Attribute = 0x0000_0002, - [1686318263.400157][108731:108731] CHIP:DMG: } - [1686318263.400159][108731:108731] CHIP:DMG: - [1686318263.400162][108731:108731] CHIP:DMG: Data = "B2" (2 chars), - [1686318263.400164][108731:108731] CHIP:DMG: }, - [1686318263.400167][108731:108731] CHIP:DMG: - [1686318263.400169][108731:108731] CHIP:DMG: }, - [1686318263.400172][108731:108731] CHIP:DMG: - [1686318263.400173][108731:108731] CHIP:DMG: ], - [1686318263.400176][108731:108731] CHIP:DMG: - [1686318263.400178][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318263.400180][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318263.400182][108731:108731] CHIP:DMG: } - [1686318263.400183][108731:108731] CHIP:DMG: - [1686318263.400206][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318263.400209][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - - ./chip-tool powersource read bat-charge-level 1 1 - Verify that TH recieves "bat-charge-level" attribute with value 0 on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - - [1686318283.452914][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318283.452916][108731:108731] CHIP:DMG: { - [1686318283.452918][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318283.452921][108731:108731] CHIP:DMG: [ - [1686318283.452923][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318283.452926][108731:108731] CHIP:DMG: { - [1686318283.452928][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318283.452930][108731:108731] CHIP:DMG: { - [1686318283.452932][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318283.452934][108731:108731] CHIP:DMG: AttributePathIB = - [1686318283.452936][108731:108731] CHIP:DMG: { - [1686318283.452939][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318283.452941][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318283.452943][108731:108731] CHIP:DMG: Attribute = 0x0000_000E, - [1686318283.452945][108731:108731] CHIP:DMG: } - [1686318283.452948][108731:108731] CHIP:DMG: - [1686318283.452950][108731:108731] CHIP:DMG: Data = 0, - [1686318283.452952][108731:108731] CHIP:DMG: }, - [1686318283.452955][108731:108731] CHIP:DMG: - [1686318283.452957][108731:108731] CHIP:DMG: }, - [1686318283.452959][108731:108731] CHIP:DMG: - [1686318283.452961][108731:108731] CHIP:DMG: ], - [1686318283.452964][108731:108731] CHIP:DMG: - [1686318283.452966][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318283.452968][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318283.452969][108731:108731] CHIP:DMG: } - [1686318283.452971][108731:108731] CHIP:DMG: - [1686318283.452997][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318283.452999][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - ./chip-tool powersource read bat-replacement-needed 1 1 - Verify that TH recieves "bat-replacement-needed" attribute with value false on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - - [1686318298.844920][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318298.844922][108731:108731] CHIP:DMG: { - [1686318298.844924][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318298.844927][108731:108731] CHIP:DMG: [ - [1686318298.844929][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318298.844932][108731:108731] CHIP:DMG: { - [1686318298.844934][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318298.844936][108731:108731] CHIP:DMG: { - [1686318298.844938][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318298.844940][108731:108731] CHIP:DMG: AttributePathIB = - [1686318298.844942][108731:108731] CHIP:DMG: { - [1686318298.844945][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318298.844947][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318298.844949][108731:108731] CHIP:DMG: Attribute = 0x0000_000F, - [1686318298.844951][108731:108731] CHIP:DMG: } - [1686318298.844954][108731:108731] CHIP:DMG: - [1686318298.844957][108731:108731] CHIP:DMG: Data = false, - [1686318298.844958][108731:108731] CHIP:DMG: }, - [1686318298.844961][108731:108731] CHIP:DMG: - [1686318298.844963][108731:108731] CHIP:DMG: }, - [1686318298.844966][108731:108731] CHIP:DMG: - [1686318298.844967][108731:108731] CHIP:DMG: ], - [1686318298.844970][108731:108731] CHIP:DMG: - [1686318298.844972][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318298.844974][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318298.844975][108731:108731] CHIP:DMG: } - [1686318298.844977][108731:108731] CHIP:DMG: - [1686318298.845011][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318298.845014][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1686318298.845016][108731:108731] CHIP:DMG: IM RH moving to [AwaitingDestruction] - - - - ./chip-tool powersource read bat-replaceability 1 1 - Verify that TH recieves "bat-replaceability" attribute with value 0 on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - - [1686318315.534100][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318315.534102][108731:108731] CHIP:DMG: { - [1686318315.534104][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318315.534107][108731:108731] CHIP:DMG: [ - [1686318315.534108][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318315.534112][108731:108731] CHIP:DMG: { - [1686318315.534113][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318315.534116][108731:108731] CHIP:DMG: { - [1686318315.534118][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318315.534120][108731:108731] CHIP:DMG: AttributePathIB = - [1686318315.534122][108731:108731] CHIP:DMG: { - [1686318315.534124][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318315.534126][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318315.534129][108731:108731] CHIP:DMG: Attribute = 0x0000_0010, - [1686318315.534131][108731:108731] CHIP:DMG: } - [1686318315.534133][108731:108731] CHIP:DMG: - [1686318315.534136][108731:108731] CHIP:DMG: Data = 0, - [1686318315.534138][108731:108731] CHIP:DMG: }, - [1686318315.534141][108731:108731] CHIP:DMG: - [1686318315.534142][108731:108731] CHIP:DMG: }, - [1686318315.534145][108731:108731] CHIP:DMG: - [1686318315.534147][108731:108731] CHIP:DMG: ], - [1686318315.534150][108731:108731] CHIP:DMG: - [1686318315.534152][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318315.534153][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318315.534155][108731:108731] CHIP:DMG: } - [1686318315.534157][108731:108731] CHIP:DMG: - [1686318315.534179][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318315.534181][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - disabled: true - - - label: - "Step 2: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order" - PICS: PS.C.AO-READ - verification: | - OPTIONAL ATTRIBUTES ARE NOT IMPLEMENTED IN SDK, If Implemented we will get the expected outcome that is value of below attributes as per Spec - - - ./chip-tool powersource read wired-assessed-input-voltage 1 1 - - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - - ./chip-tool powersource read wired-assessed-input-frequency 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read wired-current-type 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read wired-assessed-current 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read wired-nominal-voltage 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read wired-maximum-current 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read wired-present 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read active-wired-faults 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-voltage 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-percent-remaining 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-time-remaining 1 1 - - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-present 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read active-bat-faults 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-replacement-description 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-common-designation 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-ansidesignation 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-iecdesignation 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-approved-chemistry 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-capacity 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - - ./chip-tool powersource read bat-quantity 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-charge-state 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-time-to-full-charge 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-functional-while-charging 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read bat-charging-current 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - ./chip-tool powersource read active-bat-charge-faults 1 1 - Verify that TH recieves the above attribute read command and provides a plausible value on the TH (all-cluster-app) log and below is the sample log provided for the raspi platform: - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - disabled: true - - label: - "Step 3: DUT writes a suitable value to all supported mandatory - attributes on the TH one at a time in a manufacturer specific order" - PICS: PS.C.AM-WRITE + "Step 1: TH performs a wildcard read of all attributes and endpoints" verification: | - This cluster doesn't have any writable attributes + TH(chip-tool) sends the wildcard read command to read all attributes and endpoints from DUT(Reference app/all-clusters-app) + ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF disabled: true - label: - "Step 4: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order" - PICS: PS.C.AO-WRITE + "Step 2: For each power source cluster with a non-empty EndpointsList + attribute, verify that the endpoint exists on the device; also verify + that the EndpointsList attribute includes the endpoint on which the + cluster is located" verification: | - This cluster doesn't have any writable attributes + TH(chip-tool) sends the wildcard read command to read all attributes and endpoints from DUT(Reference app/all-clusters-app) + + ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF + + [1690195509.133521][44004:44006] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_000F DataVersion: 2929707991 + [1690195509.133523][44004:44006] CHIP:TOO: BatReplacementNeeded: FALSE + [1690195509.133531][44004:44006] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_0010 DataVersion: 2929707991 + [1690195509.133534][44004:44006] CHIP:TOO: BatReplaceability: 0 + [1690195509.133549][44004:44006] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_001F DataVersion: 2929707991 + [1690195509.133556][44004:44006] CHIP:TOO: EndpointList: 0 entries + [1690195509.133558][44004:44006] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_FFFC DataVersion: 2929707991 + [1690195509.133560][44004:44006] CHIP:TOO: FeatureMap: 2 + + [1690195509.203569][44004:44006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_002F Attribute 0x0000_0010 DataVersion: 1378119001 + [1690195509.203572][44004:44006] CHIP:TOO: BatReplaceability: 0 + [1690195509.203587][44004:44006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_002F Attribute 0x0000_001F DataVersion: 1378119001 + [1690195509.203592][44004:44006] CHIP:TOO: EndpointList: 0 entries + [1690195509.203595][44004:44006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_002F Attribute 0x0000_FFFC DataVersion: 1378119001 + [1690195509.203597][44004:44006] CHIP:TOO: FeatureMap: 2 + + + [1690195509.133531][44004:44006] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_0010 DataVersion: 2929707991 + [1690195509.133534][44004:44006] CHIP:TOO: BatReplaceability: 0 + [1690195509.133549][44004:44006] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_001F DataVersion: 2929707991 + [1690195509.133556][44004:44006] CHIP:TOO: EndpointList: 0 entries + [1690195509.133558][44004:44006] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002F Attribute 0x0000_FFFC DataVersion: 2929707991 + [1690195509.133560][44004:44006] CHIP:TOO: FeatureMap: 2 disabled: true - label: - "Step 5: Configure TH such that it implements mandatory and none of - the optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again" + "Step 3: For each power source cluster on an endpoint with the Bridged + Node device type, ensure the EndpointList in the Power Source cluster + includes all the endpoints listed in the PartsList of the Descriptor + cluster as well as its own endpoint id." verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool powersource read feature-map 1 1 - Verify that TH recieves "featuremap" attribute with value 0 on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - [1686319169.359277][108977:108977] CHIP:DMG: ReportDataMessage = - [1686319169.359279][108977:108977] CHIP:DMG: { - [1686319169.359280][108977:108977] CHIP:DMG: AttributeReportIBs = - [1686319169.359283][108977:108977] CHIP:DMG: [ - [1686319169.359285][108977:108977] CHIP:DMG: AttributeReportIB = - [1686319169.359288][108977:108977] CHIP:DMG: { - [1686319169.359290][108977:108977] CHIP:DMG: AttributeDataIB = - [1686319169.359292][108977:108977] CHIP:DMG: { - [1686319169.359295][108977:108977] CHIP:DMG: DataVersion = 0xb60028fe, - [1686319169.359297][108977:108977] CHIP:DMG: AttributePathIB = - [1686319169.359299][108977:108977] CHIP:DMG: { - [1686319169.359301][108977:108977] CHIP:DMG: Endpoint = 0x1, - [1686319169.359303][108977:108977] CHIP:DMG: Cluster = 0x2f, - [1686319169.359306][108977:108977] CHIP:DMG: Attribute = 0x0000_FFFC, - [1686319169.359308][108977:108977] CHIP:DMG: } - [1686319169.359310][108977:108977] CHIP:DMG: - [1686319169.359313][108977:108977] CHIP:DMG: Data = 0, - [1686319169.359315][108977:108977] CHIP:DMG: }, - [1686319169.359318][108977:108977] CHIP:DMG: - [1686319169.359319][108977:108977] CHIP:DMG: }, - [1686319169.359322][108977:108977] CHIP:DMG: - [1686319169.359324][108977:108977] CHIP:DMG: ], - [1686319169.359327][108977:108977] CHIP:DMG: - [1686319169.359329][108977:108977] CHIP:DMG: SuppressResponse = true, - [1686319169.359331][108977:108977] CHIP:DMG: InteractionModelRevision = 1 - [1686319169.359332][108977:108977] CHIP:DMG: } - [1686319169.359334][108977:108977] CHIP:DMG: - [1686319169.359357][108977:108977] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686319169.359360][108977:108977] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - ./chip-tool powersource read attribute-list 1 1 - Verify that TH recieves "attribute list" attribute with value 0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533 on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - [1686319262.503993][108977:108977] CHIP:DMG: ReportDataMessage = - [1686319262.503995][108977:108977] CHIP:DMG: { - [1686319262.503996][108977:108977] CHIP:DMG: AttributeReportIBs = - [1686319262.504001][108977:108977] CHIP:DMG: [ - [1686319262.504003][108977:108977] CHIP:DMG: AttributeReportIB = - [1686319262.504006][108977:108977] CHIP:DMG: { - [1686319262.504009][108977:108977] CHIP:DMG: AttributeDataIB = - [1686319262.504011][108977:108977] CHIP:DMG: { - [1686319262.504013][108977:108977] CHIP:DMG: DataVersion = 0xb60028fe, - [1686319262.504015][108977:108977] CHIP:DMG: AttributePathIB = - [1686319262.504017][108977:108977] CHIP:DMG: { - [1686319262.504019][108977:108977] CHIP:DMG: Endpoint = 0x1, - [1686319262.504022][108977:108977] CHIP:DMG: Cluster = 0x2f, - [1686319262.504024][108977:108977] CHIP:DMG: Attribute = 0x0000_FFFB, - [1686319262.504026][108977:108977] CHIP:DMG: } - [1686319262.504028][108977:108977] CHIP:DMG: - [1686319262.504031][108977:108977] CHIP:DMG: Data = [ - [1686319262.504036][108977:108977] CHIP:DMG: 0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533, - [1686319262.504038][108977:108977] CHIP:DMG: ], - [1686319262.504040][108977:108977] CHIP:DMG: }, - [1686319262.504043][108977:108977] CHIP:DMG: - [1686319262.504045][108977:108977] CHIP:DMG: }, - [1686319262.504049][108977:108977] CHIP:DMG: - [1686319262.504050][108977:108977] CHIP:DMG: ], - [1686319262.504054][108977:108977] CHIP:DMG: - [1686319262.504056][108977:108977] CHIP:DMG: SuppressResponse = true, - [1686319262.504058][108977:108977] CHIP:DMG: InteractionModelRevision = 1 - [1686319262.504060][108977:108977] CHIP:DMG: } - [1686319262.504061][108977:108977] CHIP:DMG: - [1686319262.504089][108977:108977] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686319262.504091][108977:108977] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - ./chip-tool powersource read status 1 1 - Verify that TH recieves "status" attribute with value 0 on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - - [1686318196.431501][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318196.431509][108731:108731] CHIP:DMG: { - [1686318196.431516][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318196.431531][108731:108731] CHIP:DMG: [ - [1686318196.431538][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318196.431552][108731:108731] CHIP:DMG: { - [1686318196.431560][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318196.431570][108731:108731] CHIP:DMG: { - [1686318196.431580][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318196.431590][108731:108731] CHIP:DMG: AttributePathIB = - [1686318196.431600][108731:108731] CHIP:DMG: { - [1686318196.431611][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318196.431621][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318196.431632][108731:108731] CHIP:DMG: Attribute = 0x0000_0000, - [1686318196.431641][108731:108731] CHIP:DMG: } - [1686318196.431653][108731:108731] CHIP:DMG: - [1686318196.431664][108731:108731] CHIP:DMG: Data = 0, - [1686318196.431672][108731:108731] CHIP:DMG: }, - [1686318196.431685][108731:108731] CHIP:DMG: - [1686318196.431693][108731:108731] CHIP:DMG: }, - [1686318196.431707][108731:108731] CHIP:DMG: - [1686318196.431713][108731:108731] CHIP:DMG: ], - [1686318196.431728][108731:108731] CHIP:DMG: - [1686318196.431736][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318196.431745][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318196.431752][108731:108731] CHIP:DMG: } - [1686318196.431761][108731:108731] CHIP:DMG: - [1686318196.431820][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318196.431829][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - - ./chip-tool powersource read order 1 1 - Verify that TH recieves "order" attribute with value 2 on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - - [1686318245.206127][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318245.206130][108731:108731] CHIP:DMG: { - [1686318245.206132][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318245.206137][108731:108731] CHIP:DMG: [ - [1686318245.206139][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318245.206145][108731:108731] CHIP:DMG: { - [1686318245.206147][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318245.206151][108731:108731] CHIP:DMG: { - [1686318245.206154][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318245.206157][108731:108731] CHIP:DMG: AttributePathIB = - [1686318245.206160][108731:108731] CHIP:DMG: { - [1686318245.206164][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318245.206167][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318245.206172][108731:108731] CHIP:DMG: Attribute = 0x0000_0001, - [1686318245.206175][108731:108731] CHIP:DMG: } - [1686318245.206178][108731:108731] CHIP:DMG: - [1686318245.206182][108731:108731] CHIP:DMG: Data = 2, - [1686318245.206185][108731:108731] CHIP:DMG: }, - [1686318245.206189][108731:108731] CHIP:DMG: - [1686318245.206192][108731:108731] CHIP:DMG: }, - [1686318245.206196][108731:108731] CHIP:DMG: - [1686318245.206199][108731:108731] CHIP:DMG: ], - [1686318245.206203][108731:108731] CHIP:DMG: - [1686318245.206206][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318245.206209][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318245.206211][108731:108731] CHIP:DMG: } - [1686318245.206214][108731:108731] CHIP:DMG: - [1686318245.206239][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318245.206243][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - - - ./chip-tool powersource read description 1 1 - Verify that TH recieves "description" attribute with value B2 on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - [1686318263.400126][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318263.400128][108731:108731] CHIP:DMG: { - [1686318263.400129][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318263.400133][108731:108731] CHIP:DMG: [ - [1686318263.400134][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318263.400137][108731:108731] CHIP:DMG: { - [1686318263.400139][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318263.400142][108731:108731] CHIP:DMG: { - [1686318263.400144][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318263.400146][108731:108731] CHIP:DMG: AttributePathIB = - [1686318263.400148][108731:108731] CHIP:DMG: { - [1686318263.400150][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318263.400153][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318263.400155][108731:108731] CHIP:DMG: Attribute = 0x0000_0002, - [1686318263.400157][108731:108731] CHIP:DMG: } - [1686318263.400159][108731:108731] CHIP:DMG: - [1686318263.400162][108731:108731] CHIP:DMG: Data = "B2" (2 chars), - [1686318263.400164][108731:108731] CHIP:DMG: }, - [1686318263.400167][108731:108731] CHIP:DMG: - [1686318263.400169][108731:108731] CHIP:DMG: }, - [1686318263.400172][108731:108731] CHIP:DMG: - [1686318263.400173][108731:108731] CHIP:DMG: ], - [1686318263.400176][108731:108731] CHIP:DMG: - [1686318263.400178][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318263.400180][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318263.400182][108731:108731] CHIP:DMG: } - [1686318263.400183][108731:108731] CHIP:DMG: - [1686318263.400206][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318263.400209][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - - ./chip-tool powersource read bat-charge-level 1 1 - Verify that TH recieves "bat-charge-level" attribute with value 0 on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - - [1686318283.452914][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318283.452916][108731:108731] CHIP:DMG: { - [1686318283.452918][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318283.452921][108731:108731] CHIP:DMG: [ - [1686318283.452923][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318283.452926][108731:108731] CHIP:DMG: { - [1686318283.452928][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318283.452930][108731:108731] CHIP:DMG: { - [1686318283.452932][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318283.452934][108731:108731] CHIP:DMG: AttributePathIB = - [1686318283.452936][108731:108731] CHIP:DMG: { - [1686318283.452939][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318283.452941][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318283.452943][108731:108731] CHIP:DMG: Attribute = 0x0000_000E, - [1686318283.452945][108731:108731] CHIP:DMG: } - [1686318283.452948][108731:108731] CHIP:DMG: - [1686318283.452950][108731:108731] CHIP:DMG: Data = 0, - [1686318283.452952][108731:108731] CHIP:DMG: }, - [1686318283.452955][108731:108731] CHIP:DMG: - [1686318283.452957][108731:108731] CHIP:DMG: }, - [1686318283.452959][108731:108731] CHIP:DMG: - [1686318283.452961][108731:108731] CHIP:DMG: ], - [1686318283.452964][108731:108731] CHIP:DMG: - [1686318283.452966][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318283.452968][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318283.452969][108731:108731] CHIP:DMG: } - [1686318283.452971][108731:108731] CHIP:DMG: - [1686318283.452997][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318283.452999][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - - - ./chip-tool powersource read bat-replacement-needed 1 1 - Verify that TH recieves "bat-replacement-needed" attribute with value false on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - - [1686318298.844920][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318298.844922][108731:108731] CHIP:DMG: { - [1686318298.844924][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318298.844927][108731:108731] CHIP:DMG: [ - [1686318298.844929][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318298.844932][108731:108731] CHIP:DMG: { - [1686318298.844934][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318298.844936][108731:108731] CHIP:DMG: { - [1686318298.844938][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318298.844940][108731:108731] CHIP:DMG: AttributePathIB = - [1686318298.844942][108731:108731] CHIP:DMG: { - [1686318298.844945][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318298.844947][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318298.844949][108731:108731] CHIP:DMG: Attribute = 0x0000_000F, - [1686318298.844951][108731:108731] CHIP:DMG: } - [1686318298.844954][108731:108731] CHIP:DMG: - [1686318298.844957][108731:108731] CHIP:DMG: Data = false, - [1686318298.844958][108731:108731] CHIP:DMG: }, - [1686318298.844961][108731:108731] CHIP:DMG: - [1686318298.844963][108731:108731] CHIP:DMG: }, - [1686318298.844966][108731:108731] CHIP:DMG: - [1686318298.844967][108731:108731] CHIP:DMG: ], - [1686318298.844970][108731:108731] CHIP:DMG: - [1686318298.844972][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318298.844974][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318298.844975][108731:108731] CHIP:DMG: } - [1686318298.844977][108731:108731] CHIP:DMG: - [1686318298.845011][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318298.845014][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1686318298.845016][108731:108731] CHIP:DMG: IM RH moving to [AwaitingDestruction] - - - - ./chip-tool powersource read bat-replaceability 1 1 - Verify that TH recieves "bat-replaceability" attribute with value 0 on the TH (all-clusters-minimal-app) log and below is the sample log provided for the raspi platform: - - [1686318315.534100][108731:108731] CHIP:DMG: ReportDataMessage = - [1686318315.534102][108731:108731] CHIP:DMG: { - [1686318315.534104][108731:108731] CHIP:DMG: AttributeReportIBs = - [1686318315.534107][108731:108731] CHIP:DMG: [ - [1686318315.534108][108731:108731] CHIP:DMG: AttributeReportIB = - [1686318315.534112][108731:108731] CHIP:DMG: { - [1686318315.534113][108731:108731] CHIP:DMG: AttributeDataIB = - [1686318315.534116][108731:108731] CHIP:DMG: { - [1686318315.534118][108731:108731] CHIP:DMG: DataVersion = 0x9b8b1ef2, - [1686318315.534120][108731:108731] CHIP:DMG: AttributePathIB = - [1686318315.534122][108731:108731] CHIP:DMG: { - [1686318315.534124][108731:108731] CHIP:DMG: Endpoint = 0x1, - [1686318315.534126][108731:108731] CHIP:DMG: Cluster = 0x2f, - [1686318315.534129][108731:108731] CHIP:DMG: Attribute = 0x0000_0010, - [1686318315.534131][108731:108731] CHIP:DMG: } - [1686318315.534133][108731:108731] CHIP:DMG: - [1686318315.534136][108731:108731] CHIP:DMG: Data = 0, - [1686318315.534138][108731:108731] CHIP:DMG: }, - [1686318315.534141][108731:108731] CHIP:DMG: - [1686318315.534142][108731:108731] CHIP:DMG: }, - [1686318315.534145][108731:108731] CHIP:DMG: - [1686318315.534147][108731:108731] CHIP:DMG: ], - [1686318315.534150][108731:108731] CHIP:DMG: - [1686318315.534152][108731:108731] CHIP:DMG: SuppressResponse = true, - [1686318315.534153][108731:108731] CHIP:DMG: InteractionModelRevision = 1 - [1686318315.534155][108731:108731] CHIP:DMG: } - [1686318315.534157][108731:108731] CHIP:DMG: - [1686318315.534179][108731:108731] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1686318315.534181][108731:108731] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages disabled: true - label: - "Step 6: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order" - PICS: PS.C.AO-READ + "Step 4: For each power source cluster on an endpoint that is a child + endpoint of an endpoint with a Bridged Node device type, ensure the + EndpointList in the Power Source cluster contains a list with one + entry that lists its own endpoint id" verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - Verify TH(all-clusters-minimal-app) receives the read command, and responds that this attribute is not available and also DUT is aware that the optional attributes are not available, and does not issue read requests for the attributes which it did read in step 2 - - - ./chip-tool powersource read bat-charge-level 1 1 - - on TH all-clusters-minimal-app verify status response as UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - - ./chip-tool powersource read bat-replacement-needed 1 1 - - on TH all-clusters-minimal-app verify status response as UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - - ./chip-tool powersource read bat-replaceability 1 1 - - on TH all-clusters-minimal-app verify status response as UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - disabled: true - - - label: - "Step 7: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order" - PICS: PS.C.AO-WRITE - verification: | - This cluster doesn't have any writable attributes disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RH_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_RH_3_1_Simulated.yaml deleted file mode 100644 index e098e12f326d93..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RH_3_1_Simulated.yaml +++ /dev/null @@ -1,399 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 10.3.1. [TC-RH-3.1] Attributes with Client as DUT - -PICS: - - RH.C - - RH.C.AM-READ - - RH.C.AO-READ - - RH.C.AM-WRITE - - RH.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Relative Humidity Measurement" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute MeasuredValue" - wait: "readAttribute" - attribute: "MeasuredValue" - - - label: "Read attribute MinMeasuredValue" - wait: "readAttribute" - attribute: "MinMeasuredValue" - - - label: "Read attribute MaxMeasuredValue" - wait: "readAttribute" - attribute: "MaxMeasuredValue" - - - label: "Read attribute Tolerance" - wait: "readAttribute" - attribute: "Tolerance" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - ./chip-tool relativehumiditymeasurement read feature-map 1 1 - - verify TH recieves "feature-map response" on the TH (all-cluster-minimal-app) log: - - [1666943749.218050][12769:12769] CHIP:DMG: - [1666943749.218060][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943749.218062][12769:12769] CHIP:DMG: { - [1666943749.218064][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943749.218067][12769:12769] CHIP:DMG: [ - [1666943749.218069][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943749.218074][12769:12769] CHIP:DMG: { - [1666943749.218076][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943749.218078][12769:12769] CHIP:DMG: { - [1666943749.218081][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943749.218083][12769:12769] CHIP:DMG: AttributePathIB = - [1666943749.218086][12769:12769] CHIP:DMG: { - [1666943749.218088][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943749.218091][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943749.218093][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666943749.218095][12769:12769] CHIP:DMG: } - [1666943749.218098][12769:12769] CHIP:DMG: - [1666943749.218101][12769:12769] CHIP:DMG: Data = 0, - [1666943749.218103][12769:12769] CHIP:DMG: }, - [1666943749.218106][12769:12769] CHIP:DMG: - [1666943749.218108][12769:12769] CHIP:DMG: }, - [1666943749.218112][12769:12769] CHIP:DMG: - [1666943749.218114][12769:12769] CHIP:DMG: ], - [1666943749.218117][12769:12769] CHIP:DMG: - - - ./chip-tool relativehumiditymeasurement read attribute-list 1 1 - - verify TH recieves "attribute-list response" on the TH (all-cluster-minimal-app) log: - - [1666943792.254338][12769:12769] CHIP:DMG: - [1666943792.254369][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943792.254372][12769:12769] CHIP:DMG: { - [1666943792.254374][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943792.254378][12769:12769] CHIP:DMG: [ - [1666943792.254381][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254385][12769:12769] CHIP:DMG: { - [1666943792.254388][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254392][12769:12769] CHIP:DMG: { - [1666943792.254395][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254397][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254399][12769:12769] CHIP:DMG: { - [1666943792.254402][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254404][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254406][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254409][12769:12769] CHIP:DMG: } - [1666943792.254411][12769:12769] CHIP:DMG: - [1666943792.254414][12769:12769] CHIP:DMG: Data = [ - [1666943792.254418][12769:12769] CHIP:DMG: - [1666943792.254422][12769:12769] CHIP:DMG: ], - [1666943792.254424][12769:12769] CHIP:DMG: }, - [1666943792.254427][12769:12769] CHIP:DMG: - [1666943792.254430][12769:12769] CHIP:DMG: }, - [1666943792.254435][12769:12769] CHIP:DMG: - [1666943792.254437][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254441][12769:12769] CHIP:DMG: { - [1666943792.254443][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254446][12769:12769] CHIP:DMG: { - [1666943792.254449][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254453][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254456][12769:12769] CHIP:DMG: { - [1666943792.254459][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254463][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254465][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254470][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254473][12769:12769] CHIP:DMG: } - [1666943792.254477][12769:12769] CHIP:DMG: - [1666943792.254480][12769:12769] CHIP:DMG: Data = 0, - [1666943792.254483][12769:12769] CHIP:DMG: }, - [1666943792.254487][12769:12769] CHIP:DMG: - [1666943792.254489][12769:12769] CHIP:DMG: }, - [1666943792.254495][12769:12769] CHIP:DMG: - [1666943792.254497][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254501][12769:12769] CHIP:DMG: { - [1666943792.254504][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254506][12769:12769] CHIP:DMG: { - [1666943792.254509][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254513][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254516][12769:12769] CHIP:DMG: { - [1666943792.254519][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254522][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254525][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254527][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254530][12769:12769] CHIP:DMG: } - [1666943792.254534][12769:12769] CHIP:DMG: - [1666943792.254538][12769:12769] CHIP:DMG: Data = 1, - [1666943792.254540][12769:12769] CHIP:DMG: }, - [1666943792.254544][12769:12769] CHIP:DMG: - [1666943792.254546][12769:12769] CHIP:DMG: }, - [1666943792.254551][12769:12769] CHIP:DMG: - [1666943792.254553][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254557][12769:12769] CHIP:DMG: { - [1666943792.254559][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254562][12769:12769] CHIP:DMG: { - [1666943792.254565][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254569][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254571][12769:12769] CHIP:DMG: { - [1666943792.254573][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254576][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254578][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254580][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254582][12769:12769] CHIP:DMG: } - [1666943792.254586][12769:12769] CHIP:DMG: - [1666943792.254589][12769:12769] CHIP:DMG: Data = 2, - [1666943792.254592][12769:12769] CHIP:DMG: }, - [1666943792.254596][12769:12769] CHIP:DMG: - [1666943792.254598][12769:12769] CHIP:DMG: }, - [1666943792.254604][12769:12769] CHIP:DMG: - [1666943792.254606][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254610][12769:12769] CHIP:DMG: { - [1666943792.254612][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254615][12769:12769] CHIP:DMG: { - [1666943792.254618][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254621][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254624][12769:12769] CHIP:DMG: { - [1666943792.254627][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254630][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254633][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254635][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254638][12769:12769] CHIP:DMG: } - [1666943792.254642][12769:12769] CHIP:DMG: - [1666943792.254645][12769:12769] CHIP:DMG: Data = 65528, - [1666943792.254647][12769:12769] CHIP:DMG: }, - [1666943792.254651][12769:12769] CHIP:DMG: - [1666943792.254653][12769:12769] CHIP:DMG: }, - [1666943792.254658][12769:12769] CHIP:DMG: - [1666943792.254660][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254664][12769:12769] CHIP:DMG: { - [1666943792.254666][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254669][12769:12769] CHIP:DMG: { - [1666943792.254672][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254674][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254677][12769:12769] CHIP:DMG: { - [1666943792.254680][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254683][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254686][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254689][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254691][12769:12769] CHIP:DMG: } - [1666943792.254695][12769:12769] CHIP:DMG: - [1666943792.254698][12769:12769] CHIP:DMG: Data = 65529, - [1666943792.254700][12769:12769] CHIP:DMG: }, - [1666943792.254704][12769:12769] CHIP:DMG: - [1666943792.254707][12769:12769] CHIP:DMG: }, - [1666943792.254712][12769:12769] CHIP:DMG: - [1666943792.254714][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254718][12769:12769] CHIP:DMG: { - [1666943792.254720][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254723][12769:12769] CHIP:DMG: { - [1666943792.254726][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254729][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254732][12769:12769] CHIP:DMG: { - [1666943792.254735][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254738][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254740][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254743][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254746][12769:12769] CHIP:DMG: } - [1666943792.254750][12769:12769] CHIP:DMG: - [1666943792.254753][12769:12769] CHIP:DMG: Data = 65531, - [1666943792.254756][12769:12769] CHIP:DMG: }, - [1666943792.254759][12769:12769] CHIP:DMG: - [1666943792.254762][12769:12769] CHIP:DMG: }, - [1666943792.254767][12769:12769] CHIP:DMG: - [1666943792.254769][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254773][12769:12769] CHIP:DMG: { - [1666943792.254775][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254778][12769:12769] CHIP:DMG: { - [1666943792.254780][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254783][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254786][12769:12769] CHIP:DMG: { - [1666943792.254789][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254792][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254797][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254799][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254802][12769:12769] CHIP:DMG: } - [1666943792.254804][12769:12769] CHIP:DMG: - [1666943792.254807][12769:12769] CHIP:DMG: Data = 65532, - [1666943792.254809][12769:12769] CHIP:DMG: }, - [1666943792.254811][12769:12769] CHIP:DMG: - [1666943792.254813][12769:12769] CHIP:DMG: }, - [1666943792.254820][12769:12769] CHIP:DMG: - [1666943792.254822][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943792.254826][12769:12769] CHIP:DMG: { - [1666943792.254828][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943792.254831][12769:12769] CHIP:DMG: { - [1666943792.254833][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943792.254835][12769:12769] CHIP:DMG: AttributePathIB = - [1666943792.254837][12769:12769] CHIP:DMG: { - [1666943792.254842][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943792.254845][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943792.254849][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943792.254851][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943792.254853][12769:12769] CHIP:DMG: } - [1666943792.254856][12769:12769] CHIP:DMG: - [1666943792.254859][12769:12769] CHIP:DMG: Data = 65533, - [1666943792.254861][12769:12769] CHIP:DMG: }, - [1666943792.254865][12769:12769] CHIP:DMG: - [1666943792.254867][12769:12769] CHIP:DMG: }, - [1666943792.254872][12769:12769] CHIP:DMG: - [1666943792.254874][12769:12769] CHIP:DMG: ], - [1666943792.254884][12769:12769] CHIP:DMG: - [1666943792.254886][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943792.254889][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666943792.254891][12769:12769] CHIP:DMG: } - [1666943792.254894][12769:12769] CHIP:DMG: - - ./chip-tool relativehumiditymeasurement read measured-value 1 1 - - verify TH recieves "measured-value response" on the TH (all-cluster-minimal-app) log: - [1666943851.649935][12769:12769] CHIP:DMG: - [1666943851.649947][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943851.649950][12769:12769] CHIP:DMG: { - [1666943851.649952][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943851.649956][12769:12769] CHIP:DMG: [ - [1666943851.649958][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943851.649962][12769:12769] CHIP:DMG: { - [1666943851.649965][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943851.649967][12769:12769] CHIP:DMG: { - [1666943851.649970][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943851.649973][12769:12769] CHIP:DMG: AttributePathIB = - [1666943851.649975][12769:12769] CHIP:DMG: { - [1666943851.649978][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943851.649981][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943851.649984][12769:12769] CHIP:DMG: Attribute = 0x0000_0000, - [1666943851.649987][12769:12769] CHIP:DMG: } - [1666943851.649990][12769:12769] CHIP:DMG: - [1666943851.649994][12769:12769] CHIP:DMG: Data = 0, - [1666943851.649997][12769:12769] CHIP:DMG: }, - [1666943851.650001][12769:12769] CHIP:DMG: - [1666943851.650003][12769:12769] CHIP:DMG: }, - [1666943851.650007][12769:12769] CHIP:DMG: - [1666943851.650009][12769:12769] CHIP:DMG: ], - [1666943851.650013][12769:12769] CHIP:DMG: - [1666943851.650015][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943851.650017][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - - ./chip-tool relativehumiditymeasurement read min-measured-value 1 1 - - verify TH recieves "min-measured-value response" on the TH (all-cluster-minimal-app) log: - - 1651147834.075387][2336:2336] CHIP:IM: Received Read request - - [1666943887.048829][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943887.048832][12769:12769] CHIP:DMG: { - [1666943887.048835][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943887.048840][12769:12769] CHIP:DMG: [ - [1666943887.048842][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943887.048846][12769:12769] CHIP:DMG: { - [1666943887.048848][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943887.048851][12769:12769] CHIP:DMG: { - [1666943887.048853][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943887.048855][12769:12769] CHIP:DMG: AttributePathIB = - [1666943887.048857][12769:12769] CHIP:DMG: { - [1666943887.048859][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943887.048862][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943887.048865][12769:12769] CHIP:DMG: Attribute = 0x0000_0001, - [1666943887.048868][12769:12769] CHIP:DMG: } - [1666943887.048871][12769:12769] CHIP:DMG: - [1666943887.048874][12769:12769] CHIP:DMG: Data = 0, - [1666943887.048877][12769:12769] CHIP:DMG: }, - [1666943887.048881][12769:12769] CHIP:DMG: - [1666943887.048883][12769:12769] CHIP:DMG: }, - [1666943887.048887][12769:12769] CHIP:DMG: - [1666943887.048889][12769:12769] CHIP:DMG: ], - [1666943887.048893][12769:12769] CHIP:DMG: - [1666943887.048894][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943887.048897][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - - - ./chip-tool relativehumiditymeasurement read max-measured-value 1 1 - - verify TH recieves "max-measured-value response" on the TH (all-cluster-minimal-app) log: - - [1666943902.417737][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943902.417740][12769:12769] CHIP:DMG: { - [1666943902.417742][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943902.417747][12769:12769] CHIP:DMG: [ - [1666943902.417749][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943902.417755][12769:12769] CHIP:DMG: { - [1666943902.417758][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943902.417761][12769:12769] CHIP:DMG: { - [1666943902.417764][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, - [1666943902.417767][12769:12769] CHIP:DMG: AttributePathIB = - [1666943902.417771][12769:12769] CHIP:DMG: { - [1666943902.417774][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943902.417777][12769:12769] CHIP:DMG: Cluster = 0x405, - [1666943902.417781][12769:12769] CHIP:DMG: Attribute = 0x0000_0002, - [1666943902.417784][12769:12769] CHIP:DMG: } - [1666943902.417788][12769:12769] CHIP:DMG: - [1666943902.417791][12769:12769] CHIP:DMG: Data = 10000, - [1666943902.417794][12769:12769] CHIP:DMG: }, - [1666943902.417798][12769:12769] CHIP:DMG: - [1666943902.417801][12769:12769] CHIP:DMG: }, - [1666943902.417805][12769:12769] CHIP:DMG: - [1666943902.417808][12769:12769] CHIP:DMG: ], - [1666943902.417812][12769:12769] CHIP:DMG: - [1666943902.417815][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943902.417819][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - TH all-clusters-minimal-app does not support optional attributes - - ./chip-tool relativehumiditymeasurement read tolerance 1 1 - - status = 0x86 (UNSUPPORTED_ATTRIBUTE), - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml index ce361a6c946e16..87ff6e151b4ef5 100644 --- a/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: RNCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !RNCONC.S.F00 && !RNCONC.S.F01 && !RNCONC.S.F02 && !RNCONC.S.F03 && + !RNCONC.S.F04 && !RNCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given RNCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && RNCONC.S.F00 + PICS: RNCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && !RNCONC.S.F00 + PICS: " !RNCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && RNCONC.S.F01 + PICS: RNCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && !RNCONC.S.F01 + PICS: " !RNCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && RNCONC.S.F02 + PICS: RNCONC.S.F02 && RNCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && !RNCONC.S.F02 + PICS: " !RNCONC.S.F02 && !RNCONC.S.F01" response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && RNCONC.S.F03 + PICS: RNCONC.S.F03 && RNCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && !RNCONC.S.F03 + PICS: " !RNCONC.S.F03 && !RNCONC.S.F01" response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && RNCONC.S.F04 + PICS: RNCONC.S.F04 && RNCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && !RNCONC.S.F04 + PICS: " !RNCONC.S.F04 && RNCONC.S.F00" response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && RNCONC.S.F05 + PICS: RNCONC.S.F05 && RNCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: RNCONC.S.Afffc && !RNCONC.S.F05 + PICS: " !RNCONC.S.F05 && !RNCONC.S.F00 " response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && RNCONC.S.A0007 && RNCONC.S.F00 + PICS: RNCONC.S.A0007 && RNCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when RNCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && !RNCONC.S.A0007 + PICS: " !RNCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && RNCONC.S.F00 + PICS: RNCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when RNCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && !RNCONC.S.F00 + PICS: " !RNCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && RNCONC.S.F04 + PICS: RNCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when RNCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && !RNCONC.S.F04 + PICS: " !RNCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && RNCONC.S.F05 + PICS: RNCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: RNCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && !RNCONC.S.F05 + PICS: " !RNCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && RNCONC.S.F01 + PICS: RNCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: RNCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: RNCONC.S.Afffb && !RNCONC.S.F01 + PICS: " !RNCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: RNCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: RNCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml index d9d98f55d8cfd6..2d10dafd07ee91 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,75 +39,78 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: RVCCLEANM.S.A0000 verification: | - ./chip-tool rvcleanm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast two ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: - - [1654595167.600241][14362:14367] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595167.600345][14362:14367] CHIP:TOO: SupportedModes: 3 entries - [1654595167.600403][14362:14367] CHIP:TOO: [1]: { - [1654595167.600430][14362:14367] CHIP:TOO: Label: Black - [1654595167.600466][14362:14367] CHIP:TOO: Mode: 0 - [1654595167.600495][14362:14367] CHIP:TOO: SemanticTags: 1 entries - [1654595167.600564][14362:14367] CHIP:TOO: [1]: { - [1654595167.600589][14362:14367] CHIP:TOO: MfgCode: 0 - [1654595167.600612][14362:14367] CHIP:TOO: Value: 0 - [1654595167.600637][14362:14367] CHIP:TOO: } - [1654595167.600662][14362:14367] CHIP:TOO: } - [1654595167.600695][14362:14367] CHIP:TOO: [2]: { - [1654595167.600719][14362:14367] CHIP:TOO: Label: Cappuccino - [1654595167.600742][14362:14367] CHIP:TOO: Mode: 4 - [1654595167.600768][14362:14367] CHIP:TOO: SemanticTags: 1 entries - [1654595167.600796][14362:14367] CHIP:TOO: [1]: { - [1654595167.600820][14362:14367] CHIP:TOO: MfgCode: 0 - [1654595167.600842][14362:14367] CHIP:TOO: Value: 0 - [1654595167.600865][14362:14367] CHIP:TOO: } - [1654595167.600889][14362:14367] CHIP:TOO: } - [1654595167.600921][14362:14367] CHIP:TOO: [3]: { - [1654595167.600945][14362:14367] CHIP:TOO: Label: Espresso - [1654595167.600968][14362:14367] CHIP:TOO: Mode: 7 - [1654595167.600993][14362:14367] CHIP:TOO: SemanticTags: 1 entries - [1654595167.601022][14362:14367] CHIP:TOO: [1]: { - [1654595167.601046][14362:14367] CHIP:TOO: MfgCode: 0 - [1654595167.601068][14362:14367] CHIP:TOO: Value: 0 - [1654595167.601091][14362:14367] CHIP:TOO: } - [1654595167.601115][14362:14367] CHIP:TOO: } + ./chip-tool rvccleanmode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries. + - Verify that list should contain at least one entry + - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value + - ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range + - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 + - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690182376.583167][14996:14998] CHIP:DMG: } + [1690182376.583260][14996:14998] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0000 DataVersion: 3145953005 + [1690182376.583288][14996:14998] CHIP:TOO: SupportedModes: 3 entries + [1690182376.583301][14996:14998] CHIP:TOO: [1]: { + [1690182376.583304][14996:14998] CHIP:TOO: Label: Vacuum + [1690182376.583307][14996:14998] CHIP:TOO: Mode: 0 + [1690182376.583311][14996:14998] CHIP:TOO: ModeTags: 1 entries + [1690182376.583316][14996:14998] CHIP:TOO: [1]: { + [1690182376.583319][14996:14998] CHIP:TOO: Value: 16385 + [1690182376.583322][14996:14998] CHIP:TOO: } + [1690182376.583325][14996:14998] CHIP:TOO: } + [1690182376.583331][14996:14998] CHIP:TOO: [2]: { + [1690182376.583333][14996:14998] CHIP:TOO: Label: Wash + [1690182376.583336][14996:14998] CHIP:TOO: Mode: 1 + [1690182376.583340][14996:14998] CHIP:TOO: ModeTags: 1 entries + [1690182376.583344][14996:14998] CHIP:TOO: [1]: { + [1690182376.583347][14996:14998] CHIP:TOO: Value: 16386 + [1690182376.583349][14996:14998] CHIP:TOO: } + [1690182376.583352][14996:14998] CHIP:TOO: } + [1690182376.583357][14996:14998] CHIP:TOO: [3]: { + [1690182376.583360][14996:14998] CHIP:TOO: Label: Deep clean + [1690182376.583362][14996:14998] CHIP:TOO: Mode: 2 + [1690182376.583366][14996:14998] CHIP:TOO: ModeTags: 2 entries + [1690182376.583369][14996:14998] CHIP:TOO: [1]: { + [1690182376.583372][14996:14998] CHIP:TOO: Value: 7 + [1690182376.583375][14996:14998] CHIP:TOO: } + [1690182376.583378][14996:14998] CHIP:TOO: [2]: { + [1690182376.583380][14996:14998] CHIP:TOO: Value: 16384 + [1690182376.583383][14996:14998] CHIP:TOO: } + [1690182376.583385][14996:14998] CHIP:TOO: } disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | - ./chip-tool rvcleanm read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut and below is the sample log provided for the raspi platform: + ./chip-tool rvccleanmode read current-mode 1 1 - [1645776767.611140][4667:4672] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469718 + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1645776767.611214][4667:4672] CHIP:TOO: CurrentMode: 0 + [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 + [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the OnMode attribute." PICS: RVCCLEANM.S.A0003 verification: | - ./chip-tool rvcleanm read on-mode 1 1 + ./chip-tool rvccleanmode read on-mode 1 1 - Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform, Here OnMode attribute value is Null - - [1649676072.465968][10754:10759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065072 - - [1649676072.466094][10754:10759] CHIP:TOO: OnMode: null + [1690182436.721527][15012:15014] CHIP:DMG: } + [1690182436.721673][15012:15014] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0003 DataVersion: 3145953005 + [1690182436.721723][15012:15014] CHIP:TOO: OnMode: null disabled: true - label: "Step 5: TH reads from the DUT the StartUpMode attribute." PICS: RVCCLEANM.S.A0002 verification: | - ./chip-tool rvcleanm read start-up-mode 1 1 - - Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer and value is from supported_modes_dut, below is the sample log provided for the raspi platform: - + ./chip-tool rvccleanmode read start-up-mode 1 1 - [1649677014.496348][10778:10784] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 4277065072 + Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer(As per spec default value is null) and value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null - [1649677014.496469][10778:10784] CHIP:TOO: StartUpMode: 0 + [1690182475.587786][15022:15024] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0002 DataVersion: 3145953005 + [1690182475.587797][15022:15024] CHIP:TOO: StartUpMode: null disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml index 1925f2b89c4066..4d0da130791b6c 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml @@ -34,143 +34,208 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: RVCCLEANM.S.A0000 verification: | - ./chip-tool rvcleanm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains two or more ModeOptionsStruct entries and save the Mode field values as supported_modes_dut, below is the sample log provided for the raspi platform: - - [1685018204.991818][16390:16392] CHIP:DMG: } - [1685018204.992182][16390:16392] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 3673378954 - [1685018204.992279][16390:16392] CHIP:TOO: SupportedModes: 3 entries - [1685018204.992320][16390:16392] CHIP:TOO: [1]: { - [1685018204.992331][16390:16392] CHIP:TOO: Label: Black - [1685018204.992350][16390:16392] CHIP:TOO: Mode: 0 - [1685018204.992376][16390:16392] CHIP:TOO: SemanticTags: 1 entries - [1685018204.992408][16390:16392] CHIP:TOO: [1]: { - [1685018204.992420][16390:16392] CHIP:TOO: MfgCode: 0 - [1685018204.992430][16390:16392] CHIP:TOO: Value: 0 - [1685018204.992440][16390:16392] CHIP:TOO: } - [1685018204.992452][16390:16392] CHIP:TOO: } - [1685018204.992482][16390:16392] CHIP:TOO: [2]: { - [1685018204.992492][16390:16392] CHIP:TOO: Label: Cappuccino - [1685018204.992504][16390:16392] CHIP:TOO: Mode: 4 - [1685018204.992525][16390:16392] CHIP:TOO: SemanticTags: 1 entries - [1685018204.992547][16390:16392] CHIP:TOO: [1]: { - [1685018204.992558][16390:16392] CHIP:TOO: MfgCode: 0 - [1685018204.992567][16390:16392] CHIP:TOO: Value: 0 - [1685018204.992578][16390:16392] CHIP:TOO: } - [1685018204.992588][16390:16392] CHIP:TOO: } - [1685018204.992610][16390:16392] CHIP:TOO: [3]: { - [1685018204.992619][16390:16392] CHIP:TOO: Label: Espresso - [1685018204.992628][16390:16392] CHIP:TOO: Mode: 7 - [1685018204.992641][16390:16392] CHIP:TOO: SemanticTags: 1 entries - [1685018204.992657][16390:16392] CHIP:TOO: [1]: { - [1685018204.992666][16390:16392] CHIP:TOO: MfgCode: 0 - [1685018204.992678][16390:16392] CHIP:TOO: Value: 0 - [1685018204.992687][16390:16392] CHIP:TOO: } - [1685018204.992695][16390:16392] CHIP:TOO: } + ./chip-tool rvccleanmode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690182376.583260][14996:14998] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0000 DataVersion: 3145953005 + [1690182376.583288][14996:14998] CHIP:TOO: SupportedModes: 3 entries + [1690182376.583301][14996:14998] CHIP:TOO: [1]: { + [1690182376.583304][14996:14998] CHIP:TOO: Label: Vacuum + [1690182376.583307][14996:14998] CHIP:TOO: Mode: 0 + [1690182376.583311][14996:14998] CHIP:TOO: ModeTags: 1 entries + [1690182376.583316][14996:14998] CHIP:TOO: [1]: { + [1690182376.583319][14996:14998] CHIP:TOO: Value: 16385 + [1690182376.583322][14996:14998] CHIP:TOO: } + [1690182376.583325][14996:14998] CHIP:TOO: } + [1690182376.583331][14996:14998] CHIP:TOO: [2]: { + [1690182376.583333][14996:14998] CHIP:TOO: Label: Wash + [1690182376.583336][14996:14998] CHIP:TOO: Mode: 1 + [1690182376.583340][14996:14998] CHIP:TOO: ModeTags: 1 entries + [1690182376.583344][14996:14998] CHIP:TOO: [1]: { + [1690182376.583347][14996:14998] CHIP:TOO: Value: 16386 + [1690182376.583349][14996:14998] CHIP:TOO: } + [1690182376.583352][14996:14998] CHIP:TOO: } + [1690182376.583357][14996:14998] CHIP:TOO: [3]: { + [1690182376.583360][14996:14998] CHIP:TOO: Label: Deep clean + [1690182376.583362][14996:14998] CHIP:TOO: Mode: 2 + [1690182376.583366][14996:14998] CHIP:TOO: ModeTags: 2 entries + [1690182376.583369][14996:14998] CHIP:TOO: [1]: { + [1690182376.583372][14996:14998] CHIP:TOO: Value: 7 + [1690182376.583375][14996:14998] CHIP:TOO: } + [1690182376.583378][14996:14998] CHIP:TOO: [2]: { + [1690182376.583380][14996:14998] CHIP:TOO: Value: 16384 + [1690182376.583383][14996:14998] CHIP:TOO: } + [1690182376.583385][14996:14998] CHIP:TOO: } disabled: true - - label: "Step 2: TH reads from the DUT the CurrentMode attribute." + - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | - ./chip-tool rvcleanm read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - - save tha value as old_current_mode_dut - - select a value from supported_modes_dut, different from old_current_mode_dut, and which corresponds to a mode the device can switch to, given its current state and save this value as new_mode_th - - select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, - below is the sample log provided for the raspi platform: - - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 + ./chip-tool rvccleanmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut + - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + + [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 + [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 3: TH sends a ChangeToMode command to the DUT with NewMode set - to old_current_mode_dut [Petru] note that currently this constraint is - not in the spec. The unapproved proposal is here: - https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/7096 - Until that's approved, please skip this step." + "Step 4: TH sends a ChangeToMode command to the DUT with NewMode set + to old_current_mode_dut" PICS: RVCCLEANM.S.C00.Rsp verification: | - ChangeToMode Command is not impleented. + ./chip-tool rvccleanmode change-to-mode 0 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690182553.733326][15036:15038] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 + [1690182553.733341][15036:15038] CHIP:TOO: ChangeToModeResponse: { + [1690182553.733348][15036:15038] CHIP:TOO: status: 0 + [1690182553.733351][15036:15038] CHIP:TOO: } disabled: true - label: - "Step 4: Manually put the device in a state from which it will FAIL to + "Step 5: Manually put the device in a state from which it will FAIL to transition to PIXIT.RVCCLEANM.MODE_CHANGE_FAIL" + PICS: PIXIT.RVCCLEANM.CAN_TEST_MODE_FAILURE verification: | - + Manual operation required disabled: true - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + - label: "Step 6: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | + ./chip-tool rvccleanmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 + [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 6: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.RVCCLEANM.MODE_CHANGE_FAIL" - PICS: RVCCLEANM.S.C00.Rsp + PICS: PIXIT.RVCCLEANM.CAN_TEST_MODE_FAILURE && RVCCLEANM.S.C00.Rsp verification: | - ChangeToMode Command is not impleented. + First change the mode to cleaning after that try to change the mode to any other modes (Vaccum, Deep clean, Wash ) + + ./chip-tool rvcrunmode change-to-mode 1 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690262143.410054][28190:28192] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690262143.410070][28190:28192] CHIP:TOO: ChangeToModeResponse: { + [1690262143.410076][28190:28192] CHIP:TOO: status: 0 + [1690262143.410079][28190:28192] CHIP:TOO: } + + ./chip-tool rvccleanmode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a GenericFailure(0x02) status response and StatusText field has a length between 1 and 64, below is the sample log provided for the raspi platform: + + [1690262155.519185][28202:28204] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 + [1690262155.519202][28202:28204] CHIP:TOO: ChangeToModeResponse: { + [1690262155.519206][28202:28204] CHIP:TOO: status: 64 + [1690262155.519210][28202:28204] CHIP:TOO: statusText: Cannot change the cleaning mode during a clean + [1690262155.519213][28202:28204] CHIP:TOO: } disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | - ./chip-tool rvcleanm read current-mode 1 1 + ./chip-tool rvccleanmode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and equal to the new_mode_th, below is the sample log provided for the raspi platform: + Verify on TH(chip-tool), CurrentMode attribute value is an integer value and equal to old_current_mode_dut below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 + [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 + [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 8: Manually put the device in a state from which it will + "Step 9: Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.RVCCLEANM.MODE_CHANGE_OK" verification: | - + Manual operation required disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | + ./chip-tool rvccleanmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 + [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 10: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 11: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.RVCCLEANM.MODE_CHANGE_OK" PICS: RVCCLEANM.S.C00.Rsp verification: | - ChangeToMode Command is not impleented. + Change to mode is not allowed from cleaning to any other mode(Vaccum, Deep clean, Wash ), Please switch the mode to idle and then try to change to other modes + + ./chip-tool rvcrunmode change-to-mode 0 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690262367.604437][28315:28317] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690262367.604496][28315:28317] CHIP:TOO: ChangeToModeResponse: { + [1690262367.604517][28315:28317] CHIP:TOO: status: 0 + [1690262367.604529][28315:28317] CHIP:TOO: } + + + ./chip-tool rvccleanmode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690262376.067598][28323:28325] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 + [1690262376.067612][28323:28325] CHIP:TOO: ChangeToModeResponse: { + [1690262376.067618][28323:28325] CHIP:TOO: status: 0 + [1690262376.067621][28323:28325] CHIP:TOO: } disabled: true - - label: "Step 11: TH reads from the DUT the CurrentMode attribute." + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | + ./chip-tool rvccleanmode read current-mode 1 1 + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 11, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 + + [1690262464.326501][28342:28344] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 2064453499 + [1690262464.326542][28342:28344] CHIP:TOO: CurrentMode: 2 disabled: true - label: - "Step 12: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 13: TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th" PICS: RVCCLEANM.S.C00.Rsp verification: | + ./chip-tool rvccleanmode change-to-mode 4 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a UnsupportedMode(0x01) status response and below is the sample log provided for the raspi platform: + [1690262496.596029][28351:28353] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 + [1690262496.596080][28351:28353] CHIP:TOO: ChangeToModeResponse: { + [1690262496.596117][28351:28353] CHIP:TOO: status: 1 + [1690262496.596120][28351:28353] CHIP:TOO: } disabled: true - - label: "Step 13: TH reads from the DUT the CurrentMode attribute." + - label: "Step 14: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | + ./chip-tool rvccleanmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 12, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 + [1690262464.326501][28342:28344] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 2064453499 + [1690262464.326542][28342:28344] CHIP:TOO: CurrentMode: 2 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml index 2a4df6ad202721..9806f6dd8b9fe6 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,63 +39,69 @@ tests: - label: "Step 2: TH reads from the DUT the OnMode attribute." PICS: RVCCLEANM.S.A0003 && RVCCLEANM.S.F00 verification: | - ./chip-tool rvcleanm read on-mode 1 1 + ./chip-tool rvccleanmode read on-mode 1 1 - On TH(chip-tool), Verify OnMode attribute value is an integer. save the value as on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer or Null + Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - [1649678983.679893][10871:10876] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065073 - [1649678983.680002][10871:10876] CHIP:TOO: OnMode: 0 + [1690183202.686514][15123:15125] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0003 DataVersion: 3145953012 + [1690183202.686550][15123:15125] CHIP:TOO: OnMode: 0 disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 && RVCCLEANM.S.F00 verification: | - ./chip-tool rvcleanm read current-mode 1 1 + ./chip-tool rvccleanmode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute is an integer. + Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - On TH(chip-tool), Verify CurrentMode attribute is an integer. save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. - [1649679034.895848][10879:10884] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679034.895972][10879:10884] CHIP:TOO: CurrentMode: 0 + [1690183300.914668][15159:15161] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 4196861832 + [1690183300.914716][15159:15161] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: RVCCLEANM.S.A0000 && RVCCLEANM.S.F00 verification: | - ./chip-tool rvcleanm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. save the Mode field values as supported_modes_dut.Select a value from supported_modes_dut different from startup_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1654595268.854568][14400:14405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595268.854678][14400:14405] CHIP:TOO: SupportedModes: 3 entries - [1654595268.854743][14400:14405] CHIP:TOO: [1]: { - [1654595268.854772][14400:14405] CHIP:TOO: Label: Black - [1654595268.854811][14400:14405] CHIP:TOO: Mode: 0 - [1654595268.854843][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.854891][14400:14405] CHIP:TOO: [1]: { - [1654595268.854918][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.854945][14400:14405] CHIP:TOO: Value: 0 - [1654595268.854971][14400:14405] CHIP:TOO: } - [1654595268.855000][14400:14405] CHIP:TOO: } - [1654595268.855038][14400:14405] CHIP:TOO: [2]: { - [1654595268.855064][14400:14405] CHIP:TOO: Label: Cappuccino - [1654595268.855089][14400:14405] CHIP:TOO: Mode: 4 - [1654595268.855117][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855149][14400:14405] CHIP:TOO: [1]: { - [1654595268.855175][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855199][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855223][14400:14405] CHIP:TOO: } - [1654595268.855249][14400:14405] CHIP:TOO: } - [1654595268.855284][14400:14405] CHIP:TOO: [3]: { - [1654595268.855310][14400:14405] CHIP:TOO: Label: Espresso - [1654595268.855332][14400:14405] CHIP:TOO: Mode: 7 - [1654595268.855360][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855390][14400:14405] CHIP:TOO: [1]: { - [1654595268.855416][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855440][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855464][14400:14405] CHIP:TOO: } - [1654595268.855490][14400:14405] CHIP:TOO: } - [1649677252.376226][10804:10809] CHIP:TOO: SemanticTag: 0 - [1649677252.376252][10804:10809] CHIP:TOO: } + ./chip-tool rvccleanmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690182376.583167][14996:14998] CHIP:DMG: } + [1690182376.583260][14996:14998] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0000 DataVersion: 3145953005 + [1690182376.583288][14996:14998] CHIP:TOO: SupportedModes: 3 entries + [1690182376.583301][14996:14998] CHIP:TOO: [1]: { + [1690182376.583304][14996:14998] CHIP:TOO: Label: Vacuum + [1690182376.583307][14996:14998] CHIP:TOO: Mode: 0 + [1690182376.583311][14996:14998] CHIP:TOO: ModeTags: 1 entries + [1690182376.583316][14996:14998] CHIP:TOO: [1]: { + [1690182376.583319][14996:14998] CHIP:TOO: Value: 16385 + [1690182376.583322][14996:14998] CHIP:TOO: } + [1690182376.583325][14996:14998] CHIP:TOO: } + [1690182376.583331][14996:14998] CHIP:TOO: [2]: { + [1690182376.583333][14996:14998] CHIP:TOO: Label: Wash + [1690182376.583336][14996:14998] CHIP:TOO: Mode: 1 + [1690182376.583340][14996:14998] CHIP:TOO: ModeTags: 1 entries + [1690182376.583344][14996:14998] CHIP:TOO: [1]: { + [1690182376.583347][14996:14998] CHIP:TOO: Value: 16386 + [1690182376.583349][14996:14998] CHIP:TOO: } + [1690182376.583352][14996:14998] CHIP:TOO: } + [1690182376.583357][14996:14998] CHIP:TOO: [3]: { + [1690182376.583360][14996:14998] CHIP:TOO: Label: Deep clean + [1690182376.583362][14996:14998] CHIP:TOO: Mode: 2 + [1690182376.583366][14996:14998] CHIP:TOO: ModeTags: 2 entries + [1690182376.583369][14996:14998] CHIP:TOO: [1]: { + [1690182376.583372][14996:14998] CHIP:TOO: Value: 7 + [1690182376.583375][14996:14998] CHIP:TOO: } + [1690182376.583378][14996:14998] CHIP:TOO: [2]: { + [1690182376.583380][14996:14998] CHIP:TOO: Value: 16384 + [1690182376.583383][14996:14998] CHIP:TOO: } + [1690182376.583385][14996:14998] CHIP:TOO: } disabled: true - label: @@ -98,16 +109,14 @@ tests: to new_mode_th" PICS: RVCCLEANM.S.C00.Rsp && RVCCLEANM.S.F00 verification: | - ./chip-tool rvcleanm change-to-mode 7 1 1 + ./chip-tool rvccleanmode change-to-mode 1 1 1 - On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931013.571019][20667:20669] CHIP:DMG: - [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = - [1684931013.571024][20667:20669] CHIP:DMG: { - [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931013.571030][20667:20669] CHIP:DMG: }, - [1684931013.571034][20667:20669] CHIP:DMG: + 1690183395.641002][15168:15170] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 + [1690183395.641020][15168:15170] CHIP:TOO: ChangeToModeResponse: { + [1690183395.641025][15168:15170] CHIP:TOO: status: 0 + [1690183395.641028][15168:15170] CHIP:TOO: } disabled: true - label: "Step 6: TH sends a Off command to the DUT" @@ -139,10 +148,10 @@ tests: - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 && RVCCLEANM.S.F00 verification: | - ./chip-tool rvcleanm read current-mode 1 1 + ./chip-tool rvccleanmode read current-mode 1 1 - On TH(chip-tool),verify that CurrentMode attribute value is an integer and value is equal to on_mode_dut. below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 - [1649679202.069163][10899:10904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679202.069278][10899:10904] CHIP:TOO: CurrentMode: 0 + [1690183444.048684][15184:15186] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 4196861834 + [1690183444.048697][15184:15186] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml index 0861a1f2117d57..5e5b97cf0cd5a0 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,96 +39,165 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: RVCCLEANM.S.A0002 verification: | - ./chip-tool rvcleanm read start-up-mode 1 1 + ./chip-tool rvccleanmode read start-up-mode 1 1 - On TH(chip-tool), Verify StartUpMode attribute value is an integer. save the valueas startup_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify StartUpMode attribute value is an integer value or null + - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is null - [1645777708.406864][4841:4846] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469721 - [1645777708.406933][4841:4846] CHIP:TOO: StartUpMode: 0 + NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. + + [1690545840.189340][3104:3106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0002 DataVersion: 3338736524 + [1690545840.189408][3104:3106] CHIP:TOO: StartUpMode: null disabled: true - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: RVCCLEANM.S.A0000 verification: | - ./chip-tool rvcleanm read current-mode 1 1 + ./chip-tool rvccleanmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690183637.107558][15230:15232] CHIP:TOO: SupportedModes: 3 entries + [1690183637.107597][15230:15232] CHIP:TOO: [1]: { + [1690183637.107608][15230:15232] CHIP:TOO: Label: Vacuum + [1690183637.107618][15230:15232] CHIP:TOO: Mode: 0 + [1690183637.107633][15230:15232] CHIP:TOO: ModeTags: 1 entries + [1690183637.107651][15230:15232] CHIP:TOO: [1]: { + [1690183637.107662][15230:15232] CHIP:TOO: Value: 16385 + [1690183637.107670][15230:15232] CHIP:TOO: } + [1690183637.107679][15230:15232] CHIP:TOO: } + [1690183637.107700][15230:15232] CHIP:TOO: [2]: { + [1690183637.107708][15230:15232] CHIP:TOO: Label: Wash + [1690183637.107718][15230:15232] CHIP:TOO: Mode: 1 + [1690183637.107730][15230:15232] CHIP:TOO: ModeTags: 1 entries + [1690183637.107744][15230:15232] CHIP:TOO: [1]: { + [1690183637.107753][15230:15232] CHIP:TOO: Value: 16386 + [1690183637.107765][15230:15232] CHIP:TOO: } + [1690183637.107774][15230:15232] CHIP:TOO: } + [1690183637.107793][15230:15232] CHIP:TOO: [3]: { + [1690183637.107801][15230:15232] CHIP:TOO: Label: Deep clean + [1690183637.107811][15230:15232] CHIP:TOO: Mode: 2 + [1690183637.107823][15230:15232] CHIP:TOO: ModeTags: 2 entries + [1690183637.107837][15230:15232] CHIP:TOO: [1]: { + [1690183637.107846][15230:15232] CHIP:TOO: Value: 7 + [1690183637.107856][15230:15232] CHIP:TOO: } + [1690183637.107885][15230:15232] CHIP:TOO: [2]: { + [1690183637.107888][15230:15232] CHIP:TOO: Value: 16384 + [1690183637.107890][15230:15232] CHIP:TOO: } + [1690183637.107894][15230:15232] CHIP:TOO: } + disabled: true - On TH(chip-tool), Verify CurrentMode attribute value is integer. save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: RVCCLEANM.S.A0002 + verification: | + ./chip-tool rvccleanmode write start-up-mode 0 1 1 - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + [1690183561.346360][15209:15211] CHIP:DMG: StatusIB = + [1690183561.346364][15209:15211] CHIP:DMG: { + [1690183561.346367][15209:15211] CHIP:DMG: status = 0x00 (SUCCESS), + [1690183561.346369][15209:15211] CHIP:DMG: }, + disabled: true - If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + PICS: RVCCLEANM.S.A0001 + verification: | + ./chip-tool rvccleanmode read current-mode 1 1 + + On TH(chip-tool), Verify CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 + + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8. + + [1690183605.342520][15217:15219] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3992778259 + [1690183605.342539][15217:15219] CHIP:TOO: CurrentMode: 0 disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." PICS: RVCCLEANM.S.A0000 verification: | - ./chip-tool rvcleanm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. save the Mode field values as supported_modes_dut.Select a value from supported_modes_dut different from startup_mode_dut and Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1654595268.854568][14400:14405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595268.854678][14400:14405] CHIP:TOO: SupportedModes: 3 entries - [1654595268.854743][14400:14405] CHIP:TOO: [1]: { - [1654595268.854772][14400:14405] CHIP:TOO: Label: Black - [1654595268.854811][14400:14405] CHIP:TOO: Mode: 0 - [1654595268.854843][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.854891][14400:14405] CHIP:TOO: [1]: { - [1654595268.854918][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.854945][14400:14405] CHIP:TOO: Value: 0 - [1654595268.854971][14400:14405] CHIP:TOO: } - [1654595268.855000][14400:14405] CHIP:TOO: } - [1654595268.855038][14400:14405] CHIP:TOO: [2]: { - [1654595268.855064][14400:14405] CHIP:TOO: Label: Cappuccino - [1654595268.855089][14400:14405] CHIP:TOO: Mode: 4 - [1654595268.855117][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855149][14400:14405] CHIP:TOO: [1]: { - [1654595268.855175][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855199][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855223][14400:14405] CHIP:TOO: } - [1654595268.855249][14400:14405] CHIP:TOO: } - [1654595268.855284][14400:14405] CHIP:TOO: [3]: { - [1654595268.855310][14400:14405] CHIP:TOO: Label: Espresso - [1654595268.855332][14400:14405] CHIP:TOO: Mode: 7 - [1654595268.855360][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855390][14400:14405] CHIP:TOO: [1]: { - [1654595268.855416][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855440][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855464][14400:14405] CHIP:TOO: } - [1654595268.855490][14400:14405] CHIP:TOO: } - [1649677252.376226][10804:10809] CHIP:TOO: SemanticTag: 0 - [1649677252.376252][10804:10809] CHIP:TOO: } + ./chip-tool rvccleanmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th., below is the sample log provided for the raspi platform: + + [1690183637.107558][15230:15232] CHIP:TOO: SupportedModes: 3 entries + [1690183637.107597][15230:15232] CHIP:TOO: [1]: { + [1690183637.107608][15230:15232] CHIP:TOO: Label: Vacuum + [1690183637.107618][15230:15232] CHIP:TOO: Mode: 0 + [1690183637.107633][15230:15232] CHIP:TOO: ModeTags: 1 entries + [1690183637.107651][15230:15232] CHIP:TOO: [1]: { + [1690183637.107662][15230:15232] CHIP:TOO: Value: 16385 + [1690183637.107670][15230:15232] CHIP:TOO: } + [1690183637.107679][15230:15232] CHIP:TOO: } + [1690183637.107700][15230:15232] CHIP:TOO: [2]: { + [1690183637.107708][15230:15232] CHIP:TOO: Label: Wash + [1690183637.107718][15230:15232] CHIP:TOO: Mode: 1 + [1690183637.107730][15230:15232] CHIP:TOO: ModeTags: 1 entries + [1690183637.107744][15230:15232] CHIP:TOO: [1]: { + [1690183637.107753][15230:15232] CHIP:TOO: Value: 16386 + [1690183637.107765][15230:15232] CHIP:TOO: } + [1690183637.107774][15230:15232] CHIP:TOO: } + [1690183637.107793][15230:15232] CHIP:TOO: [3]: { + [1690183637.107801][15230:15232] CHIP:TOO: Label: Deep clean + [1690183637.107811][15230:15232] CHIP:TOO: Mode: 2 + [1690183637.107823][15230:15232] CHIP:TOO: ModeTags: 2 entries + [1690183637.107837][15230:15232] CHIP:TOO: [1]: { + [1690183637.107846][15230:15232] CHIP:TOO: Value: 7 + [1690183637.107856][15230:15232] CHIP:TOO: } + [1690183637.107885][15230:15232] CHIP:TOO: [2]: { + [1690183637.107888][15230:15232] CHIP:TOO: Value: 16384 + [1690183637.107890][15230:15232] CHIP:TOO: } + [1690183637.107894][15230:15232] CHIP:TOO: } disabled: true - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: RVCCLEANM.S.C00.Rsp verification: | - ./chip-tool rvcleanm change-to-mode 4 1 1 - + ./chip-tool rvccleanmode change-to-mode 1 1 1 - On TH(chip-tool) , Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931419.768138][20792:20794] CHIP:DMG: StatusIB = - [1684931419.768143][20792:20794] CHIP:DMG: { - [1684931419.768148][20792:20794] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931419.768152][20792:20794] CHIP:DMG: }, + [1690183675.346665][15234:15236] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 + [1690183675.346731][15234:15236] CHIP:TOO: ChangeToModeResponse: { + [1690183675.346753][15234:15236] CHIP:TOO: status: 0 + [1690183675.346768][15234:15236] CHIP:TOO: } disabled: true - - label: "Step 6: Physically power cycle the device" + - label: "Step 8: Physically power cycle the device" verification: | Physically power cycle the device. disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 9: TH reads from the DUT the StartUpMode attribute." + PICS: RVCCLEANM.S.A0002 + verification: | + ./chip-tool rvccleanmode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer + - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is 0 + + [1690545840.189340][3104:3106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0002 DataVersion: 3338736524 + [1690545840.189408][3104:3106] CHIP:TOO: StartUpMode: 0 + disabled: true + + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 verification: | - ./chip-tool rvcleanm read current-mode 1 1 + ./chip-tool rvccleanmode read current-mode 1 1 - on TH(chip-tool), Verify that CurrentMode attribute value is same as value recorded in step 1 and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 + [1690347752.080278][43423:43425] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 1382495026 + [1690347752.080330][43423:43425] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_3.yaml index 72998922dae970..642926e317d53c 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_3.yaml @@ -26,6 +26,24 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command + disabled: true + + - label: "Note" + verification: | + To Execute the TC-RVCCLEANM-3.3 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -36,118 +54,171 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: RVCCLEANM.S.A0002 verification: | - ./chip-tool rvcleanm read start-up-mode 1 1 + ./chip-tool rvcrunmode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is an integer or Null + - Save the value as startup_mode_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is null + + NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. + + [1690546417.725863][3168:3170] CHIP:DMG: } + [1690546417.726042][3168:3170] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 3746592465 + [1690546417.726109][3168:3170] CHIP:TOO: StartUpMode: null + disabled: true + + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: RVCCLEANM.S.A0000 + verification: | + ./chip-tool rvccleanmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690184020.818299][15321:15323] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0000 DataVersion: 3807724300 + [1690184020.818324][15321:15323] CHIP:TOO: SupportedModes: 3 entries + [1690184020.818332][15321:15323] CHIP:TOO: [1]: { + [1690184020.818336][15321:15323] CHIP:TOO: Label: Vacuum + [1690184020.818341][15321:15323] CHIP:TOO: Mode: 0 + [1690184020.818345][15321:15323] CHIP:TOO: ModeTags: 1 entries + [1690184020.818351][15321:15323] CHIP:TOO: [1]: { + [1690184020.818354][15321:15323] CHIP:TOO: Value: 16385 + [1690184020.818357][15321:15323] CHIP:TOO: } + [1690184020.818360][15321:15323] CHIP:TOO: } + [1690184020.818365][15321:15323] CHIP:TOO: [2]: { + [1690184020.818368][15321:15323] CHIP:TOO: Label: Wash + [1690184020.818370][15321:15323] CHIP:TOO: Mode: 1 + [1690184020.818372][15321:15323] CHIP:TOO: ModeTags: 1 entries + [1690184020.818376][15321:15323] CHIP:TOO: [1]: { + [1690184020.818379][15321:15323] CHIP:TOO: Value: 16386 + [1690184020.818381][15321:15323] CHIP:TOO: } + [1690184020.818384][15321:15323] CHIP:TOO: } + [1690184020.818389][15321:15323] CHIP:TOO: [3]: { + [1690184020.818392][15321:15323] CHIP:TOO: Label: Deep clean + [1690184020.818394][15321:15323] CHIP:TOO: Mode: 2 + [1690184020.818398][15321:15323] CHIP:TOO: ModeTags: 2 entries + [1690184020.818402][15321:15323] CHIP:TOO: [1]: { + [1690184020.818404][15321:15323] CHIP:TOO: Value: 7 + [1690184020.818407][15321:15323] CHIP:TOO: } + [1690184020.818410][15321:15323] CHIP:TOO: [2]: { + [1690184020.818412][15321:15323] CHIP:TOO: Value: 16384 + [1690184020.818415][15321:15323] CHIP:TOO: } + [1690184020.818418][15321:15323] CHIP:TOO: } + disabled: true - On TH(chip-tool) log, Verify StartUpMode attribute value is an integer. save this value as startup_mode_dut and below is the sample log provided for the raspi platform: + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: RVCCLEANM.S.A0002 + verification: | + ./chip-tool rvcrunmode write start-up-mode 0 1 1 + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 - [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: 0 + 1690183885.227143][15298:15300] CHIP:DMG: StatusIB = + [1690183885.227148][15298:15300] CHIP:DMG: { + [1690183885.227152][15298:15300] CHIP:DMG: status = 0x00 (SUCCESS), + [1690183885.227156][15298:15300] CHIP:DMG: }, disabled: true - - label: "Step 3: TH reads from the DUT the OnMode attribute." - PICS: RVCCLEANM.S.A0003 && RVCCLEANM.S.A0002 + - label: "Step 5: TH reads from the DUT the OnMode attribute." + PICS: RVCCLEANM.S.A0000 && RVCCLEANM.S.A0002 verification: | - ./chip-tool rvcleanm read on-mode 1 1 + Set onmode to any integer value because as default it value has null. + + ./chip-tool rvccleanmode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690184081.114871][15327:15329] CHIP:DMG: StatusIB = + [1690184081.114874][15327:15329] CHIP:DMG: { + [1690184081.114877][15327:15329] CHIP:DMG: status = 0x00 (SUCCESS), + [1690184081.114879][15327:15329] CHIP:DMG: }, + [1690184081.114883][15327:15329] CHIP:DMG: + + ./chip-tool rvccleanmode read on-mode 1 1 - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as old_on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer + - Save the value as old_on_mode_dut, below is the sample log provided for the raspi platform, here OnMode attribute value is 0 + NOTE: If startup_mode_dut is equal to old_on_mode_dut proceed to step 6. Else proceed to step 8. - [1654780979.979743][61542:61547] CHIP:DMG: } - [1654780979.980040][61542:61547] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 235764160 - [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 4 + [1690184107.425807][15339:15341] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0003 DataVersion: 3807724302 + [1690184107.425849][15339:15341] CHIP:TOO: OnMode: 0 disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." PICS: RVCCLEANM.S.A0000 && RVCCLEANM.S.A0002 verification: | - NOTE: - If the StartUpMode and OnMode attributes have the same value, proceed to step 4, Otherwise proceed to step 6. - - ./chip-tool rvcleanm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. save the Mode field values as supported_modes_dut.Select a value from supported_modes_dut different from startup_mode_dut and Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1685020074.437287][16950:16952] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 3898153349 - [1685020074.437313][16950:16952] CHIP:TOO: SupportedModes: 3 entries - [1685020074.437620][16950:16952] CHIP:TOO: [1]: { - [1685020074.437632][16950:16952] CHIP:TOO: Label: Black - [1685020074.437635][16950:16952] CHIP:TOO: Mode: 0 - [1685020074.437823][16950:16952] CHIP:TOO: SemanticTags: 1 entries - [1685020074.437834][16950:16952] CHIP:TOO: [1]: { - [1685020074.437838][16950:16952] CHIP:TOO: MfgCode: 0 - [1685020074.437841][16950:16952] CHIP:TOO: Value: 0 - [1685020074.437843][16950:16952] CHIP:TOO: } - [1685020074.437846][16950:16952] CHIP:TOO: } - [1685020074.437852][16950:16952] CHIP:TOO: [2]: { - [1685020074.437854][16950:16952] CHIP:TOO: Label: Cappuccino - [1685020074.437857][16950:16952] CHIP:TOO: Mode: 4 - [1685020074.437861][16950:16952] CHIP:TOO: SemanticTags: 1 entries - [1685020074.437865][16950:16952] CHIP:TOO: [1]: { - [1685020074.437868][16950:16952] CHIP:TOO: MfgCode: 0 - [1685020074.437870][16950:16952] CHIP:TOO: Value: 0 - [1685020074.437873][16950:16952] CHIP:TOO: } - [1685020074.437876][16950:16952] CHIP:TOO: } - [1685020074.437881][16950:16952] CHIP:TOO: [3]: { - [1685020074.437883][16950:16952] CHIP:TOO: Label: Espresso - [1685020074.437885][16950:16952] CHIP:TOO: Mode: 7 - [1685020074.437889][16950:16952] CHIP:TOO: SemanticTags: 1 entries - [1685020074.437892][16950:16952] CHIP:TOO: [1]: { - [1685020074.437895][16950:16952] CHIP:TOO: MfgCode: 0 - [1685020074.437897][16950:16952] CHIP:TOO: Value: 0 - [1685020074.437900][16950:16952] CHIP:TOO: } - [1685020074.437902][16950:16952] CHIP:TOO: } + ./chip-tool rvccleanmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690184020.818299][15321:15323] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0000 DataVersion: 3807724300 + [1690184020.818324][15321:15323] CHIP:TOO: SupportedModes: 3 entries + [1690184020.818332][15321:15323] CHIP:TOO: [1]: { + [1690184020.818336][15321:15323] CHIP:TOO: Label: Vacuum + [1690184020.818341][15321:15323] CHIP:TOO: Mode: 0 + [1690184020.818345][15321:15323] CHIP:TOO: ModeTags: 1 entries + [1690184020.818351][15321:15323] CHIP:TOO: [1]: { + [1690184020.818354][15321:15323] CHIP:TOO: Value: 16385 + [1690184020.818357][15321:15323] CHIP:TOO: } + [1690184020.818360][15321:15323] CHIP:TOO: } + [1690184020.818365][15321:15323] CHIP:TOO: [2]: { + [1690184020.818368][15321:15323] CHIP:TOO: Label: Wash + [1690184020.818370][15321:15323] CHIP:TOO: Mode: 1 + [1690184020.818372][15321:15323] CHIP:TOO: ModeTags: 1 entries + [1690184020.818376][15321:15323] CHIP:TOO: [1]: { + [1690184020.818379][15321:15323] CHIP:TOO: Value: 16386 + [1690184020.818381][15321:15323] CHIP:TOO: } + [1690184020.818384][15321:15323] CHIP:TOO: } + [1690184020.818389][15321:15323] CHIP:TOO: [3]: { + [1690184020.818392][15321:15323] CHIP:TOO: Label: Deep clean + [1690184020.818394][15321:15323] CHIP:TOO: Mode: 2 + [1690184020.818398][15321:15323] CHIP:TOO: ModeTags: 2 entries + [1690184020.818402][15321:15323] CHIP:TOO: [1]: { + [1690184020.818404][15321:15323] CHIP:TOO: Value: 7 + [1690184020.818407][15321:15323] CHIP:TOO: } + [1690184020.818410][15321:15323] CHIP:TOO: [2]: { + [1690184020.818412][15321:15323] CHIP:TOO: Value: 16384 + [1690184020.818415][15321:15323] CHIP:TOO: } + [1690184020.818418][15321:15323] CHIP:TOO: } disabled: true - label: - "Step 5: TH writes to the DUT the OnMode attribute with the + "Step 7: TH writes to the DUT the OnMode attribute with the new_mode_th value" PICS: RVCCLEANM.S.A0003 verification: | - ./chip-tool rvcleanm write on-mode 7 1 1 + ./chip-tool rvccleanmode write on-mode 1 1 1 On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651099941884] [84269:7567211] CHIP: [DMG] WriteResponseMessage = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIBs = - [1651099941884] [84269:7567211] CHIP: [DMG] [ - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIB = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] AttributePathIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] Endpoint = 0x1, - [1651099941887] [84269:7567211] CHIP: [DMG] Cluster = 0x50, - [1651099941887] [84269:7567211] CHIP: [DMG] Attribute = 0x0000_0005, - [1651099941887] [84269:7567211] CHIP: [DMG] } - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] StatusIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] ], - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] InteractionModelRevision = 1 - [1651099941887] [84269:7567211] CHIP: [DMG] } + [1690184081.114871][15327:15329] CHIP:DMG: StatusIB = + [1690184081.114874][15327:15329] CHIP:DMG: { + [1690184081.114877][15327:15329] CHIP:DMG: status = 0x00 (SUCCESS), + [1690184081.114879][15327:15329] CHIP:DMG: }, + [1690184081.114883][15327:15329] CHIP:DMG: disabled: true - - label: "Step 6: TH reads from the DUT the OnMode attribute." - PICS: RVCCLEANM.S.A0003 && RVCCLEANM.S.F00 + - label: "Step 8: TH reads from the DUT the OnMode attribute." + PICS: RVCCLEANM.S.A0003 && RVCCLEANM.S.F00 verification: | - ./chip-tool rvcleanm read on-mode 1 1 + ./chip-tool rvccleanmode read on-mode 1 1 - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as new_on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer value + - Save the value as new_on_mode_dut and is equal to new_mode_th, below is the sample log provided for the raspi platform, Here OnMode attribute value is 1 - } - [1669190858.739158][4187:4189] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4107771634 - [1669190858.739222][4187:4189] CHIP:TOO: OnMode: 7 + [1690184107.425807][15339:15341] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0003 DataVersion: 3807724302 + [1690184107.425849][15339:15341] CHIP:TOO: OnMode: 1 disabled: true - label: - "Step 7: TH writes to the DUT the StartUpOnOff attribute with the + "Step 9: TH writes to the DUT the StartUpOnOff attribute with the value 1." PICS: OO.S.A4003 verification: | @@ -181,20 +252,30 @@ tests: [1651101661960] [90832:7598169] CHIP: [DMG] } disabled: true - - label: "Step 8: Physically power cycle the device" + - label: "Step 10: Physically power cycle the device" verification: | Physically power cycle the device. disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 + - label: "Step 11: TH reads from the DUT the StartUpMode attribute." + PICS: RVCCLEANM.S.A0002 verification: | - ./chip-tool rvcleanm read current-mode 1 1 + ./chip-tool rvcrunmode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is an integer and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is 0 + [1690546417.725863][3168:3170] CHIP:DMG: } + [1690546417.726042][3168:3170] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 3746592465 + [1690546417.726109][3168:3170] CHIP:TOO: StartUpMode: 0 + disabled: true + + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." + PICS: RVCCLEANM.S.A0001 + verification: | + ./chip-tool rvccleanmode read current-mode 1 1 - On TH(chip-tool),Verify CurrentMode attribute value is same as the value recorded in step 3 and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_on_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 - } - [1669190936.869804][4194:4196] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3908583538 - [1669190936.869875][4194:4196] CHIP:TOO: CurrentMode: 7 + [1690551030.852196][219235:219237] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 2491081179 + [1690551030.852224][219235:219237] CHIP:TOO: CurrentMode: 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml index d0091a46667466..a18554e6955246 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml @@ -19,7 +19,7 @@ PICS: config: nodeId: 0x12344321 - cluster: "Rvc Operational State" + cluster: "RVC Operational State" endpoint: 1 tests: @@ -32,7 +32,6 @@ tests: value: nodeId - label: "Step 2: TH reads the ClusterRevision attribute from the DUT" - PICS: RVCOPSTATE.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -41,7 +40,6 @@ tests: type: int16u - label: "Step 3: TH reads the FeatureMap attribute from the DUT" - PICS: RVCOPSTATE.S.Afffc command: "readAttribute" attribute: "FeatureMap" response: @@ -50,7 +48,7 @@ tests: type: bitmap32 - label: "Step 4a: TH reads the AttributeList attribute from the DUT" - PICS: PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -60,7 +58,7 @@ tests: [0, 1, 3, 4, 5, 65528, 65529, 65530, 65531, 65532, 65533] - label: "Step 4a: TH reads the AttributeList attribute from the DUT" - PICS: "!PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -71,7 +69,7 @@ tests: - label: "Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList from the DUT" - PICS: RVCOPSTATE.S.A0002 && RVCOPSTATE.S.Afffb + PICS: RVCOPSTATE.S.A0002 command: "readAttribute" attribute: "AttributeList" response: @@ -80,7 +78,7 @@ tests: contains: [2] - label: "Step 5a: TH reads from the DUT the EventList attribute." - PICS: PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -91,7 +89,7 @@ tests: - label: "Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList." - PICS: PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.E01 && RVCOPSTATE.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.E01 command: "readAttribute" attribute: "EventList" response: @@ -99,35 +97,35 @@ tests: type: list contains: [0x01] - - label: "Step 6a: Read the optional command(Start) in AcceptedCommandList" - PICS: RVCOPSTATE.S.C02.Rsp && RVCOPSTATE.S.Afff9 + - label: "Step 6a: Read the optional command(Pause) in AcceptedCommandList" + PICS: RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C03.Rsp command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [1, 2] + contains: [0, 3] - label: "Step 6b: Read the optional command(Stop) in AcceptedCommandList" - PICS: RVCOPSTATE.S.C01.Rsp && RVCOPSTATE.S.Afff9 + PICS: RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [1] + contains: [1, 2] - - label: "Step 6c: Read the optional command(Pause) in AcceptedCommandList" - PICS: RVCOPSTATE.S.C00.Rsp && RVCOPSTATE.S.Afff9 + - label: "Step 6c: Read the optional command(Start) in AcceptedCommandList" + PICS: RVCOPSTATE.S.C02.Rsp command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [0, 3] + contains: [2] - label: "Step 6d: Read the optional command(Resume) in AcceptedCommandList" - PICS: RVCOPSTATE.S.C03.Rsp && RVCOPSTATE.S.Afff9 + PICS: RVCOPSTATE.S.C03.Rsp || RVCOPSTATE.S.C00.Rsp command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -137,8 +135,8 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" PICS: - RVCOPSTATE.S.Afff8 && (RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C01.Rsp || - RVCOPSTATE.S.C02.Rsp || RVCOPSTATE.S.C03.Rsp) + " RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp + || RVCOPSTATE.S.C03.Rsp " command: "readAttribute" attribute: "GeneratedCommandList" response: diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml index a07df119487273..75fb98f6ff69b1 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,75 +39,73 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: RVCRUNM.S.A0000 verification: | - ./chip-tool rvcrunm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast two ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: - - [1654595167.600241][14362:14367] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595167.600345][14362:14367] CHIP:TOO: SupportedModes: 3 entries - [1654595167.600403][14362:14367] CHIP:TOO: [1]: { - [1654595167.600430][14362:14367] CHIP:TOO: Label: Black - [1654595167.600466][14362:14367] CHIP:TOO: Mode: 0 - [1654595167.600495][14362:14367] CHIP:TOO: SemanticTags: 1 entries - [1654595167.600564][14362:14367] CHIP:TOO: [1]: { - [1654595167.600589][14362:14367] CHIP:TOO: MfgCode: 0 - [1654595167.600612][14362:14367] CHIP:TOO: Value: 0 - [1654595167.600637][14362:14367] CHIP:TOO: } - [1654595167.600662][14362:14367] CHIP:TOO: } - [1654595167.600695][14362:14367] CHIP:TOO: [2]: { - [1654595167.600719][14362:14367] CHIP:TOO: Label: Cappuccino - [1654595167.600742][14362:14367] CHIP:TOO: Mode: 4 - [1654595167.600768][14362:14367] CHIP:TOO: SemanticTags: 1 entries - [1654595167.600796][14362:14367] CHIP:TOO: [1]: { - [1654595167.600820][14362:14367] CHIP:TOO: MfgCode: 0 - [1654595167.600842][14362:14367] CHIP:TOO: Value: 0 - [1654595167.600865][14362:14367] CHIP:TOO: } - [1654595167.600889][14362:14367] CHIP:TOO: } - [1654595167.600921][14362:14367] CHIP:TOO: [3]: { - [1654595167.600945][14362:14367] CHIP:TOO: Label: Espresso - [1654595167.600968][14362:14367] CHIP:TOO: Mode: 7 - [1654595167.600993][14362:14367] CHIP:TOO: SemanticTags: 1 entries - [1654595167.601022][14362:14367] CHIP:TOO: [1]: { - [1654595167.601046][14362:14367] CHIP:TOO: MfgCode: 0 - [1654595167.601068][14362:14367] CHIP:TOO: Value: 0 - [1654595167.601091][14362:14367] CHIP:TOO: } - [1654595167.601115][14362:14367] CHIP:TOO: } + ./chip-tool rvcrunmode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries. + - Verify that list should contain at least one entry + - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value + - ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range + - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 + - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690177496.793840][6284:6286] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 551764487 + [1690177496.794090][6284:6286] CHIP:TOO: SupportedModes: 3 entries + [1690177496.794285][6284:6286] CHIP:TOO: [1]: { + [1690177496.794343][6284:6286] CHIP:TOO: Label: Idle + [1690177496.794396][6284:6286] CHIP:TOO: Mode: 0 + [1690177496.794457][6284:6286] CHIP:TOO: ModeTags: 1 entries + [1690177496.794573][6284:6286] CHIP:TOO: [1]: { + [1690177496.794631][6284:6286] CHIP:TOO: Value: 16384 + [1690177496.794682][6284:6286] CHIP:TOO: } + [1690177496.794737][6284:6286] CHIP:TOO: } + [1690177496.794809][6284:6286] CHIP:TOO: [2]: { + [1690177496.794861][6284:6286] CHIP:TOO: Label: Cleaning + [1690177496.794910][6284:6286] CHIP:TOO: Mode: 1 + [1690177496.794967][6284:6286] CHIP:TOO: ModeTags: 1 entries + [1690177496.795031][6284:6286] CHIP:TOO: [1]: { + [1690177496.795085][6284:6286] CHIP:TOO: Value: 16385 + [1690177496.795135][6284:6286] CHIP:TOO: } + [1690177496.795186][6284:6286] CHIP:TOO: } + [1690177496.795257][6284:6286] CHIP:TOO: [3]: { + [1690177496.795309][6284:6286] CHIP:TOO: Label: Mapping + [1690177496.795358][6284:6286] CHIP:TOO: Mode: 2 + [1690177496.795415][6284:6286] CHIP:TOO: ModeTags: 1 entries + [1690177496.795478][6284:6286] CHIP:TOO: [1]: { + [1690177496.795531][6284:6286] CHIP:TOO: Value: 16384 + [1690177496.795581][6284:6286] CHIP:TOO: } + [1690177496.795632][6284:6286] CHIP:TOO: } disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | - ./chip-tool rvcrunm read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut and below is the sample log provided for the raspi platform: + ./chip-tool rvcrunmode read current-mode 1 1 - [1645776767.611140][4667:4672] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469718 + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1645776767.611214][4667:4672] CHIP:TOO: CurrentMode: 0 + [1690177606.359517][6295:6297] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 551764487 + [1690177606.359639][6295:6297] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the OnMode attribute." PICS: RVCRUNM.S.A0003 verification: | - ./chip-tool rvcrunm read on-mode 1 1 + ./chip-tool rvcrunmode read on-mode 1 1 - Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null), below is the sample log provided for the raspi platform, Here OnMode attribute value is Null - - [1649676072.465968][10754:10759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065072 - - [1649676072.466094][10754:10759] CHIP:TOO: OnMode: null + [1690177656.364979][6304:6306] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0003 DataVersion: 551764487 + [1690177656.365109][6304:6306] CHIP:TOO: OnMode: null disabled: true - label: "Step 5: TH reads from the DUT the StartUpMode attribute." PICS: RVCRUNM.S.A0002 verification: | - ./chip-tool rvcrunm read start-up-mode 1 1 - - Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer and value is from supported_modes_dut, below is the sample log provided for the raspi platform: - + ./chip-tool rvcrunmode read start-up-mode 1 1 - [1649677014.496348][10778:10784] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 4277065072 + Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer(As per spec default value is null) and value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null - [1649677014.496469][10778:10784] CHIP:TOO: StartUpMode: 0 + [1690177698.954736][6311:6313] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 551764487 + [1690177698.954865][6311:6313] CHIP:TOO: StartUpMode: null disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml index 9bee2e3539087c..02ecb4f0a3d981 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml @@ -34,143 +34,182 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: RVCRUNM.S.A0000 verification: | - ./chip-tool rvcrunm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains two or more ModeOptionsStruct entries and save the Mode field values as supported_modes_dut, below is the sample log provided for the raspi platform: - - [1685018204.991818][16390:16392] CHIP:DMG: } - [1685018204.992182][16390:16392] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 3673378954 - [1685018204.992279][16390:16392] CHIP:TOO: SupportedModes: 3 entries - [1685018204.992320][16390:16392] CHIP:TOO: [1]: { - [1685018204.992331][16390:16392] CHIP:TOO: Label: Black - [1685018204.992350][16390:16392] CHIP:TOO: Mode: 0 - [1685018204.992376][16390:16392] CHIP:TOO: SemanticTags: 1 entries - [1685018204.992408][16390:16392] CHIP:TOO: [1]: { - [1685018204.992420][16390:16392] CHIP:TOO: MfgCode: 0 - [1685018204.992430][16390:16392] CHIP:TOO: Value: 0 - [1685018204.992440][16390:16392] CHIP:TOO: } - [1685018204.992452][16390:16392] CHIP:TOO: } - [1685018204.992482][16390:16392] CHIP:TOO: [2]: { - [1685018204.992492][16390:16392] CHIP:TOO: Label: Cappuccino - [1685018204.992504][16390:16392] CHIP:TOO: Mode: 4 - [1685018204.992525][16390:16392] CHIP:TOO: SemanticTags: 1 entries - [1685018204.992547][16390:16392] CHIP:TOO: [1]: { - [1685018204.992558][16390:16392] CHIP:TOO: MfgCode: 0 - [1685018204.992567][16390:16392] CHIP:TOO: Value: 0 - [1685018204.992578][16390:16392] CHIP:TOO: } - [1685018204.992588][16390:16392] CHIP:TOO: } - [1685018204.992610][16390:16392] CHIP:TOO: [3]: { - [1685018204.992619][16390:16392] CHIP:TOO: Label: Espresso - [1685018204.992628][16390:16392] CHIP:TOO: Mode: 7 - [1685018204.992641][16390:16392] CHIP:TOO: SemanticTags: 1 entries - [1685018204.992657][16390:16392] CHIP:TOO: [1]: { - [1685018204.992666][16390:16392] CHIP:TOO: MfgCode: 0 - [1685018204.992678][16390:16392] CHIP:TOO: Value: 0 - [1685018204.992687][16390:16392] CHIP:TOO: } - [1685018204.992695][16390:16392] CHIP:TOO: } + ./chip-tool rvcrunmode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690177742.429087][6315:6317] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 551764487 + [1690177742.429341][6315:6317] CHIP:TOO: SupportedModes: 3 entries + [1690177742.429483][6315:6317] CHIP:TOO: [1]: { + [1690177742.429540][6315:6317] CHIP:TOO: Label: Idle + [1690177742.429595][6315:6317] CHIP:TOO: Mode: 0 + [1690177742.429658][6315:6317] CHIP:TOO: ModeTags: 1 entries + [1690177742.429732][6315:6317] CHIP:TOO: [1]: { + [1690177742.429791][6315:6317] CHIP:TOO: Value: 16384 + [1690177742.429842][6315:6317] CHIP:TOO: } + [1690177742.429892][6315:6317] CHIP:TOO: } + [1690177742.429967][6315:6317] CHIP:TOO: [2]: { + [1690177742.430020][6315:6317] CHIP:TOO: Label: Cleaning + [1690177742.430070][6315:6317] CHIP:TOO: Mode: 1 + [1690177742.430188][6315:6317] CHIP:TOO: ModeTags: 1 entries + [1690177742.430263][6315:6317] CHIP:TOO: [1]: { + [1690177742.430320][6315:6317] CHIP:TOO: Value: 16385 + [1690177742.430374][6315:6317] CHIP:TOO: } + [1690177742.430427][6315:6317] CHIP:TOO: } + [1690177742.430501][6315:6317] CHIP:TOO: [3]: { + [1690177742.430555][6315:6317] CHIP:TOO: Label: Mapping + [1690177742.430605][6315:6317] CHIP:TOO: Mode: 2 + [1690177742.430664][6315:6317] CHIP:TOO: ModeTags: 1 entries + [1690177742.430729][6315:6317] CHIP:TOO: [1]: { + [1690177742.430784][6315:6317] CHIP:TOO: Value: 16384 + [1690177742.430901][6315:6317] CHIP:TOO: } + [1690177742.430966][6315:6317] CHIP:TOO: } disabled: true - - label: "Step 2: TH reads from the DUT the CurrentMode attribute." + - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | - ./chip-tool rvcrunm read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - - save tha value as old_current_mode_dut - - select a value from supported_modes_dut, different from old_current_mode_dut, and which corresponds to a mode the device can switch to, given its current state and save this value as new_mode_th - - select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, - below is the sample log provided for the raspi platform: - - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 + ./chip-tool rvcrunmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut + - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + + [1690177776.069002][6321:6323] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 551764487 + [1690177776.069137][6321:6323] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 3: TH sends a ChangeToMode command to the DUT with NewMode set - to old_current_mode_dut [Petru] note that currently this constraint is - not in the spec. The unapproved proposal is here: - https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/7096 - Until that's approved, please skip this step." + "Step 4: TH sends a ChangeToMode command to the DUT with NewMode set + to old_current_mode_dut" PICS: RVCRUNM.S.C00.Rsp verification: | - ChangeToMode Command is not impleented. + ./chip-tool rvcrunmode change-to-mode 1 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690177967.451381][6333:6335] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690177967.451491][6333:6335] CHIP:TOO: ChangeToModeResponse: { + [1690177967.451542][6333:6335] CHIP:TOO: status: 0 + [1690177967.451590][6333:6335] CHIP:TOO: } disabled: true - label: - "Step 4: Manually put the device in a state from which it will FAIL to - transition to PIXIT.RVCCLEANM.MODE_CHANGE_FAIL" + "Step 5: Manually put the device in a state from which it will FAIL to + transition to PIXIT.RVCRUNM.MODE_CHANGE_FAIL" + PICS: PIXIT.RVCRUNM.CAN_TEST_MODE_FAILURE verification: | - + Manual operation required disabled: true - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + - label: "Step 6: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | + ./chip-tool rvcrunmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 + [1690202974.725219][18214:18216] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 2507484088 + [1690202974.725506][18214:18216] CHIP:TOO: CurrentMode: 1 disabled: true - label: - "Step 6: TH sends a ChangeToMode command to the DUT with NewMode set - to PIXIT.RVCCLEANM.MODE_CHANGE_FAIL" - PICS: RVCRUNM.S.C00.Rsp + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set + to PIXIT.RVCRUNM.MODE_CHANGE_FAIL" + PICS: PIXIT.RVCRUNM.CAN_TEST_MODE_FAILURE && RVCRUNM.S.C00.Rsp verification: | - ChangeToMode Command is not impleented. + ./chip-tool rvcrunmode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a GenericFailure(0x02) status response and StatusText field has a length between 1 and 64, below is the sample log provided for the raspi platform: + + [1690178461.944185][6368:6370] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690178461.944369][6368:6370] CHIP:TOO: ChangeToModeResponse: { + [1690178461.944457][6368:6370] CHIP:TOO: status: 2 + [1690178461.944517][6368:6370] CHIP:TOO: statusText: Change to the mapping mode is only allowed from idle + [1690178461.944578][6368:6370] CHIP:TOO: } disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | - ./chip-tool rvcrunm read current-mode 1 1 + ./chip-tool rvcrunmode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and equal to the new_mode_th, below is the sample log provided for the raspi platform: + Verify on TH(chip-tool), CurrentMode attribute value is an integer value and equal to old_current_mode_dut below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 + [1690203073.106487][18256:18258] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915104 + [1690203073.106525][18256:18258] CHIP:TOO: CurrentMode: 1 disabled: true - label: - "Step 8: Manually put the device in a state from which it will - SUCCESSFULLY transition to PIXIT.RVCCLEANM.MODE_CHANGE_OK" + "Step 9: Manually put the device in a state from which it will + SUCCESSFULLY transition to PIXIT.RVCRUNM.MODE_CHANGE_OK" verification: | - + Manual operation required disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | + ./chip-tool rvcrunmode read current-mode 1 1 + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 + + [1690203090.571985][18263:18265] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915104 + [1690203090.571996][18263:18265] CHIP:TOO: CurrentMode: 1 disabled: true - label: - "Step 10: TH sends a ChangeToMode command to the DUT with NewMode set - to PIXIT.RVCCLEANM.MODE_CHANGE_OK" + "Step 11: TH sends a ChangeToMode command to the DUT with NewMode set + to PIXIT.RVCRUNM.MODE_CHANGE_OK" PICS: RVCRUNM.S.C00.Rsp verification: | - ChangeToMode Command is not impleented. + ./chip-tool rvcrunmode change-to-mode 0 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690178355.021382][6358:6360] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690178355.021533][6358:6360] CHIP:TOO: ChangeToModeResponse: { + [1690178355.021692][6358:6360] CHIP:TOO: status: 0 + [1690178355.021750][6358:6360] CHIP:TOO: } disabled: true - - label: "Step 11: TH reads from the DUT the CurrentMode attribute." + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | + ./chip-tool rvcrunmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 11, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + [1690203144.862081][18275:18277] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915105 + [1690203144.862121][18275:18277] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 12: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 13: TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th" PICS: RVCRUNM.S.C00.Rsp verification: | + ./chip-tool rvcrunmode change-to-mode 5 1 1 + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a UnsupportedMode(0x01) status response and below is the sample log provided for the raspi platform: + + [1690178736.566529][6381:6383] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690178736.566677][6381:6383] CHIP:TOO: ChangeToModeResponse: { + [1690178736.566761][6381:6383] CHIP:TOO: status: 1 + [1690178736.566816][6381:6383] CHIP:TOO: } disabled: true - - label: "Step 13: TH reads from the DUT the CurrentMode attribute." + - label: "Step 14: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | + ./chip-tool rvcrunmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 12, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + [1690203158.762178][18282:18284] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915105 + [1690203158.762194][18282:18284] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml index e39f50f1870ba6..5279d6c054270a 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml @@ -24,6 +24,27 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + 1. RVC Run Mode and OnOff clusters are available on the same endpoint + + 2. The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. + disabled: true + + - label: "Note" + verification: | + To execute this test case set onmode to any integer value because as default it value has null. + + ./chip-tool rvcrunmode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690178870.051558][6396:6398] CHIP:DMG: StatusIB = + [1690178870.051652][6396:6398] CHIP:DMG: { + [1690178870.051727][6396:6398] CHIP:DMG: status = 0x00 (SUCCESS), + [1690178870.051799][6396:6398] CHIP:DMG: }, + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,63 +55,65 @@ tests: - label: "Step 2: TH reads from the DUT the OnMode attribute." PICS: RVCRUNM.S.A0003 && RVCRUNM.S.F00 verification: | - ./chip-tool rvcrunm read on-mode 1 1 + ./chip-tool rvcrunmode read on-mode 1 1 - On TH(chip-tool), Verify OnMode attribute value is an integer. save the value as on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer or Null + Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - [1649678983.679893][10871:10876] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065073 - [1649678983.680002][10871:10876] CHIP:TOO: OnMode: 0 + [1690265382.010747][30073:30075] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0003 DataVersion: 172461204 + [1690265382.010769][30073:30075] CHIP:TOO: OnMode: 0 disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 && RVCRUNM.S.F00 verification: | - ./chip-tool rvcrunm read current-mode 1 1 + ./chip-tool rvcrunmode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute is an integer. + Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - On TH(chip-tool), Verify CurrentMode attribute is an integer. save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. - [1649679034.895848][10879:10884] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679034.895972][10879:10884] CHIP:TOO: CurrentMode: 0 + [1690179152.516820][6454:6456] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 2795852718 + [1690179152.516952][6454:6456] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: RVCRUNM.S.A0000 && RVCRUNM.S.F00 verification: | - ./chip-tool rvcrunm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. save the Mode field values as supported_modes_dut.Select a value from supported_modes_dut different from startup_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1654595268.854568][14400:14405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595268.854678][14400:14405] CHIP:TOO: SupportedModes: 3 entries - [1654595268.854743][14400:14405] CHIP:TOO: [1]: { - [1654595268.854772][14400:14405] CHIP:TOO: Label: Black - [1654595268.854811][14400:14405] CHIP:TOO: Mode: 0 - [1654595268.854843][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.854891][14400:14405] CHIP:TOO: [1]: { - [1654595268.854918][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.854945][14400:14405] CHIP:TOO: Value: 0 - [1654595268.854971][14400:14405] CHIP:TOO: } - [1654595268.855000][14400:14405] CHIP:TOO: } - [1654595268.855038][14400:14405] CHIP:TOO: [2]: { - [1654595268.855064][14400:14405] CHIP:TOO: Label: Cappuccino - [1654595268.855089][14400:14405] CHIP:TOO: Mode: 4 - [1654595268.855117][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855149][14400:14405] CHIP:TOO: [1]: { - [1654595268.855175][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855199][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855223][14400:14405] CHIP:TOO: } - [1654595268.855249][14400:14405] CHIP:TOO: } - [1654595268.855284][14400:14405] CHIP:TOO: [3]: { - [1654595268.855310][14400:14405] CHIP:TOO: Label: Espresso - [1654595268.855332][14400:14405] CHIP:TOO: Mode: 7 - [1654595268.855360][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855390][14400:14405] CHIP:TOO: [1]: { - [1654595268.855416][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855440][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855464][14400:14405] CHIP:TOO: } - [1654595268.855490][14400:14405] CHIP:TOO: } - [1649677252.376226][10804:10809] CHIP:TOO: SemanticTag: 0 - [1649677252.376252][10804:10809] CHIP:TOO: } + ./chip-tool rvcrunmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690179211.761627][6462:6464] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 2795852718 + [1690179211.761873][6462:6464] CHIP:TOO: SupportedModes: 3 entries + [1690179211.762019][6462:6464] CHIP:TOO: [1]: { + [1690179211.762079][6462:6464] CHIP:TOO: Label: Idle + [1690179211.762131][6462:6464] CHIP:TOO: Mode: 0 + [1690179211.762193][6462:6464] CHIP:TOO: ModeTags: 1 entries + [1690179211.762265][6462:6464] CHIP:TOO: [1]: { + [1690179211.762324][6462:6464] CHIP:TOO: Value: 16384 + [1690179211.762376][6462:6464] CHIP:TOO: } + [1690179211.762429][6462:6464] CHIP:TOO: } + [1690179211.762502][6462:6464] CHIP:TOO: [2]: { + [1690179211.762555][6462:6464] CHIP:TOO: Label: Cleaning + [1690179211.762605][6462:6464] CHIP:TOO: Mode: 1 + [1690179211.762664][6462:6464] CHIP:TOO: ModeTags: 1 entries + [1690179211.762729][6462:6464] CHIP:TOO: [1]: { + [1690179211.762785][6462:6464] CHIP:TOO: Value: 16385 + [1690179211.762843][6462:6464] CHIP:TOO: } + [1690179211.762892][6462:6464] CHIP:TOO: } + [1690179211.762966][6462:6464] CHIP:TOO: [3]: { + [1690179211.763019][6462:6464] CHIP:TOO: Label: Mapping + [1690179211.763069][6462:6464] CHIP:TOO: Mode: 2 + [1690179211.763127][6462:6464] CHIP:TOO: ModeTags: 1 entries + [1690179211.763193][6462:6464] CHIP:TOO: [1]: { + [1690179211.763248][6462:6464] CHIP:TOO: Value: 16384 + [1690179211.763299][6462:6464] CHIP:TOO: } + [1690179211.763351][6462:6464] CHIP:TOO: } disabled: true - label: @@ -98,16 +121,14 @@ tests: to new_mode_th" PICS: RVCRUNM.S.C00.Rsp && RVCRUNM.S.F00 verification: | - ./chip-tool rvcrunm change-to-mode 7 1 1 + ./chip-tool rvcrunmode change-to-mode 1 1 1 - On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931013.571019][20667:20669] CHIP:DMG: - [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = - [1684931013.571024][20667:20669] CHIP:DMG: { - [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931013.571030][20667:20669] CHIP:DMG: }, - [1684931013.571034][20667:20669] CHIP:DMG: + [1690179263.329118][6471:6473] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690179263.329338][6471:6473] CHIP:TOO: ChangeToModeResponse: { + [1690179263.329435][6471:6473] CHIP:TOO: status: 0 + [1690179263.329489][6471:6473] CHIP:TOO: } disabled: true - label: "Step 6: TH sends a Off command to the DUT" @@ -139,10 +160,10 @@ tests: - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 && RVCRUNM.S.F00 verification: | - ./chip-tool rvcrunm read current-mode 1 1 + ./chip-tool rvcrunmode read current-mode 1 1 - On TH(chip-tool),verify that CurrentMode attribute value is an integer and value is equal to on_mode_dut. below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 - [1649679202.069163][10899:10904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679202.069278][10899:10904] CHIP:TOO: CurrentMode: 0 + [1690179336.313000][6489:6491] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 2795852720 + [1690179336.313132][6489:6491] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml index 962f9c02e50dbe..47f0fdfb340d75 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml @@ -24,6 +24,24 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command + disabled: true + + - label: "Note" + verification: | + To Execute the TC-RVCRUNM-3.2 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,96 +52,165 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: RVCRUNM.S.A0002 verification: | - ./chip-tool rvcrunm read start-up-mode 1 1 + ./chip-tool rvcrunmode read start-up-mode 1 1 - On TH(chip-tool), Verify StartUpMode attribute value is an integer. save the valueas startup_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify StartUpMode attribute value is an integer. + - Save the value as startup_mode_dut + - If startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. + and below is the sample log provided for the raspi platform: + - Here StartUpMode value is null proced to step3 - [1645777708.406864][4841:4846] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469721 - [1645777708.406933][4841:4846] CHIP:TOO: StartUpMode: 0 + [1690543468.611591][2895:2897] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 2245114918 + [1690543468.611648][2895:2897] CHIP:TOO: StartUpMode: null disabled: true - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: RVCRUNM.S.A0000 + verification: | + ./chip-tool rvcrunmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690179857.830697][14130:14132] CHIP:DMG: } + [1690179857.831035][14130:14132] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 290070852 + [1690179857.831058][14130:14132] CHIP:TOO: SupportedModes: 3 entries + [1690179857.831069][14130:14132] CHIP:TOO: [1]: { + [1690179857.831072][14130:14132] CHIP:TOO: Label: Idle + [1690179857.831077][14130:14132] CHIP:TOO: Mode: 0 + [1690179857.831082][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831090][14130:14132] CHIP:TOO: [1]: { + [1690179857.831093][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831096][14130:14132] CHIP:TOO: } + [1690179857.831099][14130:14132] CHIP:TOO: } + [1690179857.831104][14130:14132] CHIP:TOO: [2]: { + [1690179857.831107][14130:14132] CHIP:TOO: Label: Cleaning + [1690179857.831109][14130:14132] CHIP:TOO: Mode: 1 + [1690179857.831112][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831115][14130:14132] CHIP:TOO: [1]: { + [1690179857.831118][14130:14132] CHIP:TOO: Value: 16385 + [1690179857.831121][14130:14132] CHIP:TOO: } + [1690179857.831124][14130:14132] CHIP:TOO: } + [1690179857.831128][14130:14132] CHIP:TOO: [3]: { + [1690179857.831131][14130:14132] CHIP:TOO: Label: Mapping + [1690179857.831133][14130:14132] CHIP:TOO: Mode: 2 + [1690179857.831135][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831138][14130:14132] CHIP:TOO: [1]: { + [1690179857.831141][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831143][14130:14132] CHIP:TOO: } + [1690179857.831146][14130:14132] CHIP:TOO: } + disabled: true + + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: RVCRUNM.S.A0002 verification: | - ./chip-tool rvcrunm read current-mode 1 1 + ./chip-tool rvcrunmode write start-up-mode 0 1 1 - On TH(chip-tool), Verify CurrentMode attribute value is integer. save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690179737.189558][14110:14112] CHIP:DMG: StatusIB = + [1690179737.189576][14110:14112] CHIP:DMG: { + [1690179737.189592][14110:14112] CHIP:DMG: status = 0x00 (SUCCESS), + [1690179737.189607][14110:14112] CHIP:DMG: }, + disabled: true + + - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + PICS: RVCRUNM.S.A0001 + verification: | + ./chip-tool rvcrunmode read current-mode 1 1 - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8. - If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + [1690180034.919766][14170:14172] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 1228902958 + [1690180034.919778][14170:14172] CHIP:TOO: CurrentMode: 0 disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." PICS: RVCRUNM.S.A0000 verification: | - ./chip-tool rvcrunm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. save the Mode field values as supported_modes_dut.Select a value from supported_modes_dut different from startup_mode_dut and Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1654595268.854568][14400:14405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595268.854678][14400:14405] CHIP:TOO: SupportedModes: 3 entries - [1654595268.854743][14400:14405] CHIP:TOO: [1]: { - [1654595268.854772][14400:14405] CHIP:TOO: Label: Black - [1654595268.854811][14400:14405] CHIP:TOO: Mode: 0 - [1654595268.854843][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.854891][14400:14405] CHIP:TOO: [1]: { - [1654595268.854918][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.854945][14400:14405] CHIP:TOO: Value: 0 - [1654595268.854971][14400:14405] CHIP:TOO: } - [1654595268.855000][14400:14405] CHIP:TOO: } - [1654595268.855038][14400:14405] CHIP:TOO: [2]: { - [1654595268.855064][14400:14405] CHIP:TOO: Label: Cappuccino - [1654595268.855089][14400:14405] CHIP:TOO: Mode: 4 - [1654595268.855117][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855149][14400:14405] CHIP:TOO: [1]: { - [1654595268.855175][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855199][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855223][14400:14405] CHIP:TOO: } - [1654595268.855249][14400:14405] CHIP:TOO: } - [1654595268.855284][14400:14405] CHIP:TOO: [3]: { - [1654595268.855310][14400:14405] CHIP:TOO: Label: Espresso - [1654595268.855332][14400:14405] CHIP:TOO: Mode: 7 - [1654595268.855360][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855390][14400:14405] CHIP:TOO: [1]: { - [1654595268.855416][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855440][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855464][14400:14405] CHIP:TOO: } - [1654595268.855490][14400:14405] CHIP:TOO: } - [1649677252.376226][10804:10809] CHIP:TOO: SemanticTag: 0 - [1649677252.376252][10804:10809] CHIP:TOO: } + ./chip-tool rvcrunmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690179857.830697][14130:14132] CHIP:DMG: } + [1690179857.831035][14130:14132] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 290070852 + [1690179857.831058][14130:14132] CHIP:TOO: SupportedModes: 3 entries + [1690179857.831069][14130:14132] CHIP:TOO: [1]: { + [1690179857.831072][14130:14132] CHIP:TOO: Label: Idle + [1690179857.831077][14130:14132] CHIP:TOO: Mode: 0 + [1690179857.831082][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831090][14130:14132] CHIP:TOO: [1]: { + [1690179857.831093][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831096][14130:14132] CHIP:TOO: } + [1690179857.831099][14130:14132] CHIP:TOO: } + [1690179857.831104][14130:14132] CHIP:TOO: [2]: { + [1690179857.831107][14130:14132] CHIP:TOO: Label: Cleaning + [1690179857.831109][14130:14132] CHIP:TOO: Mode: 1 + [1690179857.831112][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831115][14130:14132] CHIP:TOO: [1]: { + [1690179857.831118][14130:14132] CHIP:TOO: Value: 16385 + [1690179857.831121][14130:14132] CHIP:TOO: } + [1690179857.831124][14130:14132] CHIP:TOO: } + [1690179857.831128][14130:14132] CHIP:TOO: [3]: { + [1690179857.831131][14130:14132] CHIP:TOO: Label: Mapping + [1690179857.831133][14130:14132] CHIP:TOO: Mode: 2 + [1690179857.831135][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831138][14130:14132] CHIP:TOO: [1]: { + [1690179857.831141][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831143][14130:14132] CHIP:TOO: } + [1690179857.831146][14130:14132] CHIP:TOO: } disabled: true - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: RVCRUNM.S.C00.Rsp verification: | - ./chip-tool rvcrunm change-to-mode 4 1 1 + ./chip-tool rvcrunmode change-to-mode 1 1 1 + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - On TH(chip-tool) , Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931419.768138][20792:20794] CHIP:DMG: StatusIB = - [1684931419.768143][20792:20794] CHIP:DMG: { - [1684931419.768148][20792:20794] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931419.768152][20792:20794] CHIP:DMG: }, + [1690179905.782387][14141:14143] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 + [1690179905.782401][14141:14143] CHIP:TOO: ChangeToModeResponse: { + [1690179905.782405][14141:14143] CHIP:TOO: status: 0 + [1690179905.782408][14141:14143] CHIP:TOO: } disabled: true - - label: "Step 6: Physically power cycle the device" + - label: "Step 8: Physically power cycle the device" verification: | Physically power cycle the device. disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 9: TH reads from the DUT the StartUpMode attribute." + PICS: RVCRUNM.S.A0002 + verification: | + ./chip-tool rvcrunmode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer. + - Save the value as new_start_up_mode_dut and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform: + - Here StartUpMode value is 0 + + [1690544350.025546][2955:2957] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 3877802510 + [1690544350.025630][2955:2957] CHIP:TOO: StartUpMode: 0 + disabled: true + + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 verification: | - ./chip-tool rvcrunm read current-mode 1 1 + ./chip-tool rvcrunmode read current-mode 1 1 - on TH(chip-tool), Verify that CurrentMode attribute value is same as value recorded in step 1 and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 + [1690180034.919766][14170:14172] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 1228902958 + [1690180034.919778][14170:14172] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_3.yaml index 8f8df3e8e1ce51..ef3fd5d593e056 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_3.yaml @@ -26,6 +26,24 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command + disabled: true + + - label: "Note" + verification: | + To Execute the TC-RVCRUNM-3.3 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -36,118 +54,163 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: RVCRUNM.S.A0002 verification: | - ./chip-tool rvcrunm read start-up-mode 1 1 + ./chip-tool rvcrunmode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer or null + - Save the value as startup_mode_dut + - If startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. + and below is the sample log provided for the raspi platform: + - Here StartUpMode value is null proced to step3 + + [1690543468.611591][2895:2897] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 2245114918 + [1690543468.611648][2895:2897] CHIP:TOO: StartUpMode: null + disabled: true + + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: RVCRUNM.S.A0000 + verification: | + ./chip-tool rvcrunmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th., below is the sample log provided for the raspi platform: + + [1690179857.831035][14130:14132] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 290070852 + [1690179857.831058][14130:14132] CHIP:TOO: SupportedModes: 3 entries + [1690179857.831069][14130:14132] CHIP:TOO: [1]: { + [1690179857.831072][14130:14132] CHIP:TOO: Label: Idle + [1690179857.831077][14130:14132] CHIP:TOO: Mode: 0 + [1690179857.831082][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831090][14130:14132] CHIP:TOO: [1]: { + [1690179857.831093][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831096][14130:14132] CHIP:TOO: } + [1690179857.831099][14130:14132] CHIP:TOO: } + [1690179857.831104][14130:14132] CHIP:TOO: [2]: { + [1690179857.831107][14130:14132] CHIP:TOO: Label: Cleaning + [1690179857.831109][14130:14132] CHIP:TOO: Mode: 1 + [1690179857.831112][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831115][14130:14132] CHIP:TOO: [1]: { + [1690179857.831118][14130:14132] CHIP:TOO: Value: 16385 + [1690179857.831121][14130:14132] CHIP:TOO: } + [1690179857.831124][14130:14132] CHIP:TOO: } + [1690179857.831128][14130:14132] CHIP:TOO: [3]: { + [1690179857.831131][14130:14132] CHIP:TOO: Label: Mapping + [1690179857.831133][14130:14132] CHIP:TOO: Mode: 2 + [1690179857.831135][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831138][14130:14132] CHIP:TOO: [1]: { + [1690179857.831141][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831143][14130:14132] CHIP:TOO: } + [1690179857.831146][14130:14132] CHIP:TOO: } + disabled: true - On TH(chip-tool) log, Verify StartUpMode attribute value is an integer. save this value as startup_mode_dut and below is the sample log provided for the raspi platform: + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: RVCRUNM.S.A0002 + verification: | + ./chip-tool rvcrunmode write start-up-mode 0 1 1 + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 - [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: 0 + [1690179737.189558][14110:14112] CHIP:DMG: StatusIB = + [1690179737.189576][14110:14112] CHIP:DMG: { + [1690179737.189592][14110:14112] CHIP:DMG: status = 0x00 (SUCCESS), + [1690179737.189607][14110:14112] CHIP:DMG: }, disabled: true - - label: "Step 3: TH reads from the DUT the OnMode attribute." + - label: "Step 5: TH reads from the DUT the OnMode attribute." PICS: RVCRUNM.S.A0003 && RVCRUNM.S.A0002 verification: | - ./chip-tool rvcrunm read on-mode 1 1 + Set onmode to any integer value because as default it value has null. + + ./chip-tool rvcrunmode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690180177.665893][14211:14213] CHIP:DMG: StatusIB = + [1690180177.665905][14211:14213] CHIP:DMG: { + [1690180177.665917][14211:14213] CHIP:DMG: status = 0x00 (SUCCESS), + [1690180177.665927][14211:14213] CHIP:DMG: }, + + ./chip-tool rvcrunmode read on-mode 1 1 - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as old_on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer + - Save the value as old_on_mode_dut , below is the sample log provided for the raspi platform, OnMode attribute value is 0 + NOTE: If startup_mode_dut is equal to old_on_mode_dut proceed to step 4. Else proceed to step 6. - [1654780979.979743][61542:61547] CHIP:DMG: } - [1654780979.980040][61542:61547] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 235764160 - [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 4 + [1690544833.540939][2984:2986] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0003 DataVersion: 3877802512 + [1690544833.541032][2984:2986] CHIP:TOO: OnMode: 0 disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." PICS: RVCRUNM.S.A0000 && RVCRUNM.S.A0002 verification: | - NOTE: - If the StartUpMode and OnMode attributes have the same value, proceed to step 4, Otherwise proceed to step 6. - - ./chip-tool rvcrunm read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. save the Mode field values as supported_modes_dut.Select a value from supported_modes_dut different from startup_mode_dut and Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1685020074.437287][16950:16952] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 3898153349 - [1685020074.437313][16950:16952] CHIP:TOO: SupportedModes: 3 entries - [1685020074.437620][16950:16952] CHIP:TOO: [1]: { - [1685020074.437632][16950:16952] CHIP:TOO: Label: Black - [1685020074.437635][16950:16952] CHIP:TOO: Mode: 0 - [1685020074.437823][16950:16952] CHIP:TOO: SemanticTags: 1 entries - [1685020074.437834][16950:16952] CHIP:TOO: [1]: { - [1685020074.437838][16950:16952] CHIP:TOO: MfgCode: 0 - [1685020074.437841][16950:16952] CHIP:TOO: Value: 0 - [1685020074.437843][16950:16952] CHIP:TOO: } - [1685020074.437846][16950:16952] CHIP:TOO: } - [1685020074.437852][16950:16952] CHIP:TOO: [2]: { - [1685020074.437854][16950:16952] CHIP:TOO: Label: Cappuccino - [1685020074.437857][16950:16952] CHIP:TOO: Mode: 4 - [1685020074.437861][16950:16952] CHIP:TOO: SemanticTags: 1 entries - [1685020074.437865][16950:16952] CHIP:TOO: [1]: { - [1685020074.437868][16950:16952] CHIP:TOO: MfgCode: 0 - [1685020074.437870][16950:16952] CHIP:TOO: Value: 0 - [1685020074.437873][16950:16952] CHIP:TOO: } - [1685020074.437876][16950:16952] CHIP:TOO: } - [1685020074.437881][16950:16952] CHIP:TOO: [3]: { - [1685020074.437883][16950:16952] CHIP:TOO: Label: Espresso - [1685020074.437885][16950:16952] CHIP:TOO: Mode: 7 - [1685020074.437889][16950:16952] CHIP:TOO: SemanticTags: 1 entries - [1685020074.437892][16950:16952] CHIP:TOO: [1]: { - [1685020074.437895][16950:16952] CHIP:TOO: MfgCode: 0 - [1685020074.437897][16950:16952] CHIP:TOO: Value: 0 - [1685020074.437900][16950:16952] CHIP:TOO: } - [1685020074.437902][16950:16952] CHIP:TOO: } + ./chip-tool rvcrunmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690179857.831035][14130:14132] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 290070852 + [1690179857.831058][14130:14132] CHIP:TOO: SupportedModes: 3 entries + [1690179857.831069][14130:14132] CHIP:TOO: [1]: { + [1690179857.831072][14130:14132] CHIP:TOO: Label: Idle + [1690179857.831077][14130:14132] CHIP:TOO: Mode: 0 + [1690179857.831082][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831090][14130:14132] CHIP:TOO: [1]: { + [1690179857.831093][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831096][14130:14132] CHIP:TOO: } + [1690179857.831099][14130:14132] CHIP:TOO: } + [1690179857.831104][14130:14132] CHIP:TOO: [2]: { + [1690179857.831107][14130:14132] CHIP:TOO: Label: Cleaning + [1690179857.831109][14130:14132] CHIP:TOO: Mode: 1 + [1690179857.831112][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831115][14130:14132] CHIP:TOO: [1]: { + [1690179857.831118][14130:14132] CHIP:TOO: Value: 16385 + [1690179857.831121][14130:14132] CHIP:TOO: } + [1690179857.831124][14130:14132] CHIP:TOO: } + [1690179857.831128][14130:14132] CHIP:TOO: [3]: { + [1690179857.831131][14130:14132] CHIP:TOO: Label: Mapping + [1690179857.831133][14130:14132] CHIP:TOO: Mode: 2 + [1690179857.831135][14130:14132] CHIP:TOO: ModeTags: 1 entries + [1690179857.831138][14130:14132] CHIP:TOO: [1]: { + [1690179857.831141][14130:14132] CHIP:TOO: Value: 16384 + [1690179857.831143][14130:14132] CHIP:TOO: } + [1690179857.831146][14130:14132] CHIP:TOO: } disabled: true - label: - "Step 5: TH writes to the DUT the OnMode attribute with the + "Step 7: TH writes to the DUT the OnMode attribute with the new_mode_th value" PICS: RVCRUNM.S.A0003 verification: | - ./chip-tool rvcrunm write on-mode 7 1 1 + ./chip-tool rvcrunmode write on-mode 1 1 1 On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651099941884] [84269:7567211] CHIP: [DMG] WriteResponseMessage = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIBs = - [1651099941884] [84269:7567211] CHIP: [DMG] [ - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIB = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] AttributePathIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] Endpoint = 0x1, - [1651099941887] [84269:7567211] CHIP: [DMG] Cluster = 0x50, - [1651099941887] [84269:7567211] CHIP: [DMG] Attribute = 0x0000_0005, - [1651099941887] [84269:7567211] CHIP: [DMG] } - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] StatusIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] ], - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] InteractionModelRevision = 1 - [1651099941887] [84269:7567211] CHIP: [DMG] } + [1690180177.665893][14211:14213] CHIP:DMG: StatusIB = + [1690180177.665905][14211:14213] CHIP:DMG: { + [1690180177.665917][14211:14213] CHIP:DMG: status = 0x00 (SUCCESS), + [1690180177.665927][14211:14213] CHIP:DMG: }, disabled: true - - label: "Step 6: TH reads from the DUT the OnMode attribute." + - label: "Step 8: TH reads from the DUT the OnMode attribute." PICS: RVCRUNM.S.A0003 && RVCRUNM.S.F00 verification: | - ./chip-tool rvcrunm read on-mode 1 1 + ./chip-tool rvcrunmode read on-mode 1 1 - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as new_on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that OnMode attribute value is an integer + - Save the value as new_on_mode_dut and is equal to new_mode_th, below is the sample log provided for the raspi platform, OnMode attribute value is 1 - } - [1669190858.739158][4187:4189] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4107771634 - [1669190858.739222][4187:4189] CHIP:TOO: OnMode: 7 + [1690544833.540939][2984:2986] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0003 DataVersion: 3877802512 + [1690544833.541032][2984:2986] CHIP:TOO: OnMode: 1 disabled: true - label: - "Step 7: TH writes to the DUT the StartUpOnOff attribute with the + "Step 9: TH writes to the DUT the StartUpOnOff attribute with the value 1." PICS: OO.S.A4003 verification: | @@ -155,46 +218,35 @@ tests: On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651101661959] [90832:7598169] CHIP: [DMG] WriteResponseMessage = - [1651101661959] [90832:7598169] CHIP: [DMG] { - [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIBs = - [1651101661959] [90832:7598169] CHIP: [DMG] [ - [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIB = - [1651101661959] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] AttributePathIB = - [1651101661960] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] Endpoint = 0x1, - [1651101661960] [90832:7598169] CHIP: [DMG] Cluster = 0x6, - [1651101661960] [90832:7598169] CHIP: [DMG] Attribute = 0x0000_4003, - [1651101661960] [90832:7598169] CHIP: [DMG] } - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] StatusIB = - [1651101661960] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651101661960] [90832:7598169] CHIP: [DMG] }, - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] }, - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] ], - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] InteractionModelRevision = 1 - [1651101661960] [90832:7598169] CHIP: [DMG] } + [1690180270.884152][14228:14230] CHIP:DMG: { + [1690180270.884156][14228:14230] CHIP:DMG: status = 0x00 (SUCCESS), + [1690180270.884158][14228:14230] CHIP:DMG: }, disabled: true - - label: "Step 8: Physically power cycle the device" + - label: "Step 10: Physically power cycle the device" verification: | Physically power cycle the device. disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 + - label: "Step 11: TH reads from the DUT the StartUpMode attribute." + PICS: RVCRUNM.S.A0002 verification: | - ./chip-tool rvcrunm read current-mode 1 1 + ./chip-tool rvcrunmode read start-up-mode 1 1 + On TH(chip-tool), Verify StartUpMode attribute value is an integer and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform, Here StartUpMode value is 0 + + [1690543468.611591][2895:2897] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 2245114918 + [1690543468.611648][2895:2897] CHIP:TOO: StartUpMode: 0 + disabled: true + + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." + PICS: RVCRUNM.S.A0001 + verification: | + ./chip-tool rvcrunmode read current-mode 1 1 - On TH(chip-tool),Verify CurrentMode attribute value is same as the value recorded in step 3 and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer and is equal to new_on_mode_dut, below is the sample log provided for the raspi platform, CurrentMode attribute value is 1 - } - [1669190936.869804][4194:4196] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3908583538 - [1669190936.869875][4194:4196] CHIP:TOO: CurrentMode: 7 + [1690545265.495445][3004:3006] CHIP:DMG: } + [1690545265.495612][3004:3006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 3877802512 + [1690545265.495679][3004:3006] CHIP:TOO: CurrentMode: 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SC_5_3.yaml b/src/app/tests/suites/certification/Test_TC_SC_5_3.yaml index 9d915ebea90e86..edcc8d93abeed1 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_5_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_5_3.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Project CHIP Authors +# Copyright (c) 2023 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 18.1.3. [TC-SC-5.3] Sending a group message - DUT to TH +name: 26.3.5. [TC-SC-5.3] Sending a group message - DUT to TH PICS: - MCORE.ROLE.COMMISSIONER @@ -35,55 +35,140 @@ tests: DUT and TH are commissioned. DUT supports Groups Cluster + + Execute the below mentioned command to put TH(Reference app) into a commissionable state in RPI platform, Pls use equivalent command on the respective platform + ./chip-all-clusters-app --trace_decode 1 + + Once TH reach the commissionable state pls send below mentioned command on DUT(chip-tool) in RPI platform. Pls use equivalent command on the respective platform + + ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 + + Verify the commissioning completed with success on DUT(Chip-tool) + + [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success disabled: true - - label: "TH should have the ACL entry with the AuthMode as Group by DUT" + - label: + "Step 1a: TH should have the ACL entry with the AuthMode as Group by + DUT" verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 4, "authMode": 3, "subjects": [259], "targets": null }]' 1 0 + Verify ACL WrireRequestMessage on TH(Reference app)log: + + [1687333786.479229][13848:13848] CHIP:DMG: WriteRequestMessage = + [1687333786.479247][13848:13848] CHIP:DMG: { + [1687333786.479257][13848:13848] CHIP:DMG: suppressResponse = false, + [1687333786.479269][13848:13848] CHIP:DMG: timedRequest = false, + [1687333786.479279][13848:13848] CHIP:DMG: AttributeDataIBs = + [1687333786.479298][13848:13848] CHIP:DMG: [ + [1687333786.479308][13848:13848] CHIP:DMG: AttributeDataIB = + [1687333786.479321][13848:13848] CHIP:DMG: { + [1687333786.479331][13848:13848] CHIP:DMG: AttributePathIB = + [1687333786.479342][13848:13848] CHIP:DMG: { + [1687333786.479355][13848:13848] CHIP:DMG: Endpoint = 0x0, + [1687333786.479367][13848:13848] CHIP:DMG: Cluster = 0x1f, + [1687333786.479379][13848:13848] CHIP:DMG: Attribute = 0x0000_0000, + [1687333786.479390][13848:13848] CHIP:DMG: } + [1687333786.479407][13848:13848] CHIP:DMG: + [1687333786.479419][13848:13848] CHIP:DMG: Data = [ + [1687333786.479432][13848:13848] CHIP:DMG: + [1687333786.479444][13848:13848] CHIP:DMG: ], + [1687333786.479454][13848:13848] CHIP:DMG: }, + [1687333786.479481][13848:13848] CHIP:DMG: + [1687333786.479491][13848:13848] CHIP:DMG: AttributeDataIB = + [1687333786.479501][13848:13848] CHIP:DMG: { + [1687333786.479513][13848:13848] CHIP:DMG: AttributePathIB = + [1687333786.479528][13848:13848] CHIP:DMG: { + [1687333786.479540][13848:13848] CHIP:DMG: Endpoint = 0x0, + [1687333786.479551][13848:13848] CHIP:DMG: Cluster = 0x1f, + [1687333786.479562][13848:13848] CHIP:DMG: Attribute = 0x0000_0000, + [1687333786.479576][13848:13848] CHIP:DMG: ListIndex = Null, + [1687333786.479586][13848:13848] CHIP:DMG: } + [1687333786.479599][13848:13848] CHIP:DMG: + [1687333786.479609][13848:13848] CHIP:DMG: Data = + [1687333786.479620][13848:13848] CHIP:DMG: { + [1687333786.479635][13848:13848] CHIP:DMG: 0x1 = 5, + [1687333786.479649][13848:13848] CHIP:DMG: 0x2 = 2, + [1687333786.479659][13848:13848] CHIP:DMG: 0x3 = [ + [1687333786.479674][13848:13848] CHIP:DMG: 112233, + [1687333786.479685][13848:13848] CHIP:DMG: ], + [1687333786.479698][13848:13848] CHIP:DMG: 0x4 = NULL + [1687333786.479709][13848:13848] CHIP:DMG: }, + [1687333786.479718][13848:13848] CHIP:DMG: }, + [1687333786.479750][13848:13848] CHIP:DMG: + [1687333786.479760][13848:13848] CHIP:DMG: AttributeDataIB = + [1687333786.479772][13848:13848] CHIP:DMG: { + [1687333786.479781][13848:13848] CHIP:DMG: AttributePathIB = + [1687333786.479793][13848:13848] CHIP:DMG: { + [1687333786.479803][13848:13848] CHIP:DMG: Endpoint = 0x0, + [1687333786.479815][13848:13848] CHIP:DMG: Cluster = 0x1f, + [1687333786.479829][13848:13848] CHIP:DMG: Attribute = 0x0000_0000, + [1687333786.479841][13848:13848] CHIP:DMG: ListIndex = Null, + [1687333786.479851][13848:13848] CHIP:DMG: } + [1687333786.479866][13848:13848] CHIP:DMG: + [1687333786.479876][13848:13848] CHIP:DMG: Data = + [1687333786.479889][13848:13848] CHIP:DMG: { + [1687333786.479901][13848:13848] CHIP:DMG: 0x1 = 4, + [1687333786.479913][13848:13848] CHIP:DMG: 0x2 = 3, + [1687333786.479929][13848:13848] CHIP:DMG: 0x3 = [ + [1687333786.479951][13848:13848] CHIP:DMG: 259, + [1687333786.479966][13848:13848] CHIP:DMG: ], + [1687333786.479978][13848:13848] CHIP:DMG: 0x4 = NULL + [1687333786.479991][13848:13848] CHIP:DMG: }, + [1687333786.480001][13848:13848] CHIP:DMG: }, + [1687333786.480020][13848:13848] CHIP:DMG: + [1687333786.480033][13848:13848] CHIP:DMG: ], + [1687333786.480071][13848:13848] CHIP:DMG: + [1687333786.480081][13848:13848] CHIP:DMG: moreChunkedMessages = false, + [1687333786.480092][13848:13848] CHIP:DMG: InteractionModelRevision = 1 + [1687333786.480101][13848:13848] CHIP:DMG: }, + + ./chip-tool accesscontrol read acl 1 0 - Verify that ACL entry with the AuthMode as Group is present on TH(Reference app)log: - - [1684162707.651064][28541:28543] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1331379855 - [1684162707.651080][28541:28543] CHIP:TOO: ACL: 2 entries - [1684162707.651089][28541:28543] CHIP:TOO: [1]: { - [1684162707.651095][28541:28543] CHIP:TOO: Privilege: 5 - [1684162707.651097][28541:28543] CHIP:TOO: AuthMode: 2 - [1684162707.651100][28541:28543] CHIP:TOO: Subjects: 1 entries - [1684162707.651103][28541:28543] CHIP:TOO: [1]: 112233 - [1684162707.651105][28541:28543] CHIP:TOO: Targets: null - [1684162707.651107][28541:28543] CHIP:TOO: FabricIndex: 1 - [1684162707.651109][28541:28543] CHIP:TOO: } - [1684162707.651113][28541:28543] CHIP:TOO: [2]: { - [1684162707.651115][28541:28543] CHIP:TOO: Privilege: 4 - [1684162707.651117][28541:28543] CHIP:TOO: AuthMode: 3 - [1684162707.651119][28541:28543] CHIP:TOO: Subjects: 1 entries - [1684162707.651122][28541:28543] CHIP:TOO: [1]: 259 - [1684162707.651124][28541:28543] CHIP:TOO: Targets: null - [1684162707.651126][28541:28543] CHIP:TOO: FabricIndex: 1 - [1684162707.651128][28541:28543] CHIP:TOO: } + Verify that ACL command on TH(Reference app)log: + + [1687333789.552788][13848:13848] CHIP:IM: Received Read request + [1687333789.552798][13848:13848] CHIP:DMG: ReadRequestMessage = + [1687333789.552801][13848:13848] CHIP:DMG: { + [1687333789.552803][13848:13848] CHIP:DMG: AttributePathIBs = + [1687333789.552807][13848:13848] CHIP:DMG: [ + [1687333789.552809][13848:13848] CHIP:DMG: AttributePathIB = + [1687333789.552812][13848:13848] CHIP:DMG: { + [1687333789.552815][13848:13848] CHIP:DMG: Endpoint = 0x0, + [1687333789.552818][13848:13848] CHIP:DMG: Cluster = 0x1f, + [1687333789.552821][13848:13848] CHIP:DMG: Attribute = 0x0000_0000, + [1687333789.552824][13848:13848] CHIP:DMG: } + [1687333789.552827][13848:13848] CHIP:DMG: + [1687333789.552830][13848:13848] CHIP:DMG: ], + [1687333789.552833][13848:13848] CHIP:DMG: + [1687333789.552836][13848:13848] CHIP:DMG: isFabricFiltered = true, + [1687333789.552839][13848:13848] CHIP:DMG: InteractionModelRevision = 1 + [1687333789.552841][13848:13848] CHIP:DMG: }, disabled: true - label: - "DUT generates fabric-unique GroupID, GroupName, random key, EpochKey0 - and GroupKeySetID. Save the GroupID as GroupID_1, GroupName as - GroupName_1 and GroupSetID" - PICS: GRPKEY.C.C00.Tx + "Step 1b: DUT generates fabric-unique GroupID, GroupName, random key, + EpochKey0 and GroupKeySetID. Save the GroupID as GroupID_1, GroupName + as GroupName_1 and GroupSetID_1" verification: | GroupKeySetID = 419 GroupID_1 = 259 GroupName_1 = "grp1" + EpochKey0 = d0d1d2d3d4d5d6d7d8d9dadbdcdddedf + EpochKey1 = d1d1d2d3d4d5d6d7d8d9dadbdcdddedf + EpochKey2 = d2d1d2d3d4d5d6d7d8d9dadbdcdddedf disabled: true - label: - "DUT sends KeySetWrite command to GroupKeyManagement cluster to TH on - EP0" + "Step 2: DUT sends KeySetWrite command to GroupKeyManagement cluster + to TH on EP0" PICS: GRPKEY.C.C00.Tx verification: | ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 419,"groupKeySecurityPolicy": 0, "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1":"d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2":"d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 - Verify that KeySetWrite with Group Set ID as 419 is present on TH(Reference app)log: + Verify that KeySetWrite command on TH(Reference app)log: [1684162878.418032][28333:28333] CHIP:DMG: { [1684162878.418034][28333:28333] CHIP:DMG: suppressResponse = false, @@ -131,13 +216,14 @@ tests: disabled: true - label: - "DUT binds GroupId with GroupKeySetID in the GroupKeyMap attribute - list on GroupKeyManagement cluster" + "Step 3: DUT binds GroupId with GroupKeySetID in the GroupKeyMap + attribute list on GroupKeyManagement cluster" PICS: GRPKEY.C.A0000 verification: | ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 259, "groupKeySetID": 419, "fabricIndex": 1},{"groupId": 257, "groupKeySetID": 419, "fabricIndex": 1}]' 1 0 Verify that group-key-map attribute with GroupID_1 as 259, GroupID_2 as 257 and Group Set ID as 419 is present on TH(Reference app)log: + [1684166126.545563][29258:29258] CHIP:DMG: WriteRequestMessage = [1684166126.545565][29258:29258] CHIP:DMG: { [1684166126.545567][29258:29258] CHIP:DMG: suppressResponse = false, @@ -201,47 +287,49 @@ tests: disabled: true - label: - "DUT sends AddGroup Command to DUT on EP0 with the the following - settings GroupID: GroupID_1 GroupName: GroupName_1" + "Step 4: DUT sends AddGroup Command to DUT on EP0 with the the + following settings GroupID: GroupID_1 GroupName: GroupName_1" PICS: G.C.C00.Tx verification: | + Note: + GroupID_1 = 259 + GroupName_1 = "grp1" + ./chip-tool groups add-group 259 'grp1' 1 1 Verify that AddGroup command with GroupID as 259 and group name as "grp1" is present on TH(Reference app)log: - [1684166282.551829][29258:29258] CHIP:DMG: InvokeRequestMessage = - [1684166282.551837][29258:29258] CHIP:DMG: { - [1684166282.551844][29258:29258] CHIP:DMG: suppressResponse = false, - [1684166282.551853][29258:29258] CHIP:DMG: timedRequest = false, - [1684166282.551859][29258:29258] CHIP:DMG: InvokeRequests = - [1684166282.551872][29258:29258] CHIP:DMG: [ - [1684166282.551879][29258:29258] CHIP:DMG: CommandDataIB = - [1684166282.551887][29258:29258] CHIP:DMG: { - [1684166282.551894][29258:29258] CHIP:DMG: CommandPathIB = - [1684166282.551903][29258:29258] CHIP:DMG: { - [1684166282.551912][29258:29258] CHIP:DMG: EndpointId = 0x1, - [1684166282.551920][29258:29258] CHIP:DMG: ClusterId = 0x4, - [1684166282.551928][29258:29258] CHIP:DMG: CommandId = 0x0, - [1684166282.551935][29258:29258] CHIP:DMG: }, - [1684166282.551944][29258:29258] CHIP:DMG: - [1684166282.551951][29258:29258] CHIP:DMG: CommandFields = - [1684166282.551960][29258:29258] CHIP:DMG: { - [1684166282.551970][29258:29258] CHIP:DMG: 0x0 = 259, - [1684166282.551980][29258:29258] CHIP:DMG: 0x1 = "grp1" (4 chars), - [1684166282.551989][29258:29258] CHIP:DMG: }, - [1684166282.551996][29258:29258] CHIP:DMG: }, - [1684166282.552007][29258:29258] CHIP:DMG: - [1684166282.552013][29258:29258] CHIP:DMG: ], - [1684166282.552024][29258:29258] CHIP:DMG: - [1684166282.552032][29258:29258] CHIP:DMG: InteractionModelRevision = 1 - [1684166282.552038][29258:29258] CHIP:DMG: }, - [1684166282.552074][29258:29258] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0004 e=1 p=m - [1684166282.552089][29258:29258] CHIP:DMG: AccessControl: allowed - [1684166282.552100][29258:29258] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0004 Command=0x0000_0000 + + [1689748064.426996][2588:2588] CHIP:DMG: InvokeRequestMessage = + [1689748064.427031][2588:2588] CHIP:DMG: { + [1689748064.427054][2588:2588] CHIP:DMG: suppressResponse = false, + [1689748064.427081][2588:2588] CHIP:DMG: timedRequest = false, + [1689748064.427105][2588:2588] CHIP:DMG: InvokeRequests = + [1689748064.427137][2588:2588] CHIP:DMG: [ + [1689748064.427162][2588:2588] CHIP:DMG: CommandDataIB = + [1689748064.427194][2588:2588] CHIP:DMG: { + [1689748064.427225][2588:2588] CHIP:DMG: CommandPathIB = + [1689748064.427257][2588:2588] CHIP:DMG: { + [1689748064.427288][2588:2588] CHIP:DMG: EndpointId = 0x0, + [1689748064.427321][2588:2588] CHIP:DMG: ClusterId = 0x4, + [1689748064.427354][2588:2588] CHIP:DMG: CommandId = 0x0, + [1689748064.427384][2588:2588] CHIP:DMG: }, + [1689748064.427415][2588:2588] CHIP:DMG: + [1689748064.427443][2588:2588] CHIP:DMG: CommandFields = + [1689748064.427473][2588:2588] CHIP:DMG: { + [1689748064.427504][2588:2588] CHIP:DMG: 0x0 = 259, + [1689748064.427539][2588:2588] CHIP:DMG: 0x1 = "grp1" (4 chars), + [1689748064.427571][2588:2588] CHIP:DMG: }, + [1689748064.427600][2588:2588] CHIP:DMG: }, + [1689748064.427632][2588:2588] CHIP:DMG: + [1689748064.427656][2588:2588] CHIP:DMG: ], + [1689748064.427686][2588:2588] CHIP:DMG: + [1689748064.427710][2588:2588] CHIP:DMG: InteractionModelRevision = 1 + [1689748064.427733][2588:2588] CHIP:DMG: }, disabled: true - label: - "DUT generates fabric-unique GroupID, GroupName. Save the GroupID as - GroupID_2, GroupName as GroupName_2" + "Step 5: DUT generates fabric-unique GroupID, GroupName. Save the + GroupID as GroupID_2, GroupName as GroupName_2" verification: | refer to log in step 3 GroupID_2 = 257 @@ -249,9 +337,10 @@ tests: disabled: true - label: - "DUT sends a AddGroup Command to the Groups cluster with the GroupID - field set to GroupID_2 and the GroupName set to an GroupName_2. The - command is sent as a group command using GroupID_1" + "Step 6: DUT sends a AddGroup Command to the Groups cluster with the + GroupID field set to GroupID_2 and the GroupName set to an + GroupName_2. The command is sent as a group command using GroupID_1" + PICS: G.C.C00.Tx verification: | ./chip-tool groups add-group 257 'grp2' 0xffffffffffff0103 0 @@ -286,7 +375,7 @@ tests: [1686319509.379870][8834:8834] CHIP:DMG: }, [1686319509.379881][8834:8834] CHIP:DMG: Rec - Verify the Destination Node ID matches the GroupID_1 On TH(all-cluster-app) log: + Verify the Destination Node ID matches the GroupID_1 On TH(Reference app) log: [1689748128.875980][2588:2588] CHIP:DMG: Received group command for Group=259 Cluster=0x0000_0004 Command=0x0000_0000 [1689748128.876384][2588:2588] CHIP:DMG: Processing group command for Endpoint=0 Cluster=0x0000_0004 Command=0x0000_0000 @@ -299,7 +388,7 @@ tests: [1684167429.421010][29723:29723] CHIP:IN: Joining Multicast Group with address UDP:[ff35:40:fd00::100:101]:5540 [1684167429.421129][29723:29723] CHIP:IN: Joined multicast group on interface wlp0s20f3 - Verify the DSIZ flag is set to Group On TH(all-cluster-app) log: + Verify the DSIZ flag is set to Group On TH(Reference app) log: (Here in below log the value recived is 0X04 = 0100 (decimal) - Here the bit 2 is enabled then DSIZ flag is set to group) [1686317564.742205][7679:7679] CHIP:DMG: Header Flags = diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_3_1_Simulated.yaml deleted file mode 100644 index 8d46d80a8de956..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_3_1_Simulated.yaml +++ /dev/null @@ -1,369 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 74.3.1. [TC-SWTCH-3.1] Global attributes with client as DUT - -PICS: - - SWTCH.C - - SWTCH.C.AM-READ - - SWTCH.C.AO-READ - - SWTCH.C.AM-WRITE - - SWTCH.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Switch" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read NumberOfPositions attribute" - PICS: SWTCH.C.AM-READ - wait: "readAttribute" - attribute: "NumberOfPositions" - - - label: "Read CurrentPosition attribute" - PICS: SWTCH.C.AM-READ - wait: "readAttribute" - attribute: "CurrentPosition" - - - label: "Read MultiPressMax attribute" - PICS: SWTCH.C.AO-READ - wait: "readAttribute" - attribute: "MultiPressMax" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again." - verification: | - ./chip-tool switch read feature-map 1 1 - - Verify TH receives FeatureMap attribute response on the TH(all-clusters-minimal-app) Log: - - [1666943977.583820][12769:12769] CHIP:DMG: - [1666943977.583832][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943977.583834][12769:12769] CHIP:DMG: { - [1666943977.583837][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943977.583842][12769:12769] CHIP:DMG: [ - [1666943977.583844][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943977.583855][12769:12769] CHIP:DMG: { - [1666943977.583857][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943977.583860][12769:12769] CHIP:DMG: { - [1666943977.583864][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666943977.583867][12769:12769] CHIP:DMG: AttributePathIB = - [1666943977.583870][12769:12769] CHIP:DMG: { - [1666943977.583873][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943977.583877][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666943977.583880][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666943977.583883][12769:12769] CHIP:DMG: } - [1666943977.583887][12769:12769] CHIP:DMG: - [1666943977.583891][12769:12769] CHIP:DMG: Data = 1, - [1666943977.583893][12769:12769] CHIP:DMG: }, - [1666943977.583897][12769:12769] CHIP:DMG: - [1666943977.583899][12769:12769] CHIP:DMG: }, - [1666943977.583903][12769:12769] CHIP:DMG: - [1666943977.583905][12769:12769] CHIP:DMG: ], - [1666943977.583909][12769:12769] CHIP:DMG: - [1666943977.583911][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943977.583913][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - - ./chip-tool switch read attribute-list 1 1 - - Verify TH receives AttributeList attribute response on the TH(all-clusters-minimal-app) Log: - - [1676530441.143667][49371:49373] CHIP:DMG: ReportDataMessage = - [1676530441.143670][49371:49373] CHIP:DMG: { - [1676530441.143673][49371:49373] CHIP:DMG: AttributeReportIBs = - [1676530441.143678][49371:49373] CHIP:DMG: [ - [1676530441.143680][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.143685][49371:49373] CHIP:DMG: { - [1676530441.143688][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.143691][49371:49373] CHIP:DMG: { - [1676530441.143694][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.143697][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.143701][49371:49373] CHIP:DMG: { - [1676530441.143704][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.143707][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.143711][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.143713][49371:49373] CHIP:DMG: } - [1676530441.143717][49371:49373] CHIP:DMG: - [1676530441.143720][49371:49373] CHIP:DMG: Data = [ - [1676530441.143723][49371:49373] CHIP:DMG: - [1676530441.143726][49371:49373] CHIP:DMG: ], - [1676530441.143729][49371:49373] CHIP:DMG: }, - [1676530441.143733][49371:49373] CHIP:DMG: - [1676530441.143736][49371:49373] CHIP:DMG: }, - [1676530441.143742][49371:49373] CHIP:DMG: - [1676530441.143744][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.143749][49371:49373] CHIP:DMG: { - [1676530441.143751][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.143754][49371:49373] CHIP:DMG: { - [1676530441.143757][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.143760][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.143763][49371:49373] CHIP:DMG: { - [1676530441.143766][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.143769][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.143772][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.143775][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.143778][49371:49373] CHIP:DMG: } - [1676530441.143782][49371:49373] CHIP:DMG: - [1676530441.143785][49371:49373] CHIP:DMG: Data = 0, - [1676530441.143788][49371:49373] CHIP:DMG: }, - [1676530441.143792][49371:49373] CHIP:DMG: - [1676530441.143794][49371:49373] CHIP:DMG: }, - [1676530441.143800][49371:49373] CHIP:DMG: - [1676530441.143803][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.143807][49371:49373] CHIP:DMG: { - [1676530441.143809][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.143812][49371:49373] CHIP:DMG: { - [1676530441.143815][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.143818][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.143820][49371:49373] CHIP:DMG: { - [1676530441.143823][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.143827][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.143830][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.143833][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.143835][49371:49373] CHIP:DMG: } - [1676530441.143839][49371:49373] CHIP:DMG: - [1676530441.143842][49371:49373] CHIP:DMG: Data = 1, - [1676530441.143845][49371:49373] CHIP:DMG: }, - [1676530441.143849][49371:49373] CHIP:DMG: - [1676530441.143851][49371:49373] CHIP:DMG: }, - [1676530441.143857][49371:49373] CHIP:DMG: - [1676530441.143860][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.143865][49371:49373] CHIP:DMG: { - [1676530441.143868][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.143872][49371:49373] CHIP:DMG: { - [1676530441.143877][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.143880][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.143885][49371:49373] CHIP:DMG: { - [1676530441.143891][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.143896][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.143900][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.143903][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.143906][49371:49373] CHIP:DMG: } - [1676530441.143910][49371:49373] CHIP:DMG: - [1676530441.143913][49371:49373] CHIP:DMG: Data = 65528, - [1676530441.143916][49371:49373] CHIP:DMG: }, - [1676530441.143920][49371:49373] CHIP:DMG: - [1676530441.143922][49371:49373] CHIP:DMG: }, - [1676530441.143929][49371:49373] CHIP:DMG: - [1676530441.143931][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.143937][49371:49373] CHIP:DMG: { - [1676530441.143940][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.143944][49371:49373] CHIP:DMG: { - [1676530441.143948][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.143952][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.143956][49371:49373] CHIP:DMG: { - [1676530441.143959][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.143964][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.143969][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.143973][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.143978][49371:49373] CHIP:DMG: } - [1676530441.143983][49371:49373] CHIP:DMG: - [1676530441.143988][49371:49373] CHIP:DMG: Data = 65529, - [1676530441.143992][49371:49373] CHIP:DMG: }, - [1676530441.143998][49371:49373] CHIP:DMG: - [1676530441.144001][49371:49373] CHIP:DMG: }, - [1676530441.144010][49371:49373] CHIP:DMG: - [1676530441.144012][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.144018][49371:49373] CHIP:DMG: { - [1676530441.144021][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.144024][49371:49373] CHIP:DMG: { - [1676530441.144027][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.144030][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.144033][49371:49373] CHIP:DMG: { - [1676530441.144036][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.144041][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.144046][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.144050][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.144054][49371:49373] CHIP:DMG: } - [1676530441.144061][49371:49373] CHIP:DMG: - [1676530441.144065][49371:49373] CHIP:DMG: Data = 65530, - [1676530441.144068][49371:49373] CHIP:DMG: }, - [1676530441.144075][49371:49373] CHIP:DMG: - [1676530441.144078][49371:49373] CHIP:DMG: }, - [1676530441.144086][49371:49373] CHIP:DMG: - [1676530441.144089][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.144096][49371:49373] CHIP:DMG: { - [1676530441.144099][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.144103][49371:49373] CHIP:DMG: { - [1676530441.144107][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.144109][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.144112][49371:49373] CHIP:DMG: { - [1676530441.144115][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.144119][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.144122][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.144127][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.144131][49371:49373] CHIP:DMG: } - [1676530441.144136][49371:49373] CHIP:DMG: - [1676530441.144141][49371:49373] CHIP:DMG: Data = 65531, - [1676530441.144145][49371:49373] CHIP:DMG: }, - [1676530441.144152][49371:49373] CHIP:DMG: - [1676530441.144156][49371:49373] CHIP:DMG: }, - [1676530441.144165][49371:49373] CHIP:DMG: - [1676530441.144169][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.144176][49371:49373] CHIP:DMG: { - [1676530441.144179][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.144184][49371:49373] CHIP:DMG: { - [1676530441.144188][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.144192][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.144197][49371:49373] CHIP:DMG: { - [1676530441.144200][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.144203][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.144208][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.144212][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.144216][49371:49373] CHIP:DMG: } - [1676530441.144222][49371:49373] CHIP:DMG: - [1676530441.144226][49371:49373] CHIP:DMG: Data = 65532, - [1676530441.144230][49371:49373] CHIP:DMG: }, - [1676530441.144237][49371:49373] CHIP:DMG: - [1676530441.144240][49371:49373] CHIP:DMG: }, - [1676530441.144248][49371:49373] CHIP:DMG: - [1676530441.144251][49371:49373] CHIP:DMG: AttributeReportIB = - [1676530441.144258][49371:49373] CHIP:DMG: { - [1676530441.144261][49371:49373] CHIP:DMG: AttributeDataIB = - [1676530441.144265][49371:49373] CHIP:DMG: { - [1676530441.144270][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, - [1676530441.144273][49371:49373] CHIP:DMG: AttributePathIB = - [1676530441.144278][49371:49373] CHIP:DMG: { - [1676530441.144283][49371:49373] CHIP:DMG: Endpoint = 0x1, - [1676530441.144288][49371:49373] CHIP:DMG: Cluster = 0x3b, - [1676530441.144293][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676530441.144297][49371:49373] CHIP:DMG: ListIndex = Null, - [1676530441.144301][49371:49373] CHIP:DMG: } - [1676530441.144306][49371:49373] CHIP:DMG: - [1676530441.144310][49371:49373] CHIP:DMG: Data = 65533, - [1676530441.144314][49371:49373] CHIP:DMG: }, - [1676530441.144319][49371:49373] CHIP:DMG: - [1676530441.144322][49371:49373] CHIP:DMG: }, - [1676530441.144329][49371:49373] CHIP:DMG: - [1676530441.144332][49371:49373] CHIP:DMG: ], - [1676530441.144352][49371:49373] CHIP:DMG: - [1676530441.144356][49371:49373] CHIP:DMG: SuppressResponse = true, - [1676530441.144359][49371:49373] CHIP:DMG: InteractionModelRevision = 1 - [1676530441.144362][49371:49373] CHIP:DMG: } - - - - ./chip-tool switch read number-of-positions 1 1 - - Verify TH receives NumberOfPositions attribute response on the TH(all-clusters-minimal-app) Log: - - [1666944027.604420][12769:12769] CHIP:DMG: ReportDataMessage = - [1666944027.604423][12769:12769] CHIP:DMG: { - [1666944027.604425][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666944027.604430][12769:12769] CHIP:DMG: [ - [1666944027.604432][12769:12769] CHIP:DMG: AttributeReportIB = - [1666944027.604437][12769:12769] CHIP:DMG: { - [1666944027.604439][12769:12769] CHIP:DMG: AttributeDataIB = - [1666944027.604443][12769:12769] CHIP:DMG: { - [1666944027.604445][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666944027.604447][12769:12769] CHIP:DMG: AttributePathIB = - [1666944027.604450][12769:12769] CHIP:DMG: { - [1666944027.604452][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666944027.604455][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666944027.604459][12769:12769] CHIP:DMG: Attribute = 0x0000_0000, - [1666944027.604461][12769:12769] CHIP:DMG: } - [1666944027.604463][12769:12769] CHIP:DMG: - [1666944027.604466][12769:12769] CHIP:DMG: Data = 2, - [1666944027.604469][12769:12769] CHIP:DMG: }, - [1666944027.604480][12769:12769] CHIP:DMG: - [1666944027.604482][12769:12769] CHIP:DMG: }, - [1666944027.604486][12769:12769] CHIP:DMG: - [1666944027.604488][12769:12769] CHIP:DMG: ], - [1666944027.604492][12769:12769] CHIP:DMG: - [1666944027.604495][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666944027.604497][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666944027.604500][12769:12769] CHIP:DMG: } - - - ./chip-tool switch read current-position 1 1 - - Verify TH receives CurrentPosition attribute response on the TH(all-clusters-minimal-app) Log: - - [1666944049.906683][12769:12769] CHIP:DMG: ReportDataMessage = - [1666944049.906685][12769:12769] CHIP:DMG: { - [1666944049.906687][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666944049.906690][12769:12769] CHIP:DMG: [ - [1666944049.906692][12769:12769] CHIP:DMG: AttributeReportIB = - [1666944049.906695][12769:12769] CHIP:DMG: { - [1666944049.906697][12769:12769] CHIP:DMG: AttributeDataIB = - [1666944049.906699][12769:12769] CHIP:DMG: { - [1666944049.906701][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666944049.906703][12769:12769] CHIP:DMG: AttributePathIB = - [1666944049.906705][12769:12769] CHIP:DMG: { - [1666944049.906708][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666944049.906710][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666944049.906712][12769:12769] CHIP:DMG: Attribute = 0x0000_0001, - [1666944049.906714][12769:12769] CHIP:DMG: } - [1666944049.906717][12769:12769] CHIP:DMG: - [1666944049.906719][12769:12769] CHIP:DMG: Data = 0, - [1666944049.906721][12769:12769] CHIP:DMG: }, - [1666944049.906724][12769:12769] CHIP:DMG: - [1666944049.906726][12769:12769] CHIP:DMG: }, - [1666944049.906728][12769:12769] CHIP:DMG: - [1666944049.906730][12769:12769] CHIP:DMG: ], - [1666944049.906733][12769:12769] CHIP:DMG: - [1666944049.906735][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666944049.906737][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666944049.906739][12769:12769] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - TH all-clusters-minimal-app does not support optional attributes - - ./chip-tool switch read multi-press-max 1 1 - - status = 0x86 (UNSUPPORTED_ATTRIBUTE), - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && SWTCH.C.AO-READ - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_S_2_1.yaml b/src/app/tests/suites/certification/Test_TC_S_2_1.yaml index 02d54ffa921b7e..039309538b5097 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_1.yaml @@ -64,7 +64,7 @@ tests: attribute: "SceneValid" response: constraints: - type: uint8 + type: int8u - label: "Step 6: TH reads from the DUT the (0x0004) NameSupport attribute" PICS: S.S.A0003 && S.S.F00 @@ -73,7 +73,7 @@ tests: response: value: 0x80 constraints: - type: uint8 + type: int8u - label: "Step 6: TH reads from the DUT the (0x0004) NameSupport attribute" PICS: S.S.A0004 && (!S.S.F00) @@ -82,7 +82,7 @@ tests: response: value: 0x00 constraints: - type: uint8 + type: int8u - label: "Step 7: TH reads from the DUT the (0x0005) LastConfiguredBy attribute" @@ -110,4 +110,4 @@ tests: attribute: "RemainingCapacity" response: constraints: - type: uint8 + type: int8u diff --git a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml index 437acb3881ff3f..a33f9d9752b168 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml @@ -23,6 +23,9 @@ config: cluster: "Scenes" endpoint: 1 + GroupKeyManagement.Endpoint: 0 + Groups.Endpoint: 1 + tests: - label: "Wait for the commissioned device to be retrieved" cluster: "DelayCommands" @@ -32,12 +35,6 @@ tests: - name: "nodeId" value: nodeId - - label: "TH sends a RemoveAllGroups command to DUT." - PICS: G.S.C04.Rsp - cluster: "Groups" - endpoint: "1" - command: "RemoveAllGroups" - - label: "TH reads from the DUT the (0x0006) SceneTableSize attribute" PICS: S.S.A0006 command: "readAttribute" @@ -46,14 +43,12 @@ tests: values: - name: "SceneTableSize" saveAs: maxScenes - constraints: - type: uint16 - label: "Step 0a: preparation step for using commands from Groups cluster: Add KeySet" cluster: "Group Key Management" - endpoint: 0 + endpoint: GroupKeyManagement.Endpoint command: "KeySetWrite" arguments: values: @@ -62,19 +57,19 @@ tests: { GroupKeySetID: 0x01a1, GroupKeySecurityPolicy: 0, - EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", - EpochStartTime0: 0, - EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", - EpochStartTime1: 0, - EpochKey2: "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", - EpochStartTime2: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 2220000, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: 2220001, + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 2220002, } - label: "Step 0b: Preparation step for using commands from Groups cluster: Write Group Keys" cluster: "Group Key Management" - endpoint: 0 + endpoint: GroupKeyManagement.Endpoint command: "writeAttribute" attribute: "GroupKeyMap" arguments: @@ -84,6 +79,12 @@ tests: { FabricIndex: 1, GroupId: 0x0002, GroupKeySetID: 0x01a1 }, ] + - label: "Step 0c: TH sends a RemoveAllGroups command to DUT." + PICS: G.S.C04.Rsp + cluster: "Groups" + endpoint: Groups.Endpoint + command: "RemoveAllGroups" + - label: "Step 1a: TH sends a AddGroup command to DUT with the GroupID field set to 0x0001." @@ -133,7 +134,7 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) + value: ( maxScenes / 2 ) - name: "GroupID" value: 0x0001 @@ -238,16 +239,17 @@ tests: value: 0x01 - label: "Step 3c: TH reads the SceneCount attribute from DUT." - PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 + PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 && !S.S.F03 command: "readAttribute" attribute: "SceneCount" response: value: 1 + saveAs: SceneCountValue constraints: type: int8u - - label: "Step 3c: TH reads the CurrentScene attribute from DUT." - PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 + - label: "Step 3d: TH reads the CurrentScene attribute from DUT." + PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 && !S.S.F03 command: "readAttribute" attribute: "CurrentScene" response: @@ -255,8 +257,8 @@ tests: constraints: type: int8u - - label: "Step 3c: TH reads the CurrentGroup attribute from DUT." - PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 + - label: "Step 3e: TH reads the CurrentGroup attribute from DUT." + PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 && !S.S.F03 command: "readAttribute" attribute: "CurrentGroup" response: @@ -264,19 +266,65 @@ tests: constraints: type: groupid - - label: "Step 3c: TH reads the SceneValid attribute from DUT." - PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 + - label: "Step 3f: TH reads the SceneValid attribute from DUT." + PICS: S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003 && !S.S.F03 command: "readAttribute" attribute: "SceneValid" response: value: true constraints: - type: uint8 + type: int8u + + - label: "Step 3g: TH reads attribute SceneTableSize from DUT." + PICS: S.S.F03 && S.S.F02 + command: "readAttribute" + attribute: "SceneTableSize" + response: + saveAs: SceneTableSizeValue + constraints: + type: int16u + + #FabricSceneInfo attribute not supported + - label: "Step 3h: TH reads attribute FabricSceneInfo from DUT" + verification: | + DUT provides FabricSceneInfo containing (for the current fabric) following fields: + + SceneCount has the value (PIXIT.S.SceneTableEntriesOnFactoryNew + 1) + + CurrentScene has the value 0x01 + + CurrentGroup has the value G1 + + SceneValid has the value TRUE. + + if S.S.F02(TS), RemainingCapacity has the value SceneTableSize/2 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && S.S.F03 && S.S.F02 + arguments: + values: + - name: "message" + value: "Enter y after success" + - name: "expectedValue" + value: "y" + + #- label: "Step 3h: TH reads attribute FabricSceneInfo from DUT" + # PICS: S.S.F03 && S.S.F02 + # command: "readAttribute" + # attribute: "FabricSceneInfo" + # response: + # value: { + # SceneCount: SceneCountValue, + # CurrentScene: 0x01, + # CurrentGroup: 0x0001, + # SceneValid: true, + # RemainingCapacity: ( SceneTableSizeValue/2 ), + # } - label: "Step 4a: Reboot target device" PICS: PICS_SDK_CI_ONLY cluster: "SystemCommands" - endpoint: 0 + endpoint: GroupKeyManagement.Endpoint command: "Reboot" - label: "Step 4a: Reboot target device(DUT)" @@ -292,6 +340,14 @@ tests: - name: "expectedValue" value: "y" + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + - label: "Step 4c: TH configures AC2 on DUT for all implemented application clusters supporting scenes." @@ -419,7 +475,7 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) - 1 + value: ( maxScenes / 2 ) - 1 - name: "GroupID" value: 0x0001 - name: "SceneList" @@ -455,18 +511,16 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) + constraints: + anyOf: [( maxScenes / 2 ), 0xfe, 0x89] - name: "GroupID" value: 0x0001 - # TODO : For Capacity, replace "value: (maxScenes/2)" by following lines when new backend for test is used in CI - # constraints: - # anyOf: [(maxScenes/2), 0xfe ,0x89] - label: "Step 8a: TH sends a AddScene command to DUT with the GroupID field set to 0x0001, the SceneID field set to 0x01, the TransitionTime field set to 0x0001 and a set of extension fields appropriate to AC1." - PICS: S.S.C00.Rsp && && PICS_SDK_CI_ONLY + PICS: S.S.C00.Rsp && PICS_SDK_CI_ONLY command: "AddScene" arguments: values: @@ -586,14 +640,12 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) - 1 + constraints: + anyOf: [( maxScenes / 2 ) - 1, 0xfe, 0x89] - name: "GroupID" value: 0x0001 - name: "SceneList" value: [0x01] - # TODO : For Capacity, replace "value: (maxScenes/2)" by following lines when new backend for test is used in CI - # constraints: - # anyOf: [(maxScenes/2), 0xfe ,0x89] - label: "Step 9a: TH sends a RemoveScene command to DUT with the GroupID field @@ -629,12 +681,10 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) + constraints: + anyOf: [( maxScenes / 2 ), 0xfe, 0x89] - name: "GroupID" value: 0x0001 - # TODO : For Capacity, replace "value: (maxScenes/2)" by following lines when new backend for test is used in CI - # constraints: - # anyOf: [(maxScenes/2), 0xfe ,0x89] - label: "Step 10a: TH configures AC2 on DUT for all implemented application @@ -786,39 +836,34 @@ tests: response: values: - name: "Status" - value: 0x00 + saveAs: StoreStatus + constraints: + anyOf: [0x00, 0x89] - name: "GroupID" value: 0x0001 - name: "SceneID" value: 0x02 - # TODO: For status, replace "- value: 0x00" by following lines when new backend for test is used in CI - # saveAs: StoreStatus - # constraints: - # anyOf: [0x00, 0x89] - - # TODO: Uncomment once the new backend is implemented, allowing the use of EqualityCommands pseudo cluster - #- label: - # "Verify that the status of previous command was either 0x00 (SUCCESS) - # or 0x89 (INSUFFICIENT_SPACE)" - # cluster: "EqualityCommands" - # command: "UnsignedNumberEquals" - # arguments: - # values: - # - name: "Value1" - # value: 0x00 - # - name: "Value2" - # value: StoreStatus - # response: - # - values: - # - name: "Equals" - # value: true - # saveAs: ContinueTest + + - label: + "Verify that the status of previous command was either 0x00 (SUCCESS) + or 0x89 (INSUFFICIENT_SPACE)" + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: 0x00 + - name: "Value2" + value: StoreStatus + response: + - values: + - name: "Equals" + saveAs: ContinueTest - label: "Step 12c: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0001." - # TODO : Uncomment runIf statement once new test backend is implemented - #runIf: ContinueTest + runIf: ContinueTest PICS: S.S.C06.Rsp command: "GetSceneMembership" arguments: @@ -830,7 +875,7 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) - 2 + value: ( maxScenes / 2 ) - 2 - name: "GroupID" value: 0x0001 - name: "SceneList" @@ -839,8 +884,7 @@ tests: - label: "Step 13a: If capacity allows, TH sends a AddGroup command to DUT with the GroupID field set to 0x0002." - # TODO : Uncomment runIf statement once new test backend is implemented - #runIf: ContinueTest + runIf: ContinueTest PICS: G.S.C00.Rsp cluster: "Groups" command: "AddGroup" @@ -860,8 +904,7 @@ tests: - label: "Step 13b: TH sends a RemoveAllScenes command to DUT with the GroupID field set to 0x0002." - # TODO : Uncomment runIf statement once new test backend is implemented - #runIf: ContinueTest + runIf: ContinueTest PICS: S.S.C03.Rsp command: "RemoveAllScenes" arguments: @@ -878,8 +921,7 @@ tests: - label: "Step 13c: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0002." - # TODO : Uncomment runIf statement once new test backend is implemented - #runIf: ContinueTest + runIf: ContinueTest PICS: S.S.C06.Rsp command: "GetSceneMembership" arguments: @@ -891,15 +933,14 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) - 2 + value: ( maxScenes / 2 ) - 2 - name: "GroupID" value: 0x0002 - label: "Step 14a: TH configures AC3 on DUT for all implemented application clusters supporting scenes." - # TODO : Uncomment runIf statement once new test backend is implemented - #runIf: ContinueTest + runIf: ContinueTest cluster: "Level Control" PICS: PICS_SDK_CI_ONLY command: "MoveToLevelWithOnOff" @@ -917,8 +958,7 @@ tests: - label: "Step 14a: TH configures AC3 on DUT for all implemented application clusters supporting scenes." - # TODO : Uncomment runIf statement once new test backend is implemented - #runIf: ContinueTest + runIf: ContinueTest verification: | Is DUT configured with AC3? cluster: "LogCommands" @@ -936,8 +976,7 @@ tests: - label: "Step 14b: TH sends a StoreScene command to DUT with the GroupID field set to 0x0002 and the SceneID field set to 0x03." - # TODO : Uncomment runIf statement once new test backend is implemented - #runIf: ContinueTest + runIf: ContinueTest PICS: S.S.C04.Rsp command: "StoreScene" arguments: @@ -949,39 +988,35 @@ tests: response: values: - name: "Status" - value: 0x00 + saveAs: StoreStatus + constraints: + anyOf: [0x00, 0x89] - name: "GroupID" value: 0x0002 - name: "SceneID" value: 0x03 - # TODO: For Status, replace "- value: 0x00"by following lines when new backend for test is used in CI - # saveAs: StoreStatus - # constraints: - # anyOf: [0x00, 0x89] - - # TODO: Uncomment once the new backend is implemented, allowing the use of EqualityCommands pseudo cluster - #- label: - # "Verify that the status of previous command was either 0x00 (SUCCESS) - # or 0x89 (INSUFFICIENT_SPACE)" - # runIf: ContinueTest - # cluster: "EqualityCommands" - # command: "UnsignedNumberEquals" - # arguments: - # values: - # - name: "Value1" - # value: 0x00 - # - name: "Value2" - # value: StoreStatus - # response: - # - values: - # - name: "Equals" - # value: true - # saveAs: ContinueTest + + - label: + "Verify that the status of previous command was either 0x00 (SUCCESS) + or 0x89 (INSUFFICIENT_SPACE)" + runIf: ContinueTest + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: 0x00 + - name: "Value2" + value: StoreStatus + response: + - values: + - name: "Equals" + saveAs: ContinueTest - label: "Step 14c: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0002." - #runIf: ContinueTest + runIf: ContinueTest PICS: S.S.C06.Rsp command: "GetSceneMembership" arguments: @@ -993,8 +1028,20 @@ tests: - name: "Status" value: 0x00 - name: "Capacity" - value: (maxScenes/2) - 3 + value: ( maxScenes / 2 ) - 3 - name: "GroupID" value: 0x0002 - name: "SceneList" value: [0x03] + + - label: + "Step 15: TH removes the Group key set that was added by sending a + KeySetRemove command to the GroupKeyManagement cluster with the + GroupKeySetID field set to 0x01a1" + cluster: "Group Key Management" + endpoint: GroupKeyManagement.Endpoint + command: "KeySetRemove" + arguments: + values: + - name: GroupKeySetID + value: 0x01a1 diff --git a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml index 61ba0728eef868..cc019818fcc4a1 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml @@ -25,6 +25,7 @@ config: G1: type: int16u defaultValue: 0x0001 + GroupKeyManagement.Endpoint: 0 tests: - label: "Wait for the commissioned device to be retrieved" @@ -43,14 +44,12 @@ tests: values: - name: "SceneTableSize" saveAs: maxScenes - constraints: - type: uint16 - label: "Step 0a: preparation step for using commands from Groups cluster: Add KeySet" cluster: "Group Key Management" - endpoint: 0 + endpoint: GroupKeyManagement.Endpoint command: "KeySetWrite" arguments: values: @@ -59,19 +58,19 @@ tests: { GroupKeySetID: 0x01a1, GroupKeySecurityPolicy: 0, - EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", - EpochStartTime0: 0, - EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", - EpochStartTime1: 0, - EpochKey2: "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", - EpochStartTime2: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 2220000, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: 2220001, + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 2220002, } - label: "Step 0b: Preparation step for using commands from Groups cluster: Write Group Keys" cluster: "Group Key Management" - endpoint: 0 + endpoint: GroupKeyManagement.Endpoint command: "writeAttribute" attribute: "GroupKeyMap" arguments: @@ -182,10 +181,10 @@ tests: value: 0x01 - label: - "Step 2a: TH sends a AddScene command to DUT with the GroupID field + "Step 2b: TH sends a AddScene command to DUT with the GroupID field set to G1, the SceneID field set to 0x01, the TransitionTime field set to 0x0001 (1s) and a set of extension fields appropriate to AC1." - PICS: (!S.S.C40.Rsp) && PICS_SDK_CI_ONLY + PICS: S.S.C40.Rsp && PICS_SDK_CI_ONLY command: "AddScene" arguments: values: @@ -230,7 +229,7 @@ tests: value: 0x01 - label: - "Step 2b: TH sends a EnhancedAddScene command to DUT with the GroupID + "Step 2a: TH sends a EnhancedAddScene command to DUT with the GroupID field set to G1, the SceneID field set to 0x01, the TransitionTime field set to 0x000a and a set of extension fields appropriate to AC1." verification: | @@ -399,9 +398,9 @@ tests: ] - label: - "Step 3a: TH sends a ViewScene command to DUT with the GroupID field + "Step 3b: TH sends a ViewScene command to DUT with the GroupID field set to G1 and the SceneID field set to 0x01." - PICS: (!S.S.C41.Rsp) && PICS_SDK_CI_ONLY + PICS: S.S.C41.Rsp && PICS_SDK_CI_ONLY command: "ViewScene" arguments: values: @@ -444,7 +443,7 @@ tests: ] - label: - "Step 3b: TH sends a EnhancedViewScene command to DUT with the GroupID + "Step 3a: TH sends a EnhancedViewScene command to DUT with the GroupID field set to G1 and the SceneID field set to 0x01." PICS: S.S.C41.Rsp && PICS_SKIP_SAMPLE_APP verification: | @@ -578,7 +577,7 @@ tests: - label: "TH confirm the DUT reached AC1 (on level control cluster) after 1s" - PICS: PICS_SDK_CI_ONLY + PICS: S.S.C40.Rsp cluster: "Level Control" command: "readAttribute" attribute: "CurrentLevel" @@ -604,8 +603,6 @@ tests: identifier from field set to 0x01, the group identifier to field set to G1 and the scene identifier to field set to 0x02." PICS: S.S.C42.Rsp - verification: | - DUT sends a CopySceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the group identifier from field set to G1 and the scene identifier from field set to 0x01. command: "CopyScene" arguments: values: @@ -647,3 +644,15 @@ tests: value: G1 - name: "SceneList" value: [0x01, 0x02] + + - label: + "Step 7: TH removes the Group key set that was added by sending a + KeySetRemove command to the GroupKeyManagement cluster with the + GroupKeySetID field set to 0x01a1" + cluster: "Group Key Management" + endpoint: GroupKeyManagement.Endpoint + command: "KeySetRemove" + arguments: + values: + - name: GroupKeySetID + value: 0x01a1 diff --git a/src/app/tests/suites/certification/Test_TC_S_2_4.yaml b/src/app/tests/suites/certification/Test_TC_S_2_4.yaml index dea1657f51e555..2cf0d603da4ba1 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_4.yaml @@ -23,6 +23,9 @@ config: cluster: "Scenes" endpoint: 1 + GroupKeyManagement.Endpoint: 0 + Groups.Endpoint: 1 + tests: - label: "Wait for the commissioned device to be retrieved" cluster: "DelayCommands" @@ -32,17 +35,11 @@ tests: - name: "nodeId" value: nodeId - - label: "TH sends a RemoveAllGroups command to DUT." - PICS: G.S.C04.Rsp - cluster: "Groups" - endpoint: "1" - command: "RemoveAllGroups" - - label: "Step 0a: preparation step for using commands from Groups cluster: Add KeySet" cluster: "Group Key Management" - endpoint: 0 + endpoint: GroupKeyManagement.Endpoint command: "KeySetWrite" arguments: values: @@ -51,24 +48,30 @@ tests: { GroupKeySetID: 0x01a1, GroupKeySecurityPolicy: 0, - EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", - EpochStartTime0: 0, - EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", - EpochStartTime1: 0, - EpochKey2: "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", - EpochStartTime2: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 2220000, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: 2220001, + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 2220002, } - label: "Step 0b: Preparation step for using commands from Groups cluster: Write Group Keys" cluster: "Group Key Management" - endpoint: 0 + endpoint: GroupKeyManagement.Endpoint command: "writeAttribute" attribute: "GroupKeyMap" arguments: value: [{ FabricIndex: 1, GroupId: 0x0001, GroupKeySetID: 0x01a1 }] + - label: "Step 0c: TH sends a RemoveAllGroups command to DUT." + PICS: G.S.C04.Rsp + cluster: "Groups" + endpoint: Groups.Endpoint + command: "RemoveAllGroups" + - label: "Step 2a: TH sends a AddGroup command to DUT with the GroupID field set to 0x0001." @@ -204,7 +207,6 @@ tests: value: 0 - label: "Wait 1s for level to change" - PICS: PICS_SDK_CI_ONLY cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -253,7 +255,6 @@ tests: value: 0x01 - label: "Wait 20s" - PICS: PICS_SDK_CI_ONLY cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -284,8 +285,8 @@ tests: value: "y" - label: - "TH configures AC2 on DUT for all implemented application clusters - supporting scenes." + "Step 6a: TH configures AC2 on DUT for all implemented application + clusters supporting scenes." PICS: PICS_SDK_CI_ONLY cluster: "Level Control" command: "MoveToLevelWithOnOff" @@ -301,13 +302,13 @@ tests: value: 0 - label: - "TH configures AC2 on DUT for all implemented application clusters - supporting scenes." + "Step 6a: TH configures AC2 on DUT for all implemented application + clusters supporting scenes." verification: | Is DUT configured with AC2? cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP + PICS: PICS_SKIP_SAMPLE_APP && PICS_SC_RECALL_SCENE_TRANSITION_TIME arguments: values: - name: "message" @@ -318,10 +319,10 @@ tests: value: "y" - label: - "Step 6a: TH sends a RecallScene command to DUT with the GroupID field + "Step 6b: TH sends a RecallScene command to DUT with the GroupID field set to 0x0001, the SceneID field set to 0x01 and the TransitionTime field set to 0x0032 (5s)." - PICS: S.S.C05.Rsp + PICS: S.S.C05.Rsp && PICS_SC_RECALL_SCENE_TRANSITION_TIME command: "RecallScene" arguments: values: @@ -333,7 +334,6 @@ tests: value: 0x0032 - label: "Wait 5s" - PICS: PICS_SDK_CI_ONLY cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -412,4 +412,16 @@ tests: - name: "TransitionTime" value: null response: - error: 0x00 + error: SUCCESS + + - label: + "Step 8: TH removes the Group key set that was added by sending a + KeySetRemove command to the GroupKeyManagement cluster with the + GroupKeySetID field set to 0x01a1" + cluster: "Group Key Management" + endpoint: GroupKeyManagement.Endpoint + command: "KeySetRemove" + arguments: + values: + - name: GroupKeySetID + value: 0x01a1 diff --git a/src/app/tests/suites/certification/Test_TC_S_3_1.yaml b/src/app/tests/suites/certification/Test_TC_S_3_1.yaml deleted file mode 100644 index 3bc443f3cb3866..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_S_3_1.yaml +++ /dev/null @@ -1,608 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 132.3.1. [TC-S-3.1] Functionality with DUT as Client - -PICS: - - S.C - - S.C.AM-READ - - S.C.AO-READ - - S.C.AM-WRITE - - S.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: DUT reads all supported mandatory attributes from TH one at a - time in a manufacturer specific order." - PICS: S.C.AM-READ - verification: | - ./chip-tool scenes read scene-count 1 1 - - [1689664978.443091][2339:2341] CHIP:DMG: ReportDataMessage = - [1689664978.443128][2339:2341] CHIP:DMG: { - [1689664978.443156][2339:2341] CHIP:DMG: AttributeReportIBs = - [1689664978.443196][2339:2341] CHIP:DMG: [ - [1689664978.443226][2339:2341] CHIP:DMG: AttributeReportIB = - [1689664978.443268][2339:2341] CHIP:DMG: { - [1689664978.443300][2339:2341] CHIP:DMG: AttributeDataIB = - [1689664978.443341][2339:2341] CHIP:DMG: { - [1689664978.443381][2339:2341] CHIP:DMG: DataVersion = 0xff333f87, - [1689664978.443420][2339:2341] CHIP:DMG: AttributePathIB = - [1689664978.443462][2339:2341] CHIP:DMG: { - [1689664978.443503][2339:2341] CHIP:DMG: Endpoint = 0x1, - [1689664978.443546][2339:2341] CHIP:DMG: Cluster = 0x5, - [1689664978.443589][2339:2341] CHIP:DMG: Attribute = 0x0000_0000, - [1689664978.443630][2339:2341] CHIP:DMG: } - [1689664978.443672][2339:2341] CHIP:DMG: - [1689664978.443714][2339:2341] CHIP:DMG: Data = 0, - [1689664978.443752][2339:2341] CHIP:DMG: }, - [1689664978.443793][2339:2341] CHIP:DMG: - [1689664978.443857][2339:2341] CHIP:DMG: }, - [1689664978.443900][2339:2341] CHIP:DMG: - [1689664978.443929][2339:2341] CHIP:DMG: ], - [1689664978.443968][2339:2341] CHIP:DMG: - [1689664978.443999][2339:2341] CHIP:DMG: SuppressResponse = true, - [1689664978.444030][2339:2341] CHIP:DMG: InteractionModelRevision = 1 - [1689664978.444059][2339:2341] CHIP:DMG: } - - ./chip-tool scenes read current-scene 1 1 - - [1689664981.268319][2343:2346] CHIP:DMG: ReportDataMessage = - [1689664981.268356][2343:2346] CHIP:DMG: { - [1689664981.268420][2343:2346] CHIP:DMG: AttributeReportIBs = - [1689664981.268462][2343:2346] CHIP:DMG: [ - [1689664981.268492][2343:2346] CHIP:DMG: AttributeReportIB = - [1689664981.268530][2343:2346] CHIP:DMG: { - [1689664981.268561][2343:2346] CHIP:DMG: AttributeDataIB = - [1689664981.268595][2343:2346] CHIP:DMG: { - [1689664981.268631][2343:2346] CHIP:DMG: DataVersion = 0xff333f87, - [1689664981.268666][2343:2346] CHIP:DMG: AttributePathIB = - [1689664981.268703][2343:2346] CHIP:DMG: { - [1689664981.268740][2343:2346] CHIP:DMG: Endpoint = 0x1, - [1689664981.268779][2343:2346] CHIP:DMG: Cluster = 0x5, - [1689664981.268817][2343:2346] CHIP:DMG: Attribute = 0x0000_0001, - [1689664981.268854][2343:2346] CHIP:DMG: } - [1689664981.268893][2343:2346] CHIP:DMG: - [1689664981.268932][2343:2346] CHIP:DMG: Data = 0, - [1689664981.268966][2343:2346] CHIP:DMG: }, - [1689664981.269003][2343:2346] CHIP:DMG: - [1689664981.269033][2343:2346] CHIP:DMG: }, - [1689664981.269068][2343:2346] CHIP:DMG: - [1689664981.269095][2343:2346] CHIP:DMG: ], - [1689664981.269131][2343:2346] CHIP:DMG: - [1689664981.269160][2343:2346] CHIP:DMG: SuppressResponse = true, - [1689664981.269189][2343:2346] CHIP:DMG: InteractionModelRevision = 1 - [1689664981.269216][2343:2346] CHIP:DMG: } - - - ./chip-tool scenes read current-group 1 1 - - [1689664983.848116][2348:2351] CHIP:DMG: ReportDataMessage = - [1689664983.848153][2348:2351] CHIP:DMG: { - [1689664983.848182][2348:2351] CHIP:DMG: AttributeReportIBs = - [1689664983.848226][2348:2351] CHIP:DMG: [ - [1689664983.848257][2348:2351] CHIP:DMG: AttributeReportIB = - [1689664983.848296][2348:2351] CHIP:DMG: { - [1689664983.848326][2348:2351] CHIP:DMG: AttributeDataIB = - [1689664983.848364][2348:2351] CHIP:DMG: { - [1689664983.848400][2348:2351] CHIP:DMG: DataVersion = 0xff333f87, - [1689664983.848437][2348:2351] CHIP:DMG: AttributePathIB = - [1689664983.848475][2348:2351] CHIP:DMG: { - [1689664983.848513][2348:2351] CHIP:DMG: Endpoint = 0x1, - [1689664983.848553][2348:2351] CHIP:DMG: Cluster = 0x5, - [1689664983.848593][2348:2351] CHIP:DMG: Attribute = 0x0000_0002, - [1689664983.848631][2348:2351] CHIP:DMG: } - [1689664983.848671][2348:2351] CHIP:DMG: - [1689664983.848710][2348:2351] CHIP:DMG: Data = 0, - [1689664983.848745][2348:2351] CHIP:DMG: }, - [1689664983.848783][2348:2351] CHIP:DMG: - [1689664983.848813][2348:2351] CHIP:DMG: }, - [1689664983.848850][2348:2351] CHIP:DMG: - [1689664983.848877][2348:2351] CHIP:DMG: ], - [1689664983.848913][2348:2351] CHIP:DMG: - [1689664983.848941][2348:2351] CHIP:DMG: SuppressResponse = true, - [1689664983.848970][2348:2351] CHIP:DMG: InteractionModelRevision = 1 - [1689664983.848997][2348:2351] CHIP:DMG: } - - - ./chip-tool scenes read scene-valid 1 1 - - [1689664986.197422][2352:2354] CHIP:DMG: ReportDataMessage = - [1689664986.197461][2352:2354] CHIP:DMG: { - [1689664986.197492][2352:2354] CHIP:DMG: AttributeReportIBs = - [1689664986.197534][2352:2354] CHIP:DMG: [ - [1689664986.197565][2352:2354] CHIP:DMG: AttributeReportIB = - [1689664986.197610][2352:2354] CHIP:DMG: { - [1689664986.197643][2352:2354] CHIP:DMG: AttributeDataIB = - [1689664986.197682][2352:2354] CHIP:DMG: { - [1689664986.197722][2352:2354] CHIP:DMG: DataVersion = 0xff333f87, - [1689664986.197762][2352:2354] CHIP:DMG: AttributePathIB = - [1689664986.197803][2352:2354] CHIP:DMG: { - [1689664986.197845][2352:2354] CHIP:DMG: Endpoint = 0x1, - [1689664986.197889][2352:2354] CHIP:DMG: Cluster = 0x5, - [1689664986.197935][2352:2354] CHIP:DMG: Attribute = 0x0000_0003, - [1689664986.197978][2352:2354] CHIP:DMG: } - [1689664986.198021][2352:2354] CHIP:DMG: - [1689664986.198064][2352:2354] CHIP:DMG: Data = false, - [1689664986.198102][2352:2354] CHIP:DMG: }, - [1689664986.198144][2352:2354] CHIP:DMG: - [1689664986.198177][2352:2354] CHIP:DMG: }, - [1689664986.198217][2352:2354] CHIP:DMG: - [1689664986.198247][2352:2354] CHIP:DMG: ], - [1689664986.198285][2352:2354] CHIP:DMG: - [1689664986.198315][2352:2354] CHIP:DMG: SuppressResponse = true, - [1689664986.198347][2352:2354] CHIP:DMG: InteractionModelRevision = 1 - [1689664986.198376][2352:2354] CHIP:DMG: } - - ./chip-tool scenes read name-support 1 1 - - [1689664990.166849][2355:2357] CHIP:DMG: ReportDataMessage = - [1689664990.166908][2355:2357] CHIP:DMG: { - [1689664990.166933][2355:2357] CHIP:DMG: AttributeReportIBs = - [1689664990.166966][2355:2357] CHIP:DMG: [ - [1689664990.166992][2355:2357] CHIP:DMG: AttributeReportIB = - [1689664990.167030][2355:2357] CHIP:DMG: { - [1689664990.167058][2355:2357] CHIP:DMG: AttributeDataIB = - [1689664990.167090][2355:2357] CHIP:DMG: { - [1689664990.167125][2355:2357] CHIP:DMG: DataVersion = 0xff333f87, - [1689664990.167157][2355:2357] CHIP:DMG: AttributePathIB = - [1689664990.167193][2355:2357] CHIP:DMG: { - [1689664990.167228][2355:2357] CHIP:DMG: Endpoint = 0x1, - [1689664990.167265][2355:2357] CHIP:DMG: Cluster = 0x5, - [1689664990.167302][2355:2357] CHIP:DMG: Attribute = 0x0000_0004, - [1689664990.167338][2355:2357] CHIP:DMG: } - [1689664990.167374][2355:2357] CHIP:DMG: - [1689664990.167410][2355:2357] CHIP:DMG: Data = 128, - [1689664990.167442][2355:2357] CHIP:DMG: }, - [1689664990.167477][2355:2357] CHIP:DMG: - [1689664990.167505][2355:2357] CHIP:DMG: }, - [1689664990.167538][2355:2357] CHIP:DMG: - [1689664990.167564][2355:2357] CHIP:DMG: ], - [1689664990.167596][2355:2357] CHIP:DMG: - [1689664990.167623][2355:2357] CHIP:DMG: SuppressResponse = true, - [1689664990.167650][2355:2357] CHIP:DMG: InteractionModelRevision = 1 - [1689664990.167674][2355:2357] CHIP:DMG: } - - ./chip-tool scenes read scene-table-size 1 1 - - [1689664998.402942][2361:2363] CHIP:DMG: ReportDataMessage = - [1689664998.402980][2361:2363] CHIP:DMG: { - [1689664998.403009][2361:2363] CHIP:DMG: AttributeReportIBs = - [1689664998.403051][2361:2363] CHIP:DMG: [ - [1689664998.403085][2361:2363] CHIP:DMG: AttributeReportIB = - [1689664998.403173][2361:2363] CHIP:DMG: { - [1689664998.403212][2361:2363] CHIP:DMG: AttributeDataIB = - [1689664998.403256][2361:2363] CHIP:DMG: { - [1689664998.403300][2361:2363] CHIP:DMG: DataVersion = 0xff333f87, - [1689664998.403341][2361:2363] CHIP:DMG: AttributePathIB = - [1689664998.403386][2361:2363] CHIP:DMG: { - [1689664998.403431][2361:2363] CHIP:DMG: Endpoint = 0x1, - [1689664998.403487][2361:2363] CHIP:DMG: Cluster = 0x5, - [1689664998.403534][2361:2363] CHIP:DMG: Attribute = 0x0000_0006, - [1689664998.403578][2361:2363] CHIP:DMG: } - [1689664998.403623][2361:2363] CHIP:DMG: - [1689664998.403669][2361:2363] CHIP:DMG: Data = 0, - [1689664998.403710][2361:2363] CHIP:DMG: }, - [1689664998.403756][2361:2363] CHIP:DMG: - [1689664998.403793][2361:2363] CHIP:DMG: }, - [1689664998.403868][2361:2363] CHIP:DMG: - [1689664998.403903][2361:2363] CHIP:DMG: ], - [1689664998.403947][2361:2363] CHIP:DMG: - [1689664998.403981][2361:2363] CHIP:DMG: SuppressResponse = true, - [1689664998.404016][2361:2363] CHIP:DMG: InteractionModelRevision = 1 - [1689664998.404048][2361:2363] CHIP:DMG: } - - ./chip-tool scenes read remaining-capacity 1 1 - - [1689665008.860825][2364:2366] CHIP:DMG: ReportDataMessage = - [1689665008.860866][2364:2366] CHIP:DMG: { - [1689665008.860922][2364:2366] CHIP:DMG: AttributeReportIBs = - [1689665008.860964][2364:2366] CHIP:DMG: [ - [1689665008.860995][2364:2366] CHIP:DMG: AttributeReportIB = - [1689665008.861039][2364:2366] CHIP:DMG: { - [1689665008.861072][2364:2366] CHIP:DMG: AttributeDataIB = - [1689665008.861108][2364:2366] CHIP:DMG: { - [1689665008.861147][2364:2366] CHIP:DMG: DataVersion = 0xff333f87, - [1689665008.861187][2364:2366] CHIP:DMG: AttributePathIB = - [1689665008.861228][2364:2366] CHIP:DMG: { - [1689665008.861269][2364:2366] CHIP:DMG: Endpoint = 0x1, - [1689665008.861312][2364:2366] CHIP:DMG: Cluster = 0x5, - [1689665008.861355][2364:2366] CHIP:DMG: Attribute = 0x0000_0007, - [1689665008.861396][2364:2366] CHIP:DMG: } - [1689665008.861438][2364:2366] CHIP:DMG: - [1689665008.861481][2364:2366] CHIP:DMG: Data = 0, - [1689665008.861518][2364:2366] CHIP:DMG: }, - [1689665008.861559][2364:2366] CHIP:DMG: - [1689665008.861592][2364:2366] CHIP:DMG: }, - [1689665008.861631][2364:2366] CHIP:DMG: - [1689665008.861660][2364:2366] CHIP:DMG: ], - [1689665008.861698][2364:2366] CHIP:DMG: - [1689665008.861729][2364:2366] CHIP:DMG: SuppressResponse = true, - [1689665008.861760][2364:2366] CHIP:DMG: InteractionModelRevision = 1 - [1689665008.861789][2364:2366] CHIP:DMG: } - disabled: true - - - label: - "Step 2: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order." - PICS: S.C.AO-READ - verification: | - ./chip-tool scenes read last-configured-by 1 1 - - [1689664994.730050][2358:2360] CHIP:DMG: ReportDataMessage = - [1689664994.730079][2358:2360] CHIP:DMG: { - [1689664994.730102][2358:2360] CHIP:DMG: AttributeReportIBs = - [1689664994.730136][2358:2360] CHIP:DMG: [ - [1689664994.730162][2358:2360] CHIP:DMG: AttributeReportIB = - [1689664994.730201][2358:2360] CHIP:DMG: { - [1689664994.730229][2358:2360] CHIP:DMG: AttributeDataIB = - [1689664994.730262][2358:2360] CHIP:DMG: { - [1689664994.730296][2358:2360] CHIP:DMG: DataVersion = 0xff333f87, - [1689664994.730329][2358:2360] CHIP:DMG: AttributePathIB = - [1689664994.730364][2358:2360] CHIP:DMG: { - [1689664994.730399][2358:2360] CHIP:DMG: Endpoint = 0x1, - [1689664994.730437][2358:2360] CHIP:DMG: Cluster = 0x5, - [1689664994.730473][2358:2360] CHIP:DMG: Attribute = 0x0000_0005, - [1689664994.730508][2358:2360] CHIP:DMG: } - [1689664994.730544][2358:2360] CHIP:DMG: - [1689664994.730580][2358:2360] CHIP:DMG: Data = NULL - [1689664994.730610][2358:2360] CHIP:DMG: }, - [1689664994.730646][2358:2360] CHIP:DMG: - [1689664994.730674][2358:2360] CHIP:DMG: }, - [1689664994.730707][2358:2360] CHIP:DMG: - [1689664994.730732][2358:2360] CHIP:DMG: ], - [1689664994.730765][2358:2360] CHIP:DMG: - [1689664994.730791][2358:2360] CHIP:DMG: SuppressResponse = true, - [1689664994.730818][2358:2360] CHIP:DMG: InteractionModelRevision = 1 - [1689664994.730843][2358:2360] CHIP:DMG: } - disabled: true - - - label: - "Step 3: DUT writes a suitable value to all supported mandatory - attributes on the TH one at a time in a manufacturer specific order." - PICS: S.C.AM-WRITE - verification: | - This cluster doesn't have any writable attributes - disabled: true - - - label: - "Step 4: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order." - PICS: S.C.AO-WRITE - verification: | - This cluster doesn't have any writable attributes - disabled: true - - - label: - "Step 5: Configure TH such that it implements mandatory and none of - the optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again." - verification: | - ./chip-tool scenes read attribute-list 1 1 - - [1689666789.967807][4742:4744] CHIP:DMG: ReportDataMessage = - [1689666789.967886][4742:4744] CHIP:DMG: { - [1689666789.967916][4742:4744] CHIP:DMG: AttributeReportIBs = - [1689666789.967966][4742:4744] CHIP:DMG: [ - [1689666789.967997][4742:4744] CHIP:DMG: AttributeReportIB = - [1689666789.968046][4742:4744] CHIP:DMG: { - [1689666789.968079][4742:4744] CHIP:DMG: AttributeDataIB = - [1689666789.968117][4742:4744] CHIP:DMG: { - [1689666789.968158][4742:4744] CHIP:DMG: DataVersion = 0xf12a63c8, - [1689666789.968197][4742:4744] CHIP:DMG: AttributePathIB = - [1689666789.968238][4742:4744] CHIP:DMG: { - [1689666789.968279][4742:4744] CHIP:DMG: Endpoint = 0x1, - [1689666789.968322][4742:4744] CHIP:DMG: Cluster = 0x5, - [1689666789.968366][4742:4744] CHIP:DMG: Attribute = 0x0000_FFFB, - [1689666789.968407][4742:4744] CHIP:DMG: } - [1689666789.968449][4742:4744] CHIP:DMG: - [1689666789.968488][4742:4744] CHIP:DMG: Data = [ - [1689666789.968579][4742:4744] CHIP:DMG: 0, 1, 2, 3, 4, 5, 6, 7, 65528, 65529, 65530, 65531, 65532, 65533, - [1689666789.968630][4742:4744] CHIP:DMG: ], - [1689666789.968668][4742:4744] CHIP:DMG: }, - [1689666789.968716][4742:4744] CHIP:DMG: - [1689666789.968749][4742:4744] CHIP:DMG: }, - [1689666789.968795][4742:4744] CHIP:DMG: - [1689666789.968825][4742:4744] CHIP:DMG: ], - [1689666789.968871][4742:4744] CHIP:DMG: - [1689666789.968902][4742:4744] CHIP:DMG: SuppressResponse = true, - [1689666789.968934][4742:4744] CHIP:DMG: InteractionModelRevision = 1 - [1689666789.968963][4742:4744] CHIP:DMG: } - - - ./chip-tool scenes read feature-map 1 1 - - [1689666905.399488][4746:4748] CHIP:DMG: ReportDataMessage = - [1689666905.399526][4746:4748] CHIP:DMG: { - [1689666905.399556][4746:4748] CHIP:DMG: AttributeReportIBs = - [1689666905.399600][4746:4748] CHIP:DMG: [ - [1689666905.399632][4746:4748] CHIP:DMG: AttributeReportIB = - [1689666905.399680][4746:4748] CHIP:DMG: { - [1689666905.399715][4746:4748] CHIP:DMG: AttributeDataIB = - [1689666905.399761][4746:4748] CHIP:DMG: { - [1689666905.399799][4746:4748] CHIP:DMG: DataVersion = 0xf12a63c8, - [1689666905.399868][4746:4748] CHIP:DMG: AttributePathIB = - [1689666905.399908][4746:4748] CHIP:DMG: { - [1689666905.399951][4746:4748] CHIP:DMG: Endpoint = 0x1, - [1689666905.399994][4746:4748] CHIP:DMG: Cluster = 0x5, - [1689666905.400038][4746:4748] CHIP:DMG: Attribute = 0x0000_FFFC, - [1689666905.400079][4746:4748] CHIP:DMG: } - [1689666905.400121][4746:4748] CHIP:DMG: - [1689666905.400163][4746:4748] CHIP:DMG: Data = 1, - [1689666905.400200][4746:4748] CHIP:DMG: }, - [1689666905.400281][4746:4748] CHIP:DMG: - [1689666905.400316][4746:4748] CHIP:DMG: }, - [1689666905.400355][4746:4748] CHIP:DMG: - [1689666905.400385][4746:4748] CHIP:DMG: ], - [1689666905.400424][4746:4748] CHIP:DMG: - [1689666905.400455][4746:4748] CHIP:DMG: SuppressResponse = true, - [1689666905.400487][4746:4748] CHIP:DMG: InteractionModelRevision = 1 - [1689666905.400517][4746:4748] CHIP:DMG: } - - - ./chip-tool scenes read scene-count 1 1 - - [1689664978.443091][2339:2341] CHIP:DMG: ReportDataMessage = - [1689664978.443128][2339:2341] CHIP:DMG: { - [1689664978.443156][2339:2341] CHIP:DMG: AttributeReportIBs = - [1689664978.443196][2339:2341] CHIP:DMG: [ - [1689664978.443226][2339:2341] CHIP:DMG: AttributeReportIB = - [1689664978.443268][2339:2341] CHIP:DMG: { - [1689664978.443300][2339:2341] CHIP:DMG: AttributeDataIB = - [1689664978.443341][2339:2341] CHIP:DMG: { - [1689664978.443381][2339:2341] CHIP:DMG: DataVersion = 0xff333f87, - [1689664978.443420][2339:2341] CHIP:DMG: AttributePathIB = - [1689664978.443462][2339:2341] CHIP:DMG: { - [1689664978.443503][2339:2341] CHIP:DMG: Endpoint = 0x1, - [1689664978.443546][2339:2341] CHIP:DMG: Cluster = 0x5, - [1689664978.443589][2339:2341] CHIP:DMG: Attribute = 0x0000_0000, - [1689664978.443630][2339:2341] CHIP:DMG: } - [1689664978.443672][2339:2341] CHIP:DMG: - [1689664978.443714][2339:2341] CHIP:DMG: Data = 0, - [1689664978.443752][2339:2341] CHIP:DMG: }, - [1689664978.443793][2339:2341] CHIP:DMG: - [1689664978.443857][2339:2341] CHIP:DMG: }, - [1689664978.443900][2339:2341] CHIP:DMG: - [1689664978.443929][2339:2341] CHIP:DMG: ], - [1689664978.443968][2339:2341] CHIP:DMG: - [1689664978.443999][2339:2341] CHIP:DMG: SuppressResponse = true, - [1689664978.444030][2339:2341] CHIP:DMG: InteractionModelRevision = 1 - [1689664978.444059][2339:2341] CHIP:DMG: } - - ./chip-tool scenes read current-scene 1 1 - - [1689664981.268319][2343:2346] CHIP:DMG: ReportDataMessage = - [1689664981.268356][2343:2346] CHIP:DMG: { - [1689664981.268420][2343:2346] CHIP:DMG: AttributeReportIBs = - [1689664981.268462][2343:2346] CHIP:DMG: [ - [1689664981.268492][2343:2346] CHIP:DMG: AttributeReportIB = - [1689664981.268530][2343:2346] CHIP:DMG: { - [1689664981.268561][2343:2346] CHIP:DMG: AttributeDataIB = - [1689664981.268595][2343:2346] CHIP:DMG: { - [1689664981.268631][2343:2346] CHIP:DMG: DataVersion = 0xff333f87, - [1689664981.268666][2343:2346] CHIP:DMG: AttributePathIB = - [1689664981.268703][2343:2346] CHIP:DMG: { - [1689664981.268740][2343:2346] CHIP:DMG: Endpoint = 0x1, - [1689664981.268779][2343:2346] CHIP:DMG: Cluster = 0x5, - [1689664981.268817][2343:2346] CHIP:DMG: Attribute = 0x0000_0001, - [1689664981.268854][2343:2346] CHIP:DMG: } - [1689664981.268893][2343:2346] CHIP:DMG: - [1689664981.268932][2343:2346] CHIP:DMG: Data = 0, - [1689664981.268966][2343:2346] CHIP:DMG: }, - [1689664981.269003][2343:2346] CHIP:DMG: - [1689664981.269033][2343:2346] CHIP:DMG: }, - [1689664981.269068][2343:2346] CHIP:DMG: - [1689664981.269095][2343:2346] CHIP:DMG: ], - [1689664981.269131][2343:2346] CHIP:DMG: - [1689664981.269160][2343:2346] CHIP:DMG: SuppressResponse = true, - [1689664981.269189][2343:2346] CHIP:DMG: InteractionModelRevision = 1 - [1689664981.269216][2343:2346] CHIP:DMG: } - - - ./chip-tool scenes read current-group 1 1 - - [1689664983.848116][2348:2351] CHIP:DMG: ReportDataMessage = - [1689664983.848153][2348:2351] CHIP:DMG: { - [1689664983.848182][2348:2351] CHIP:DMG: AttributeReportIBs = - [1689664983.848226][2348:2351] CHIP:DMG: [ - [1689664983.848257][2348:2351] CHIP:DMG: AttributeReportIB = - [1689664983.848296][2348:2351] CHIP:DMG: { - [1689664983.848326][2348:2351] CHIP:DMG: AttributeDataIB = - [1689664983.848364][2348:2351] CHIP:DMG: { - [1689664983.848400][2348:2351] CHIP:DMG: DataVersion = 0xff333f87, - [1689664983.848437][2348:2351] CHIP:DMG: AttributePathIB = - [1689664983.848475][2348:2351] CHIP:DMG: { - [1689664983.848513][2348:2351] CHIP:DMG: Endpoint = 0x1, - [1689664983.848553][2348:2351] CHIP:DMG: Cluster = 0x5, - [1689664983.848593][2348:2351] CHIP:DMG: Attribute = 0x0000_0002, - [1689664983.848631][2348:2351] CHIP:DMG: } - [1689664983.848671][2348:2351] CHIP:DMG: - [1689664983.848710][2348:2351] CHIP:DMG: Data = 0, - [1689664983.848745][2348:2351] CHIP:DMG: }, - [1689664983.848783][2348:2351] CHIP:DMG: - [1689664983.848813][2348:2351] CHIP:DMG: }, - [1689664983.848850][2348:2351] CHIP:DMG: - [1689664983.848877][2348:2351] CHIP:DMG: ], - [1689664983.848913][2348:2351] CHIP:DMG: - [1689664983.848941][2348:2351] CHIP:DMG: SuppressResponse = true, - [1689664983.848970][2348:2351] CHIP:DMG: InteractionModelRevision = 1 - [1689664983.848997][2348:2351] CHIP:DMG: } - - - ./chip-tool scenes read scene-valid 1 1 - - [1689664986.197422][2352:2354] CHIP:DMG: ReportDataMessage = - [1689664986.197461][2352:2354] CHIP:DMG: { - [1689664986.197492][2352:2354] CHIP:DMG: AttributeReportIBs = - [1689664986.197534][2352:2354] CHIP:DMG: [ - [1689664986.197565][2352:2354] CHIP:DMG: AttributeReportIB = - [1689664986.197610][2352:2354] CHIP:DMG: { - [1689664986.197643][2352:2354] CHIP:DMG: AttributeDataIB = - [1689664986.197682][2352:2354] CHIP:DMG: { - [1689664986.197722][2352:2354] CHIP:DMG: DataVersion = 0xff333f87, - [1689664986.197762][2352:2354] CHIP:DMG: AttributePathIB = - [1689664986.197803][2352:2354] CHIP:DMG: { - [1689664986.197845][2352:2354] CHIP:DMG: Endpoint = 0x1, - [1689664986.197889][2352:2354] CHIP:DMG: Cluster = 0x5, - [1689664986.197935][2352:2354] CHIP:DMG: Attribute = 0x0000_0003, - [1689664986.197978][2352:2354] CHIP:DMG: } - [1689664986.198021][2352:2354] CHIP:DMG: - [1689664986.198064][2352:2354] CHIP:DMG: Data = false, - [1689664986.198102][2352:2354] CHIP:DMG: }, - [1689664986.198144][2352:2354] CHIP:DMG: - [1689664986.198177][2352:2354] CHIP:DMG: }, - [1689664986.198217][2352:2354] CHIP:DMG: - [1689664986.198247][2352:2354] CHIP:DMG: ], - [1689664986.198285][2352:2354] CHIP:DMG: - [1689664986.198315][2352:2354] CHIP:DMG: SuppressResponse = true, - [1689664986.198347][2352:2354] CHIP:DMG: InteractionModelRevision = 1 - [1689664986.198376][2352:2354] CHIP:DMG: } - - ./chip-tool scenes read name-support 1 1 - - [1689664990.166849][2355:2357] CHIP:DMG: ReportDataMessage = - [1689664990.166908][2355:2357] CHIP:DMG: { - [1689664990.166933][2355:2357] CHIP:DMG: AttributeReportIBs = - [1689664990.166966][2355:2357] CHIP:DMG: [ - [1689664990.166992][2355:2357] CHIP:DMG: AttributeReportIB = - [1689664990.167030][2355:2357] CHIP:DMG: { - [1689664990.167058][2355:2357] CHIP:DMG: AttributeDataIB = - [1689664990.167090][2355:2357] CHIP:DMG: { - [1689664990.167125][2355:2357] CHIP:DMG: DataVersion = 0xff333f87, - [1689664990.167157][2355:2357] CHIP:DMG: AttributePathIB = - [1689664990.167193][2355:2357] CHIP:DMG: { - [1689664990.167228][2355:2357] CHIP:DMG: Endpoint = 0x1, - [1689664990.167265][2355:2357] CHIP:DMG: Cluster = 0x5, - [1689664990.167302][2355:2357] CHIP:DMG: Attribute = 0x0000_0004, - [1689664990.167338][2355:2357] CHIP:DMG: } - [1689664990.167374][2355:2357] CHIP:DMG: - [1689664990.167410][2355:2357] CHIP:DMG: Data = 128, - [1689664990.167442][2355:2357] CHIP:DMG: }, - [1689664990.167477][2355:2357] CHIP:DMG: - [1689664990.167505][2355:2357] CHIP:DMG: }, - [1689664990.167538][2355:2357] CHIP:DMG: - [1689664990.167564][2355:2357] CHIP:DMG: ], - [1689664990.167596][2355:2357] CHIP:DMG: - [1689664990.167623][2355:2357] CHIP:DMG: SuppressResponse = true, - [1689664990.167650][2355:2357] CHIP:DMG: InteractionModelRevision = 1 - [1689664990.167674][2355:2357] CHIP:DMG: } - - ./chip-tool scenes read scene-table-size 1 1 - - [1689664998.402942][2361:2363] CHIP:DMG: ReportDataMessage = - [1689664998.402980][2361:2363] CHIP:DMG: { - [1689664998.403009][2361:2363] CHIP:DMG: AttributeReportIBs = - [1689664998.403051][2361:2363] CHIP:DMG: [ - [1689664998.403085][2361:2363] CHIP:DMG: AttributeReportIB = - [1689664998.403173][2361:2363] CHIP:DMG: { - [1689664998.403212][2361:2363] CHIP:DMG: AttributeDataIB = - [1689664998.403256][2361:2363] CHIP:DMG: { - [1689664998.403300][2361:2363] CHIP:DMG: DataVersion = 0xff333f87, - [1689664998.403341][2361:2363] CHIP:DMG: AttributePathIB = - [1689664998.403386][2361:2363] CHIP:DMG: { - [1689664998.403431][2361:2363] CHIP:DMG: Endpoint = 0x1, - [1689664998.403487][2361:2363] CHIP:DMG: Cluster = 0x5, - [1689664998.403534][2361:2363] CHIP:DMG: Attribute = 0x0000_0006, - [1689664998.403578][2361:2363] CHIP:DMG: } - [1689664998.403623][2361:2363] CHIP:DMG: - [1689664998.403669][2361:2363] CHIP:DMG: Data = 0, - [1689664998.403710][2361:2363] CHIP:DMG: }, - [1689664998.403756][2361:2363] CHIP:DMG: - [1689664998.403793][2361:2363] CHIP:DMG: }, - [1689664998.403868][2361:2363] CHIP:DMG: - [1689664998.403903][2361:2363] CHIP:DMG: ], - [1689664998.403947][2361:2363] CHIP:DMG: - [1689664998.403981][2361:2363] CHIP:DMG: SuppressResponse = true, - [1689664998.404016][2361:2363] CHIP:DMG: InteractionModelRevision = 1 - [1689664998.404048][2361:2363] CHIP:DMG: } - - ./chip-tool scenes read remaining-capacity 1 1 - - [1689665008.860825][2364:2366] CHIP:DMG: ReportDataMessage = - [1689665008.860866][2364:2366] CHIP:DMG: { - [1689665008.860922][2364:2366] CHIP:DMG: AttributeReportIBs = - [1689665008.860964][2364:2366] CHIP:DMG: [ - [1689665008.860995][2364:2366] CHIP:DMG: AttributeReportIB = - [1689665008.861039][2364:2366] CHIP:DMG: { - [1689665008.861072][2364:2366] CHIP:DMG: AttributeDataIB = - [1689665008.861108][2364:2366] CHIP:DMG: { - [1689665008.861147][2364:2366] CHIP:DMG: DataVersion = 0xff333f87, - [1689665008.861187][2364:2366] CHIP:DMG: AttributePathIB = - [1689665008.861228][2364:2366] CHIP:DMG: { - [1689665008.861269][2364:2366] CHIP:DMG: Endpoint = 0x1, - [1689665008.861312][2364:2366] CHIP:DMG: Cluster = 0x5, - [1689665008.861355][2364:2366] CHIP:DMG: Attribute = 0x0000_0007, - [1689665008.861396][2364:2366] CHIP:DMG: } - [1689665008.861438][2364:2366] CHIP:DMG: - [1689665008.861481][2364:2366] CHIP:DMG: Data = 0, - [1689665008.861518][2364:2366] CHIP:DMG: }, - [1689665008.861559][2364:2366] CHIP:DMG: - [1689665008.861592][2364:2366] CHIP:DMG: }, - [1689665008.861631][2364:2366] CHIP:DMG: - [1689665008.861660][2364:2366] CHIP:DMG: ], - [1689665008.861698][2364:2366] CHIP:DMG: - [1689665008.861729][2364:2366] CHIP:DMG: SuppressResponse = true, - [1689665008.861760][2364:2366] CHIP:DMG: InteractionModelRevision = 1 - [1689665008.861789][2364:2366] CHIP:DMG: } - disabled: true - - - label: - "Step 6: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order." - PICS: S.C.AO-READ - verification: | - ./chip-tool scenes read last-configured-by 1 1 - - [1689666947.328580][4750:4752] CHIP:DMG: ReportDataMessage = - [1689666947.328619][4750:4752] CHIP:DMG: { - [1689666947.328650][4750:4752] CHIP:DMG: AttributeReportIBs = - [1689666947.328692][4750:4752] CHIP:DMG: [ - [1689666947.328723][4750:4752] CHIP:DMG: AttributeReportIB = - [1689666947.328771][4750:4752] CHIP:DMG: { - [1689666947.328806][4750:4752] CHIP:DMG: AttributeDataIB = - [1689666947.328851][4750:4752] CHIP:DMG: { - [1689666947.328892][4750:4752] CHIP:DMG: DataVersion = 0xf12a63c8, - [1689666947.328932][4750:4752] CHIP:DMG: AttributePathIB = - [1689666947.328974][4750:4752] CHIP:DMG: { - [1689666947.329015][4750:4752] CHIP:DMG: Endpoint = 0x1, - [1689666947.329060][4750:4752] CHIP:DMG: Cluster = 0x5, - [1689666947.329105][4750:4752] CHIP:DMG: Attribute = 0x0000_0005, - [1689666947.329146][4750:4752] CHIP:DMG: } - [1689666947.329189][4750:4752] CHIP:DMG: - [1689666947.329231][4750:4752] CHIP:DMG: Data = NULL - [1689666947.329270][4750:4752] CHIP:DMG: }, - [1689666947.329312][4750:4752] CHIP:DMG: - [1689666947.329346][4750:4752] CHIP:DMG: }, - [1689666947.329386][4750:4752] CHIP:DMG: - [1689666947.329416][4750:4752] CHIP:DMG: ], - [1689666947.329455][4750:4752] CHIP:DMG: - [1689666947.329486][4750:4752] CHIP:DMG: SuppressResponse = true, - [1689666947.329518][4750:4752] CHIP:DMG: InteractionModelRevision = 1 - [1689666947.329547][4750:4752] CHIP:DMG: } - disabled: true - - - label: - "Step 7: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order." - PICS: S.C.AO-WRITE - verification: | - This cluster doesn't have any writable attributes - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml index c6b39dba4f8fa3..b9977898b1d5ec 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml @@ -30,65 +30,75 @@ tests: - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." verification: | - Verify that the DUT response contains the ClusterRevision attribute and has the value 1. + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read cluster-revision 1 1 + + Verify the "ClusterRevision" value is of unit16 and reflects the highest revision number 1 on the TH(Chip-tool) and below is the sample log provided for the raspi platform: + + [1690189572.337445][16132:16134] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFFD DataVersion: 473867547 + [1690189572.337466][16132:16134] CHIP:TOO: ClusterRevision: 1 disabled: true - label: "Step 3: TH reads from the DUT the FeatureMap attribute." verification: | - Verify that the DUT response contains the FeatureMap attribute and have the following bit set: + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read feature-map 1 1 - bit 0: SHALL be 1 if and only if TCCM.S.F00(DEPONOFF) + On the TH(Chip-tool) Log, Verify featureMap value is 1 If TCCM.S.F00(DEPONOFF) true, Otherwise 0, and below is the sample log provided for the raspi platform: + + [1690189585.723124][16135:16137] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFFC DataVersion: 473867547 + [1690189585.723143][16135:16137] CHIP:TOO: FeatureMap: 1 disabled: true - label: "Step 4: TH reads from the DUT the AttributeList attribute." verification: | - Verify that the DUT response contains the AttributeList attribute and have the list of supported attributes: - - The list SHALL include all the mandatory entries: - 0x0000, 0x0001, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd. - - The list MAY include these optional entries: - - 0x0002: SHALL be included if and only if TCCM.S.A0002(StartUpMode) - - The list include entries based on feature support: - - - 0x0003 SHALL be included if and only if TCCM.S.F00(DEPONOFF) - - - and SHALL NOT be included otherwise. - - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) - + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read attribute-list 1 1 + + Verify the "AttributeList " should include the mandatory attributes (values 0, 1), + - global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528) and + - list may include optional attribute(value 0x0002), if MOD.S.A0004(StartUpMode) supports, + - list contains feature dependent attribute (values 0x0003), if MOD.S.F00(DEPONOFF) is true on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1690189598.832157][16140:16142] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFFB DataVersion: 473867547 + [1690189598.832176][16140:16142] CHIP:TOO: AttributeList: 10 entries + [1690189598.832181][16140:16142] CHIP:TOO: [1]: 0 + [1690189598.832184][16140:16142] CHIP:TOO: [2]: 1 + [1690189598.832187][16140:16142] CHIP:TOO: [3]: 2 + [1690189598.832190][16140:16142] CHIP:TOO: [4]: 3 + [1690189598.832193][16140:16142] CHIP:TOO: [5]: 65528 + [1690189598.832196][16140:16142] CHIP:TOO: [6]: 65529 + [1690189598.832199][16140:16142] CHIP:TOO: [7]: 65530 + [1690189598.832202][16140:16142] CHIP:TOO: [8]: 65531 + [1690189598.832206][16140:16142] CHIP:TOO: [9]: 65532 + [1690189598.832210][16140:16142] CHIP:TOO: [10]: 65533 + disabled: true - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. + - label: "Step 5: TH reads from the DUT the EventList attribute." + verification: | + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read event-list 1 1 + Verify "EventList" contains a list of supported events, for this cluster the list is emty(0 entries) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + [1690189614.840538][16147:16149] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFFA DataVersion: 473867547 + [1690189614.840589][16147:16149] CHIP:TOO: EventList: 0 entries disabled: true - - label: "Step 5: TH reads from the DUT the AcceptedCommandList attribute." + - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." verification: | - Verify that the DUT response contains the AcceptedCommandList attribute and have the list of Accepted Command: - The list SHALL include all the mandatory entries: + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read accepted-command-list 1 1 - 0x00 - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF) + Verify the "AcceptedCommandList" contains a list of mandatory commands (value 0) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. - - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + [1690189624.827078][16152:16154] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFF9 DataVersion: 473867547 + [1690189624.827136][16152:16154] CHIP:TOO: AcceptedCommandList: 1 entries + [1690189624.827158][16152:16154] CHIP:TOO: [1]: 0 disabled: true - - label: "Step 6: TH reads from the DUT the GeneratedCommandList attribute." + - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." verification: | - Verify that the DUT response contains the GeneratedCommandList attribute and have the list of Generated Command: - The list SHALL include all the mandatory entries: - - 0x01 - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF) + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read generated-command-list 1 1 - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. + Verify " GeneratedCommandList" contains a list of mandatory commands (value 1) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + [1690189651.608897][16155:16157] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFF8 DataVersion: 473867547 + [1690189651.608955][16155:16157] CHIP:TOO: GeneratedCommandList: 1 entries + [1690189651.608973][16155:16157] CHIP:TOO: [1]: 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_1_2.yaml index 7dec81834b44c9..41a95cff88e004 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_1_2.yaml @@ -34,42 +34,73 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: TCCM.S.A0000 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has at least one entry - - Verify that each ModeOptionsStruct entry has a unique Mode field value - - Verify that each ModeOptionsStruct entry has a unique Label field value - - Verify that each ModeOptionsStruct entry’s ModeTags field, if not empty, has: - the values of the Value fields that are not larger than 16 bits - - for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range - - if the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 - - - - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field - - Save the Mode field values as supported_modes_dut + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries. + - Verify that list should contain at least one entry + - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value + - ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range + - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 + - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690189665.585798][16159:16161] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0000 DataVersion: 473867547 + [1690189665.585885][16159:16161] CHIP:TOO: SupportedModes: 3 entries + [1690189665.585924][16159:16161] CHIP:TOO: [1]: { + [1690189665.585936][16159:16161] CHIP:TOO: Label: Normal + [1690189665.585955][16159:16161] CHIP:TOO: Mode: 0 + [1690189665.585970][16159:16161] CHIP:TOO: ModeTags: 1 entries + [1690189665.585997][16159:16161] CHIP:TOO: [1]: { + [1690189665.586008][16159:16161] CHIP:TOO: Value: 0 + [1690189665.586018][16159:16161] CHIP:TOO: } + [1690189665.586028][16159:16161] CHIP:TOO: } + [1690189665.586050][16159:16161] CHIP:TOO: [2]: { + [1690189665.586060][16159:16161] CHIP:TOO: Label: Rapid Cool + [1690189665.586068][16159:16161] CHIP:TOO: Mode: 1 + [1690189665.586081][16159:16161] CHIP:TOO: ModeTags: 1 entries + [1690189665.586094][16159:16161] CHIP:TOO: [1]: { + [1690189665.586105][16159:16161] CHIP:TOO: Value: 16384 + [1690189665.586114][16159:16161] CHIP:TOO: } + [1690189665.586124][16159:16161] CHIP:TOO: } + [1690189665.586143][16159:16161] CHIP:TOO: [3]: { + [1690189665.586152][16159:16161] CHIP:TOO: Label: Rapid Freeze + [1690189665.586162][16159:16161] CHIP:TOO: Mode: 2 + [1690189665.586175][16159:16161] CHIP:TOO: ModeTags: 1 entries + [1690189665.586189][16159:16161] CHIP:TOO: [1]: { + [1690189665.586198][16159:16161] CHIP:TOO: Value: 16385 + [1690189665.586207][16159:16161] CHIP:TOO: } + [1690189665.586217][16159:16161] CHIP:TOO: } disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer from supported_modes_dut + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + + [1690189682.782276][16162:16164] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 473867547 + [1690189682.782314][16162:16164] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the OnMode attribute." PICS: TCCM.S.A0003 verification: | - Verify that the DUT response contains an integer from supported_modes_dut + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read on-mode 1 1 + + Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform, Here OnMode attribute value is Null + + [1690189699.711642][16169:16171] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0003 DataVersion: 473867547 + [1690189699.711687][16169:16171] CHIP:TOO: OnMode: null disabled: true - label: "Step 5: TH reads from the DUT the StartUpMode attribute." PICS: TCCM.S.A0002 verification: | - Verify that the DUT response contains an integer from supported_modes_dut + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read start-up-mode 1 1 + + Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer(As per spec default value is null) and value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null + + [1690189713.973520][16173:16175] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0002 DataVersion: 473867547 + [1690189713.973576][16173:16175] CHIP:TOO: StartUpMode: null disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_2_1.yaml index 1978da84910f03..90b3751ebb632f 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_2_1.yaml @@ -34,107 +34,183 @@ tests: - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: TCCM.S.A0000 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 + + Verify that the DUT response contains list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1690189665.585798][16159:16161] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0000 DataVersion: 473867547 + [1690189665.585885][16159:16161] CHIP:TOO: SupportedModes: 3 entries + [1690189665.585924][16159:16161] CHIP:TOO: [1]: { + [1690189665.585936][16159:16161] CHIP:TOO: Label: Normal + [1690189665.585955][16159:16161] CHIP:TOO: Mode: 0 + [1690189665.585970][16159:16161] CHIP:TOO: ModeTags: 1 entries + [1690189665.585997][16159:16161] CHIP:TOO: [1]: { + [1690189665.586008][16159:16161] CHIP:TOO: Value: 0 + [1690189665.586018][16159:16161] CHIP:TOO: } + [1690189665.586028][16159:16161] CHIP:TOO: } + [1690189665.586050][16159:16161] CHIP:TOO: [2]: { + [1690189665.586060][16159:16161] CHIP:TOO: Label: Rapid Cool + [1690189665.586068][16159:16161] CHIP:TOO: Mode: 1 + [1690189665.586081][16159:16161] CHIP:TOO: ModeTags: 1 entries + [1690189665.586094][16159:16161] CHIP:TOO: [1]: { + [1690189665.586105][16159:16161] CHIP:TOO: Value: 16384 + [1690189665.586114][16159:16161] CHIP:TOO: } + [1690189665.586124][16159:16161] CHIP:TOO: } + [1690189665.586143][16159:16161] CHIP:TOO: [3]: { + [1690189665.586152][16159:16161] CHIP:TOO: Label: Rapid Freeze + [1690189665.586162][16159:16161] CHIP:TOO: Mode: 2 + [1690189665.586175][16159:16161] CHIP:TOO: ModeTags: 1 entries + [1690189665.586189][16159:16161] CHIP:TOO: [1]: { + [1690189665.586198][16159:16161] CHIP:TOO: Value: 16385 + [1690189665.586207][16159:16161] CHIP:TOO: } + [1690189665.586217][16159:16161] CHIP:TOO: } disabled: true - - label: "Step 2: TH reads from the DUT the CurrentMode attribute." + - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 - Save the value as old_current_mode_dut + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut + - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th + [1690189753.281932][16180:16182] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 473867547 + [1690189753.281979][16180:16182] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 3: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 4: TH sends a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut" PICS: TCCM.S.C00.Rsp verification: | - Verify that the DUT response contains a ChangeToModeResponse command w/ data fields: * Status, set to Success(0x00). + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode change-to-mode 0 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1689991627.698450][142731:142733] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Command 0x0000_0001 + [1689991627.698488][142731:142733] CHIP:TOO: ChangeToModeResponse: { + [1689991627.698499][142731:142733] CHIP:TOO: status: 0 + [1689991627.698507][142731:142733] CHIP:TOO: } disabled: true - label: - "Step 4: Manually put the device in a state from which it will FAIL to + "Step 5: Manually put the device in a state from which it will FAIL to transition to PIXIT.TCCM.MODE_CHANGE_FAIL" + PICS: PIXIT.TCCM.CAN_TEST_MODE_FAILURE verification: | - + Manual operation required disabled: true - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + - label: "Step 6: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 - Save the value as old_current_mode_dut + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + + [1689991744.646114][142740:142742] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 2299631070 + [1689991744.646165][142740:142742] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 6: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.TCCM.MODE_CHANGE_FAIL" - PICS: TCCM.S.C00.Rsp + PICS: PIXIT.TCCM.CAN_TEST_MODE_FAILURE && TCCM.S.C00.Rsp verification: | - Verify that the DUT responds with a ChangeToModeResponse command. + Note : Please skip this step as SDK is not enabled with this failure response - Verify that the Status field is set to GenericFailure(0x02) or in the MfgCodes (0x80 to 0xBF) range + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode change-to-mode 2 1 1 - Verify that the StatusText field has a length between 1 and 64 + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a GenericFailure(0x02) status response and below is the sample log provided for the raspi platform: + + [1690208444.427313][19616:19618] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Command 0x0000_0001 + [1690208444.427473][19616:19618] CHIP:TOO: ChangeToModeResponse: { + [1690208444.427482][19616:19618] CHIP:TOO: status: 0 + [1690208444.427486][19616:19618] CHIP:TOO: } disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value equal to old_current_mode_dut + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + Verify on TH(chip-tool), CurrentMode attribute value is an integer value and equal to old_current_mode_dut below is the sample log provided for the raspi platform,Here CurrentMode attribute value is 0 + + [1689991744.646114][142740:142742] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 2299631070 + [1689991744.646165][142740:142742] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 8: Manually put the device in a state from which it will + "Step 9: Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.TCCM.MODE_CHANGE_OK" verification: | - + Manual operation required disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - Save the value as old_current_mode_dut + [1689991744.646114][142740:142742] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 2299631070 + [1689991744.646165][142740:142742] CHIP:TOO: CurrentMode: 0 disabled: true - label: - "Step 10: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 11: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.TCCM.MODE_CHANGE_OK" PICS: TCCM.S.C00.Rsp verification: | - Verify that the DUT responds with a ChangeToModeResponse command. + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode change-to-mode 1 1 1 - Verify that the Status field is set to Success(0x00) + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690189985.803199][16357:16359] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Command 0x0000_0001 + [1690189985.803213][16357:16359] CHIP:TOO: ChangeToModeResponse: { + [1690189985.803220][16357:16359] CHIP:TOO: status: 0 + [1690189985.803224][16357:16359] CHIP:TOO: } disabled: true - - label: "Step 11: TH reads from the DUT the CurrentMode attribute." + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value equal to PIXIT.TCCM.MODE_CHANGE_OK + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 11, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 + + [1690190007.564500][16361:16363] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 473867552 + [1690190007.564538][16361:16363] CHIP:TOO: CurrentMode: 1 disabled: true - label: - "Step 12: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 13: TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th" PICS: TCCM.S.C00.Rsp verification: | - Verify that the DUT responds with a ChangeToModeResponse command. + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode change-to-mode 3 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a UnsupportedMode(0x01) status response and below is the sample log provided for the raspi platform: - Verify that the Status field is set to UnsupportedMode(0x01). + [1690190041.868458][16365:16367] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Command 0x0000_0001 + [1690190041.868514][16365:16367] CHIP:TOO: ChangeToModeResponse: { + [1690190041.868518][16365:16367] CHIP:TOO: status: 1 + [1690190041.868521][16365:16367] CHIP:TOO: } disabled: true - - label: "Step 13: TH reads from the DUT the CurrentMode attribute." + - label: "Step 14: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value equal to PIXIT.TCCM.MODE_CHANGE_OK + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 12, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 + + [1690190081.598522][16369:16371] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 473867552 + [1690190081.598595][16369:16371] CHIP:TOO: CurrentMode: 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml index 030a1fd97419d5..0999a37d8a8fae 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml @@ -21,6 +21,27 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + 1. Refrigerator and Temperature Controlled Cabinet and OnOff clusters are available on the same endpoint + + 2. The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. + disabled: true + + - label: "Note" + verification: | + To execute this test case set onmode to any integer value because as default it value has null. + + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690190139.816096][16383:16385] CHIP:DMG: StatusIB = + [1690190139.816100][16383:16385] CHIP:DMG: { + [1690190139.816102][16383:16385] CHIP:DMG: status = 0x00 (SUCCESS), + [1690190139.816105][16383:16385] CHIP:DMG: }, + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -31,31 +52,66 @@ tests: - label: "Step 2: TH reads from the DUT the OnMode attribute." PICS: TCCM.S.A0003 && TCCM.S.F00 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read on-mode 1 1 + + On TH(chip-tool), Verify that OnMode attribute value is an integer or Null + Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - Save the value as on_mode_dut + [1690190167.005388][16387:16389] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0003 DataVersion: 473867556 + [1690190167.005447][16387:16389] CHIP:TOO: OnMode: 0 disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 && TCCM.S.F00 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute is an integer. + Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - Save the value as old_current_mode_dut + NOTE: If on_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. - If on_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + [1690190333.843046][16430:16432] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 2612443001 + [1690190333.843064][16430:16432] CHIP:TOO: CurrentMode: 0 disabled: true - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: TCCM.S.A0000 && TCCM.S.F00 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th. + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690190348.956716][16435:16437] CHIP:DMG: } + [1690190348.956853][16435:16437] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0000 DataVersion: 2612443001 + [1690190348.956895][16435:16437] CHIP:TOO: SupportedModes: 3 entries + [1690190348.956919][16435:16437] CHIP:TOO: [1]: { + [1690190348.956924][16435:16437] CHIP:TOO: Label: Normal + [1690190348.956929][16435:16437] CHIP:TOO: Mode: 0 + [1690190348.956935][16435:16437] CHIP:TOO: ModeTags: 1 entries + [1690190348.956952][16435:16437] CHIP:TOO: [1]: { + [1690190348.956955][16435:16437] CHIP:TOO: Value: 0 + [1690190348.956958][16435:16437] CHIP:TOO: } + [1690190348.956961][16435:16437] CHIP:TOO: } + [1690190348.956967][16435:16437] CHIP:TOO: [2]: { + [1690190348.956970][16435:16437] CHIP:TOO: Label: Rapid Cool + [1690190348.956972][16435:16437] CHIP:TOO: Mode: 1 + [1690190348.956976][16435:16437] CHIP:TOO: ModeTags: 1 entries + [1690190348.956980][16435:16437] CHIP:TOO: [1]: { + [1690190348.956982][16435:16437] CHIP:TOO: Value: 16384 + [1690190348.956984][16435:16437] CHIP:TOO: } + [1690190348.956987][16435:16437] CHIP:TOO: } + [1690190348.956992][16435:16437] CHIP:TOO: [3]: { + [1690190348.956994][16435:16437] CHIP:TOO: Label: Rapid Freeze + [1690190348.956997][16435:16437] CHIP:TOO: Mode: 2 + [1690190348.957000][16435:16437] CHIP:TOO: ModeTags: 1 entries + [1690190348.957003][16435:16437] CHIP:TOO: [1]: { + [1690190348.957006][16435:16437] CHIP:TOO: Value: 16385 + [1690190348.957008][16435:16437] CHIP:TOO: } + [1690190348.957010][16435:16437] CHIP:TOO: } disabled: true - label: @@ -63,25 +119,50 @@ tests: to new_mode_th" PICS: TCCM.S.C00.Rsp && TCCM.S.F00 verification: | - Verify that the DUT response contains a ChangeToModeResponse command w/ data fields: * Status, set to Success(0x00). + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690190379.801241][16449:16451] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Command 0x0000_0001 + [1690190379.801256][16449:16451] CHIP:TOO: ChangeToModeResponse: { + [1690190379.801260][16449:16451] CHIP:TOO: status: 0 + [1690190379.801263][16449:16451] CHIP:TOO: } disabled: true - label: "Step 6: TH sends a Off command to the DUT" PICS: OO.S.C00.Rsp && TCCM.S.F00 verification: | - Verify DUT responds w/ status SUCCESS(0x00) + ./chip-tool onoff off 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931101.118656][20709:20711] CHIP:DMG: StatusIB = + [1684931101.118659][20709:20711] CHIP:DMG: { + [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931101.118665][20709:20711] CHIP:DMG: }, disabled: true - label: "Step 7: TH sends a On command to the DUT" PICS: OO.S.C01.Rsp && TCCM.S.F00 verification: | - Verify DUT responds w/ status SUCCESS(0x00) + ./chip-tool onoff on 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931217.055514][20729:20731] CHIP:DMG: StatusIB = + [1684931217.055517][20729:20731] CHIP:DMG: { + [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931217.055523][20729:20731] CHIP:DMG: }, disabled: true - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 && TCCM.S.F00 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 + - The value is equal to on_mode_dut + [1690190401.931156][16461:16463] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 2612443003 + [1690190401.931176][16461:16463] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml index 7c2b43de5486f5..d7283b93401d3b 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml @@ -24,6 +24,19 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To Execute the TC-TCCM-3.2 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -34,50 +47,164 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: TCCM.S.A0002 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is an integer or Null + - Save the value as startup_mode_dut, below is the sample log provided for the raspi platform: + - If startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. + - Here startup_mode_dut is null proceed to step 3. - Save the value as startup_mode_dut + [1690541247.515223][2594:2596] CHIP:DMG: } + [1690541247.521286][2594:2596] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0002 DataVersion: 667171525 + [1690541247.523875][2594:2596] CHIP:TOO: StartUpMode: null disabled: true - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: TCCM.S.A0001 + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: TCCM.S.A0000 + verification: | + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690190590.967854][16509:16511] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0000 DataVersion: 899063585 + [1690190590.967878][16509:16511] CHIP:TOO: SupportedModes: 3 entries + [1690190590.967889][16509:16511] CHIP:TOO: [1]: { + [1690190590.967892][16509:16511] CHIP:TOO: Label: Normal + [1690190590.967895][16509:16511] CHIP:TOO: Mode: 0 + [1690190590.967899][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967904][16509:16511] CHIP:TOO: [1]: { + [1690190590.967907][16509:16511] CHIP:TOO: Value: 0 + [1690190590.967910][16509:16511] CHIP:TOO: } + [1690190590.967913][16509:16511] CHIP:TOO: } + [1690190590.967918][16509:16511] CHIP:TOO: [2]: { + [1690190590.967920][16509:16511] CHIP:TOO: Label: Rapid Cool + [1690190590.967923][16509:16511] CHIP:TOO: Mode: 1 + [1690190590.967926][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967929][16509:16511] CHIP:TOO: [1]: { + [1690190590.967932][16509:16511] CHIP:TOO: Value: 16384 + [1690190590.967934][16509:16511] CHIP:TOO: } + [1690190590.967937][16509:16511] CHIP:TOO: } + [1690190590.967942][16509:16511] CHIP:TOO: [3]: { + [1690190590.967944][16509:16511] CHIP:TOO: Label: Rapid Freeze + [1690190590.967946][16509:16511] CHIP:TOO: Mode: 2 + [1690190590.967950][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967953][16509:16511] CHIP:TOO: [1]: { + [1690190590.967956][16509:16511] CHIP:TOO: Value: 16385 + [1690190590.967958][16509:16511] CHIP:TOO: } + [1690190590.967961][16509:16511] CHIP:TOO: } + disabled: true + + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: TCCM.S.A0002 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode write start-up-mode 0 1 1 - Save the value as old_current_mode_dut + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + [1690190139.816096][16383:16385] CHIP:DMG: StatusIB = + [1690190139.816100][16383:16385] CHIP:DMG: { + [1690190139.816102][16383:16385] CHIP:DMG: status = 0x00 (SUCCESS), + [1690190139.816105][16383:16385] CHIP:DMG: }, disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - PICS: TCCM.S.A0000 + - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 - Verify that the list has two or more entries + On TH(chip-tool), Verify that CurrentMode attribute value is an integer + - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform: - Save the Mode field values as supported_modes_dut + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8 - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th. + [1690190562.418843][16505:16507] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 899063585 + [1690190562.418907][16505:16507] CHIP:TOO: CurrentMode: 0 + disabled: true + + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." + PICS: TCCM.S.A0000 + verification: | + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690190590.967854][16509:16511] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0000 DataVersion: 899063585 + [1690190590.967878][16509:16511] CHIP:TOO: SupportedModes: 3 entries + [1690190590.967889][16509:16511] CHIP:TOO: [1]: { + [1690190590.967892][16509:16511] CHIP:TOO: Label: Normal + [1690190590.967895][16509:16511] CHIP:TOO: Mode: 0 + [1690190590.967899][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967904][16509:16511] CHIP:TOO: [1]: { + [1690190590.967907][16509:16511] CHIP:TOO: Value: 0 + [1690190590.967910][16509:16511] CHIP:TOO: } + [1690190590.967913][16509:16511] CHIP:TOO: } + [1690190590.967918][16509:16511] CHIP:TOO: [2]: { + [1690190590.967920][16509:16511] CHIP:TOO: Label: Rapid Cool + [1690190590.967923][16509:16511] CHIP:TOO: Mode: 1 + [1690190590.967926][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967929][16509:16511] CHIP:TOO: [1]: { + [1690190590.967932][16509:16511] CHIP:TOO: Value: 16384 + [1690190590.967934][16509:16511] CHIP:TOO: } + [1690190590.967937][16509:16511] CHIP:TOO: } + [1690190590.967942][16509:16511] CHIP:TOO: [3]: { + [1690190590.967944][16509:16511] CHIP:TOO: Label: Rapid Freeze + [1690190590.967946][16509:16511] CHIP:TOO: Mode: 2 + [1690190590.967950][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967953][16509:16511] CHIP:TOO: [1]: { + [1690190590.967956][16509:16511] CHIP:TOO: Value: 16385 + [1690190590.967958][16509:16511] CHIP:TOO: } + [1690190590.967961][16509:16511] CHIP:TOO: } disabled: true - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set + "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: TCCM.S.C00.Rsp verification: | - Verify that the DUT response contains a ChangeToModeResponse command w/ data fields: * Status, set to Success(0x00). + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode change-to-mode 2 1 1 + + Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690190614.263418][16516:16518] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Command 0x0000_0001 + [1690190614.263432][16516:16518] CHIP:TOO: ChangeToModeResponse: { + [1690190614.263438][16516:16518] CHIP:TOO: status: 0 + [1690190614.263441][16516:16518] CHIP:TOO: } + disabled: true + + - label: "Step 8: Physically power cycle the device" + verification: | + Physically power cycle the device disabled: true - - label: "Step 6: Physically power cycle the device" + - label: "Step 9: TH reads from the DUT the StartUpMode attribute." + PICS: TCCM.S.A0002 verification: | + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is an integer + - Save the value as new_start_up_mode_dut + - The value is equal to new_start_up_mode_th and below is the sample log provided for the raspi platform, Here StartUpMode value is 0 + [1690541859.062480][2695:2697] CHIP:DMG: } + [1690541859.062677][2695:2697] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0002 DataVersion: 1628543926 + [1690541859.062764][2695:2697] CHIP:TOO: StartUpMode: 0 disabled: true - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - The value is equal to startup_mode_dut + [1690190646.897310][16529:16531] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 3922115677 + [1690190646.897357][16529:16531] CHIP:TOO: CurrentMode: 0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml index 86efebd44626e1..f8f067844dcc96 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml @@ -26,6 +26,19 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + To Execute the TC-TCC-3.3 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -36,68 +49,199 @@ tests: - label: "Step 2: TH reads from the DUT the StartUpMode attribute." PICS: TCCM.S.A0002 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is an integer or Null + - Save the value as startup_mode_dut, below is the sample log provided for the raspi platform: + - If startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. + - Here startup_mode_dut is null proceed to step 3. - Save the value as startup_mode_dut + [1690541247.515223][2594:2596] CHIP:DMG: } + [1690541247.521286][2594:2596] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0002 DataVersion: 667171525 + [1690541247.523875][2594:2596] CHIP:TOO: StartUpMode: null disabled: true - - label: "Step 3: TH reads from the DUT the OnMode attribute." - PICS: TCCM.S.A0003 && TCCM.S.A0002 + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: TCCM.S.A0000 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690190590.967854][16509:16511] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0000 DataVersion: 899063585 + [1690190590.967878][16509:16511] CHIP:TOO: SupportedModes: 3 entries + [1690190590.967889][16509:16511] CHIP:TOO: [1]: { + [1690190590.967892][16509:16511] CHIP:TOO: Label: Normal + [1690190590.967895][16509:16511] CHIP:TOO: Mode: 0 + [1690190590.967899][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967904][16509:16511] CHIP:TOO: [1]: { + [1690190590.967907][16509:16511] CHIP:TOO: Value: 0 + [1690190590.967910][16509:16511] CHIP:TOO: } + [1690190590.967913][16509:16511] CHIP:TOO: } + [1690190590.967918][16509:16511] CHIP:TOO: [2]: { + [1690190590.967920][16509:16511] CHIP:TOO: Label: Rapid Cool + [1690190590.967923][16509:16511] CHIP:TOO: Mode: 1 + [1690190590.967926][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967929][16509:16511] CHIP:TOO: [1]: { + [1690190590.967932][16509:16511] CHIP:TOO: Value: 16384 + [1690190590.967934][16509:16511] CHIP:TOO: } + [1690190590.967937][16509:16511] CHIP:TOO: } + [1690190590.967942][16509:16511] CHIP:TOO: [3]: { + [1690190590.967944][16509:16511] CHIP:TOO: Label: Rapid Freeze + [1690190590.967946][16509:16511] CHIP:TOO: Mode: 2 + [1690190590.967950][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967953][16509:16511] CHIP:TOO: [1]: { + [1690190590.967956][16509:16511] CHIP:TOO: Value: 16385 + [1690190590.967958][16509:16511] CHIP:TOO: } + [1690190590.967961][16509:16511] CHIP:TOO: } + disabled: true - Save the value as old_on_mode_dut + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: TCCM.S.A0002 + verification: | + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode write start-up-mode 0 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - If startup_mode_dut is equal to old_on_mode_dut proceed to step 4. Else proceed to step 6. + [1690190139.816096][16383:16385] CHIP:DMG: StatusIB = + [1690190139.816100][16383:16385] CHIP:DMG: { + [1690190139.816102][16383:16385] CHIP:DMG: status = 0x00 (SUCCESS), + [1690190139.816105][16383:16385] CHIP:DMG: }, disabled: true - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - PICS: TCCM.S.A0000 && TCCM.S.A0002 + - label: "Step 5: TH reads from the DUT the OnMode attribute." + PICS: TCCM.S.A0003 && TCCM.S.A0002 verification: | - Verify that the DUT response contains a list of ModeOptionsStruct entries + Set onmode to any integer value because as default it value has null. + + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - Verify that the list has two or more entries + [1690190824.443367][16580:16582] CHIP:DMG: StatusIB = + [1690190824.443379][16580:16582] CHIP:DMG: { + [1690190824.443391][16580:16582] CHIP:DMG: status = 0x00 (SUCCESS), + [1690190824.443402][16580:16582] CHIP:DMG: }, - Save the Mode field values as supported_modes_dut + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read on-mode 1 1 - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th. + On TH(chip-tool), Verify that OnMode attribute value is an integer + -Save the value as old_on_mode_du, t below is the sample log provided for the raspi platform, here OnMode attribute value is 0 + + [1690190846.367481][16585:16587] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0003 DataVersion: 978521150 + [1690190846.367522][16585:16587] CHIP:TOO: OnMode: 0 + + If startup_mode_dut is equal to old_on_mode_dut proceed to step 6. Else proceed to step 8. + disabled: true + + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." + PICS: TCCM.S.A0000 && TCCM.S.A0002 + verification: | + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1690190590.967854][16509:16511] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0000 DataVersion: 899063585 + [1690190590.967878][16509:16511] CHIP:TOO: SupportedModes: 3 entries + [1690190590.967889][16509:16511] CHIP:TOO: [1]: { + [1690190590.967892][16509:16511] CHIP:TOO: Label: Normal + [1690190590.967895][16509:16511] CHIP:TOO: Mode: 0 + [1690190590.967899][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967904][16509:16511] CHIP:TOO: [1]: { + [1690190590.967907][16509:16511] CHIP:TOO: Value: 0 + [1690190590.967910][16509:16511] CHIP:TOO: } + [1690190590.967913][16509:16511] CHIP:TOO: } + [1690190590.967918][16509:16511] CHIP:TOO: [2]: { + [1690190590.967920][16509:16511] CHIP:TOO: Label: Rapid Cool + [1690190590.967923][16509:16511] CHIP:TOO: Mode: 1 + [1690190590.967926][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967929][16509:16511] CHIP:TOO: [1]: { + [1690190590.967932][16509:16511] CHIP:TOO: Value: 16384 + [1690190590.967934][16509:16511] CHIP:TOO: } + [1690190590.967937][16509:16511] CHIP:TOO: } + [1690190590.967942][16509:16511] CHIP:TOO: [3]: { + [1690190590.967944][16509:16511] CHIP:TOO: Label: Rapid Freeze + [1690190590.967946][16509:16511] CHIP:TOO: Mode: 2 + [1690190590.967950][16509:16511] CHIP:TOO: ModeTags: 1 entries + [1690190590.967953][16509:16511] CHIP:TOO: [1]: { + [1690190590.967956][16509:16511] CHIP:TOO: Value: 16385 + [1690190590.967958][16509:16511] CHIP:TOO: } + [1690190590.967961][16509:16511] CHIP:TOO: } disabled: true - label: - "Step 5: TH writes to the DUT the OnMode attribute with the + "Step 7: TH writes to the DUT the OnMode attribute with the new_mode_th value" PICS: TCCM.S.A0003 verification: | - Verify DUT responds w/ status SUCCESS(0x00) + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode write on-mode 1 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690190905.134866][16594:16596] CHIP:DMG: StatusIB = + [1690190905.134869][16594:16596] CHIP:DMG: { + [1690190905.134873][16594:16596] CHIP:DMG: status = 0x00 (SUCCESS), + [1690190905.134876][16594:16596] CHIP:DMG: }, disabled: true - - label: "Step 6: TH reads from the DUT the OnMode attribute." + - label: "Step 8: TH reads from the DUT the OnMode attribute." PICS: TCCM.S.A0003 && TCCM.S.F00 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read on-mode 1 1 - Save the value as new_on_mode_dut + On TH(chip-tool), Verify that OnMode attribute value is an integer + - Save the value as new_on_mode_dut and value is equal to new_mode_th, below is the sample log provided for the raspi platform, here OnMode attribute value is 1 - The value is equal to new_mode_th + [1690190846.367481][16585:16587] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0003 DataVersion: 978521150 + [1690190846.367522][16585:16587] CHIP:TOO: OnMode: 1 disabled: true - label: - "Step 7: TH writes to the DUT the StartUpOnOff attribute with the + "Step 9: TH writes to the DUT the StartUpOnOff attribute with the value 1." PICS: OO.S.A4003 verification: | - Verify DUT responds w/ status SUCCESS(0x00) + ./chip-tool onoff write start-up-on-off 1 1 1 + + On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690180270.884152][14228:14230] CHIP:DMG: { + [1690180270.884156][14228:14230] CHIP:DMG: status = 0x00 (SUCCESS), + [1690180270.884158][14228:14230] CHIP:DMG: }, + disabled: true + + - label: "Step 10: Physically power cycle the device" + verification: | + Physically power cycle the device disabled: true - - label: "Step 8: Physically power cycle the device" + - label: "Step 11: TH reads from the DUT the StartUpMode attribute." + PICS: TCCM.S.A0002 verification: | + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read start-up-mode 1 1 + On TH(chip-tool), Verify that StartUpMode attribute value is an integer value is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform , here StartUpMode is 0 + + [1690541247.515223][2594:2596] CHIP:DMG: } + [1690541247.521286][2594:2596] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0002 DataVersion: 667171525 + [1690541247.523875][2594:2596] CHIP:TOO: StartUpMode: 0 disabled: true - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." PICS: TCCM.S.A0001 verification: | - Verify that the DUT response contains an integer value + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to new_on_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 - The value is equal to new_on_mode_dut + [1690190945.261971][16605:16607] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 4180211608 + [1690190945.261982][16605:16607] CHIP:TOO: CurrentMode: 1 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCTL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TCTL_2_1.yaml index f70fad20638661..a31f3ccf9a1775 100644 --- a/src/app/tests/suites/certification/Test_TC_TCTL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCTL_2_1.yaml @@ -35,4 +35,15 @@ tests: PICS: TCTL.S.A0003 verification: | ./chip-tool temperaturecontrol read step 1 1 + + On TH(chip-tool), Verify that the DUT response contains a temperature value <= TCTL.S.A0002(MaxTemperature) - TCTL.S.A0001(MinTemperature) + and (TCTL.S.A0002(MaxTemperature) - TCTL.S.A0001(MinTemperature)) % TCTL.S.A0003(Step) == 0 + + + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0003 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: step: 0 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml index 398788f4ed8802..7806d2fce732ab 100644 --- a/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml @@ -36,16 +36,41 @@ tests: PICS: TCTL.S.A0000 verification: | ./chip-tool temperaturecontrol read temperature-setpoint 1 1 + On TH(chip-tool), Verify that the DUT response contains a temperature with value between MinTemperature and TCTL.S.A0002(MaxTemperature) inclusive. + + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0000 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: TemperatureSetpoint : 0 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: "Step 3: TH reads from the DUT the MinTemperature attribute" PICS: TCTL.S.A0001 verification: | ./chip-tool temperaturecontrol read min-temperature 1 1 + on TH(chip-tool), Verify that the DUT response contains a temperature with value less than TCTL.S.A0002(MaxTemperature). + + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0001 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: MinTemperature: 0 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: "Step 4: TH reads from the DUT the MaxTemperature attribute" PICS: TCTL.S.A0002 verification: | ./chip-tool temperaturecontrol read max-temperature 1 1 + + On TH(chip-tool), Verify that the DUT response contains a temperature with value greater than TCTL.S.A0001(MinTemperature). + + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0002 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: MaxTemperature: 0 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TIMESYNC_2_15.yaml b/src/app/tests/suites/certification/Test_TC_TIMESYNC_2_15.yaml deleted file mode 100644 index dea7e182c42dd1..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_TIMESYNC_2_15.yaml +++ /dev/null @@ -1,163 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 142.2.15. [TC-TIMESYNC-2.15] Endpoint composition with DUT as Server - -PICS: - - TIMESYNC.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: TH does a wildcard read of the time sync cluster UTCTime - attribute across all endpoints." - verification: | - ./chip-tool timesynchronization read utctime 1 0xFFFF - - On TH(Chip-tool), Verify that only one AttributeReportIB is returned for endpoint 0. - - [1688724683.563762][13887:13889] CHIP:DMG: } - [1688724683.563834][13887:13889] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0038 Attribute 0x0000_0000 DataVersion: 2061582322 - [1688724683.563870][13887:13889] CHIP:TOO: UTCTime: 742039883563331 - [1688724683.563926][13887:13889] CHIP:EM: <<< [E:22156i S:9939 M:104620514 (Ack:265588578)] (S) Msg TX to 1:0000000000000001 [8979] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1688724683.563939][13887:13889] CHIP:IN: (S) Sending msg 104620514 on secure session with LSID: 9939 - [1688724683.563964][13887:13889] CHIP:EM: Flushed pending ack for MessageCounter:265588578 on exchange 22156i - disabled: true - - - label: - "Step 2: TH does a wildcard read of the descriptor cluster ServerList - attribute across all endpoint." - verification: | - ./chip-tool descriptor read server-list 1 0xFFFF - On TH(Chip-tool), Verify that the time synchronization cluster id - 0x0038(56) is listed in the ServerList attribute from endpoint 0 and is not listed in the ServerList attribute for any other endpoints. - - [1688724759.304134][13899:13901] CHIP:DMG: } - [1688724759.304525][13899:13901] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 2397850349 - [1688724759.304584][13899:13901] CHIP:TOO: ServerList: 29 entries - [1688724759.304598][13899:13901] CHIP:TOO: [1]: 3 - [1688724759.304607][13899:13901] CHIP:TOO: [2]: 4 - [1688724759.304617][13899:13901] CHIP:TOO: [3]: 29 - [1688724759.304627][13899:13901] CHIP:TOO: [4]: 30 - [1688724759.304637][13899:13901] CHIP:TOO: [5]: 31 - [1688724759.304646][13899:13901] CHIP:TOO: [6]: 40 - [1688724759.304656][13899:13901] CHIP:TOO: [7]: 42 - [1688724759.304666][13899:13901] CHIP:TOO: [8]: 43 - [1688724759.304676][13899:13901] CHIP:TOO: [9]: 44 - [1688724759.304686][13899:13901] CHIP:TOO: [10]: 45 - [1688724759.304695][13899:13901] CHIP:TOO: [11]: 46 - [1688724759.304705][13899:13901] CHIP:TOO: [12]: 47 - [1688724759.304715][13899:13901] CHIP:TOO: [13]: 48 - [1688724759.304725][13899:13901] CHIP:TOO: [14]: 49 - [1688724759.304734][13899:13901] CHIP:TOO: [15]: 50 - [1688724759.304744][13899:13901] CHIP:TOO: [16]: 51 - [1688724759.304754][13899:13901] CHIP:TOO: [17]: 52 - [1688724759.304764][13899:13901] CHIP:TOO: [18]: 53 - [1688724759.304773][13899:13901] CHIP:TOO: [19]: 54 - [1688724759.304783][13899:13901] CHIP:TOO: [20]: 55 - [1688724759.304793][13899:13901] CHIP:TOO: [21]: 56 - [1688724759.304802][13899:13901] CHIP:TOO: [22]: 60 - [1688724759.304813][13899:13901] CHIP:TOO: [23]: 62 - [1688724759.304823][13899:13901] CHIP:TOO: [24]: 63 - [1688724759.304832][13899:13901] CHIP:TOO: [25]: 64 - [1688724759.304842][13899:13901] CHIP:TOO: [26]: 65 - [1688724759.304852][13899:13901] CHIP:TOO: [27]: 70 - [1688724759.304862][13899:13901] CHIP:TOO: [28]: 1029 - [1688724759.304872][13899:13901] CHIP:TOO: [29]: 4294048774 - [1688724759.305115][13899:13901] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1621835978 - [1688724759.305168][13899:13901] CHIP:TOO: ServerList: 69 entries - [1688724759.305177][13899:13901] CHIP:TOO: [1]: 3 - [1688724759.305187][13899:13901] CHIP:TOO: [2]: 4 - [1688724759.305197][13899:13901] CHIP:TOO: [3]: 5 - [1688724759.305207][13899:13901] CHIP:TOO: [4]: 6 - [1688724759.305217][13899:13901] CHIP:TOO: [5]: 7 - [1688724759.305226][13899:13901] CHIP:TOO: [6]: 8 - [1688724759.305236][13899:13901] CHIP:TOO: [7]: 15 - [1688724759.305246][13899:13901] CHIP:TOO: [8]: 29 - [1688724759.305256][13899:13901] CHIP:TOO: [9]: 30 - [1688724759.305265][13899:13901] CHIP:TOO: [10]: 37 - [1688724759.305275][13899:13901] CHIP:TOO: [11]: 47 - [1688724759.305285][13899:13901] CHIP:TOO: [12]: 59 - [1688724759.305295][13899:13901] CHIP:TOO: [13]: 64 - [1688724759.305304][13899:13901] CHIP:TOO: [14]: 65 - [1688724759.305314][13899:13901] CHIP:TOO: [15]: 69 - [1688724759.305323][13899:13901] CHIP:TOO: [16]: 80 - [1688724759.305333][13899:13901] CHIP:TOO: [17]: 87 - [1688724759.305343][13899:13901] CHIP:TOO: [18]: 91 - [1688724759.305353][13899:13901] CHIP:TOO: [19]: 113 - [1688724759.305362][13899:13901] CHIP:TOO: [20]: 114 - [1688724759.305372][13899:13901] CHIP:TOO: [21]: 115 - [1688724759.305382][13899:13901] CHIP:TOO: [22]: 116 - [1688724759.305392][13899:13901] CHIP:TOO: [23]: 117 - [1688724759.305402][13899:13901] CHIP:TOO: [24]: 118 - [1688724759.305411][13899:13901] CHIP:TOO: [25]: 119 - [1688724759.305421][13899:13901] CHIP:TOO: [26]: 120 - [1688724759.305431][13899:13901] CHIP:TOO: [27]: 121 - [1688724759.305441][13899:13901] CHIP:TOO: [28]: 122 - [1688724759.305450][13899:13901] CHIP:TOO: [29]: 123 - [1688724759.305460][13899:13901] CHIP:TOO: [30]: 124 - [1688724759.305470][13899:13901] CHIP:TOO: [31]: 257 - [1688724759.305480][13899:13901] CHIP:TOO: [32]: 258 - [1688724759.305490][13899:13901] CHIP:TOO: [33]: 259 - [1688724759.305499][13899:13901] CHIP:TOO: [34]: 512 - [1688724759.305509][13899:13901] CHIP:TOO: [35]: 513 - [1688724759.305519][13899:13901] CHIP:TOO: [36]: 514 - [1688724759.305529][13899:13901] CHIP:TOO: [37]: 516 - [1688724759.305539][13899:13901] CHIP:TOO: [38]: 768 - [1688724759.305549][13899:13901] CHIP:TOO: [39]: 769 - [1688724759.305558][13899:13901] CHIP:TOO: [40]: 1024 - [1688724759.305568][13899:13901] CHIP:TOO: [41]: 1026 - [1688724759.305578][13899:13901] CHIP:TOO: [42]: 1027 - [1688724759.305588][13899:13901] CHIP:TOO: [43]: 1028 - [1688724759.305598][13899:13901] CHIP:TOO: [44]: 1029 - [1688724759.305607][13899:13901] CHIP:TOO: [45]: 1030 - [1688724759.305617][13899:13901] CHIP:TOO: [46]: 1036 - [1688724759.305627][13899:13901] CHIP:TOO: [47]: 1037 - [1688724759.305637][13899:13901] CHIP:TOO: [48]: 1043 - [1688724759.305647][13899:13901] CHIP:TOO: [49]: 1045 - [1688724759.305657][13899:13901] CHIP:TOO: [50]: 1066 - [1688724759.305667][13899:13901] CHIP:TOO: [51]: 1067 - [1688724759.305676][13899:13901] CHIP:TOO: [52]: 1068 - [1688724759.305686][13899:13901] CHIP:TOO: [53]: 1069 - [1688724759.305696][13899:13901] CHIP:TOO: [54]: 1070 - [1688724759.305705][13899:13901] CHIP:TOO: [55]: 1071 - [1688724759.305715][13899:13901] CHIP:TOO: [56]: 1283 - [1688724759.305725][13899:13901] CHIP:TOO: [57]: 1284 - [1688724759.305734][13899:13901] CHIP:TOO: [58]: 1285 - [1688724759.305744][13899:13901] CHIP:TOO: [59]: 1286 - [1688724759.305754][13899:13901] CHIP:TOO: [60]: 1287 - [1688724759.305764][13899:13901] CHIP:TOO: [61]: 1288 - [1688724759.305773][13899:13901] CHIP:TOO: [62]: 1289 - [1688724759.305783][13899:13901] CHIP:TOO: [63]: 1290 - [1688724759.305793][13899:13901] CHIP:TOO: [64]: 1291 - [1688724759.305802][13899:13901] CHIP:TOO: [65]: 1292 - [1688724759.305812][13899:13901] CHIP:TOO: [66]: 1293 - [1688724759.305822][13899:13901] CHIP:TOO: [67]: 1294 - [1688724759.305832][13899:13901] CHIP:TOO: [68]: 2820 - [1688724759.305842][13899:13901] CHIP:TOO: [69]: 4294048773 - [1688724759.305881][13899:13901] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1550598832 - [1688724759.305897][13899:13901] CHIP:TOO: ServerList: 5 entries - [1688724759.305906][13899:13901] CHIP:TOO: [1]: 4 - [1688724759.305916][13899:13901] CHIP:TOO: [2]: 6 - [1688724759.305926][13899:13901] CHIP:TOO: [3]: 29 - [1688724759.305936][13899:13901] CHIP:TOO: [4]: 47 - [1688724759.305945][13899:13901] CHIP:TOO: [5]: 1030 - [1688724759.306032][13899:13901] CHIP:EM: <<< [E:9189i S:12449 M:231725041 (Ack:22667687)] (S) Msg TX to 1:0000000000000001 [8979] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1688724759.306046][13899:13901] CHIP:IN: (S) Sending msg 231725041 on secure session with LSID: 12449 - [1688724759.306081][13899:13901] CHIP:EM: Flushed pending ack for MessageCounter:22667687 on exchange 9189i - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TMP_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_TMP_3_1_Simulated.yaml deleted file mode 100644 index fcef638b9e000a..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_TMP_3_1_Simulated.yaml +++ /dev/null @@ -1,659 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 6.3.1. [TC-TMP-3.1] Attributes with client as DUT - -PICS: - - TMP.C - - TMP.C.AM-READ - - TMP.C.AO-READ - - TMP.C.AM-WRITE - - TMP.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Temperature Measurement" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: MeasuredValue" - wait: "readAttribute" - attribute: "MeasuredValue" - - - label: "Read attribute: MinMeasuredValue" - wait: "readAttribute" - attribute: "MinMeasuredValue" - - - label: "Read attribute: MaxMeasuredValue" - wait: "readAttribute" - attribute: "MaxMeasuredValue" - - - label: "Read attribute: Tolerance" - wait: "readAttribute" - attribute: "Tolerance" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - To verify all below steps use all-clusters-minimal-app - - ./chip-tool temperaturemeasurement read measured-value 1 1 - Verify DUT receives measured-value attribute response on the TH(all-clusters-minimal-app) Log: - - [1666954493.877646][6087:6087] CHIP:EM: Handling via exchange: 25543r, Delegate: 0xaaaab0ad80e0 - [1666954493.877744][6087:6087] CHIP:IM: Received Read request - [1666954493.877919][6087:6087] CHIP:DMG: ReadRequestMessage = - [1666954493.877989][6087:6087] CHIP:DMG: { - [1666954493.878044][6087:6087] CHIP:DMG: AttributePathIBs = - [1666954493.878109][6087:6087] CHIP:DMG: [ - [1666954493.878172][6087:6087] CHIP:DMG: AttributePathIB = - [1666954493.878258][6087:6087] CHIP:DMG: { - [1666954493.878333][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666954493.878483][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666954493.878627][6087:6087] CHIP:DMG: Attribute = 0x0000_0000, - [1666954493.878815][6087:6087] CHIP:DMG: } - [1666954493.878899][6087:6087] CHIP:DMG: - [1666954493.878966][6087:6087] CHIP:DMG: ], - [1666954493.879039][6087:6087] CHIP:DMG: - [1666954493.879544][6087:6087] CHIP:DMG: isFabricFiltered = true, - [1666954493.879716][6087:6087] CHIP:DMG: InteractionModelRevision = 1 - [1666954493.879780][6087:6087] CHIP:DMG: }, - [1666954493.879963][6087:6087] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666954493.880294][6087:6087] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666954493.880375][6087:6087] CHIP:DMG: Cluster 402, Attribute 0 is dirty - [1666954493.880434][6087:6087] CHIP:DMG: Reading attribute: Cluster=0x0000_0402 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1666954493.880505][6087:6087] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0402 e=1 p=v - [1666954493.880583][6087:6087] CHIP:DMG: AccessControl: allowed - [1666954493.880703][6087:6087] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666954493.881294][6087:6087] CHIP:EM: <<< [E:25543r M:47295307 (Ack:14766592)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666954493.881411][6087:6087] CHIP:IN: (S) Sending msg 47295307 on secure session with LSID: 1274 - [1666954493.882135][6087:6087] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:47925 | 47295307 | [Interaction Model (1) / Report Data (0x05) / Session = 17330 / Exchange = 25543] - [1666954493.882240][6087:6087] CHIP:DMG: Header Flags = - [1666954493.882298][6087:6087] CHIP:DMG: { - [1666954493.882387][6087:6087] CHIP:DMG: Exchange (0x06) = - [1666954493.882444][6087:6087] CHIP:DMG: { - [1666954493.882504][6087:6087] CHIP:DMG: AckMsg = 14766592 - [1666954493.882560][6087:6087] CHIP:DMG: NeedsAck = true - [1666954493.882607][6087:6087] CHIP:DMG: } - [1666954493.882677][6087:6087] CHIP:DMG: } - [1666954493.882776][6087:6087] CHIP:DMG: - [1666954493.882851][6087:6087] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666954493.882907][6087:6087] CHIP:DMG: { - [1666954493.882963][6087:6087] CHIP:DMG: data = 00b243004babd102ad9c892c216d98202fc231b7185fd81d7cdfbbcbea762458172c6c84a150ec33023c18ec7a0b46e73335a7aaf43ca2b4e050c6d85c866bd7039f5bd37366 - [1666954493.883023][6087:6087] CHIP:DMG: buffer_ptr = 187650284036288 - [1666954493.883077][6087:6087] CHIP:DMG: } - [1666954493.883130][6087:6087] CHIP:DMG: - [1666954493.883299][6087:6087] CHIP:DMG: ReportDataMessage = - [1666954493.883367][6087:6087] CHIP:DMG: { - [1666954493.883422][6087:6087] CHIP:DMG: AttributeReportIBs = - [1666954493.883492][6087:6087] CHIP:DMG: [ - [1666954493.883554][6087:6087] CHIP:DMG: AttributeReportIB = - [1666954493.883720][6087:6087] CHIP:DMG: { - [1666954493.883803][6087:6087] CHIP:DMG: AttributeDataIB = - [1666954493.883936][6087:6087] CHIP:DMG: { - [1666954493.884016][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666954493.884157][6087:6087] CHIP:DMG: AttributePathIB = - [1666954493.884302][6087:6087] CHIP:DMG: { - [1666954493.884451][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666954493.884602][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666954493.884756][6087:6087] CHIP:DMG: Attribute = 0x0000_0000, - [1666954493.884899][6087:6087] CHIP:DMG: } - [1666954493.884985][6087:6087] CHIP:DMG: - [1666954493.885057][6087:6087] CHIP:DMG: Data = NULL - [1666954493.885135][6087:6087] CHIP:DMG: }, - [1666954493.885273][6087:6087] CHIP:DMG: - [1666954493.885350][6087:6087] CHIP:DMG: }, - [1666954493.885477][6087:6087] CHIP:DMG: - [1666954493.885544][6087:6087] CHIP:DMG: ], - - - ./chip-tool temperaturemeasurement read max-measured-value 1 1 - Verify DUT receives max-measured-value attribute response on the TH(all-clusters-minimal-app) Log: - - [1666954528.135348][6087:6087] CHIP:EM: Handling via exchange: 34550r, Delegate: 0xaaaab0ad80e0 - [1666954528.135445][6087:6087] CHIP:IM: Received Read request - [1666954528.135617][6087:6087] CHIP:DMG: ReadRequestMessage = - [1666954528.135684][6087:6087] CHIP:DMG: { - [1666954528.135738][6087:6087] CHIP:DMG: AttributePathIBs = - [1666954528.135802][6087:6087] CHIP:DMG: [ - [1666954528.135864][6087:6087] CHIP:DMG: AttributePathIB = - [1666954528.135948][6087:6087] CHIP:DMG: { - [1666954528.136021][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666954528.136243][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666954528.136334][6087:6087] CHIP:DMG: Attribute = 0x0000_0002, - [1666954528.136418][6087:6087] CHIP:DMG: } - [1666954528.136487][6087:6087] CHIP:DMG: - [1666954528.136559][6087:6087] CHIP:DMG: ], - [1666954528.136631][6087:6087] CHIP:DMG: - [1666954528.136698][6087:6087] CHIP:DMG: isFabricFiltered = true, - [1666954528.136762][6087:6087] CHIP:DMG: InteractionModelRevision = 1 - [1666954528.136821][6087:6087] CHIP:DMG: }, - [1666954528.136988][6087:6087] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666954528.137208][6087:6087] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666954528.137279][6087:6087] CHIP:DMG: Cluster 402, Attribute 2 is dirty - [1666954528.137334][6087:6087] CHIP:DMG: Reading attribute: Cluster=0x0000_0402 Endpoint=1 AttributeId=0x0000_0002 (expanded=0) - [1666954528.137401][6087:6087] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0402 e=1 p=v - [1666954528.137477][6087:6087] CHIP:DMG: AccessControl: allowed - [1666954528.137592][6087:6087] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666954528.138121][6087:6087] CHIP:EM: <<< [E:34550r M:157321696 (Ack:200937431)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666954528.138223][6087:6087] CHIP:IN: (S) Sending msg 157321696 on secure session with LSID: 1275 - [1666954528.138927][6087:6087] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:60947 | 157321696 | [Interaction Model (1) / Report Data (0x05) / Session = 47327 / Exchange = 34550] - [1666954528.139022][6087:6087] CHIP:DMG: Header Flags = - [1666954528.139080][6087:6087] CHIP:DMG: { - [1666954528.139168][6087:6087] CHIP:DMG: Exchange (0x06) = - [1666954528.139226][6087:6087] CHIP:DMG: { - [1666954528.139286][6087:6087] CHIP:DMG: AckMsg = 200937431 - [1666954528.139341][6087:6087] CHIP:DMG: NeedsAck = true - [1666954528.139394][6087:6087] CHIP:DMG: } - [1666954528.139466][6087:6087] CHIP:DMG: } - [1666954528.139521][6087:6087] CHIP:DMG: - [1666954528.139588][6087:6087] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666954528.139644][6087:6087] CHIP:DMG: { - [1666954528.139699][6087:6087] CHIP:DMG: data = 00dfb800e0896009f537bfb3ee387784dd9550975d432fc9600b2c971bd4be1e94725849b9c26de6d951e18c9bd7c72e2494172492cc8f645459f0523f4e9f688827c1d68604 - [1666954528.139757][6087:6087] CHIP:DMG: buffer_ptr = 187650284039360 - [1666954528.139810][6087:6087] CHIP:DMG: } - [1666954528.139861][6087:6087] CHIP:DMG: - [1666954528.140022][6087:6087] CHIP:DMG: ReportDataMessage = - [1666954528.140087][6087:6087] CHIP:DMG: { - [1666954528.140141][6087:6087] CHIP:DMG: AttributeReportIBs = - [1666954528.140225][6087:6087] CHIP:DMG: [ - [1666954528.140287][6087:6087] CHIP:DMG: AttributeReportIB = - [1666954528.140371][6087:6087] CHIP:DMG: { - [1666954528.140442][6087:6087] CHIP:DMG: AttributeDataIB = - [1666954528.140515][6087:6087] CHIP:DMG: { - [1666954528.140596][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666954528.140679][6087:6087] CHIP:DMG: AttributePathIB = - [1666954528.140771][6087:6087] CHIP:DMG: { - [1666954528.140866][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666954528.140958][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666954528.141053][6087:6087] CHIP:DMG: Attribute = 0x0000_0002, - [1666954528.141141][6087:6087] CHIP:DMG: } - [1666954528.141237][6087:6087] CHIP:DMG: - [1666954528.141331][6087:6087] CHIP:DMG: Data = NULL - [1666954528.141410][6087:6087] CHIP:DMG: }, - [1666954528.141493][6087:6087] CHIP:DMG: - [1666954528.141563][6087:6087] CHIP:DMG: }, - [1666954528.141648][6087:6087] CHIP:DMG: - [1666954528.141715][6087:6087] CHIP:DMG: ], - - - ./chip-tool temperaturemeasurement read min-measured-value 1 1 - Verify DUT receives min-measured-value attribute response on the TH(all-clusters-minimal-app) Log: - - [1666954579.729186][6087:6087] CHIP:EM: Handling via exchange: 13627r, Delegate: 0xaaaab0ad80e0 - [1666954579.729291][6087:6087] CHIP:IM: Received Read request - [1666954579.729463][6087:6087] CHIP:DMG: ReadRequestMessage = - [1666954579.729530][6087:6087] CHIP:DMG: { - [1666954579.729585][6087:6087] CHIP:DMG: AttributePathIBs = - [1666954579.729651][6087:6087] CHIP:DMG: [ - [1666954579.729713][6087:6087] CHIP:DMG: AttributePathIB = - [1666954579.729796][6087:6087] CHIP:DMG: { - [1666954579.729871][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666954579.729948][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666954579.730024][6087:6087] CHIP:DMG: Attribute = 0x0000_0001, - [1666954579.730094][6087:6087] CHIP:DMG: } - [1666954579.730168][6087:6087] CHIP:DMG: - [1666954579.730236][6087:6087] CHIP:DMG: ], - [1666954579.730307][6087:6087] CHIP:DMG: - [1666954579.730376][6087:6087] CHIP:DMG: isFabricFiltered = true, - [1666954579.730440][6087:6087] CHIP:DMG: InteractionModelRevision = 1 - [1666954579.730499][6087:6087] CHIP:DMG: }, - [1666954579.730674][6087:6087] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666954579.730963][6087:6087] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666954579.731038][6087:6087] CHIP:DMG: Cluster 402, Attribute 1 is dirty - [1666954579.731095][6087:6087] CHIP:DMG: Reading attribute: Cluster=0x0000_0402 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) - [1666954579.731164][6087:6087] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0402 e=1 p=v - [1666954579.731240][6087:6087] CHIP:DMG: AccessControl: allowed - [1666954579.731379][6087:6087] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666954579.732062][6087:6087] CHIP:EM: <<< [E:13627r M:44698905 (Ack:48846946)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666954579.732182][6087:6087] CHIP:IN: (S) Sending msg 44698905 on secure session with LSID: 1276 - [1666954579.732896][6087:6087] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:50038 | 44698905 | [Interaction Model (1) / Report Data (0x05) / Session = 14277 / Exchange = 13627] - [1666954579.733002][6087:6087] CHIP:DMG: Header Flags = - [1666954579.733059][6087:6087] CHIP:DMG: { - [1666954579.733149][6087:6087] CHIP:DMG: Exchange (0x06) = - [1666954579.733205][6087:6087] CHIP:DMG: { - [1666954579.733265][6087:6087] CHIP:DMG: AckMsg = 48846946 - [1666954579.733320][6087:6087] CHIP:DMG: NeedsAck = true - [1666954579.733374][6087:6087] CHIP:DMG: } - [1666954579.733445][6087:6087] CHIP:DMG: } - [1666954579.733501][6087:6087] CHIP:DMG: - [1666954579.733571][6087:6087] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666954579.733626][6087:6087] CHIP:DMG: { - [1666954579.733682][6087:6087] CHIP:DMG: data = 00c53700190daa027a1deb577441765a1cec59927ae2370d0d2190907ce38e16fa3493923aca247183f3cc5540bd1f4683f32e86f9842fc968152ea37fc686b1aedaf7296ffb - [1666954579.733740][6087:6087] CHIP:DMG: buffer_ptr = 187650284040096 - [1666954579.733856][6087:6087] CHIP:DMG: } - [1666954579.733915][6087:6087] CHIP:DMG: - [1666954579.734086][6087:6087] CHIP:DMG: ReportDataMessage = - [1666954579.734154][6087:6087] CHIP:DMG: { - [1666954579.734205][6087:6087] CHIP:DMG: AttributeReportIBs = - [1666954579.734283][6087:6087] CHIP:DMG: [ - [1666954579.734346][6087:6087] CHIP:DMG: AttributeReportIB = - [1666954579.734427][6087:6087] CHIP:DMG: { - [1666954579.734502][6087:6087] CHIP:DMG: AttributeDataIB = - [1666954579.734595][6087:6087] CHIP:DMG: { - [1666954579.734691][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666954579.734824][6087:6087] CHIP:DMG: AttributePathIB = - [1666954579.734923][6087:6087] CHIP:DMG: { - [1666954579.735005][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666954579.735105][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666954579.735196][6087:6087] CHIP:DMG: Attribute = 0x0000_0001, - [1666954579.735292][6087:6087] CHIP:DMG: } - [1666954579.735391][6087:6087] CHIP:DMG: - [1666954579.735487][6087:6087] CHIP:DMG: Data = NULL - [1666954579.735565][6087:6087] CHIP:DMG: }, - [1666954579.735651][6087:6087] CHIP:DMG: - [1666954579.735724][6087:6087] CHIP:DMG: }, - [1666954579.735801][6087:6087] CHIP:DMG: - [1666954579.735863][6087:6087] CHIP:DMG: ], - - - ./chip-tool temperaturemeasurement read feature-map 1 1 - Verify DUT receives feature-map attribute response on the TH(all-clusters-minimal-app) Log: - - [1666955056.085472][6087:6087] CHIP:EM: Handling via exchange: 8859r, Delegate: 0xaaaab0ad80e0 - [1666955056.085572][6087:6087] CHIP:IM: Received Read request - [1666955056.085747][6087:6087] CHIP:DMG: ReadRequestMessage = - [1666955056.085819][6087:6087] CHIP:DMG: { - [1666955056.085874][6087:6087] CHIP:DMG: AttributePathIBs = - [1666955056.085954][6087:6087] CHIP:DMG: [ - [1666955056.086018][6087:6087] CHIP:DMG: AttributePathIB = - [1666955056.086107][6087:6087] CHIP:DMG: { - [1666955056.086188][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955056.086282][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955056.086373][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666955056.086451][6087:6087] CHIP:DMG: } - [1666955056.086517][6087:6087] CHIP:DMG: - [1666955056.086577][6087:6087] CHIP:DMG: ], - [1666955056.086649][6087:6087] CHIP:DMG: - [1666955056.086762][6087:6087] CHIP:DMG: isFabricFiltered = true, - [1666955056.086836][6087:6087] CHIP:DMG: InteractionModelRevision = 1 - [1666955056.086897][6087:6087] CHIP:DMG: }, - [1666955056.087072][6087:6087] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666955056.087308][6087:6087] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666955056.087385][6087:6087] CHIP:DMG: Cluster 402, Attribute fffc is dirty - [1666955056.087440][6087:6087] CHIP:DMG: Reading attribute: Cluster=0x0000_0402 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - [1666955056.087510][6087:6087] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0402 e=1 p=v - [1666955056.087586][6087:6087] CHIP:DMG: AccessControl: allowed - [1666955056.087705][6087:6087] CHIP:DMG: Sending report (payload has 38 bytes)... - [1666955056.088268][6087:6087] CHIP:EM: <<< [E:8859r M:73892045 (Ack:58753019)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666955056.088379][6087:6087] CHIP:IN: (S) Sending msg 73892045 on secure session with LSID: 1277 - [1666955056.089094][6087:6087] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:45653 | 73892045 | [Interaction Model (1) / Report Data (0x05) / Session = 30000 / Exchange = 8859] - [1666955056.089297][6087:6087] CHIP:DMG: Header Flags = - [1666955056.089357][6087:6087] CHIP:DMG: { - [1666955056.089448][6087:6087] CHIP:DMG: Exchange (0x06) = - [1666955056.089505][6087:6087] CHIP:DMG: { - [1666955056.089565][6087:6087] CHIP:DMG: AckMsg = 58753019 - [1666955056.089622][6087:6087] CHIP:DMG: NeedsAck = true - [1666955056.089675][6087:6087] CHIP:DMG: } - [1666955056.089748][6087:6087] CHIP:DMG: } - [1666955056.089805][6087:6087] CHIP:DMG: - [1666955056.089875][6087:6087] CHIP:DMG: Encrypted Payload (72 bytes) = - [1666955056.089933][6087:6087] CHIP:DMG: { - [1666955056.089991][6087:6087] CHIP:DMG: data = 00307500cd80670441d7379f0c2dc290cb546382bd57698bf3b434ce28da2056c754abe2015af240726bece5af2ddb6c7c4161daa7179aa455f0e17736706d0af429e76cbd119449 - [1666955056.090050][6087:6087] CHIP:DMG: buffer_ptr = 187650284037616 - [1666955056.090105][6087:6087] CHIP:DMG: } - [1666955056.090157][6087:6087] CHIP:DMG: - [1666955056.090328][6087:6087] CHIP:DMG: ReportDataMessage = - [1666955056.090397][6087:6087] CHIP:DMG: { - [1666955056.090452][6087:6087] CHIP:DMG: AttributeReportIBs = - [1666955056.090530][6087:6087] CHIP:DMG: [ - [1666955056.090593][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955056.090687][6087:6087] CHIP:DMG: { - [1666955056.090808][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955056.090887][6087:6087] CHIP:DMG: { - [1666955056.090974][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955056.091058][6087:6087] CHIP:DMG: AttributePathIB = - [1666955056.091144][6087:6087] CHIP:DMG: { - [1666955056.091234][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955056.091328][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955056.091419][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666955056.091504][6087:6087] CHIP:DMG: } - [1666955056.091596][6087:6087] CHIP:DMG: - [1666955056.091686][6087:6087] CHIP:DMG: Data = 0, - [1666955056.091767][6087:6087] CHIP:DMG: }, - [1666955056.091856][6087:6087] CHIP:DMG: - [1666955056.091929][6087:6087] CHIP:DMG: }, - [1666955056.092008][6087:6087] CHIP:DMG: - [1666955056.092071][6087:6087] CHIP:DMG: ], - - - ./chip-tool temperaturemeasurement read attribute-list 1 1 - Verify DUT receives attribute-list attribute response on the TH(all-clusters-minimal-app) Log: - - [1666955301.631931][6087:6087] CHIP:EM: Handling via exchange: 47180r, Delegate: 0xaaaab0ad80e0 - [1666955301.632028][6087:6087] CHIP:IM: Received Read request - [1666955301.632199][6087:6087] CHIP:DMG: ReadRequestMessage = - [1666955301.632265][6087:6087] CHIP:DMG: { - [1666955301.632320][6087:6087] CHIP:DMG: AttributePathIBs = - [1666955301.632385][6087:6087] CHIP:DMG: [ - [1666955301.632447][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.632523][6087:6087] CHIP:DMG: { - [1666955301.632601][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.632684][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.632772][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.632854][6087:6087] CHIP:DMG: } - [1666955301.632931][6087:6087] CHIP:DMG: - [1666955301.633002][6087:6087] CHIP:DMG: ], - [1666955301.633073][6087:6087] CHIP:DMG: - [1666955301.633141][6087:6087] CHIP:DMG: isFabricFiltered = true, - [1666955301.633206][6087:6087] CHIP:DMG: InteractionModelRevision = 1 - [1666955301.633265][6087:6087] CHIP:DMG: }, - [1666955301.633433][6087:6087] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666955301.633656][6087:6087] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666955301.633729][6087:6087] CHIP:DMG: Cluster 402, Attribute fffb is dirty - [1666955301.633785][6087:6087] CHIP:DMG: Reading attribute: Cluster=0x0000_0402 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) - [1666955301.633849][6087:6087] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0402 e=1 p=v - [1666955301.633924][6087:6087] CHIP:DMG: AccessControl: allowed - [1666955301.634106][6087:6087] CHIP:DMG: Sending report (payload has 283 bytes)... - [1666955301.634781][6087:6087] CHIP:EM: <<< [E:47180r M:264855615 (Ack:241692066)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666955301.634883][6087:6087] CHIP:IN: (S) Sending msg 264855615 on secure session with LSID: 1278 - [1666955301.635623][6087:6087] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:49059 | 264855615 | [Interaction Model (1) / Report Data (0x05) / Session = 25182 / Exchange = 47180] - [1666955301.635718][6087:6087] CHIP:DMG: Header Flags = - [1666955301.635776][6087:6087] CHIP:DMG: { - [1666955301.635863][6087:6087] CHIP:DMG: Exchange (0x06) = - [1666955301.635919][6087:6087] CHIP:DMG: { - [1666955301.635979][6087:6087] CHIP:DMG: AckMsg = 241692066 - [1666955301.636034][6087:6087] CHIP:DMG: NeedsAck = true - [1666955301.636093][6087:6087] CHIP:DMG: } - [1666955301.636165][6087:6087] CHIP:DMG: } - [1666955301.636220][6087:6087] CHIP:DMG: - [1666955301.636288][6087:6087] CHIP:DMG: Encrypted Payload (317 bytes) = - [1666955301.636343][6087:6087] CHIP:DMG: { - [1666955301.636399][6087:6087] CHIP:DMG: data = 005e62003f60c90fa085c5efdb33678732930f363ecdcb1a14a818f3d0e4922d984374a5b24f4911f05027baa4ba57ad5e9cdd5c13e89854c6aa43aab11031b96294249f35b7a273fd77ec16354ed968bbb1ede503247e17267d38a1752a1439786e9644dfb5e2161ecd397e5e6017ce7bfe17cd7f7cbedf0bc058f51a9136c0cb8b20c43d69a7af9eb49164f4017674e2e6da38a7e2cf7b23f6505d88265ef05838884f1cdfc66a37116fd0bb060e276a58b5ef4f23c3d32df2fd9d407b700239852bb02415f4019bff097b0108ee91c06ef7b9c4561de3377d54afd95b5cdf9803eddca6e9ef2a546add7c9832494c20d07d1f91bb0b4588afc28256beebfb0ecd955858e918313b98e4cbaac3458fafe13ccdec893229c50f78732eaf5dfbb8e42fc9747e765937f59a36367892f493783d9184c0aba847cffed9a4 - [1666955301.636471][6087:6087] CHIP:DMG: buffer_ptr = 187650284042032 - [1666955301.636524][6087:6087] CHIP:DMG: } - [1666955301.636576][6087:6087] CHIP:DMG: - [1666955301.637014][6087:6087] CHIP:DMG: ReportDataMessage = - [1666955301.637245][6087:6087] CHIP:DMG: { - [1666955301.637303][6087:6087] CHIP:DMG: AttributeReportIBs = - [1666955301.637382][6087:6087] CHIP:DMG: [ - [1666955301.637444][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.637532][6087:6087] CHIP:DMG: { - [1666955301.637604][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.637692][6087:6087] CHIP:DMG: { - [1666955301.637768][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.637850][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.637942][6087:6087] CHIP:DMG: { - [1666955301.638037][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.638128][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.638226][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.638318][6087:6087] CHIP:DMG: } - [1666955301.638414][6087:6087] CHIP:DMG: - [1666955301.638498][6087:6087] CHIP:DMG: Data = [ - [1666955301.638587][6087:6087] CHIP:DMG: - [1666955301.638677][6087:6087] CHIP:DMG: ], - [1666955301.638784][6087:6087] CHIP:DMG: }, - [1666955301.638873][6087:6087] CHIP:DMG: - [1666955301.638945][6087:6087] CHIP:DMG: }, - [1666955301.639042][6087:6087] CHIP:DMG: - [1666955301.639104][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.639183][6087:6087] CHIP:DMG: { - [1666955301.639248][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.639335][6087:6087] CHIP:DMG: { - [1666955301.639417][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.639658][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.639755][6087:6087] CHIP:DMG: { - [1666955301.639841][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.639933][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.640025][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.640112][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.640195][6087:6087] CHIP:DMG: } - [1666955301.640283][6087:6087] CHIP:DMG: - [1666955301.640378][6087:6087] CHIP:DMG: Data = 0, - [1666955301.640457][6087:6087] CHIP:DMG: }, - [1666955301.640543][6087:6087] CHIP:DMG: - [1666955301.640613][6087:6087] CHIP:DMG: }, - [1666955301.640708][6087:6087] CHIP:DMG: - [1666955301.640770][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.640854][6087:6087] CHIP:DMG: { - [1666955301.640925][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.641012][6087:6087] CHIP:DMG: { - [1666955301.641102][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.641190][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.641274][6087:6087] CHIP:DMG: { - [1666955301.641367][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.641466][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.641558][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.641645][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.641730][6087:6087] CHIP:DMG: } - [1666955301.641825][6087:6087] CHIP:DMG: - [1666955301.641920][6087:6087] CHIP:DMG: Data = 1, - [1666955301.642000][6087:6087] CHIP:DMG: }, - [1666955301.642094][6087:6087] CHIP:DMG: - [1666955301.642164][6087:6087] CHIP:DMG: }, - [1666955301.642261][6087:6087] CHIP:DMG: - [1666955301.642323][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.642406][6087:6087] CHIP:DMG: { - [1666955301.642476][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.642557][6087:6087] CHIP:DMG: { - [1666955301.642645][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.642752][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.642842][6087:6087] CHIP:DMG: { - [1666955301.642934][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.643024][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.643115][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.643201][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.643294][6087:6087] CHIP:DMG: } - [1666955301.643383][6087:6087] CHIP:DMG: - [1666955301.643478][6087:6087] CHIP:DMG: Data = 2, - [1666955301.643564][6087:6087] CHIP:DMG: }, - [1666955301.643657][6087:6087] CHIP:DMG: - [1666955301.643722][6087:6087] CHIP:DMG: }, - [1666955301.643817][6087:6087] CHIP:DMG: - [1666955301.643879][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.643972][6087:6087] CHIP:DMG: { - [1666955301.644043][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.644120][6087:6087] CHIP:DMG: { - [1666955301.644208][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.644289][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.644372][6087:6087] CHIP:DMG: { - [1666955301.644465][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.644558][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.644648][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.644733][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.644821][6087:6087] CHIP:DMG: } - [1666955301.644909][6087:6087] CHIP:DMG: - [1666955301.644996][6087:6087] CHIP:DMG: Data = 65528, - [1666955301.645074][6087:6087] CHIP:DMG: }, - [1666955301.645168][6087:6087] CHIP:DMG: - [1666955301.645234][6087:6087] CHIP:DMG: }, - [1666955301.645323][6087:6087] CHIP:DMG: - [1666955301.645385][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.645465][6087:6087] CHIP:DMG: { - [1666955301.645535][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.645616][6087:6087] CHIP:DMG: { - [1666955301.645704][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.645785][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.645867][6087:6087] CHIP:DMG: { - [1666955301.645960][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.646052][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.646149][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.646234][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.646318][6087:6087] CHIP:DMG: } - [1666955301.646406][6087:6087] CHIP:DMG: - [1666955301.646500][6087:6087] CHIP:DMG: Data = 65529, - [1666955301.646586][6087:6087] CHIP:DMG: }, - [1666955301.646678][6087:6087] CHIP:DMG: - [1666955301.646777][6087:6087] CHIP:DMG: }, - [1666955301.646869][6087:6087] CHIP:DMG: - [1666955301.646932][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.647016][6087:6087] CHIP:DMG: { - [1666955301.647087][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.647172][6087:6087] CHIP:DMG: { - [1666955301.647376][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.647461][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.647545][6087:6087] CHIP:DMG: { - [1666955301.647631][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.647713][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.647812][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.647907][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.647994][6087:6087] CHIP:DMG: } - [1666955301.648082][6087:6087] CHIP:DMG: - [1666955301.648168][6087:6087] CHIP:DMG: Data = 65531, - [1666955301.648254][6087:6087] CHIP:DMG: }, - [1666955301.648338][6087:6087] CHIP:DMG: - [1666955301.648408][6087:6087] CHIP:DMG: }, - [1666955301.648503][6087:6087] CHIP:DMG: - [1666955301.648564][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.648649][6087:6087] CHIP:DMG: { - [1666955301.648714][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.648800][6087:6087] CHIP:DMG: { - [1666955301.648880][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.648961][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.649050][6087:6087] CHIP:DMG: { - [1666955301.649136][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.649226][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.649314][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.649401][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.649484][6087:6087] CHIP:DMG: } - [1666955301.649579][6087:6087] CHIP:DMG: - [1666955301.649804][6087:6087] CHIP:DMG: Data = 65532, - [1666955301.649887][6087:6087] CHIP:DMG: }, - [1666955301.649973][6087:6087] CHIP:DMG: - [1666955301.650043][6087:6087] CHIP:DMG: }, - [1666955301.650137][6087:6087] CHIP:DMG: - [1666955301.650198][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955301.650282][6087:6087] CHIP:DMG: { - [1666955301.650353][6087:6087] CHIP:DMG: AttributeDataIB = - [1666955301.650440][6087:6087] CHIP:DMG: { - [1666955301.650528][6087:6087] CHIP:DMG: DataVersion = 0xe31304a9, - [1666955301.650609][6087:6087] CHIP:DMG: AttributePathIB = - [1666955301.650693][6087:6087] CHIP:DMG: { - [1666955301.650840][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955301.650934][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955301.651032][6087:6087] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666955301.651126][6087:6087] CHIP:DMG: ListIndex = Null, - [1666955301.651219][6087:6087] CHIP:DMG: } - [1666955301.651308][6087:6087] CHIP:DMG: - [1666955301.651392][6087:6087] CHIP:DMG: Data = 65533, - [1666955301.651471][6087:6087] CHIP:DMG: }, - [1666955301.651558][6087:6087] CHIP:DMG: - [1666955301.651628][6087:6087] CHIP:DMG: }, - [1666955301.651708][6087:6087] CHIP:DMG: - [1666955301.651769][6087:6087] CHIP:DMG: ], - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - .Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool temperaturemeasurement read tolerance 1 1 - - Verify DUT receives tolerence attribute response on the TH(all-clusters-minimal-app) Log: - - [1666955343.056928][6087:6087] CHIP:EM: Handling via exchange: 21936r, Delegate: 0xaaaab0ad80e0 - [1666955343.057022][6087:6087] CHIP:IM: Received Read request - [1666955343.057192][6087:6087] CHIP:DMG: ReadRequestMessage = - [1666955343.057258][6087:6087] CHIP:DMG: { - [1666955343.057313][6087:6087] CHIP:DMG: AttributePathIBs = - [1666955343.057378][6087:6087] CHIP:DMG: [ - [1666955343.057440][6087:6087] CHIP:DMG: AttributePathIB = - [1666955343.057515][6087:6087] CHIP:DMG: { - [1666955343.057649][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955343.057746][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955343.057820][6087:6087] CHIP:DMG: Attribute = 0x0000_0003, - [1666955343.057902][6087:6087] CHIP:DMG: } - [1666955343.057980][6087:6087] CHIP:DMG: - [1666955343.058050][6087:6087] CHIP:DMG: ], - [1666955343.058122][6087:6087] CHIP:DMG: - [1666955343.058256][6087:6087] CHIP:DMG: isFabricFiltered = true, - [1666955343.058325][6087:6087] CHIP:DMG: InteractionModelRevision = 1 - [1666955343.058385][6087:6087] CHIP:DMG: }, - [1666955343.058552][6087:6087] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666955343.058812][6087:6087] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666955343.058888][6087:6087] CHIP:DMG: Cluster 402, Attribute 3 is dirty - [1666955343.058943][6087:6087] CHIP:DMG: Reading attribute: Cluster=0x0000_0402 Endpoint=1 AttributeId=0x0000_0003 (expanded=0) - [1666955343.059055][6087:6087] CHIP:DMG: Sending report (payload has 34 bytes)... - [1666955343.059564][6087:6087] CHIP:EM: <<< [E:21936r M:135520016 (Ack:7304816)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666955343.059664][6087:6087] CHIP:IN: (S) Sending msg 135520016 on secure session with LSID: 1279 - [1666955343.060484][6087:6087] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:33713 | 135520016 | [Interaction Model (1) / Report Data (0x05) / Session = 15458 / Exchange = 21936] - [1666955343.060581][6087:6087] CHIP:DMG: Header Flags = - [1666955343.060638][6087:6087] CHIP:DMG: { - [1666955343.060725][6087:6087] CHIP:DMG: Exchange (0x06) = - [1666955343.060783][6087:6087] CHIP:DMG: { - [1666955343.060842][6087:6087] CHIP:DMG: AckMsg = 7304816 - [1666955343.060898][6087:6087] CHIP:DMG: NeedsAck = true - [1666955343.060952][6087:6087] CHIP:DMG: } - [1666955343.061024][6087:6087] CHIP:DMG: } - [1666955343.061079][6087:6087] CHIP:DMG: - [1666955343.061146][6087:6087] CHIP:DMG: Encrypted Payload (68 bytes) = - [1666955343.061201][6087:6087] CHIP:DMG: { - [1666955343.061256][6087:6087] CHIP:DMG: data = 00623c0010df1308fd3223e8f68f0d869707d560703cf1ab9c49624bdfa75abcf3c360a19db17c7f2a325e41b371932dbcbc9d41f2b617d0e98154f3d11f237da69cf343 - [1666955343.061314][6087:6087] CHIP:DMG: buffer_ptr = 187650284050608 - [1666955343.061368][6087:6087] CHIP:DMG: } - [1666955343.061420][6087:6087] CHIP:DMG: - [1666955343.061568][6087:6087] CHIP:DMG: ReportDataMessage = - [1666955343.061634][6087:6087] CHIP:DMG: { - [1666955343.061689][6087:6087] CHIP:DMG: AttributeReportIBs = - [1666955343.061774][6087:6087] CHIP:DMG: [ - [1666955343.061837][6087:6087] CHIP:DMG: AttributeReportIB = - [1666955343.061919][6087:6087] CHIP:DMG: { - [1666955343.061991][6087:6087] CHIP:DMG: AttributeStatusIB = - [1666955343.062082][6087:6087] CHIP:DMG: { - [1666955343.062167][6087:6087] CHIP:DMG: AttributePathIB = - [1666955343.062258][6087:6087] CHIP:DMG: { - [1666955343.062355][6087:6087] CHIP:DMG: Endpoint = 0x1, - [1666955343.062437][6087:6087] CHIP:DMG: Cluster = 0x402, - [1666955343.062528][6087:6087] CHIP:DMG: Attribute = 0x0000_0003, - [1666955343.062603][6087:6087] CHIP:DMG: } - [1666955343.062697][6087:6087] CHIP:DMG: - [1666955343.062822][6087:6087] CHIP:DMG: StatusIB = - [1666955343.062911][6087:6087] CHIP:DMG: { - [1666955343.062997][6087:6087] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1666955343.063081][6087:6087] CHIP:DMG: }, - [1666955343.063167][6087:6087] CHIP:DMG: - [1666955343.063236][6087:6087] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml index d43b6e8cf7cde1..0ec5d4dfe2d042 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml @@ -31,13 +31,27 @@ tests: - name: "nodeId" value: nodeId + #Issue: https://github.com/project-chip/connectedhomeip/issues/26601 - label: "Step 2: Read the global attribute: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 5 - constraints: - type: int16u + verification: | + ./chip-tool thermostat read cluster-revision 1 1 + + On TH(chip-tool), verify that DUT responsds ClusterRevision attribute value as 6 + + [1654082369.006076][7829:7834] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_FFFD DataVersion: 2954689426 + [1654082369.006146][7829:7834] CHIP:TOO: ClusterRevision: 5 + [1654082369.006241][7829:7834] CHIP:EM: Sending Standalone Ack for MessageCounter:4310083 on exchange 63290i + + This log and comment are as per the latest sdk but the vaue is wrong https://github.com/project-chip/connectedhomeip/issues/26601 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Step 3a: Read the global attribute: FeatureMap" PICS: @@ -116,6 +130,17 @@ tests: type: bitmap32 hasMasksSet: [0x20] + - label: + "Step 3h: Given TSTAT.S.F06(LTNE) ensure featuremap has the correct + bit set" + PICS: TSTAT.S.F06 + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x40] + - label: "Step 4a: Read the global attribute: AttributeList" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" @@ -232,16 +257,318 @@ tests: type: list contains: [55, 56, 57] - - label: "Step 5a: Read the global attribute: AcceptedCommandList" + - label: "Step 4k: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0001 command: "readAttribute" - attribute: "AcceptedCommandList" + attribute: "AttributeList" response: constraints: type: list - contains: [0] + contains: [1] + + - label: "Step 4l: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0009 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [9] + + - label: "Step 4m: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0010 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [16] + + - label: "Step 4n: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A001a + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [26] + + - label: "Step 4o: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A001d + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [29] + + - label: "Step 4p: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0023 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [35] + + - label: "Step 4q: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0024 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [36] + + - label: "Step 4r: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0025 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [37] + + - label: "Step 4s: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0029 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [41] + + - label: "Step 4t: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0030 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [48] + + - label: "Step 4u: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0031 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [49] + + - label: "Step 4x: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0032 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [50] + + - label: "Step 5y: Read the optional attribute: AttributeList" + PICS: TSTAT.S.A003a + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [58] + + - label: "Step 4z: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0040 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [64] + + - label: "Step 4A: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0041 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65] + + - label: "Step 4B: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0042 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [66] + + - label: "Step 4C: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0043 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [67] + + - label: "Step 5D: Read the optional attribute: AttributeList" + PICS: TSTAT.S.A0044 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [68] + + - label: "Step 4E: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0045 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [69] + + - label: "Step 4F: Read the optional attribute in AttributeList" + PICS: TSTAT.S.A0046 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [70] + + - label: "Step 5G: Read the optional attribute: AttributeList" + PICS: TSTAT.S.A0047 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [71] + + - label: + "Step 4H: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional + attribute in AttributeList" + PICS: TSTAT.S.F00 && TSTAT.S.A0003 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [3] + + - label: + "Step 4I: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional + attribute in AttributeList" + PICS: TSTAT.S.F00 && TSTAT.S.A0004 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [4] + + - label: + "Step 4J: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional + attribute in AttributeList" + PICS: TSTAT.S.F00 && TSTAT.S.A0008 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [8] + + - label: + "Step 4K: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional + attribute in AttributeList" + PICS: TSTAT.S.F00 && TSTAT.S.A0015 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [21] + + - label: + "Step 4L: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional + attribute in AttributeList" + PICS: TSTAT.S.F00 && TSTAT.S.A0016 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [22] + + - label: + "Step 4M: Read the Feature dependent(TSTAT.S.F01(COOL)) optional + attribute in AttributeList" + PICS: TSTAT.S.F01 && TSTAT.S.A0005 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [5] + + - label: + "Step 4N: Read the Feature dependent(TSTAT.S.F01(COOL)) optional + attribute in AttributeList" + PICS: TSTAT.S.F01 && TSTAT.S.A0007 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [6] + + - label: + "Step 4O: Read the Feature dependent(TSTAT.S.F01(COOL)) optional + attribute in AttributeList" + PICS: TSTAT.S.F01 && TSTAT.S.A0007 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [7] + + - label: + "Step 4P: Read the Feature dependent(TSTAT.S.F01(COOL)) optional + attribute in AttributeList" + PICS: TSTAT.S.F01 && TSTAT.S.A0017 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [23] + + - label: + "Step 4Q: Read the Feature dependent(TSTAT.S.F01(COOL)) optional + attribute in AttributeList" + PICS: TSTAT.S.F01 && TSTAT.S.A0018 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [24] - label: - "Step 5b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in + "Step 4R: Read the Feature dependent(TSTAT.S.F05(AUTO)) optional + attribute in AttributeList" + PICS: TSTAT.S.F05 && TSTAT.S.A001e + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [30] + + - label: + "Step 5a: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList" PICS: TSTAT.S.F03 command: "readAttribute" @@ -251,6 +578,15 @@ tests: type: list contains: [0, 1, 2, 3] + - label: "Step 5b: Read the optional attribute: AcceptedCommandList" + PICS: TSTAT.S.C04.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [4] + - label: "Step 6a: Read the global attribute: GeneratedCommandList" PICS: " !TSTAT.S.C04.Rsp && !TSTAT.S.C02.Rsp " command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_3_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_3_1.yaml deleted file mode 100644 index 2166efc583592e..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_3_1.yaml +++ /dev/null @@ -1,979 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 41.3.1. [TC-TSTAT-3.1] Attributes with client as DUT - -PICS: - - TSTAT.C - - TSTAT.C.AM-READ - - TSTAT.C.AO-READ - - TSTAT.C.AM-WRITE - - TSTAT.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. - disabled: true - - - label: - "Step 1: DUT reads all supported mandatory attributes from TH one at a - time in a manufacturer specific order" - PICS: TSTAT.C.AM-READ - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - ./chip-tool thermostat read local-temperature 1 1 - - Verify the ReadRequestMessage on TH(thermostat-app) - - [1666952132.254664][5523:5523] CHIP:EM: Handling via exchange: 45183r, Delegate: 0xaaaad0bf6d38 - [1666952132.254810][5523:5523] CHIP:IM: Received Read request - [1666952132.254984][5523:5523] CHIP:DMG: ReadRequestMessage = - [1666952132.255049][5523:5523] CHIP:DMG: { - [1666952132.255104][5523:5523] CHIP:DMG: AttributePathIBs = - [1666952132.255170][5523:5523] CHIP:DMG: [ - [1666952132.255231][5523:5523] CHIP:DMG: AttributePathIB = - [1666952132.255311][5523:5523] CHIP:DMG: { - [1666952132.255383][5523:5523] CHIP:DMG: Endpoint = 0x1, - [1666952132.255465][5523:5523] CHIP:DMG: Cluster = 0x201, - [1666952132.255552][5523:5523] CHIP:DMG: Attribute = 0x0000_0000, - [1666952132.255634][5523:5523] CHIP:DMG: } - [1666952132.255711][5523:5523] CHIP:DMG: - [1666952132.255939][5523:5523] CHIP:DMG: ], - [1666952132.256019][5523:5523] CHIP:DMG: - [1666952132.256086][5523:5523] CHIP:DMG: isFabricFiltered = true, - [1666952132.256150][5523:5523] CHIP:DMG: InteractionModelRevision = 1 - [1666952132.256209][5523:5523] CHIP:DMG: }, - [1666952132.256374][5523:5523] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952132.256579][5523:5523] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952132.256650][5523:5523] CHIP:DMG: Cluster 201, Attribute 0 is dirty - [1666952132.256704][5523:5523] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1666952132.256770][5523:5523] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666952132.256846][5523:5523] CHIP:DMG: AccessControl: allowed - [1666952132.256956][5523:5523] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666952132.257462][5523:5523] CHIP:EM: <<< [E:45183r M:211664667 (Ack:20415204)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666952132.257559][5523:5523] CHIP:IN: (S) Sending msg 211664667 on secure session with LSID: 58857 - [1666952132.258207][5523:5523] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:57054 | 211664667 | [Interaction Model (1) / Report Data (0x05) / Session = 30657 / Exchange = 45183] - [1666952132.258305][5523:5523] CHIP:DMG: Header Flags = - [1666952132.258362][5523:5523] CHIP:DMG: { - [1666952132.258450][5523:5523] CHIP:DMG: Exchange (0x06) = - [1666952132.258506][5523:5523] CHIP:DMG: { - [1666952132.258566][5523:5523] CHIP:DMG: AckMsg = 20415204 - [1666952132.258620][5523:5523] CHIP:DMG: NeedsAck = true - [1666952132.258674][5523:5523] CHIP:DMG: } - [1666952132.258795][5523:5523] CHIP:DMG: } - [1666952132.258854][5523:5523] CHIP:DMG: - [1666952132.258922][5523:5523] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666952132.258978][5523:5523] CHIP:DMG: { - [1666952132.259034][5523:5523] CHIP:DMG: data = 00c177001bbf9d0c8d034854664a7ad1e4d8a6e4d761fe52deb0e743e0c31922d77d53fe79bdb2ad8046791f6a61818db2b483479c011ab934bf0781e9f97d136c8b15e3fbc00f - [1666952132.259092][5523:5523] CHIP:DMG: buffer_ptr = 187651103265312 - [1666952132.259145][5523:5523] CHIP:DMG: } - [1666952132.259197][5523:5523] CHIP:DMG: - [1666952132.259352][5523:5523] CHIP:DMG: ReportDataMessage = - [1666952132.259419][5523:5523] CHIP:DMG: { - [1666952132.259472][5523:5523] CHIP:DMG: AttributeReportIBs = - [1666952132.259557][5523:5523] CHIP:DMG: [ - [1666952132.259619][5523:5523] CHIP:DMG: AttributeReportIB = - [1666952132.259699][5523:5523] CHIP:DMG: { - [1666952132.259769][5523:5523] CHIP:DMG: AttributeDataIB = - [1666952132.259856][5523:5523] CHIP:DMG: { - [1666952132.259941][5523:5523] CHIP:DMG: DataVersion = 0x20b42cf7, - [1666952132.260026][5523:5523] CHIP:DMG: AttributePathIB = - [1666952132.260109][5523:5523] CHIP:DMG: { - [1666952132.260197][5523:5523] CHIP:DMG: Endpoint = 0x1, - [1666952132.260294][5523:5523] CHIP:DMG: Cluster = 0x201, - [1666952132.260389][5523:5523] CHIP:DMG: Attribute = 0x0000_0000, - [1666952132.260465][5523:5523] CHIP:DMG: } - [1666952132.260537][5523:5523] CHIP:DMG: - [1666952132.260608][5523:5523] CHIP:DMG: Data = 0, - [1666952132.260671][5523:5523] CHIP:DMG: }, - [1666952132.260741][5523:5523] CHIP:DMG: - [1666952132.260805][5523:5523] CHIP:DMG: }, - [1666952132.260886][5523:5523] CHIP:DMG: - [1666952132.260947][5523:5523] CHIP:DMG: ], - - - - ./chip-tool thermostat read control-sequence-of-operation 1 1 - - - Verify the ReadRequestMessage on TH(thermostat-app) - - [1666952211.603156][5523:5523] CHIP:EM: Handling via exchange: 32228r, Delegate: 0xaaaad0bf6d38 - [1666952211.603251][5523:5523] CHIP:IM: Received Read request - [1666952211.603444][5523:5523] CHIP:DMG: ReadRequestMessage = - [1666952211.603512][5523:5523] CHIP:DMG: { - [1666952211.603592][5523:5523] CHIP:DMG: AttributePathIBs = - [1666952211.603658][5523:5523] CHIP:DMG: [ - [1666952211.603740][5523:5523] CHIP:DMG: AttributePathIB = - [1666952211.603818][5523:5523] CHIP:DMG: { - [1666952211.603917][5523:5523] CHIP:DMG: Endpoint = 0x1, - [1666952211.604002][5523:5523] CHIP:DMG: Cluster = 0x201, - [1666952211.604112][5523:5523] CHIP:DMG: Attribute = 0x0000_001B, - [1666952211.604197][5523:5523] CHIP:DMG: } - [1666952211.604297][5523:5523] CHIP:DMG: - [1666952211.604372][5523:5523] CHIP:DMG: ], - [1666952211.604464][5523:5523] CHIP:DMG: - [1666952211.604533][5523:5523] CHIP:DMG: isFabricFiltered = true, - [1666952211.604598][5523:5523] CHIP:DMG: InteractionModelRevision = 1 - [1666952211.604657][5523:5523] CHIP:DMG: }, - [1666952211.604851][5523:5523] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952211.605110][5523:5523] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952211.605181][5523:5523] CHIP:DMG: Cluster 201, Attribute 1b is dirty - [1666952211.605259][5523:5523] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_001B (expanded=0) - [1666952211.605329][5523:5523] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666952211.605404][5523:5523] CHIP:DMG: AccessControl: allowed - [1666952211.605514][5523:5523] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666952211.606307][5523:5523] CHIP:EM: <<< [E:32228r M:122580976 (Ack:109657417)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666952211.606407][5523:5523] CHIP:IN: (S) Sending msg 122580976 on secure session with LSID: 58858 - [1666952211.607192][5523:5523] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:59185 | 122580976 | [Interaction Model (1) / Report Data (0x05) / Session = 34789 / Exchange = 32228] - [1666952211.607290][5523:5523] CHIP:DMG: Header Flags = - [1666952211.607348][5523:5523] CHIP:DMG: { - [1666952211.607436][5523:5523] CHIP:DMG: Exchange (0x06) = - [1666952211.607491][5523:5523] CHIP:DMG: { - [1666952211.607551][5523:5523] CHIP:DMG: AckMsg = 109657417 - [1666952211.607637][5523:5523] CHIP:DMG: NeedsAck = true - [1666952211.607692][5523:5523] CHIP:DMG: } - [1666952211.607764][5523:5523] CHIP:DMG: } - [1666952211.607844][5523:5523] CHIP:DMG: - [1666952211.607912][5523:5523] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666952211.608153][5523:5523] CHIP:DMG: { - [1666952211.608217][5523:5523] CHIP:DMG: data = 00e58700f06f4e07aad692eabd077933fb8541496ae905808d17a81c3427464da89dc5f0d6bb92eedfca8a57e327fbb528f459b2636428a845bbc22a64e87328cb458a5dd459e1 - [1666952211.608274][5523:5523] CHIP:DMG: buffer_ptr = 187651103269664 - [1666952211.608327][5523:5523] CHIP:DMG: } - [1666952211.608378][5523:5523] CHIP:DMG: - [1666952211.608544][5523:5523] CHIP:DMG: ReportDataMessage = - [1666952211.608609][5523:5523] CHIP:DMG: { - [1666952211.608664][5523:5523] CHIP:DMG: AttributeReportIBs = - [1666952211.608748][5523:5523] CHIP:DMG: [ - [1666952211.608811][5523:5523] CHIP:DMG: AttributeReportIB = - [1666952211.608896][5523:5523] CHIP:DMG: { - [1666952211.608966][5523:5523] CHIP:DMG: AttributeDataIB = - [1666952211.609052][5523:5523] CHIP:DMG: { - [1666952211.609142][5523:5523] CHIP:DMG: DataVersion = 0x20b42cf7, - [1666952211.609224][5523:5523] CHIP:DMG: AttributePathIB = - [1666952211.609315][5523:5523] CHIP:DMG: { - [1666952211.609402][5523:5523] CHIP:DMG: Endpoint = 0x1, - [1666952211.609500][5523:5523] CHIP:DMG: Cluster = 0x201, - [1666952211.609589][5523:5523] CHIP:DMG: Attribute = 0x0000_001B, - [1666952211.609672][5523:5523] CHIP:DMG: } - [1666952211.609760][5523:5523] CHIP:DMG: - [1666952211.609848][5523:5523] CHIP:DMG: Data = 4, - [1666952211.609934][5523:5523] CHIP:DMG: }, - [1666952211.610017][5523:5523] CHIP:DMG: - [1666952211.610087][5523:5523] CHIP:DMG: }, - [1666952211.610167][5523:5523] CHIP:DMG: - [1666952211.610227][5523:5523] CHIP:DMG: ], - - - ./chip-tool thermostat read system-mode 1 1 - - Verify the ReadRequestMessage on TH(thermostat-app) - [1666952247.579164][5523:5523] CHIP:EM: Handling via exchange: 50210r, Delegate: 0xaaaad0bf6d38 - [1666952247.579281][5523:5523] CHIP:IM: Received Read request - [1666952247.579476][5523:5523] CHIP:DMG: ReadRequestMessage = - [1666952247.579543][5523:5523] CHIP:DMG: { - [1666952247.579625][5523:5523] CHIP:DMG: AttributePathIBs = - [1666952247.579691][5523:5523] CHIP:DMG: [ - [1666952247.579753][5523:5523] CHIP:DMG: AttributePathIB = - [1666952247.579830][5523:5523] CHIP:DMG: { - [1666952247.579928][5523:5523] CHIP:DMG: Endpoint = 0x1, - [1666952247.580019][5523:5523] CHIP:DMG: Cluster = 0x201, - [1666952247.580119][5523:5523] CHIP:DMG: Attribute = 0x0000_001C, - [1666952247.580201][5523:5523] CHIP:DMG: } - [1666952247.580299][5523:5523] CHIP:DMG: - [1666952247.580370][5523:5523] CHIP:DMG: ], - [1666952247.580440][5523:5523] CHIP:DMG: - [1666952247.580529][5523:5523] CHIP:DMG: isFabricFiltered = true, - [1666952247.580594][5523:5523] CHIP:DMG: InteractionModelRevision = 1 - [1666952247.580673][5523:5523] CHIP:DMG: }, - [1666952247.580869][5523:5523] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952247.581075][5523:5523] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952247.581171][5523:5523] CHIP:DMG: Cluster 201, Attribute 1c is dirty - [1666952247.581228][5523:5523] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_001C (expanded=0) - [1666952247.581294][5523:5523] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666952247.581397][5523:5523] CHIP:DMG: AccessControl: allowed - [1666952247.581509][5523:5523] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666952247.582161][5523:5523] CHIP:EM: <<< [E:50210r M:165064456 (Ack:89022834)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666952247.582273][5523:5523] CHIP:IN: (S) Sending msg 165064456 on secure session with LSID: 58859 - [1666952247.583141][5523:5523] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:56721 | 165064456 | [Interaction Model (1) / Report Data (0x05) / Session = 58238 / Exchange = 50210] - [1666952247.583242][5523:5523] CHIP:DMG: Header Flags = - [1666952247.583300][5523:5523] CHIP:DMG: { - [1666952247.583392][5523:5523] CHIP:DMG: Exchange (0x06) = - [1666952247.583448][5523:5523] CHIP:DMG: { - [1666952247.583508][5523:5523] CHIP:DMG: AckMsg = 89022834 - [1666952247.583592][5523:5523] CHIP:DMG: NeedsAck = true - [1666952247.583647][5523:5523] CHIP:DMG: } - [1666952247.583720][5523:5523] CHIP:DMG: } - [1666952247.583798][5523:5523] CHIP:DMG: - [1666952247.583867][5523:5523] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666952247.583923][5523:5523] CHIP:DMG: { - [1666952247.584002][5523:5523] CHIP:DMG: data = 007ee30008afd6097d214467e50b2d76866fd8607b4ce9b1edf46c7178b36f801076b9660a84298c1205a215dd5fb346203daaadd1d55a849de8778e02811b15cba9abdf49bdc8 - [1666952247.584060][5523:5523] CHIP:DMG: buffer_ptr = 187651103269840 - [1666952247.584114][5523:5523] CHIP:DMG: } - [1666952247.584190][5523:5523] CHIP:DMG: - [1666952247.584385][5523:5523] CHIP:DMG: ReportDataMessage = - [1666952247.584453][5523:5523] CHIP:DMG: { - [1666952247.584529][5523:5523] CHIP:DMG: AttributeReportIBs = - [1666952247.584610][5523:5523] CHIP:DMG: [ - [1666952247.584673][5523:5523] CHIP:DMG: AttributeReportIB = - [1666952247.584758][5523:5523] CHIP:DMG: { - [1666952247.584848][5523:5523] CHIP:DMG: AttributeDataIB = - [1666952247.584930][5523:5523] CHIP:DMG: { - [1666952247.585036][5523:5523] CHIP:DMG: DataVersion = 0x20b42cf7, - [1666952247.585118][5523:5523] CHIP:DMG: AttributePathIB = - [1666952247.585237][5523:5523] CHIP:DMG: { - [1666952247.585335][5523:5523] CHIP:DMG: Endpoint = 0x1, - [1666952247.585448][5523:5523] CHIP:DMG: Cluster = 0x201, - [1666952247.585537][5523:5523] CHIP:DMG: Attribute = 0x0000_001C, - [1666952247.585654][5523:5523] CHIP:DMG: } - [1666952247.585765][5523:5523] CHIP:DMG: - [1666952247.585856][5523:5523] CHIP:DMG: Data = 1, - [1666952247.585957][5523:5523] CHIP:DMG: }, - [1666952247.586053][5523:5523] CHIP:DMG: - [1666952247.586145][5523:5523] CHIP:DMG: }, - [1666952247.586229][5523:5523] CHIP:DMG: - [1666952247.586291][5523:5523] CHIP:DMG: ], - disabled: true - - - label: - "Step 2: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order" - PICS: TSTAT.C.AO-READ - verification: | - Most of optional attribute is not implemented in SDK - - - https://github.com/project-chip/connectedhomeip/issues/15626 - disabled: true - - - label: - "Step 3: DUT writes a suitable value to all supported mandatory - attributes on the TH one at a time in a manufacturer specific order" - PICS: TSTAT.C.AM-WRITE - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - ./chip-tool thermostat write system-mode 2 1 1 - - Verify the WriteRequestMessage on TH(thermostat-app) - - [1666952315.223166][5547:5547] CHIP:EM: Handling via exchange: 40014r, Delegate: 0xaaaabacd6d38 - [1666952315.223290][5547:5547] CHIP:IM: Received Write request - [1666952315.223349][5547:5547] CHIP:DMG: IM WH moving to [Initialized] - [1666952315.223501][5547:5547] CHIP:DMG: WriteRequestMessage = - [1666952315.223587][5547:5547] CHIP:DMG: { - [1666952315.223647][5547:5547] CHIP:DMG: suppressResponse = false, - [1666952315.223715][5547:5547] CHIP:DMG: timedRequest = false, - [1666952315.223799][5547:5547] CHIP:DMG: AttributeDataIBs = - [1666952315.223876][5547:5547] CHIP:DMG: [ - [1666952315.223938][5547:5547] CHIP:DMG: AttributeDataIB = - [1666952315.224046][5547:5547] CHIP:DMG: { - [1666952315.224118][5547:5547] CHIP:DMG: AttributePathIB = - [1666952315.224237][5547:5547] CHIP:DMG: { - [1666952315.224344][5547:5547] CHIP:DMG: Endpoint = 0x1, - [1666952315.224434][5547:5547] CHIP:DMG: Cluster = 0x201, - [1666952315.224548][5547:5547] CHIP:DMG: Attribute = 0x0000_001C, - [1666952315.224630][5547:5547] CHIP:DMG: } - [1666952315.224735][5547:5547] CHIP:DMG: - [1666952315.224822][5547:5547] CHIP:DMG: Data = 2, - [1666952315.224916][5547:5547] CHIP:DMG: }, - [1666952315.224999][5547:5547] CHIP:DMG: - [1666952315.225061][5547:5547] CHIP:DMG: ], - [1666952315.225156][5547:5547] CHIP:DMG: - [1666952315.225407][5547:5547] CHIP:DMG: moreChunkedMessages = false, - [1666952315.225499][5547:5547] CHIP:DMG: InteractionModelRevision = 1 - [1666952315.225558][5547:5547] CHIP:DMG: }, - [1666952315.225770][5547:5547] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=m - [1666952315.225877][5547:5547] CHIP:DMG: AccessControl: allowed - [1666952315.225993][5547:5547] CHIP:DMG: Endpoint 1, Cluster 0x0000_0201 update version to 26951d9b - [1666952315.226108][5547:5547] CHIP:DMG: IM WH moving to [AddStatus] - [1666952315.226827][5547:5547] CHIP:EM: <<< [E:40014r M:9653961 (Ack:42468606)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:07 (IM:WriteResponse) - [1666952315.226938][5547:5547] CHIP:IN: (S) Sending msg 9653961 on secure session with LSID: 64565 - [1666952315.227822][5547:5547] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:33368 | 9653961 | [Interaction Model (1) / Write Response (0x07) / Session = 53259 / Exchange = 40014] - [1666952315.227925][5547:5547] CHIP:DMG: Header Flags = - [1666952315.227983][5547:5547] CHIP:DMG: { - [1666952315.228073][5547:5547] CHIP:DMG: Exchange (0x06) = - [1666952315.228130][5547:5547] CHIP:DMG: { - [1666952315.228190][5547:5547] CHIP:DMG: AckMsg = 42468606 - [1666952315.228270][5547:5547] CHIP:DMG: NeedsAck = true - [1666952315.228327][5547:5547] CHIP:DMG: } - [1666952315.228402][5547:5547] CHIP:DMG: } - [1666952315.228485][5547:5547] CHIP:DMG: - [1666952315.228556][5547:5547] CHIP:DMG: Encrypted Payload (63 bytes) = - [1666952315.228614][5547:5547] CHIP:DMG: { - [1666952315.228693][5547:5547] CHIP:DMG: data = 000bd000c94e9300ba13b443ba129f21dda5c76aca803ace28abeb29f3026e08be154db2f5f310a70ad76121537736e6e5554a952c9b1180fec8c1c3660be6 - [1666952315.228751][5547:5547] CHIP:DMG: buffer_ptr = 187650847962096 - [1666952315.228805][5547:5547] CHIP:DMG: } - [1666952315.228878][5547:5547] CHIP:DMG: - [1666952315.229004][5547:5547] CHIP:DMG: WriteResponseMessage = - [1666952315.229073][5547:5547] CHIP:DMG: { - [1666952315.229127][5547:5547] CHIP:DMG: AttributeStatusIBs = - [1666952315.229206][5547:5547] CHIP:DMG: [ - [1666952315.229267][5547:5547] CHIP:DMG: AttributeStatusIB = - [1666952315.229349][5547:5547] CHIP:DMG: { - [1666952315.229424][5547:5547] CHIP:DMG: AttributePathIB = - [1666952315.229506][5547:5547] CHIP:DMG: { - [1666952315.229591][5547:5547] CHIP:DMG: Endpoint = 0x1, - [1666952315.229677][5547:5547] CHIP:DMG: Cluster = 0x201, - [1666952315.229764][5547:5547] CHIP:DMG: Attribute = 0x0000_001C, - [1666952315.229844][5547:5547] CHIP:DMG: } - [1666952315.229937][5547:5547] CHIP:DMG: - [1666952315.230015][5547:5547] CHIP:DMG: StatusIB = - [1666952315.230098][5547:5547] CHIP:DMG: { - [1666952315.230179][5547:5547] CHIP:DMG: status = 0x00 (SUCCESS), - [1666952315.230260][5547:5547] CHIP:DMG: }, - [1666952315.230340][5547:5547] CHIP:DMG: - [1666952315.230412][5547:5547] CHIP:DMG: }, - - - - - ./chip-tool thermostat write control-sequence-of-operation 1 1 1 - Verify the WriteRequestMessage on TH(thermostat-app) - - [1666952355.926940][5547:5547] CHIP:EM: Handling via exchange: 19955r, Delegate: 0xaaaabacd6d38 - [1666952355.927042][5547:5547] CHIP:IM: Received Write request - [1666952355.927101][5547:5547] CHIP:DMG: IM WH moving to [Initialized] - [1666952355.927258][5547:5547] CHIP:DMG: WriteRequestMessage = - [1666952355.927347][5547:5547] CHIP:DMG: { - [1666952355.927407][5547:5547] CHIP:DMG: suppressResponse = false, - [1666952355.927476][5547:5547] CHIP:DMG: timedRequest = false, - [1666952355.927563][5547:5547] CHIP:DMG: AttributeDataIBs = - [1666952355.927643][5547:5547] CHIP:DMG: [ - [1666952355.927706][5547:5547] CHIP:DMG: AttributeDataIB = - [1666952355.927789][5547:5547] CHIP:DMG: { - [1666952355.927859][5547:5547] CHIP:DMG: AttributePathIB = - [1666952355.927982][5547:5547] CHIP:DMG: { - [1666952355.928078][5547:5547] CHIP:DMG: Endpoint = 0x1, - [1666952355.928193][5547:5547] CHIP:DMG: Cluster = 0x201, - [1666952355.928292][5547:5547] CHIP:DMG: Attribute = 0x0000_001B, - [1666952355.928406][5547:5547] CHIP:DMG: } - [1666952355.928493][5547:5547] CHIP:DMG: - [1666952355.928610][5547:5547] CHIP:DMG: Data = 1, - [1666952355.928698][5547:5547] CHIP:DMG: }, - [1666952355.928802][5547:5547] CHIP:DMG: - [1666952355.928866][5547:5547] CHIP:DMG: ], - [1666952355.928940][5547:5547] CHIP:DMG: - [1666952355.929027][5547:5547] CHIP:DMG: moreChunkedMessages = false, - [1666952355.929092][5547:5547] CHIP:DMG: InteractionModelRevision = 1 - [1666952355.929179][5547:5547] CHIP:DMG: }, - [1666952355.929392][5547:5547] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=m - [1666952355.929479][5547:5547] CHIP:DMG: AccessControl: allowed - [1666952355.929592][5547:5547] CHIP:DMG: Endpoint 1, Cluster 0x0000_0201 update version to 26951d9c - [1666952355.929708][5547:5547] CHIP:DMG: IM WH moving to [AddStatus] - [1666952355.930385][5547:5547] CHIP:EM: <<< [E:19955r M:206996235 (Ack:164787467)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:07 (IM:WriteResponse) - [1666952355.930495][5547:5547] CHIP:IN: (S) Sending msg 206996235 on secure session with LSID: 64566 - [1666952355.931306][5547:5547] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:50950 | 206996235 | [Interaction Model (1) / Write Response (0x07) / Session = 54514 / Exchange = 19955] - [1666952355.931417][5547:5547] CHIP:DMG: Header Flags = - [1666952355.931476][5547:5547] CHIP:DMG: { - [1666952355.931566][5547:5547] CHIP:DMG: Exchange (0x06) = - [1666952355.931625][5547:5547] CHIP:DMG: { - [1666952355.931686][5547:5547] CHIP:DMG: AckMsg = 164787467 - [1666952355.931742][5547:5547] CHIP:DMG: NeedsAck = true - [1666952355.931797][5547:5547] CHIP:DMG: } - [1666952355.931897][5547:5547] CHIP:DMG: } - [1666952355.931954][5547:5547] CHIP:DMG: - [1666952355.932046][5547:5547] CHIP:DMG: Encrypted Payload (63 bytes) = - [1666952355.932104][5547:5547] CHIP:DMG: { - [1666952355.932160][5547:5547] CHIP:DMG: data = 00f2d4000b83560c39c00c331a1baabb444bf9962b11291cbd1d92449cb00ebf401dd998b1d4f268a51ad2591f11215b2592b676fe2d53587ad6c5c6b6722a - [1666952355.932217][5547:5547] CHIP:DMG: buffer_ptr = 187650847961312 - [1666952355.932272][5547:5547] CHIP:DMG: } - [1666952355.932351][5547:5547] CHIP:DMG: - [1666952355.932482][5547:5547] CHIP:DMG: WriteResponseMessage = - [1666952355.932573][5547:5547] CHIP:DMG: { - [1666952355.932628][5547:5547] CHIP:DMG: AttributeStatusIBs = - [1666952355.932729][5547:5547] CHIP:DMG: [ - [1666952355.932795][5547:5547] CHIP:DMG: AttributeStatusIB = - [1666952355.932877][5547:5547] CHIP:DMG: { - [1666952355.932972][5547:5547] CHIP:DMG: AttributePathIB = - [1666952355.933067][5547:5547] CHIP:DMG: { - [1666952355.933182][5547:5547] CHIP:DMG: Endpoint = 0x1, - [1666952355.933281][5547:5547] CHIP:DMG: Cluster = 0x201, - [1666952355.933404][5547:5547] CHIP:DMG: Attribute = 0x0000_001B, - [1666952355.933494][5547:5547] CHIP:DMG: } - [1666952355.933617][5547:5547] CHIP:DMG: - [1666952355.933707][5547:5547] CHIP:DMG: StatusIB = - [1666952355.933815][5547:5547] CHIP:DMG: { - [1666952355.933909][5547:5547] CHIP:DMG: status = 0x00 (SUCCESS), - [1666952355.934025][5547:5547] CHIP:DMG: }, - [1666952355.934117][5547:5547] CHIP:DMG: - [1666952355.934189][5547:5547] CHIP:DMG: }, - [1666952355.934304][5547:5547] CHIP:DMG: - [1666952355.934366][5547:5547] CHIP:DMG: ], - disabled: true - - - label: - "Step 4: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order" - PICS: TSTAT.C.AO-WRITE - verification: | - Verify by sending the optional attribute which is mentioned in spec - - Most of optional attribute is not implemented in SDK - disabled: true - - - label: - "Step 5: Configure TH such that it implements mandatory and none of - the optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - To verify all below steps use all-clusters-minimal-app - - ./chip-tool thermostat read feature-map 1 1 - verify on TH(all-cluster-minimal-app) receives the Read Request Message - - [1666952645.116645][5988:5988] CHIP:EM: Handling via exchange: 48700r, Delegate: 0xaaaad96680e0 - [1666952645.116825][5988:5988] CHIP:IM: Received Read request - [1666952645.117083][5988:5988] CHIP:DMG: ReadRequestMessage = - [1666952645.117235][5988:5988] CHIP:DMG: { - [1666952645.117363][5988:5988] CHIP:DMG: AttributePathIBs = - [1666952645.117611][5988:5988] CHIP:DMG: [ - [1666952645.117805][5988:5988] CHIP:DMG: AttributePathIB = - [1666952645.118031][5988:5988] CHIP:DMG: { - [1666952645.118263][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666952645.118526][5988:5988] CHIP:DMG: Cluster = 0x201, - [1666952645.118930][5988:5988] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666952645.119197][5988:5988] CHIP:DMG: } - [1666952645.119429][5988:5988] CHIP:DMG: - [1666952645.119654][5988:5988] CHIP:DMG: ], - [1666952645.119856][5988:5988] CHIP:DMG: - [1666952645.120055][5988:5988] CHIP:DMG: isFabricFiltered = true, - [1666952645.120246][5988:5988] CHIP:DMG: InteractionModelRevision = 1 - [1666952645.120432][5988:5988] CHIP:DMG: }, - [1666952645.120684][5988:5988] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952645.121016][5988:5988] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952645.121177][5988:5988] CHIP:DMG: Cluster 201, Attribute fffc is dirty - [1666952645.121309][5988:5988] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - [1666952645.121454][5988:5988] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666952645.121605][5988:5988] CHIP:DMG: AccessControl: allowed - [1666952645.121808][5988:5988] CHIP:DMG: Sending report (payload has 38 bytes)... - [1666952645.122505][5988:5988] CHIP:EM: <<< [E:48700r M:122322767 (Ack:59445400)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666952645.122637][5988:5988] CHIP:IN: (S) Sending msg 122322767 on secure session with LSID: 10696 - [1666952645.123579][5988:5988] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:59359 | 122322767 | [Interaction Model (1) / Report Data (0x05) / Session = 64481 / Exchange = 48700] - [1666952645.123699][5988:5988] CHIP:DMG: Header Flags = - [1666952645.123761][5988:5988] CHIP:DMG: { - [1666952645.123855][5988:5988] CHIP:DMG: Exchange (0x06) = - [1666952645.123914][5988:5988] CHIP:DMG: { - [1666952645.123976][5988:5988] CHIP:DMG: AckMsg = 59445400 - [1666952645.124033][5988:5988] CHIP:DMG: NeedsAck = true - [1666952645.124088][5988:5988] CHIP:DMG: } - [1666952645.124163][5988:5988] CHIP:DMG: } - [1666952645.124211][5988:5988] CHIP:DMG: - [1666952645.124282][5988:5988] CHIP:DMG: Encrypted Payload (72 bytes) = - [1666952645.124340][5988:5988] CHIP:DMG: { - [1666952645.124398][5988:5988] CHIP:DMG: data = 00e1fb004f7f4a074bda6ee4183c1a50a28662f1c9f84586706ba9e4e4898ff69072838a343d12fad2c257b8a73bcc5eef3a63ce34c7450b8c51c12db004a68eafd1afa8c88ff6ca - [1666952645.124459][5988:5988] CHIP:DMG: buffer_ptr = 187650777052944 - [1666952645.124514][5988:5988] CHIP:DMG: } - [1666952645.124568][5988:5988] CHIP:DMG: - [1666952645.124742][5988:5988] CHIP:DMG: ReportDataMessage = - [1666952645.124814][5988:5988] CHIP:DMG: { - [1666952645.124872][5988:5988] CHIP:DMG: AttributeReportIBs = - [1666952645.124951][5988:5988] CHIP:DMG: [ - [1666952645.125016][5988:5988] CHIP:DMG: AttributeReportIB = - [1666952645.125107][5988:5988] CHIP:DMG: { - [1666952645.125181][5988:5988] CHIP:DMG: AttributeDataIB = - [1666952645.125272][5988:5988] CHIP:DMG: { - [1666952645.125367][5988:5988] CHIP:DMG: DataVersion = 0xdc2e5914, - [1666952645.125460][5988:5988] CHIP:DMG: AttributePathIB = - [1666952645.125554][5988:5988] CHIP:DMG: { - [1666952645.125652][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666952645.125753][5988:5988] CHIP:DMG: Cluster = 0x201, - [1666952645.125836][5988:5988] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666952645.125935][5988:5988] CHIP:DMG: } - [1666952645.126035][5988:5988] CHIP:DMG: - [1666952645.126134][5988:5988] CHIP:DMG: Data = 1, - [1666952645.126223][5988:5988] CHIP:DMG: }, - [1666952645.126310][5988:5988] CHIP:DMG: - [1666952645.126383][5988:5988] CHIP:DMG: }, - [1666952645.126467][5988:5988] CHIP:DMG: - - - ./chip-tool thermostat read attribute-list 1 1 - verify on TH(all-cluster-minimal-app) receives the Read Request Message - - [1666951258.078426][5466:5466] CHIP:EM: Handling via exchange: 13120r, Delegate: 0xaaaab26280e0 - [1666951258.078521][5466:5466] CHIP:IM: Received Read request - [1666951258.078689][5466:5466] CHIP:DMG: ReadRequestMessage = - [1666951258.078833][5466:5466] CHIP:DMG: { - [1666951258.078894][5466:5466] CHIP:DMG: AttributePathIBs = - [1666951258.078961][5466:5466] CHIP:DMG: [ - [1666951258.079023][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.079105][5466:5466] CHIP:DMG: { - [1666951258.079178][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.079268][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.079356][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.079438][5466:5466] CHIP:DMG: } - [1666951258.079517][5466:5466] CHIP:DMG: - [1666951258.079587][5466:5466] CHIP:DMG: ], - [1666951258.079658][5466:5466] CHIP:DMG: - [1666951258.079725][5466:5466] CHIP:DMG: isFabricFiltered = true, - [1666951258.079791][5466:5466] CHIP:DMG: InteractionModelRevision = 1 - [1666951258.079850][5466:5466] CHIP:DMG: }, - [1666951258.080022][5466:5466] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666951258.080237][5466:5466] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666951258.080310][5466:5466] CHIP:DMG: Cluster 201, Attribute fffb is dirty - [1666951258.080366][5466:5466] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) - [1666951258.080430][5466:5466] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666951258.080506][5466:5466] CHIP:DMG: AccessControl: allowed - [1666951258.080690][5466:5466] CHIP:DMG: Sending report (payload has 313 bytes)... - [1666951258.081302][5466:5466] CHIP:EM: <<< [E:13120r M:26460859 (Ack:143052534)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666951258.081405][5466:5466] CHIP:IN: (S) Sending msg 26460859 on secure session with LSID: 45983 - [1666951258.082333][5466:5466] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:59536 | 26460859 | [Interaction Model (1) / Report Data (0x05) / Session = 40269 / Exchange = 13120] - [1666951258.082432][5466:5466] CHIP:DMG: Header Flags = - [1666951258.082490][5466:5466] CHIP:DMG: { - [1666951258.082577][5466:5466] CHIP:DMG: Exchange (0x06) = - [1666951258.082634][5466:5466] CHIP:DMG: { - [1666951258.082695][5466:5466] CHIP:DMG: AckMsg = 143052534 - [1666951258.082792][5466:5466] CHIP:DMG: NeedsAck = true - [1666951258.082848][5466:5466] CHIP:DMG: } - [1666951258.082920][5466:5466] CHIP:DMG: } - [1666951258.082976][5466:5466] CHIP:DMG: - [1666951258.083045][5466:5466] CHIP:DMG: Encrypted Payload (347 bytes) = - [1666951258.083100][5466:5466] CHIP:DMG: { - [1666951258.083155][5466:5466] CHIP:DMG: data = 004d9d00bbc29301194a6d83521606e6f1531417acbf717a18722f6d5200bc788506e7b07690cd42f23c3731f427415d294482395bd940ded7d98438041ae9fe5042d90a883bab2a9ca2a4b96ca2c3aa64508a6a50d819db68f58e17b5e011bad06e9302c05ba7682596074c05029edf4f5b1433230c16b709f683e2d88333867528db1bd800de3c563f83dc7afccf2b965d4864d8370028cadb90e438275fb34268d9493a76cdcfec3c2eeec55b3a986dcea555fbfeb44aba1393925b5e07181d612f24be3170a87a46f86398dc2a9cbeac3b338cea029e0eb23490aec479668569ba2d3ca12a8eecbd05ab26dedc4dcda11aba7a4ba9d8d36b2690a01b190f0627f4ba8f59ca2301c7ec7b8e3d5ac43fb73eeec6ccb1bf00c4d25a1fcd9838c2294da6ff9995b3bc059b873169d3fc6572eeda760f7f3c4cd72f813169afc7d1c3b2586833eff3c9f1f684606ebfa7e02a950b6d5d84ce8c9dcb - [1666951258.083229][5466:5466] CHIP:DMG: buffer_ptr = 187651008656048 - [1666951258.083282][5466:5466] CHIP:DMG: } - [1666951258.083334][5466:5466] CHIP:DMG: - [1666951258.083929][5466:5466] CHIP:DMG: ReportDataMessage = - [1666951258.084001][5466:5466] CHIP:DMG: { - [1666951258.084057][5466:5466] CHIP:DMG: AttributeReportIBs = - [1666951258.084145][5466:5466] CHIP:DMG: [ - [1666951258.084209][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.084295][5466:5466] CHIP:DMG: { - [1666951258.084367][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.084452][5466:5466] CHIP:DMG: { - [1666951258.084534][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.084624][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.084717][5466:5466] CHIP:DMG: { - [1666951258.084801][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.084894][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.085060][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.085153][5466:5466] CHIP:DMG: } - [1666951258.085242][5466:5466] CHIP:DMG: - [1666951258.085318][5466:5466] CHIP:DMG: Data = [ - [1666951258.085401][5466:5466] CHIP:DMG: - [1666951258.085497][5466:5466] CHIP:DMG: ], - [1666951258.085577][5466:5466] CHIP:DMG: }, - [1666951258.085664][5466:5466] CHIP:DMG: - [1666951258.085734][5466:5466] CHIP:DMG: }, - [1666951258.085831][5466:5466] CHIP:DMG: - [1666951258.085893][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.085977][5466:5466] CHIP:DMG: { - [1666951258.086049][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.086127][5466:5466] CHIP:DMG: { - [1666951258.086218][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.086306][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.086397][5466:5466] CHIP:DMG: { - [1666951258.086483][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.086582][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.086679][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.086889][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.086978][5466:5466] CHIP:DMG: } - [1666951258.087075][5466:5466] CHIP:DMG: - [1666951258.087171][5466:5466] CHIP:DMG: Data = 0, - [1666951258.087250][5466:5466] CHIP:DMG: }, - [1666951258.087331][5466:5466] CHIP:DMG: - [1666951258.087400][5466:5466] CHIP:DMG: }, - [1666951258.087497][5466:5466] CHIP:DMG: - [1666951258.087559][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.087644][5466:5466] CHIP:DMG: { - [1666951258.087723][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.087809][5466:5466] CHIP:DMG: { - [1666951258.087896][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.087978][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.088060][5466:5466] CHIP:DMG: { - [1666951258.088146][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.088245][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.088337][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.088428][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.088521][5466:5466] CHIP:DMG: } - [1666951258.088608][5466:5466] CHIP:DMG: - [1666951258.088695][5466:5466] CHIP:DMG: Data = 18, - [1666951258.088773][5466:5466] CHIP:DMG: }, - [1666951258.088860][5466:5466] CHIP:DMG: - [1666951258.088930][5466:5466] CHIP:DMG: }, - [1666951258.089026][5466:5466] CHIP:DMG: - [1666951258.089087][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.089171][5466:5466] CHIP:DMG: { - [1666951258.089323][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.089416][5466:5466] CHIP:DMG: { - [1666951258.089499][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.089573][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.089663][5466:5466] CHIP:DMG: { - [1666951258.089748][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.089837][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.089927][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.090013][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.090098][5466:5466] CHIP:DMG: } - [1666951258.090186][5466:5466] CHIP:DMG: - [1666951258.090273][5466:5466] CHIP:DMG: Data = 27, - [1666951258.090345][5466:5466] CHIP:DMG: }, - [1666951258.090431][5466:5466] CHIP:DMG: - [1666951258.090502][5466:5466] CHIP:DMG: }, - [1666951258.090607][5466:5466] CHIP:DMG: - [1666951258.090675][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.090788][5466:5466] CHIP:DMG: { - [1666951258.090941][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.091026][5466:5466] CHIP:DMG: { - [1666951258.091116][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.091190][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.091272][5466:5466] CHIP:DMG: { - [1666951258.091585][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.091690][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.091840][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.091924][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.092005][5466:5466] CHIP:DMG: } - [1666951258.092090][5466:5466] CHIP:DMG: - [1666951258.092176][5466:5466] CHIP:DMG: Data = 28, - [1666951258.092263][5466:5466] CHIP:DMG: }, - [1666951258.092351][5466:5466] CHIP:DMG: - [1666951258.092422][5466:5466] CHIP:DMG: }, - [1666951258.092519][5466:5466] CHIP:DMG: - [1666951258.092582][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.092668][5466:5466] CHIP:DMG: { - [1666951258.092740][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.092820][5466:5466] CHIP:DMG: { - [1666951258.092903][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.092984][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.093068][5466:5466] CHIP:DMG: { - [1666951258.093161][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.093253][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.093342][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.093429][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.093522][5466:5466] CHIP:DMG: } - [1666951258.093610][5466:5466] CHIP:DMG: - [1666951258.093696][5466:5466] CHIP:DMG: Data = 65528, - [1666951258.093776][5466:5466] CHIP:DMG: }, - [1666951258.094154][5466:5466] CHIP:DMG: - [1666951258.094233][5466:5466] CHIP:DMG: }, - [1666951258.094331][5466:5466] CHIP:DMG: - [1666951258.094476][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.094566][5466:5466] CHIP:DMG: { - [1666951258.094639][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.094799][5466:5466] CHIP:DMG: { - [1666951258.094888][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.095033][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.095133][5466:5466] CHIP:DMG: { - [1666951258.095220][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.095319][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.095416][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.095506][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.095654][5466:5466] CHIP:DMG: } - [1666951258.095742][5466:5466] CHIP:DMG: - [1666951258.095882][5466:5466] CHIP:DMG: Data = 65529, - [1666951258.095975][5466:5466] CHIP:DMG: }, - [1666951258.096063][5466:5466] CHIP:DMG: - [1666951258.096142][5466:5466] CHIP:DMG: }, - [1666951258.096242][5466:5466] CHIP:DMG: - [1666951258.096304][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.096397][5466:5466] CHIP:DMG: { - [1666951258.096477][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.096627][5466:5466] CHIP:DMG: { - [1666951258.096718][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.096799][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.096884][5466:5466] CHIP:DMG: { - [1666951258.096977][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.097069][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.097162][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.097248][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.097335][5466:5466] CHIP:DMG: } - [1666951258.097430][5466:5466] CHIP:DMG: - [1666951258.097516][5466:5466] CHIP:DMG: Data = 65531, - [1666951258.097661][5466:5466] CHIP:DMG: }, - [1666951258.097748][5466:5466] CHIP:DMG: - [1666951258.097818][5466:5466] CHIP:DMG: }, - [1666951258.097914][5466:5466] CHIP:DMG: - [1666951258.097976][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.098059][5466:5466] CHIP:DMG: { - [1666951258.098139][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.098218][5466:5466] CHIP:DMG: { - [1666951258.098292][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.098373][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.098457][5466:5466] CHIP:DMG: { - [1666951258.098542][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.098640][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.098758][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.098845][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.098928][5466:5466] CHIP:DMG: } - [1666951258.099017][5466:5466] CHIP:DMG: - [1666951258.099103][5466:5466] CHIP:DMG: Data = 65532, - [1666951258.099188][5466:5466] CHIP:DMG: }, - [1666951258.099274][5466:5466] CHIP:DMG: - [1666951258.099344][5466:5466] CHIP:DMG: }, - [1666951258.099438][5466:5466] CHIP:DMG: - [1666951258.099499][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951258.099582][5466:5466] CHIP:DMG: { - [1666951258.099653][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951258.099739][5466:5466] CHIP:DMG: { - [1666951258.099818][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951258.099899][5466:5466] CHIP:DMG: AttributePathIB = - [1666951258.099989][5466:5466] CHIP:DMG: { - [1666951258.100073][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951258.100171][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951258.100259][5466:5466] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666951258.100353][5466:5466] CHIP:DMG: ListIndex = Null, - [1666951258.100443][5466:5466] CHIP:DMG: } - [1666951258.100538][5466:5466] CHIP:DMG: - [1666951258.100623][5466:5466] CHIP:DMG: Data = 65533, - [1666951258.100709][5466:5466] CHIP:DMG: }, - [1666951258.100795][5466:5466] CHIP:DMG: - [1666951258.100863][5466:5466] CHIP:DMG: }, - [1666951258.100940][5466:5466] CHIP:DMG: - [1666951258.101000][5466:5466] CHIP:DMG: ], - - - - - ./chip-tool thermostat read local-temperature 1 1 - verify on TH(all-cluster-minimal-app) receives the Read Request Message - - [1666951485.740766][5466:5466] CHIP:EM: Handling via exchange: 11893r, Delegate: 0xaaaab26280e0 - [1666951485.740865][5466:5466] CHIP:IM: Received Read request - [1666951485.741040][5466:5466] CHIP:DMG: ReadRequestMessage = - [1666951485.741108][5466:5466] CHIP:DMG: { - [1666951485.741163][5466:5466] CHIP:DMG: AttributePathIBs = - [1666951485.741229][5466:5466] CHIP:DMG: [ - [1666951485.741400][5466:5466] CHIP:DMG: AttributePathIB = - [1666951485.741488][5466:5466] CHIP:DMG: { - [1666951485.741569][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951485.741667][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951485.741750][5466:5466] CHIP:DMG: Attribute = 0x0000_0000, - [1666951485.741827][5466:5466] CHIP:DMG: } - [1666951485.742035][5466:5466] CHIP:DMG: - [1666951485.742115][5466:5466] CHIP:DMG: ], - [1666951485.742188][5466:5466] CHIP:DMG: - [1666951485.742258][5466:5466] CHIP:DMG: isFabricFiltered = true, - [1666951485.742324][5466:5466] CHIP:DMG: InteractionModelRevision = 1 - [1666951485.742383][5466:5466] CHIP:DMG: }, - [1666951485.742555][5466:5466] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666951485.743017][5466:5466] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666951485.743101][5466:5466] CHIP:DMG: Cluster 201, Attribute 0 is dirty - [1666951485.743158][5466:5466] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1666951485.743310][5466:5466] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666951485.743387][5466:5466] CHIP:DMG: AccessControl: allowed - [1666951485.743510][5466:5466] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666951485.744094][5466:5466] CHIP:EM: <<< [E:11893r M:246688943 (Ack:135368864)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666951485.744209][5466:5466] CHIP:IN: (S) Sending msg 246688943 on secure session with LSID: 45984 - [1666951485.744932][5466:5466] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:40236 | 246688943 | [Interaction Model (1) / Report Data (0x05) / Session = 16201 / Exchange = 11893] - [1666951485.745037][5466:5466] CHIP:DMG: Header Flags = - [1666951485.745096][5466:5466] CHIP:DMG: { - [1666951485.745187][5466:5466] CHIP:DMG: Exchange (0x06) = - [1666951485.745244][5466:5466] CHIP:DMG: { - [1666951485.745304][5466:5466] CHIP:DMG: AckMsg = 135368864 - [1666951485.745360][5466:5466] CHIP:DMG: NeedsAck = true - [1666951485.745414][5466:5466] CHIP:DMG: } - [1666951485.745487][5466:5466] CHIP:DMG: } - [1666951485.745542][5466:5466] CHIP:DMG: - [1666951485.745610][5466:5466] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666951485.745665][5466:5466] CHIP:DMG: { - [1666951485.745720][5466:5466] CHIP:DMG: data = 00493f00af2cb40e068c846db1feac48acc0f7d42291e7ab0758921068f9eea40375dc80ba3edc283a193f288e8820bcdd707b47b1bc1ac105ea01e423d92bfed065447dc3bb21 - [1666951485.745778][5466:5466] CHIP:DMG: buffer_ptr = 187651008656224 - [1666951485.745832][5466:5466] CHIP:DMG: } - [1666951485.745884][5466:5466] CHIP:DMG: - [1666951485.746048][5466:5466] CHIP:DMG: ReportDataMessage = - [1666951485.746117][5466:5466] CHIP:DMG: { - [1666951485.746172][5466:5466] CHIP:DMG: AttributeReportIBs = - [1666951485.746250][5466:5466] CHIP:DMG: [ - [1666951485.746312][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951485.746404][5466:5466] CHIP:DMG: { - [1666951485.746480][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951485.746564][5466:5466] CHIP:DMG: { - [1666951485.746776][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951485.746862][5466:5466] CHIP:DMG: AttributePathIB = - [1666951485.746950][5466:5466] CHIP:DMG: { - [1666951485.747041][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951485.747133][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951485.747224][5466:5466] CHIP:DMG: Attribute = 0x0000_0000, - [1666951485.747423][5466:5466] CHIP:DMG: } - [1666951485.747523][5466:5466] CHIP:DMG: - [1666951485.747617][5466:5466] CHIP:DMG: Data = 0, - [1666951485.747699][5466:5466] CHIP:DMG: }, - [1666951485.747786][5466:5466] CHIP:DMG: - [1666951485.747860][5466:5466] CHIP:DMG: }, - [1666951485.747945][5466:5466] CHIP:DMG: - [1666951485.748008][5466:5466] CHIP:DMG: ], - - - - ./chip-tool thermostat read control-sequence-of-operation 1 1 - - Verify the ReadRequestMessage on TH(all-cluster-minimal-app) - - [1666951649.029221][5466:5466] CHIP:EM: Handling via exchange: 52404r, Delegate: 0xaaaab26280e0 - [1666951649.029318][5466:5466] CHIP:IM: Received Read request - [1666951649.029488][5466:5466] CHIP:DMG: ReadRequestMessage = - [1666951649.029555][5466:5466] CHIP:DMG: { - [1666951649.029609][5466:5466] CHIP:DMG: AttributePathIBs = - [1666951649.029674][5466:5466] CHIP:DMG: [ - [1666951649.029736][5466:5466] CHIP:DMG: AttributePathIB = - [1666951649.029823][5466:5466] CHIP:DMG: { - [1666951649.029896][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951649.029985][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951649.030072][5466:5466] CHIP:DMG: Attribute = 0x0000_001B, - [1666951649.030149][5466:5466] CHIP:DMG: } - [1666951649.030227][5466:5466] CHIP:DMG: - [1666951649.030297][5466:5466] CHIP:DMG: ], - [1666951649.030369][5466:5466] CHIP:DMG: - [1666951649.030437][5466:5466] CHIP:DMG: isFabricFiltered = true, - [1666951649.030501][5466:5466] CHIP:DMG: InteractionModelRevision = 1 - [1666951649.030560][5466:5466] CHIP:DMG: }, - [1666951649.030781][5466:5466] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666951649.030999][5466:5466] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666951649.031072][5466:5466] CHIP:DMG: Cluster 201, Attribute 1b is dirty - [1666951649.031131][5466:5466] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_001B (expanded=0) - [1666951649.031199][5466:5466] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666951649.031275][5466:5466] CHIP:DMG: AccessControl: allowed - [1666951649.031392][5466:5466] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666951649.031898][5466:5466] CHIP:EM: <<< [E:52404r M:80802549 (Ack:174395409)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666951649.032001][5466:5466] CHIP:IN: (S) Sending msg 80802549 on secure session with LSID: 45985 - [1666951649.032653][5466:5466] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:37686 | 80802549 | [Interaction Model (1) / Report Data (0x05) / Session = 45395 / Exchange = 52404] - [1666951649.032750][5466:5466] CHIP:DMG: Header Flags = - [1666951649.032807][5466:5466] CHIP:DMG: { - [1666951649.032895][5466:5466] CHIP:DMG: Exchange (0x06) = - [1666951649.032951][5466:5466] CHIP:DMG: { - [1666951649.033010][5466:5466] CHIP:DMG: AckMsg = 174395409 - [1666951649.033065][5466:5466] CHIP:DMG: NeedsAck = true - [1666951649.033118][5466:5466] CHIP:DMG: } - [1666951649.033190][5466:5466] CHIP:DMG: } - [1666951649.033245][5466:5466] CHIP:DMG: - [1666951649.033310][5466:5466] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666951649.033365][5466:5466] CHIP:DMG: { - [1666951649.033419][5466:5466] CHIP:DMG: data = 0053b100f5f2d004f96a4d70c4b16122f251e4d299237245e6542fab668c2571f0b7aa5c4900c9af4e4f8c3e609ce74aa50968f953121b25ac374736a62e348ae61a263128350d - [1666951649.033477][5466:5466] CHIP:DMG: buffer_ptr = 187651008663600 - [1666951649.033529][5466:5466] CHIP:DMG: } - [1666951649.033581][5466:5466] CHIP:DMG: - [1666951649.033735][5466:5466] CHIP:DMG: ReportDataMessage = - [1666951649.033959][5466:5466] CHIP:DMG: { - [1666951649.034017][5466:5466] CHIP:DMG: AttributeReportIBs = - [1666951649.034097][5466:5466] CHIP:DMG: [ - [1666951649.034159][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951649.034246][5466:5466] CHIP:DMG: { - [1666951649.034318][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951649.034406][5466:5466] CHIP:DMG: { - [1666951649.034490][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951649.034572][5466:5466] CHIP:DMG: AttributePathIB = - [1666951649.034657][5466:5466] CHIP:DMG: { - [1666951649.034782][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951649.034885][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951649.034982][5466:5466] CHIP:DMG: Attribute = 0x0000_001B, - [1666951649.035068][5466:5466] CHIP:DMG: } - [1666951649.035157][5466:5466] CHIP:DMG: - [1666951649.035244][5466:5466] CHIP:DMG: Data = 4, - [1666951649.035323][5466:5466] CHIP:DMG: }, - [1666951649.035416][5466:5466] CHIP:DMG: - [1666951649.035486][5466:5466] CHIP:DMG: }, - [1666951649.035567][5466:5466] CHIP:DMG: - [1666951649.035629][5466:5466] CHIP:DMG: ], - - - ./chip-tool thermostat read system-mode 1 1 - - Verify the ReadRequestMessage on TH(all-clusters-app) - - [1666951722.178349][5466:5466] CHIP:EM: Handling via exchange: 21521r, Delegate: 0xaaaab26280e0 - [1666951722.178443][5466:5466] CHIP:IM: Received Read request - [1666951722.178611][5466:5466] CHIP:DMG: ReadRequestMessage = - [1666951722.178678][5466:5466] CHIP:DMG: { - [1666951722.178800][5466:5466] CHIP:DMG: AttributePathIBs = - [1666951722.178878][5466:5466] CHIP:DMG: [ - [1666951722.178950][5466:5466] CHIP:DMG: AttributePathIB = - [1666951722.179021][5466:5466] CHIP:DMG: { - [1666951722.179094][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951722.179322][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951722.179408][5466:5466] CHIP:DMG: Attribute = 0x0000_001C, - [1666951722.179490][5466:5466] CHIP:DMG: } - [1666951722.179572][5466:5466] CHIP:DMG: - [1666951722.179644][5466:5466] CHIP:DMG: ], - [1666951722.179715][5466:5466] CHIP:DMG: - [1666951722.179782][5466:5466] CHIP:DMG: isFabricFiltered = true, - [1666951722.179846][5466:5466] CHIP:DMG: InteractionModelRevision = 1 - [1666951722.179905][5466:5466] CHIP:DMG: }, - [1666951722.180070][5466:5466] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666951722.180283][5466:5466] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666951722.180355][5466:5466] CHIP:DMG: Cluster 201, Attribute 1c is dirty - [1666951722.180410][5466:5466] CHIP:DMG: Reading attribute: Cluster=0x0000_0201 Endpoint=1 AttributeId=0x0000_001C (expanded=0) - [1666951722.180477][5466:5466] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0201 e=1 p=v - [1666951722.180552][5466:5466] CHIP:DMG: AccessControl: allowed - [1666951722.180666][5466:5466] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666951722.181184][5466:5466] CHIP:EM: <<< [E:21521r M:214108728 (Ack:40689834)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666951722.181285][5466:5466] CHIP:IN: (S) Sending msg 214108728 on secure session with LSID: 45986 - [1666951722.181932][5466:5466] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:34735 | 214108728 | [Interaction Model (1) / Report Data (0x05) / Session = 17453 / Exchange = 21521] - [1666951722.182029][5466:5466] CHIP:DMG: Header Flags = - [1666951722.182087][5466:5466] CHIP:DMG: { - [1666951722.182176][5466:5466] CHIP:DMG: Exchange (0x06) = - [1666951722.182232][5466:5466] CHIP:DMG: { - [1666951722.182292][5466:5466] CHIP:DMG: AckMsg = 40689834 - [1666951722.182348][5466:5466] CHIP:DMG: NeedsAck = true - [1666951722.182412][5466:5466] CHIP:DMG: } - [1666951722.182485][5466:5466] CHIP:DMG: } - [1666951722.182540][5466:5466] CHIP:DMG: - [1666951722.182609][5466:5466] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666951722.182665][5466:5466] CHIP:DMG: { - [1666951722.182755][5466:5466] CHIP:DMG: data = 002d4400380ac30cae2c21e379f109decb71da8dc524b60de5152814b3d68a18cd13cf300991a58665898f260bcf99b588f9b77f2d11ee591b91ac16c48364267779b65ccd7eb8 - [1666951722.182819][5466:5466] CHIP:DMG: buffer_ptr = 187651008665008 - [1666951722.182872][5466:5466] CHIP:DMG: } - [1666951722.182924][5466:5466] CHIP:DMG: - [1666951722.183085][5466:5466] CHIP:DMG: ReportDataMessage = - [1666951722.183151][5466:5466] CHIP:DMG: { - [1666951722.183205][5466:5466] CHIP:DMG: AttributeReportIBs = - [1666951722.183288][5466:5466] CHIP:DMG: [ - [1666951722.183350][5466:5466] CHIP:DMG: AttributeReportIB = - [1666951722.183436][5466:5466] CHIP:DMG: { - [1666951722.183510][5466:5466] CHIP:DMG: AttributeDataIB = - [1666951722.183583][5466:5466] CHIP:DMG: { - [1666951722.183672][5466:5466] CHIP:DMG: DataVersion = 0x5f8a90b0, - [1666951722.183754][5466:5466] CHIP:DMG: AttributePathIB = - [1666951722.183838][5466:5466] CHIP:DMG: { - [1666951722.183926][5466:5466] CHIP:DMG: Endpoint = 0x1, - [1666951722.184024][5466:5466] CHIP:DMG: Cluster = 0x201, - [1666951722.184115][5466:5466] CHIP:DMG: Attribute = 0x0000_001C, - [1666951722.184208][5466:5466] CHIP:DMG: } - [1666951722.184306][5466:5466] CHIP:DMG: - [1666951722.184402][5466:5466] CHIP:DMG: Data = 1, - [1666951722.184482][5466:5466] CHIP:DMG: }, - [1666951722.184575][5466:5466] CHIP:DMG: - [1666951722.184646][5466:5466] CHIP:DMG: }, - [1666951722.184726][5466:5466] CHIP:DMG: - [1666951722.184788][5466:5466] CHIP:DMG: ], - disabled: true - - - label: - "Step 6: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order" - PICS: TSTAT.C.AO-READ - verification: | - Verify by sending the optional attribute which is mentioned in spec - - Most of optional attribute is not implemented in SDK - disabled: true - - - label: - "Step 7: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order" - PICS: TSTAT.C.AO-WRITE - verification: | - Verify by sending the optional attribute which is mentioned in spec - - Most of optional attribute is not implemented in SDK - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_3_1_Simulated.yaml deleted file mode 100644 index dd1aa9b26296bb..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_3_1_Simulated.yaml +++ /dev/null @@ -1,635 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 12.3.1. [TC-TSUIC-3.1] Attributes with client as DUT - -PICS: - - TSUIC.C - - TSUIC.C.AM-READ - - TSUIC.C.AO-READ - - TSUIC.C.AM-WRITE - - TSUIC.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Thermostat User Interface Configuration" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "DUT reads TemperatureDisplayMode attribute from TH" - wait: "readAttribute" - attribute: "TemperatureDisplayMode" - - - label: "DUT reads KeypadLockout attribute from TH" - wait: "readAttribute" - attribute: "KeypadLockout" - - - label: "DUT reads ScheduleProgrammingVisibility attribute from TH" - wait: "readAttribute" - attribute: "ScheduleProgrammingVisibility" - - - label: "DUT writes TemperatureDisplayMode attribute from TH" - wait: "writeAttribute" - attribute: "TemperatureDisplayMode" - arguments: - value: - - - label: "DUT writes KeypadLockout attribute from TH" - wait: "writeAttribute" - attribute: "KeypadLockout" - arguments: - value: - - - label: "DUT writes ScheduleProgrammingVisibility attribute from TH" - wait: "writeAttribute" - attribute: "ScheduleProgrammingVisibility" - arguments: - value: - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool thermostatuserinterfaceconfiguration read temperature-display-mode 1 1 - Verify DUT receives temperature-display-mode attribute response on the TH(all-clusters-minimal-app) Log: - - [1666952907.484910][5988:5988] CHIP:EM: Handling via exchange: 55230r, Delegate: 0xaaaad96680e0 - [1666952907.485012][5988:5988] CHIP:IM: Received Read request - [1666952907.485181][5988:5988] CHIP:DMG: ReadRequestMessage = - [1666952907.485247][5988:5988] CHIP:DMG: { - [1666952907.485298][5988:5988] CHIP:DMG: AttributePathIBs = - [1666952907.485363][5988:5988] CHIP:DMG: [ - [1666952907.485425][5988:5988] CHIP:DMG: AttributePathIB = - [1666952907.485499][5988:5988] CHIP:DMG: { - [1666952907.485577][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666952907.485654][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666952907.485743][5988:5988] CHIP:DMG: Attribute = 0x0000_0000, - [1666952907.485825][5988:5988] CHIP:DMG: } - [1666952907.485957][5988:5988] CHIP:DMG: - [1666952907.486032][5988:5988] CHIP:DMG: ], - [1666952907.486105][5988:5988] CHIP:DMG: - [1666952907.486173][5988:5988] CHIP:DMG: isFabricFiltered = true, - [1666952907.486237][5988:5988] CHIP:DMG: InteractionModelRevision = 1 - [1666952907.486296][5988:5988] CHIP:DMG: }, - [1666952907.486459][5988:5988] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952907.486859][5988:5988] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952907.486933][5988:5988] CHIP:DMG: Cluster 204, Attribute 0 is dirty - [1666952907.486988][5988:5988] CHIP:DMG: Reading attribute: Cluster=0x0000_0204 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1666952907.487056][5988:5988] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=v - [1666952907.487130][5988:5988] CHIP:DMG: AccessControl: allowed - [1666952907.487245][5988:5988] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666952907.487768][5988:5988] CHIP:EM: <<< [E:55230r M:41825397 (Ack:212794457)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666952907.487871][5988:5988] CHIP:IN: (S) Sending msg 41825397 on secure session with LSID: 10697 - [1666952907.488513][5988:5988] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:53323 | 41825397 | [Interaction Model (1) / Report Data (0x05) / Session = 25917 / Exchange = 55230] - [1666952907.488608][5988:5988] CHIP:DMG: Header Flags = - [1666952907.488665][5988:5988] CHIP:DMG: { - [1666952907.488754][5988:5988] CHIP:DMG: Exchange (0x06) = - [1666952907.488810][5988:5988] CHIP:DMG: { - [1666952907.488871][5988:5988] CHIP:DMG: AckMsg = 212794457 - [1666952907.488927][5988:5988] CHIP:DMG: NeedsAck = true - [1666952907.488980][5988:5988] CHIP:DMG: } - [1666952907.489052][5988:5988] CHIP:DMG: } - [1666952907.489107][5988:5988] CHIP:DMG: - [1666952907.489174][5988:5988] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666952907.489229][5988:5988] CHIP:DMG: { - [1666952907.489284][5988:5988] CHIP:DMG: data = 003d650075347e020776c6e49e846255494afb7162d53375ec47e3a81865d9dfed7bd0d3b81c282e6d345a46b6f7188f38a62af2bf68f61d7a2e93bdb8b638416d20b1afe793b1 - [1666952907.489342][5988:5988] CHIP:DMG: buffer_ptr = 187650777049920 - [1666952907.489395][5988:5988] CHIP:DMG: } - [1666952907.489446][5988:5988] CHIP:DMG: - [1666952907.489604][5988:5988] CHIP:DMG: ReportDataMessage = - [1666952907.489670][5988:5988] CHIP:DMG: { - [1666952907.489724][5988:5988] CHIP:DMG: AttributeReportIBs = - [1666952907.489807][5988:5988] CHIP:DMG: [ - [1666952907.489869][5988:5988] CHIP:DMG: AttributeReportIB = - [1666952907.489948][5988:5988] CHIP:DMG: { - [1666952907.490153][5988:5988] CHIP:DMG: AttributeDataIB = - [1666952907.490246][5988:5988] CHIP:DMG: { - [1666952907.490331][5988:5988] CHIP:DMG: DataVersion = 0x97fedc88, - [1666952907.490412][5988:5988] CHIP:DMG: AttributePathIB = - [1666952907.490496][5988:5988] CHIP:DMG: { - [1666952907.490583][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666952907.490681][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666952907.490841][5988:5988] CHIP:DMG: Attribute = 0x0000_0000, - [1666952907.490919][5988:5988] CHIP:DMG: } - [1666952907.491017][5988:5988] CHIP:DMG: - [1666952907.491104][5988:5988] CHIP:DMG: Data = 0, - [1666952907.491182][5988:5988] CHIP:DMG: }, - [1666952907.491276][5988:5988] CHIP:DMG: - [1666952907.491346][5988:5988] CHIP:DMG: }, - - - - ./chip-tool thermostatuserinterfaceconfiguration read keypad-lockout 1 1 - Verify DUT receives keypad-lockout attribute response on the TH(all-clusters-minimal-app) Log: - - [1666952951.992449][5988:5988] CHIP:EM: Handling via exchange: 31337r, Delegate: 0xaaaad96680e0 - [1666952951.992544][5988:5988] CHIP:IM: Received Read request - [1666952951.992711][5988:5988] CHIP:DMG: ReadRequestMessage = - [1666952951.992778][5988:5988] CHIP:DMG: { - [1666952951.992824][5988:5988] CHIP:DMG: AttributePathIBs = - [1666952951.992880][5988:5988] CHIP:DMG: [ - [1666952951.992950][5988:5988] CHIP:DMG: AttributePathIB = - [1666952951.993026][5988:5988] CHIP:DMG: { - [1666952951.993105][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666952951.993195][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666952951.993284][5988:5988] CHIP:DMG: Attribute = 0x0000_0001, - [1666952951.993366][5988:5988] CHIP:DMG: } - [1666952951.993444][5988:5988] CHIP:DMG: - [1666952951.993509][5988:5988] CHIP:DMG: ], - [1666952951.993592][5988:5988] CHIP:DMG: - [1666952951.993660][5988:5988] CHIP:DMG: isFabricFiltered = true, - [1666952951.993724][5988:5988] CHIP:DMG: InteractionModelRevision = 1 - [1666952951.993783][5988:5988] CHIP:DMG: }, - [1666952951.993951][5988:5988] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666952951.994166][5988:5988] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666952951.994239][5988:5988] CHIP:DMG: Cluster 204, Attribute 1 is dirty - [1666952951.994294][5988:5988] CHIP:DMG: Reading attribute: Cluster=0x0000_0204 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) - [1666952951.994363][5988:5988] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=v - [1666952951.994439][5988:5988] CHIP:DMG: AccessControl: allowed - [1666952951.994556][5988:5988] CHIP:DMG: Sending report (payload has 37 bytes)... - [1666952951.995160][5988:5988] CHIP:EM: <<< [E:31337r M:163238133 (Ack:50767302)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666952951.995264][5988:5988] CHIP:IN: (S) Sending msg 163238133 on secure session with LSID: 10698 - [1666952951.995933][5988:5988] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:58247 | 163238133 | [Interaction Model (1) / Report Data (0x05) / Session = 7537 / Exchange = 31337] - [1666952951.996031][5988:5988] CHIP:DMG: Header Flags = - [1666952951.996088][5988:5988] CHIP:DMG: { - [1666952951.996177][5988:5988] CHIP:DMG: Exchange (0x06) = - [1666952951.996234][5988:5988] CHIP:DMG: { - [1666952951.996294][5988:5988] CHIP:DMG: AckMsg = 50767302 - [1666952951.996350][5988:5988] CHIP:DMG: NeedsAck = true - [1666952951.996404][5988:5988] CHIP:DMG: } - [1666952951.996477][5988:5988] CHIP:DMG: } - [1666952951.996533][5988:5988] CHIP:DMG: - [1666952951.996599][5988:5988] CHIP:DMG: Encrypted Payload (71 bytes) = - [1666952951.996655][5988:5988] CHIP:DMG: { - [1666952951.996711][5988:5988] CHIP:DMG: data = 00711d00f5d0ba0905d1ce49007c130f1c76302873da95826c5bbbadebfad86b93a5b9a743e3a29b5dd500582640433c06f3f22159b09129938868c073478e30209ebdbeddc96b - [1666952951.996932][5988:5988] CHIP:DMG: buffer_ptr = 187650777054064 - [1666952951.996990][5988:5988] CHIP:DMG: } - [1666952951.997042][5988:5988] CHIP:DMG: - [1666952951.997203][5988:5988] CHIP:DMG: ReportDataMessage = - [1666952951.997270][5988:5988] CHIP:DMG: { - [1666952951.997325][5988:5988] CHIP:DMG: AttributeReportIBs = - [1666952951.997400][5988:5988] CHIP:DMG: [ - [1666952951.997462][5988:5988] CHIP:DMG: AttributeReportIB = - [1666952951.997549][5988:5988] CHIP:DMG: { - [1666952951.997615][5988:5988] CHIP:DMG: AttributeDataIB = - [1666952951.997692][5988:5988] CHIP:DMG: { - [1666952951.997781][5988:5988] CHIP:DMG: DataVersion = 0x97fedc88, - [1666952951.997856][5988:5988] CHIP:DMG: AttributePathIB = - [1666952951.997946][5988:5988] CHIP:DMG: { - [1666952951.998041][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666952951.998132][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666952951.998227][5988:5988] CHIP:DMG: Attribute = 0x0000_0001, - [1666952951.998319][5988:5988] CHIP:DMG: } - [1666952951.998414][5988:5988] CHIP:DMG: - [1666952951.998503][5988:5988] CHIP:DMG: Data = 0, - [1666952951.998582][5988:5988] CHIP:DMG: }, - [1666952951.998666][5988:5988] CHIP:DMG: - [1666952951.998772][5988:5988] CHIP:DMG: }, - [1666952951.998858][5988:5988] CHIP:DMG: - [1666952951.998925][5988:5988] CHIP:DMG: ], - - - ./chip-tool thermostatuserinterfaceconfiguration read feature-map 1 1 - Verify DUT receives feature-map attribute response on the TH(all-clusters-minimal-app) Log: - - [1666953011.987486][5988:5988] CHIP:EM: Handling via exchange: 41581r, Delegate: 0xaaaad96680e0 - [1666953011.987582][5988:5988] CHIP:IM: Received Read request - [1666953011.987754][5988:5988] CHIP:DMG: ReadRequestMessage = - [1666953011.987820][5988:5988] CHIP:DMG: { - [1666953011.987875][5988:5988] CHIP:DMG: AttributePathIBs = - [1666953011.987940][5988:5988] CHIP:DMG: [ - [1666953011.988002][5988:5988] CHIP:DMG: AttributePathIB = - [1666953011.988140][5988:5988] CHIP:DMG: { - [1666953011.988218][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666953011.988315][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666953011.988399][5988:5988] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666953011.988476][5988:5988] CHIP:DMG: } - [1666953011.988557][5988:5988] CHIP:DMG: - [1666953011.988630][5988:5988] CHIP:DMG: ], - [1666953011.988703][5988:5988] CHIP:DMG: - [1666953011.988771][5988:5988] CHIP:DMG: isFabricFiltered = true, - [1666953011.988837][5988:5988] CHIP:DMG: InteractionModelRevision = 1 - [1666953011.988895][5988:5988] CHIP:DMG: }, - [1666953011.989066][5988:5988] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666953011.989956][5988:5988] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666953011.990037][5988:5988] CHIP:DMG: Cluster 204, Attribute fffc is dirty - [1666953011.990096][5988:5988] CHIP:DMG: Reading attribute: Cluster=0x0000_0204 Endpoint=1 AttributeId=0x0000_FFFC (expanded=0) - [1666953011.990167][5988:5988] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0204 e=1 p=v - [1666953011.990245][5988:5988] CHIP:DMG: AccessControl: allowed - [1666953011.990366][5988:5988] CHIP:DMG: Sending report (payload has 38 bytes)... - [1666953011.991110][5988:5988] CHIP:EM: <<< [E:41581r M:126419151 (Ack:121750119)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666953011.991234][5988:5988] CHIP:IN: (S) Sending msg 126419151 on secure session with LSID: 10699 - [1666953011.991978][5988:5988] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:51918 | 126419151 | [Interaction Model (1) / Report Data (0x05) / Session = 4917 / Exchange = 41581] - [1666953011.992080][5988:5988] CHIP:DMG: Header Flags = - [1666953011.992141][5988:5988] CHIP:DMG: { - [1666953011.992223][5988:5988] CHIP:DMG: Exchange (0x06) = - [1666953011.992270][5988:5988] CHIP:DMG: { - [1666953011.992334][5988:5988] CHIP:DMG: AckMsg = 121750119 - [1666953011.992393][5988:5988] CHIP:DMG: NeedsAck = true - [1666953011.992449][5988:5988] CHIP:DMG: } - [1666953011.992523][5988:5988] CHIP:DMG: } - [1666953011.992578][5988:5988] CHIP:DMG: - [1666953011.992648][5988:5988] CHIP:DMG: Encrypted Payload (72 bytes) = - [1666953011.992704][5988:5988] CHIP:DMG: { - [1666953011.992760][5988:5988] CHIP:DMG: data = 00351300cf0089075485011d70effa9c929aff24c827bbf7a3c248a568ad130358506703e7b2bab3a825a30775202aee61f0ac21a9f3de9f2d64cb1cb4f9fa2fb10449d125921408 - [1666953011.992818][5988:5988] CHIP:DMG: buffer_ptr = 187650777054672 - [1666953011.992872][5988:5988] CHIP:DMG: } - [1666953011.993094][5988:5988] CHIP:DMG: - [1666953011.993274][5988:5988] CHIP:DMG: ReportDataMessage = - [1666953011.993332][5988:5988] CHIP:DMG: { - [1666953011.993378][5988:5988] CHIP:DMG: AttributeReportIBs = - [1666953011.993663][5988:5988] CHIP:DMG: [ - [1666953011.993735][5988:5988] CHIP:DMG: AttributeReportIB = - [1666953011.993827][5988:5988] CHIP:DMG: { - [1666953011.993903][5988:5988] CHIP:DMG: AttributeDataIB = - [1666953011.993986][5988:5988] CHIP:DMG: { - [1666953011.994072][5988:5988] CHIP:DMG: DataVersion = 0x97fedc88, - [1666953011.994156][5988:5988] CHIP:DMG: AttributePathIB = - [1666953011.994242][5988:5988] CHIP:DMG: { - [1666953011.994331][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666953011.994423][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666953011.994515][5988:5988] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666953011.994599][5988:5988] CHIP:DMG: } - [1666953011.994690][5988:5988] CHIP:DMG: - [1666953011.994825][5988:5988] CHIP:DMG: Data = 0, - [1666953011.994908][5988:5988] CHIP:DMG: }, - [1666953011.995069][5988:5988] CHIP:DMG: - [1666953011.995147][5988:5988] CHIP:DMG: }, - [1666953011.995233][5988:5988] CHIP:DMG: - [1666953011.995296][5988:5988] CHIP:DMG: ], - - - ./chip-tool thermostatuserinterfaceconfiguration read attribute-list 1 1 - Verify DUT receives attribute-list attribute response on the TH(all-clusters-minimal-app) Log: - - [1676893524.772970][14579:14579] CHIP:DMG: ReportDataMessage = - [1676893524.772985][14579:14579] CHIP:DMG: { - [1676893524.772995][14579:14579] CHIP:DMG: AttributeReportIBs = - [1676893524.773014][14579:14579] CHIP:DMG: [ - [1676893524.773026][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.773046][14579:14579] CHIP:DMG: { - [1676893524.773060][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.773075][14579:14579] CHIP:DMG: { - [1676893524.773092][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.773109][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.773126][14579:14579] CHIP:DMG: { - [1676893524.773143][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.773160][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.773180][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.773197][14579:14579] CHIP:DMG: } - [1676893524.773216][14579:14579] CHIP:DMG: - [1676893524.773232][14579:14579] CHIP:DMG: Data = [ - [1676893524.773251][14579:14579] CHIP:DMG: - [1676893524.773268][14579:14579] CHIP:DMG: ], - [1676893524.773283][14579:14579] CHIP:DMG: }, - [1676893524.773303][14579:14579] CHIP:DMG: - [1676893524.773316][14579:14579] CHIP:DMG: }, - [1676893524.773345][14579:14579] CHIP:DMG: - [1676893524.773358][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.773381][14579:14579] CHIP:DMG: { - [1676893524.773394][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.773409][14579:14579] CHIP:DMG: { - [1676893524.773425][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.773439][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.773455][14579:14579] CHIP:DMG: { - [1676893524.773471][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.773488][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.773505][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.773521][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.773536][14579:14579] CHIP:DMG: } - [1676893524.773558][14579:14579] CHIP:DMG: - [1676893524.773575][14579:14579] CHIP:DMG: Data = 0, - [1676893524.773589][14579:14579] CHIP:DMG: }, - [1676893524.773609][14579:14579] CHIP:DMG: - [1676893524.773623][14579:14579] CHIP:DMG: }, - [1676893524.773651][14579:14579] CHIP:DMG: - [1676893524.773665][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.773686][14579:14579] CHIP:DMG: { - [1676893524.773699][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.773714][14579:14579] CHIP:DMG: { - [1676893524.773729][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.773744][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.773760][14579:14579] CHIP:DMG: { - [1676893524.773775][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.773792][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.773809][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.773826][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.773841][14579:14579] CHIP:DMG: } - [1676893524.773860][14579:14579] CHIP:DMG: - [1676893524.773877][14579:14579] CHIP:DMG: Data = 1, - [1676893524.773893][14579:14579] CHIP:DMG: }, - [1676893524.773915][14579:14579] CHIP:DMG: - [1676893524.773928][14579:14579] CHIP:DMG: }, - [1676893524.773955][14579:14579] CHIP:DMG: - [1676893524.773968][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.773989][14579:14579] CHIP:DMG: { - [1676893524.774002][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.774018][14579:14579] CHIP:DMG: { - [1676893524.774032][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.774047][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.774063][14579:14579] CHIP:DMG: { - [1676893524.774079][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.774095][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.774111][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.774127][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.774142][14579:14579] CHIP:DMG: } - [1676893524.774161][14579:14579] CHIP:DMG: - [1676893524.774177][14579:14579] CHIP:DMG: Data = 65528, - [1676893524.774193][14579:14579] CHIP:DMG: }, - [1676893524.774212][14579:14579] CHIP:DMG: - [1676893524.774227][14579:14579] CHIP:DMG: }, - [1676893524.774255][14579:14579] CHIP:DMG: - [1676893524.774268][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.774288][14579:14579] CHIP:DMG: { - [1676893524.774301][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.774316][14579:14579] CHIP:DMG: { - [1676893524.774331][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.774346][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.774361][14579:14579] CHIP:DMG: { - [1676893524.774377][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.774395][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.774412][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.774428][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.774443][14579:14579] CHIP:DMG: } - [1676893524.774464][14579:14579] CHIP:DMG: - [1676893524.774480][14579:14579] CHIP:DMG: Data = 65529, - [1676893524.774494][14579:14579] CHIP:DMG: }, - [1676893524.774514][14579:14579] CHIP:DMG: - [1676893524.774528][14579:14579] CHIP:DMG: }, - [1676893524.774555][14579:14579] CHIP:DMG: - [1676893524.774568][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.774589][14579:14579] CHIP:DMG: { - [1676893524.774602][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.774617][14579:14579] CHIP:DMG: { - [1676893524.774633][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.774648][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.774664][14579:14579] CHIP:DMG: { - [1676893524.774679][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.774695][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.774713][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.774729][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.774744][14579:14579] CHIP:DMG: } - [1676893524.774763][14579:14579] CHIP:DMG: - [1676893524.774779][14579:14579] CHIP:DMG: Data = 65530, - [1676893524.774794][14579:14579] CHIP:DMG: }, - [1676893524.774813][14579:14579] CHIP:DMG: - [1676893524.774827][14579:14579] CHIP:DMG: }, - [1676893524.774854][14579:14579] CHIP:DMG: - [1676893524.774867][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.774887][14579:14579] CHIP:DMG: { - [1676893524.774900][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.774915][14579:14579] CHIP:DMG: { - [1676893524.774955][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.774971][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.774987][14579:14579] CHIP:DMG: { - [1676893524.775002][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.775018][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.775038][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.775054][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.775070][14579:14579] CHIP:DMG: } - [1676893524.775088][14579:14579] CHIP:DMG: - [1676893524.775105][14579:14579] CHIP:DMG: Data = 65531, - [1676893524.775120][14579:14579] CHIP:DMG: }, - [1676893524.775139][14579:14579] CHIP:DMG: - [1676893524.775153][14579:14579] CHIP:DMG: }, - [1676893524.775180][14579:14579] CHIP:DMG: - [1676893524.775194][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.775214][14579:14579] CHIP:DMG: { - [1676893524.775227][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.775242][14579:14579] CHIP:DMG: { - [1676893524.775258][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.775273][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.775290][14579:14579] CHIP:DMG: { - [1676893524.775306][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.775321][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.775338][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.775355][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.775371][14579:14579] CHIP:DMG: } - [1676893524.775390][14579:14579] CHIP:DMG: - [1676893524.775406][14579:14579] CHIP:DMG: Data = 65532, - [1676893524.775421][14579:14579] CHIP:DMG: }, - [1676893524.775440][14579:14579] CHIP:DMG: - [1676893524.775454][14579:14579] CHIP:DMG: }, - [1676893524.775480][14579:14579] CHIP:DMG: - [1676893524.775493][14579:14579] CHIP:DMG: AttributeReportIB = - [1676893524.775513][14579:14579] CHIP:DMG: { - [1676893524.775526][14579:14579] CHIP:DMG: AttributeDataIB = - [1676893524.775542][14579:14579] CHIP:DMG: { - [1676893524.775557][14579:14579] CHIP:DMG: DataVersion = 0xceda3005, - [1676893524.775572][14579:14579] CHIP:DMG: AttributePathIB = - [1676893524.775588][14579:14579] CHIP:DMG: { - [1676893524.775604][14579:14579] CHIP:DMG: Endpoint = 0x1, - [1676893524.775623][14579:14579] CHIP:DMG: Cluster = 0x204, - [1676893524.775640][14579:14579] CHIP:DMG: Attribute = 0x0000_FFFB, - [1676893524.775656][14579:14579] CHIP:DMG: ListIndex = Null, - [1676893524.775672][14579:14579] CHIP:DMG: } - [1676893524.775691][14579:14579] CHIP:DMG: - [1676893524.775707][14579:14579] CHIP:DMG: Data = 65533, - [1676893524.775722][14579:14579] CHIP:DMG: }, - [1676893524.775745][14579:14579] CHIP:DMG: - [1676893524.775759][14579:14579] CHIP:DMG: }, - [1676893524.775778][14579:14579] CHIP:DMG: - [1676893524.775791][14579:14579] CHIP:DMG: ], - [1676893524.775862][14579:14579] CHIP:DMG: - [1676893524.775877][14579:14579] CHIP:DMG: SuppressResponse = true, - [1676893524.775891][14579:14579] CHIP:DMG: InteractionModelRevision = 1 - [1676893524.775903][14579:14579] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool thermostatuserinterfaceconfiguration read schedule-programming-visibility 1 1 - - Verify DUT receives schedule-programming-visibility attribute response on the TH(all-clusters-minimal-app) Log: - - [1666953130.730282][5988:5988] CHIP:EM: Handling via exchange: 19762r, Delegate: 0xaaaad96680e0 - [1666953130.730438][5988:5988] CHIP:IM: Received Read request - [1666953130.730662][5988:5988] CHIP:DMG: ReadRequestMessage = - [1666953130.730769][5988:5988] CHIP:DMG: { - [1666953130.730828][5988:5988] CHIP:DMG: AttributePathIBs = - [1666953130.730893][5988:5988] CHIP:DMG: [ - [1666953130.730955][5988:5988] CHIP:DMG: AttributePathIB = - [1666953130.731032][5988:5988] CHIP:DMG: { - [1666953130.731110][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666953130.731200][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666953130.731287][5988:5988] CHIP:DMG: Attribute = 0x0000_0002, - [1666953130.731370][5988:5988] CHIP:DMG: } - [1666953130.731447][5988:5988] CHIP:DMG: - [1666953130.731512][5988:5988] CHIP:DMG: ], - [1666953130.731582][5988:5988] CHIP:DMG: - [1666953130.731649][5988:5988] CHIP:DMG: isFabricFiltered = true, - [1666953130.731714][5988:5988] CHIP:DMG: InteractionModelRevision = 1 - [1666953130.731772][5988:5988] CHIP:DMG: }, - [1666953130.731937][5988:5988] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666953130.732148][5988:5988] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666953130.732219][5988:5988] CHIP:DMG: Cluster 204, Attribute 2 is dirty - [1666953130.732275][5988:5988] CHIP:DMG: Reading attribute: Cluster=0x0000_0204 Endpoint=1 AttributeId=0x0000_0002 (expanded=0) - [1666953130.732383][5988:5988] CHIP:DMG: Sending report (payload has 34 bytes)... - [1666953130.732896][5988:5988] CHIP:EM: <<< [E:19762r M:73354864 (Ack:39436104)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) - [1666953130.732993][5988:5988] CHIP:IN: (S) Sending msg 73354864 on secure session with LSID: 10701 - [1666953130.733819][5988:5988] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:39423 | 73354864 | [Interaction Model (1) / Report Data (0x05) / Session = 51855 / Exchange = 19762] - [1666953130.733918][5988:5988] CHIP:DMG: Header Flags = - [1666953130.733975][5988:5988] CHIP:DMG: { - [1666953130.734062][5988:5988] CHIP:DMG: Exchange (0x06) = - [1666953130.734120][5988:5988] CHIP:DMG: { - [1666953130.734180][5988:5988] CHIP:DMG: AckMsg = 39436104 - [1666953130.734237][5988:5988] CHIP:DMG: NeedsAck = true - [1666953130.734295][5988:5988] CHIP:DMG: } - [1666953130.734367][5988:5988] CHIP:DMG: } - [1666953130.734422][5988:5988] CHIP:DMG: - [1666953130.734490][5988:5988] CHIP:DMG: Encrypted Payload (68 bytes) = - [1666953130.734545][5988:5988] CHIP:DMG: { - [1666953130.734600][5988:5988] CHIP:DMG: data = 008fca00704e5f040d933cd2a06139a038a30bdd479e10884e5b1d470d816f6dedc00aa71193a9ad3702ed39ea7c8d8d9b99ca1fe4c24cfdc365fa24300f32d9a8bcefde - [1666953130.734659][5988:5988] CHIP:DMG: buffer_ptr = 187650777059872 - [1666953130.734712][5988:5988] CHIP:DMG: } - [1666953130.734817][5988:5988] CHIP:DMG: - [1666953130.734969][5988:5988] CHIP:DMG: ReportDataMessage = - [1666953130.735035][5988:5988] CHIP:DMG: { - [1666953130.735089][5988:5988] CHIP:DMG: AttributeReportIBs = - [1666953130.735166][5988:5988] CHIP:DMG: [ - [1666953130.735228][5988:5988] CHIP:DMG: AttributeReportIB = - [1666953130.735318][5988:5988] CHIP:DMG: { - [1666953130.735389][5988:5988] CHIP:DMG: AttributeStatusIB = - [1666953130.735478][5988:5988] CHIP:DMG: { - [1666953130.735556][5988:5988] CHIP:DMG: AttributePathIB = - [1666953130.735640][5988:5988] CHIP:DMG: { - [1666953130.735729][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666953130.735819][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666953130.735917][5988:5988] CHIP:DMG: Attribute = 0x0000_0002, - [1666953130.736010][5988:5988] CHIP:DMG: } - [1666953130.736104][5988:5988] CHIP:DMG: - [1666953130.736187][5988:5988] CHIP:DMG: StatusIB = - [1666953130.736272][5988:5988] CHIP:DMG: { - [1666953130.736366][5988:5988] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1666953130.736449][5988:5988] CHIP:DMG: }, - [1666953130.736533][5988:5988] CHIP:DMG: - [1666953130.736616][5988:5988] CHIP:DMG: }, - [1666953130.736709][5988:5988] CHIP:DMG: - [1666953130.736927][5988:5988] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - ./chip-tool thermostatuserinterfaceconfiguration write schedule-programming-visibility 1 1 1 - - Verify DUT receives schedule-programming-visibility attribute write response on the TH(all-clusters-minimal-app) Log: - - [1666953180.787649][5988:5988] CHIP:EM: Handling via exchange: 274r, Delegate: 0xaaaad96680e0 - [1666953180.787747][5988:5988] CHIP:IM: Received Write request - [1666953180.787806][5988:5988] CHIP:DMG: IM WH moving to [Initialized] - [1666953180.787936][5988:5988] CHIP:DMG: WriteRequestMessage = - [1666953180.788002][5988:5988] CHIP:DMG: { - [1666953180.788061][5988:5988] CHIP:DMG: suppressResponse = false, - [1666953180.788128][5988:5988] CHIP:DMG: timedRequest = false, - [1666953180.788191][5988:5988] CHIP:DMG: AttributeDataIBs = - [1666953180.788266][5988:5988] CHIP:DMG: [ - [1666953180.788329][5988:5988] CHIP:DMG: AttributeDataIB = - [1666953180.788479][5988:5988] CHIP:DMG: { - [1666953180.788565][5988:5988] CHIP:DMG: AttributePathIB = - [1666953180.788700][5988:5988] CHIP:DMG: { - [1666953180.788844][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666953180.788939][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666953180.789077][5988:5988] CHIP:DMG: Attribute = 0x0000_0002, - [1666953180.789216][5988:5988] CHIP:DMG: } - [1666953180.789355][5988:5988] CHIP:DMG: - [1666953180.789498][5988:5988] CHIP:DMG: Data = 1, - [1666953180.789630][5988:5988] CHIP:DMG: }, - [1666953180.789717][5988:5988] CHIP:DMG: - [1666953180.789780][5988:5988] CHIP:DMG: ], - [1666953180.789855][5988:5988] CHIP:DMG: - [1666953180.789918][5988:5988] CHIP:DMG: moreChunkedMessages = false, - [1666953180.789984][5988:5988] CHIP:DMG: InteractionModelRevision = 1 - [1666953180.790043][5988:5988] CHIP:DMG: }, - [1666953180.790251][5988:5988] CHIP:DMG: IM WH moving to [AddStatus] - [1666953180.790936][5988:5988] CHIP:EM: <<< [E:274r M:42261800 (Ack:75748820)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:07 (IM:WriteResponse) - [1666953180.791049][5988:5988] CHIP:IN: (S) Sending msg 42261800 on secure session with LSID: 10702 - [1666953180.791742][5988:5988] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:58417 | 42261800 | [Interaction Model (1) / Write Response (0x07) / Session = 57550 / Exchange = 274] - [1666953180.791843][5988:5988] CHIP:DMG: Header Flags = - [1666953180.791900][5988:5988] CHIP:DMG: { - [1666953180.791986][5988:5988] CHIP:DMG: Exchange (0x06) = - [1666953180.792043][5988:5988] CHIP:DMG: { - [1666953180.792104][5988:5988] CHIP:DMG: AckMsg = 75748820 - [1666953180.792161][5988:5988] CHIP:DMG: NeedsAck = true - [1666953180.792215][5988:5988] CHIP:DMG: } - [1666953180.792288][5988:5988] CHIP:DMG: } - [1666953180.792343][5988:5988] CHIP:DMG: - [1666953180.792410][5988:5988] CHIP:DMG: Encrypted Payload (63 bytes) = - [1666953180.792466][5988:5988] CHIP:DMG: { - [1666953180.792521][5988:5988] CHIP:DMG: data = 00cee00028dd84020da296796a531f41d840f78b8736adc0b9e024d7096618010c89ca2aaa0435215f2f43aff228e1c004bf0fe22f4c42b20602d0e9d683ce - [1666953180.792580][5988:5988] CHIP:DMG: buffer_ptr = 187650777059872 - [1666953180.792634][5988:5988] CHIP:DMG: } - [1666953180.792685][5988:5988] CHIP:DMG: - [1666953180.792805][5988:5988] CHIP:DMG: WriteResponseMessage = - [1666953180.792871][5988:5988] CHIP:DMG: { - [1666953180.792924][5988:5988] CHIP:DMG: AttributeStatusIBs = - [1666953180.793003][5988:5988] CHIP:DMG: [ - [1666953180.793066][5988:5988] CHIP:DMG: AttributeStatusIB = - [1666953180.793150][5988:5988] CHIP:DMG: { - [1666953180.793217][5988:5988] CHIP:DMG: AttributePathIB = - [1666953180.793300][5988:5988] CHIP:DMG: { - [1666953180.793385][5988:5988] CHIP:DMG: Endpoint = 0x1, - [1666953180.793472][5988:5988] CHIP:DMG: Cluster = 0x204, - [1666953180.793558][5988:5988] CHIP:DMG: Attribute = 0x0000_0002, - [1666953180.793639][5988:5988] CHIP:DMG: } - [1666953180.793731][5988:5988] CHIP:DMG: - [1666953180.793810][5988:5988] CHIP:DMG: StatusIB = - [1666953180.793892][5988:5988] CHIP:DMG: { - [1666953180.793975][5988:5988] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1666953180.794124][5988:5988] CHIP:DMG: }, - [1666953180.794221][5988:5988] CHIP:DMG: - [1666953180.794294][5988:5988] CHIP:DMG: }, - [1666953180.794379][5988:5988] CHIP:DMG: - [1666953180.794440][5988:5988] CHIP:DMG: ], - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml index 4b27410e01e79f..4dfe7de1773721 100644 --- a/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml @@ -34,31 +34,30 @@ tests: - label: "Step 2: Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" - PICS: TVOCCONC.S.Afffd response: value: 3 constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" + PICS: + " !TVOCCONC.S.F00 && !TVOCCONC.S.F01 && !TVOCCONC.S.F02 && + !TVOCCONC.S.F03 && !TVOCCONC.S.F04 && !TVOCCONC.S.F05 " command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc response: + value: 0 constraints: type: bitmap32 - hasMasksSet: [0x03] - disabled: true - label: "Step 3b: Given TVOCCONC.S.F00(MEA) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && TVOCCONC.S.F00 + PICS: TVOCCONC.S.F00 response: constraints: type: bitmap32 @@ -69,7 +68,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && !TVOCCONC.S.F00 + PICS: " !TVOCCONC.S.F00 " response: constraints: type: bitmap32 @@ -80,7 +79,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && TVOCCONC.S.F01 + PICS: TVOCCONC.S.F01 response: constraints: type: bitmap32 @@ -91,7 +90,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && !TVOCCONC.S.F01 + PICS: " !TVOCCONC.S.F01 " response: constraints: type: bitmap32 @@ -102,7 +101,7 @@ tests: bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && TVOCCONC.S.F02 + PICS: TVOCCONC.S.F02 && TVOCCONC.S.F01 response: constraints: type: bitmap32 @@ -113,7 +112,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && !TVOCCONC.S.F02 + PICS: " !TVOCCONC.S.F02 && !TVOCCONC.S.F01 " response: constraints: type: bitmap32 @@ -124,7 +123,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && TVOCCONC.S.F03 + PICS: TVOCCONC.S.F03 && TVOCCONC.S.F01 response: constraints: type: bitmap32 @@ -135,7 +134,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && !TVOCCONC.S.F03 + PICS: " !TVOCCONC.S.F03 && !TVOCCONC.S.F01" response: constraints: type: bitmap32 @@ -146,7 +145,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && TVOCCONC.S.F04 + PICS: TVOCCONC.S.F04 && TVOCCONC.S.F00 response: constraints: type: bitmap32 @@ -157,7 +156,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && !TVOCCONC.S.F04 + PICS: " !TVOCCONC.S.F04 && !TVOCCONC.S.F00 " response: constraints: type: bitmap32 @@ -168,7 +167,7 @@ tests: bits set" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && TVOCCONC.S.F05 + PICS: TVOCCONC.S.F05 && TVOCCONC.S.F00 response: constraints: type: bitmap32 @@ -179,7 +178,7 @@ tests: the correct bit clear" command: "readAttribute" attribute: "FeatureMap" - PICS: TVOCCONC.S.Afffc && !TVOCCONC.S.F05 + PICS: " !TVOCCONC.S.F05 && !TVOCCONC.S.F00 " response: constraints: type: bitmap32 @@ -188,7 +187,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list @@ -197,7 +196,7 @@ tests: - label: "Step 4a: Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -206,7 +205,7 @@ tests: - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && TVOCCONC.S.A0007 && TVOCCONC.S.F00 + PICS: TVOCCONC.S.A0007 && TVOCCONC.S.F00 response: constraints: type: list @@ -217,7 +216,7 @@ tests: AttributeList when TVOCCONC.S.A0007 is not set" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && !TVOCCONC.S.A0007 + PICS: " !TVOCCONC.S.A0007 " response: constraints: type: list @@ -229,7 +228,7 @@ tests: in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && TVOCCONC.S.F00 + PICS: TVOCCONC.S.F00 response: constraints: type: list @@ -241,7 +240,7 @@ tests: AttributeList when TVOCCONC.S.F00 (MEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && !TVOCCONC.S.F00 + PICS: " !TVOCCONC.S.F00 " response: constraints: type: list @@ -252,7 +251,7 @@ tests: PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && TVOCCONC.S.F04 + PICS: TVOCCONC.S.F04 response: constraints: type: list @@ -263,7 +262,7 @@ tests: excluded from AttributeList when TVOCCONC.S.F04 (PEA) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && !TVOCCONC.S.F04 + PICS: " !TVOCCONC.S.F04 " response: constraints: type: list @@ -274,7 +273,7 @@ tests: AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && TVOCCONC.S.F05 + PICS: TVOCCONC.S.F05 response: constraints: type: list @@ -286,7 +285,7 @@ tests: TVOCCONC.S.F05 (AVG) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && !TVOCCONC.S.F05 + PICS: " !TVOCCONC.S.F05 " response: constraints: type: list @@ -297,7 +296,7 @@ tests: AttributeList" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && TVOCCONC.S.F01 + PICS: TVOCCONC.S.F01 response: constraints: type: list @@ -308,7 +307,7 @@ tests: TVOCCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" - PICS: TVOCCONC.S.Afffb && !TVOCCONC.S.F01 + PICS: " !TVOCCONC.S.F01 " response: constraints: type: list @@ -317,7 +316,7 @@ tests: - label: "Step 5l: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: @@ -326,7 +325,6 @@ tests: - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" - PICS: TVOCCONC.S.Afff9 response: value: [] constraints: @@ -335,7 +333,6 @@ tests: - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" - PICS: TVOCCONC.S.Afff8 response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_3_1_Simulated.yaml deleted file mode 100644 index 87a9a977a1a714..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_3_1_Simulated.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 95.3.1. [TC-ULABEL-3.1] User label cluster [DUT-client] - -PICS: - - ULABEL.C - -config: - nodeId: 0x12344321 - cluster: "User Label" - endpoint: 1 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Step 1: Read attribute: LabelList" - PICS: ULABEL.C.A0000 - wait: "readAttribute" - attribute: "LabelList" - - - label: "Step 2: write attribute: LabelList" - PICS: ULABEL.C.A0000 - wait: "writeAttribute" - attribute: "LabelList" - arguments: - value: diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 4267b90a2388dc..24826e89021967 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -340,6 +340,8 @@ DISHM.S.A0003=1 DISHM.S.C00.Rsp=1 DISHM.S.C01.Tx=1 +PIXIT.DISHM.CAN_TEST_MODE_FAILURE=1 + # MEDIA CLUSTER # App Launcher APPLAUNCHER.S=1 @@ -673,6 +675,10 @@ G.S.C04.Rsp=0 S.S.AM=0 S.S.AO=0 S.S.F00=0 +S.S.F01=0 +S.S.F02=0 +S.S.F03=0 +PICS_SC_RECALL_SCENE_TRANSITION_TIME=1 S.C=0 S.C.C00.Tx=0 @@ -775,6 +781,8 @@ LWM.S.F00=1 LWM.S.C00.Rsp=1 LWM.S.C01.Tx=1 +PIXIT.LWM.CAN_TEST_MODE_FAILURE=1 + # Time Format Localization Cluster LTIME.S=1 LTIME.S.A0000=1 @@ -1950,6 +1958,7 @@ TSTAT.S.F02=0 TSTAT.S.F03=0 TSTAT.S.F04=0 TSTAT.S.F05=1 +TSTAT.S.F06=0 TSTAT.S.A0000=1 TSTAT.S.A0001=0 @@ -2082,13 +2091,7 @@ DESC.S.A0000=1 DESC.S.A0001=1 DESC.S.A0002=1 DESC.S.A0003=1 - -DESC.S.Afffd=1 -DESC.S.Afffc=1 -DESC.S.Afffb=1 -DESC.S.Afffa=1 -DESC.S.Afff9=1 -DESC.S.Afff8=1 +DESC.S.A0004=1 DESC.C=1 DESC.C.A0000=1 @@ -2181,6 +2184,7 @@ BRBINFO.C.E02=1 BRBINFO.C.E03=1 # Interaction Data Model +ICDM.S=1 MCORE.IDM.C=1 MCORE.IDM.C.InvokeRequest=1 MCORE.IDM.C.ReadRequest=1 @@ -2325,12 +2329,6 @@ CDOCONC.S.A0007=1 CDOCONC.S.A0008=1 CDOCONC.S.A0009=1 CDOCONC.S.A000a=1 -CDOCONC.S.Afff8=1 -CDOCONC.S.Afff9=1 -CDOCONC.S.Afffa=1 -CDOCONC.S.Afffb=1 -CDOCONC.S.Afffc=1 -CDOCONC.S.Afffd=1 CMOCONC.C=0 CMOCONC.S=1 @@ -2351,12 +2349,6 @@ CMOCONC.S.A0007=1 CMOCONC.S.A0008=1 CMOCONC.S.A0009=1 CMOCONC.S.A000a=1 -CMOCONC.S.Afff8=1 -CMOCONC.S.Afff9=1 -CMOCONC.S.Afffa=1 -CMOCONC.S.Afffb=1 -CMOCONC.S.Afffc=1 -CMOCONC.S.Afffd=1 NDOCONC.C=0 NDOCONC.S=1 @@ -2377,12 +2369,6 @@ NDOCONC.S.A0007=1 NDOCONC.S.A0008=1 NDOCONC.S.A0009=1 NDOCONC.S.A000a=1 -NDOCONC.S.Afff8=1 -NDOCONC.S.Afff9=1 -NDOCONC.S.Afffa=1 -NDOCONC.S.Afffb=1 -NDOCONC.S.Afffc=1 -NDOCONC.S.Afffd=1 OZCONC.C=0 OZCONC.S=1 @@ -2403,12 +2389,6 @@ OZCONC.S.A0007=1 OZCONC.S.A0008=1 OZCONC.S.A0009=1 OZCONC.S.A000a=1 -OZCONC.S.Afff8=1 -OZCONC.S.Afff9=1 -OZCONC.S.Afffa=1 -OZCONC.S.Afffb=1 -OZCONC.S.Afffc=1 -OZCONC.S.Afffd=1 PMICONC.C=0 PMICONC.S=1 @@ -2429,12 +2409,6 @@ PMICONC.S.A0007=1 PMICONC.S.A0008=1 PMICONC.S.A0009=1 PMICONC.S.A000a=1 -PMICONC.S.Afff8=1 -PMICONC.S.Afff9=1 -PMICONC.S.Afffa=1 -PMICONC.S.Afffb=1 -PMICONC.S.Afffc=1 -PMICONC.S.Afffd=1 FLDCONC.C=0 FLDCONC.S=1 @@ -2455,12 +2429,6 @@ FLDCONC.S.A0007=1 FLDCONC.S.A0008=1 FLDCONC.S.A0009=1 FLDCONC.S.A000a=1 -FLDCONC.S.Afff8=1 -FLDCONC.S.Afff9=1 -FLDCONC.S.Afffa=1 -FLDCONC.S.Afffb=1 -FLDCONC.S.Afffc=1 -FLDCONC.S.Afffd=1 PMHCONC.C=0 PMHCONC.S=1 @@ -2481,12 +2449,6 @@ PMHCONC.S.A0007=1 PMHCONC.S.A0008=1 PMHCONC.S.A0009=1 PMHCONC.S.A000a=1 -PMHCONC.S.Afff8=1 -PMHCONC.S.Afff9=1 -PMHCONC.S.Afffa=1 -PMHCONC.S.Afffb=1 -PMHCONC.S.Afffc=1 -PMHCONC.S.Afffd=1 PMKCONC.C=0 PMKCONC.S=1 @@ -2507,12 +2469,6 @@ PMKCONC.S.A0007=1 PMKCONC.S.A0008=1 PMKCONC.S.A0009=1 PMKCONC.S.A000a=1 -PMKCONC.S.Afff8=1 -PMKCONC.S.Afff9=1 -PMKCONC.S.Afffa=1 -PMKCONC.S.Afffb=1 -PMKCONC.S.Afffc=1 -PMKCONC.S.Afffd=1 TVOCCONC.C=0 TVOCCONC.S=1 @@ -2533,12 +2489,6 @@ TVOCCONC.S.A0007=1 TVOCCONC.S.A0008=1 TVOCCONC.S.A0009=1 TVOCCONC.S.A000a=1 -TVOCCONC.S.Afff8=1 -TVOCCONC.S.Afff9=1 -TVOCCONC.S.Afffa=1 -TVOCCONC.S.Afffb=1 -TVOCCONC.S.Afffc=1 -TVOCCONC.S.Afffd=1 # TEMPERATURE CONTROL CLUSTER @@ -2582,12 +2532,6 @@ RNCONC.S.A0007=1 RNCONC.S.A0008=1 RNCONC.S.A0009=1 RNCONC.S.A000a=1 -RNCONC.S.Afff8=1 -RNCONC.S.Afff9=1 -RNCONC.S.Afffa=1 -RNCONC.S.Afffb=1 -RNCONC.S.Afffc=1 -RNCONC.S.Afffd=1 # REFRIGERATOR ALARM CLUSTER REFALM.S=1 @@ -2623,6 +2567,8 @@ RVCCLEANM.S.F00=1 RVCCLEANM.S.C00.Rsp=1 RVCCLEANM.S.C01.Tx=1 +PIXIT.RVCCLEANM.CAN_TEST_MODE_FAILURE=1 + # RVC OPERATIONAL STATE CLUSTER RVCOPSTATE.S=1 RVCOPSTATE.C=1 @@ -2641,8 +2587,8 @@ RVCOPSTATE.S.A0005=1 #Commands RVCOPSTATE.S.C00.Rsp=1 -RVCOPSTATE.S.C01.Rsp=1 -RVCOPSTATE.S.C02.Rsp=1 +RVCOPSTATE.S.C01.Rsp=0 +RVCOPSTATE.S.C02.Rsp=0 RVCOPSTATE.S.C03.Rsp=1 RVCOPSTATE.S.C04.Tx=1 RVCOPSTATE.C.C00.Tx=1 @@ -2666,6 +2612,8 @@ RVCRUNM.S.Afffa=1 RVCRUNM.S.C00.Rsp=1 RVCRUNM.S.C01.Tx=1 +PIXIT.RVCRUNM.CAN_TEST_MODE_FAILURE=1 + #Refrigerator and Temperature Controlled Cabinet Mode Cluster(TCCM) TCCM.S=1 @@ -2737,19 +2685,8 @@ ICDM.S.C03.Rsp=1 ICDM.C.C00.Rsp=1 ICDM.S.C01.Tx=1 -#RVC Clean Mode Select -RVCCLEANMS.S.F00=1 -RVCCLEANMS.S.F01=0 -RVCCLEANMS.S.F02=0 -#Attributes: -RVCCLEANMS.S.A0004=1 -RVCCLEANMS.S.A0005=1 -#Commands: -RVCCLEANMS.S.C00.Rsp=1 -RVCCLEANMS.S.C01.Rsp=1 -RVCCLEANMS.S.C03.Tx=1 # Smoke CO Alarm Cluster SMOKECO.S=1 @@ -2797,6 +2734,8 @@ TCCM.S.A0003=1 TCCM.S.C00.Rsp=1 TCCM.S.C01.Tx=1 +PIXIT.TCCM.CAN_TEST_MODE_FAILURE=1 + #Temperature Control TCTL.S=1 TCTL.C=1 diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 30f793e64c6f46..25ba9a6b338a2b 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -73,6 +73,7 @@ ], "GeneralCommissioning": ["Test_TC_CGEN_1_1", "Test_TC_CGEN_2_1"], "GeneralDiagnostics": ["Test_TC_DGGEN_1_1", "Test_TC_DGGEN_2_1"], + "GroupKeyManagement": ["Test_TC_GRPKEY_1_1"], "IcdManagement": ["Test_TC_ICDM_1_1", "Test_TC_ICDM_2_1"], "Identify": [ "Test_TC_I_1_1", @@ -301,6 +302,7 @@ "Test_TC_G_2_1" ], "Scenes": ["Test_TC_S_1_1"], + "RVCOperationalState": ["Test_TC_RVCOPSTATE_1_1"], "ResourceMonitoring": [ "TestActivatedCarbonFilterMonitoring", "TestHepaFilterMonitoring", @@ -351,6 +353,7 @@ "FanControl", "GeneralCommissioning", "GeneralDiagnostics", + "GroupKeyManagement", "IcdManagement", "Identify", "IlluminanceMeasurement", @@ -373,6 +376,7 @@ "SecureChannel", "SmokeCOAlarm", "Switch", + "RVCOperationalState", "TemperatureMeasurement", "Thermostat", "ThermostatUserConfiguration", diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index cde28a356d9e97..c57af2d95df63d 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -40,6 +40,7 @@ "TestGroupDemoConfig", "Test_TC_G_2_2", "Test_TC_G_2_3", + "Test_TC_G_2_4", "Test_TC_G_3_2" ], "BulkDataExchangeProtocol": [ @@ -102,9 +103,6 @@ "Test_TC_CNET_4_14", "Test_TC_CNET_4_15", "Test_TC_CNET_4_16", - "Test_TC_CNET_4_17", - "Test_TC_CNET_4_18", - "Test_TC_CNET_4_19", "Test_TC_CNET_4_20", "Test_TC_CNET_4_21", "Test_TC_CNET_4_22" @@ -115,13 +113,9 @@ "Test_TC_DLOG_3_1" ], "Descriptor": ["Test_TC_DESC_2_1"], - "FanControl": ["Test_TC_FAN_3_3", "Test_TC_FAN_3_5"], + "FanControl": [], "GeneralCommissioning": ["Test_TC_CGEN_2_2"], - "GeneralDiagnostics": [ - "Test_TC_DGGEN_2_2", - "Test_TC_DGGEN_2_3", - "Test_TC_DGGEN_3_1" - ], + "GeneralDiagnostics": ["Test_TC_DGGEN_2_2", "Test_TC_DGGEN_2_3"], "Identify": ["Test_TC_I_3_2"], "IcdManagement": ["Test_TC_ICDM_2_2", "Test_TC_ICDM_2_3"], "IlluminanceMeasurement": [], @@ -142,7 +136,9 @@ "Test_TC_IDM_6_3", "Test_TC_IDM_6_4", "Test_TC_IDM_7_1", - "Test_TC_IDM_8_1" + "Test_TC_IDM_8_1", + "Test_TC_IDM_10_1", + "Test_TC_IDM_11_1" ], "MediaControl": [ "Test_TC_LOWPOWER_2_2", @@ -191,7 +187,9 @@ "Test_TC_CADMIN_1_10", "Test_TC_CADMIN_1_13", "Test_TC_CADMIN_1_23", - "Test_TC_CADMIN_1_24" + "Test_TC_CADMIN_1_24", + "Test_TC_CADMIN_1_25", + "Test_TC_CADMIN_1_26" ], "ModeSelect": [ "Test_TC_MOD_1_2", @@ -267,9 +265,9 @@ "Test_TC_CC_9_2", "Test_TC_CC_9_3" ], - "DoorLock": ["Test_TC_DRLK_2_10", "Test_TC_DRLK_3_2", "Test_TC_DRLK_3_3"], + "DoorLock": ["Test_TC_DRLK_2_10", "Test_TC_DRLK_3_2"], "LocalizationConfiguration": ["Test_TC_LCFG_2_1"], - "LevelControl": ["Test_TC_LVL_8_1"], + "LevelControl": [], "LaundryWasherMode": [ "Test_TC_LWM_1_1", "Test_TC_LWM_1_2", @@ -331,23 +329,19 @@ "Test_TC_TCTL_3_3" ], "TemperatureMeasurement": ["Test_TC_TMP_2_2"], - "Thermostat": ["Test_TC_TSTAT_3_1", "Test_TC_TSTAT_3_2"], + "Thermostat": ["Test_TC_TSTAT_3_2"], "ThermostatUserConfiguration": [], "ThreadNetworkDiagnostics": ["Test_TC_DGTHREAD_2_5"], "Actions": ["Test_TC_ACT_2_1", "Test_TC_ACT_2_2", "Test_TC_ACT_3_2"], - "TimeFormatLocalization": ["Test_TC_LTIME_2_1", "Test_TC_LTIME_3_1"], - "TimeSynchronization": ["Test_TC_TIMESYNC_2_15"], + "TimeFormatLocalization": ["Test_TC_LTIME_3_1"], + "TimeSynchronization": [], "UnitLocalization": [], "Binding": ["Test_TC_BIND_2_1", "Test_TC_BIND_2_2", "Test_TC_BIND_2_3"], "Scenes": [ "Test_TC_S_1_1", "Test_TC_S_2_1", - "Test_TC_S_2_2", - "Test_TC_S_2_3", - "Test_TC_S_2_4", "Test_TC_S_2_5", - "Test_TC_S_2_6", - "Test_TC_S_3_1" + "Test_TC_S_2_6" ], "PumpConfigurationControl": [], "AccessControl": [], diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index cdb7b4274c4968..b64115bee8df00 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -125,6 +125,7 @@ class TestList : public Command printf("Test_TC_CGEN_2_1\n"); printf("Test_TC_DGGEN_1_1\n"); printf("Test_TC_DGGEN_2_1\n"); + printf("Test_TC_GRPKEY_1_1\n"); printf("Test_TC_ICDM_1_1\n"); printf("Test_TC_ICDM_2_1\n"); printf("Test_TC_I_1_1\n"); @@ -218,6 +219,7 @@ class TestList : public Command printf("Test_TC_SMOKECO_2_6\n"); printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_SWTCH_2_1\n"); + printf("Test_TC_RVCOPSTATE_1_1\n"); printf("Test_TC_TMP_1_1\n"); printf("Test_TC_TMP_2_1\n"); printf("Test_TC_TSTAT_1_1\n"); @@ -376,6 +378,7 @@ class ManualTestList : public Command printf("TestGroupDemoConfig\n"); printf("Test_TC_G_2_2\n"); printf("Test_TC_G_2_3\n"); + printf("Test_TC_G_2_4\n"); printf("Test_TC_G_3_2\n"); printf("Test_TC_BDX_1_1\n"); printf("Test_TC_BDX_1_2\n"); @@ -417,9 +420,6 @@ class ManualTestList : public Command printf("Test_TC_CNET_4_14\n"); printf("Test_TC_CNET_4_15\n"); printf("Test_TC_CNET_4_16\n"); - printf("Test_TC_CNET_4_17\n"); - printf("Test_TC_CNET_4_18\n"); - printf("Test_TC_CNET_4_19\n"); printf("Test_TC_CNET_4_20\n"); printf("Test_TC_CNET_4_21\n"); printf("Test_TC_CNET_4_22\n"); @@ -441,12 +441,9 @@ class ManualTestList : public Command printf("Test_TC_DISHM_3_2\n"); printf("Test_TC_DISHM_3_3\n"); printf("Test_TC_DESC_2_1\n"); - printf("Test_TC_FAN_3_3\n"); - printf("Test_TC_FAN_3_5\n"); printf("Test_TC_CGEN_2_2\n"); printf("Test_TC_DGGEN_2_2\n"); printf("Test_TC_DGGEN_2_3\n"); - printf("Test_TC_DGGEN_3_1\n"); printf("Test_TC_ICDM_2_2\n"); printf("Test_TC_ICDM_2_3\n"); printf("Test_TC_I_3_2\n"); @@ -467,6 +464,8 @@ class ManualTestList : public Command printf("Test_TC_IDM_6_4\n"); printf("Test_TC_IDM_7_1\n"); printf("Test_TC_IDM_8_1\n"); + printf("Test_TC_IDM_10_1\n"); + printf("Test_TC_IDM_11_1\n"); printf("Test_TC_LOWPOWER_2_2\n"); printf("Test_TC_APPLAUNCHER_3_7_1\n"); printf("Test_TC_APPLAUNCHER_3_8_1\n"); @@ -512,6 +511,8 @@ class ManualTestList : public Command printf("Test_TC_CADMIN_1_13\n"); printf("Test_TC_CADMIN_1_23\n"); printf("Test_TC_CADMIN_1_24\n"); + printf("Test_TC_CADMIN_1_25\n"); + printf("Test_TC_CADMIN_1_26\n"); printf("Test_TC_MOD_1_2\n"); printf("Test_TC_MOD_1_3\n"); printf("Test_TC_MOD_2_1\n"); @@ -576,9 +577,7 @@ class ManualTestList : public Command printf("Test_TC_CC_9_3\n"); printf("Test_TC_DRLK_2_10\n"); printf("Test_TC_DRLK_3_2\n"); - printf("Test_TC_DRLK_3_3\n"); printf("Test_TC_LCFG_2_1\n"); - printf("Test_TC_LVL_8_1\n"); printf("Test_TC_LWM_1_1\n"); printf("Test_TC_LWM_1_2\n"); printf("Test_TC_LWM_2_1\n"); @@ -624,26 +623,19 @@ class ManualTestList : public Command printf("Test_TC_TCTL_3_2\n"); printf("Test_TC_TCTL_3_3\n"); printf("Test_TC_TMP_2_2\n"); - printf("Test_TC_TSTAT_3_1\n"); printf("Test_TC_TSTAT_3_2\n"); printf("Test_TC_DGTHREAD_2_5\n"); printf("Test_TC_ACT_2_1\n"); printf("Test_TC_ACT_2_2\n"); printf("Test_TC_ACT_3_2\n"); - printf("Test_TC_LTIME_2_1\n"); printf("Test_TC_LTIME_3_1\n"); - printf("Test_TC_TIMESYNC_2_15\n"); printf("Test_TC_BIND_2_1\n"); printf("Test_TC_BIND_2_2\n"); printf("Test_TC_BIND_2_3\n"); printf("Test_TC_S_1_1\n"); printf("Test_TC_S_2_1\n"); - printf("Test_TC_S_2_2\n"); - printf("Test_TC_S_2_3\n"); - printf("Test_TC_S_2_4\n"); printf("Test_TC_S_2_5\n"); printf("Test_TC_S_2_6\n"); - printf("Test_TC_S_3_1\n"); printf("Test_TC_BRBINFO_2_2\n"); printf("Test_TC_BRBINFO_3_1\n"); printf("Test_TC_WASHERCTRL_1_1\n"); @@ -10837,12 +10829,7 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -11072,8 +11059,13 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ClusterRevision::Id, true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 2: { LogStep(2, "Step 3: TH reads the FeatureMap from DUT"); @@ -12640,12 +12632,7 @@ class Test_TC_CC_1_1Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -13387,8 +13374,13 @@ class Test_TC_CC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ClusterRevision::Id, - true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 2: { LogStep(2, "Step 3a: Read the global attribute: FeatureMap"); @@ -16923,7 +16915,7 @@ class Test_TC_CC_4_3Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 19: { - LogStep(19, "TStep 3c: H reads CurrentSaturation attribute from DUT"); + LogStep(19, "Step 3c: H reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); @@ -16994,7 +16986,7 @@ class Test_TC_CC_4_3Suite : public TestCommand chip::NullOptional); } case 28: { - LogStep(28, "TStep 4b: H reads EnhancedColorMode attribute from DUT"); + LogStep(28, "Step 4b: H reads EnhancedColorMode attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, true, chip::NullOptional); @@ -19240,7 +19232,7 @@ class Test_TC_CC_6_1Suite : public TestCommand ); } case 3: { - LogStep(3, "TStep 1a: H reads ColorTempPhysicalMinMireds attribute from DUT"); + LogStep(3, "Step 1a: H reads ColorTempPhysicalMinMireds attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); @@ -22345,7 +22337,7 @@ class Test_TC_CC_8_1Suite : public TestCommand } case 3: { LogStep(3, - "TStep 2a: H sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and " + "Step 2a: H sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and " "TransitionTime=0 (immediately)."); VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -24288,7 +24280,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand { public: Test_TC_CDOCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CDOCONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_CDOCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -24339,8 +24331,8 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -24349,7 +24341,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -24358,7 +24350,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -24367,10 +24359,19 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -24380,16 +24381,17 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -24399,16 +24401,17 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -24418,16 +24421,17 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -24437,16 +24441,17 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24461,7 +24466,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24475,7 +24480,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24484,7 +24489,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24493,7 +24498,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24505,7 +24510,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24518,7 +24523,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24528,7 +24533,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24538,7 +24543,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24548,7 +24553,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24558,7 +24563,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24567,7 +24572,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24576,7 +24581,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24588,7 +24593,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24600,7 +24605,7 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -24636,185 +24641,190 @@ class Test_TC_CDOCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given CDOCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip( + " !CDOCONC.S.F00 && !CDOCONC.S.F01 && !CDOCONC.S.F02 && !CDOCONC.S.F03 && !CDOCONC.S.F04 && !CDOCONC.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given CDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given CDOCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given CDOCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given CDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given CDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given CDOCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given CDOCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given CDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given CDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given CDOCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F02 && CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given CDOCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given CDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F02 && !CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given CDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given CDOCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F03 && CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given CDOCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given CDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F03 && !CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given CDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given CDOCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F04 && CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given CDOCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given CDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F04 && !CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given CDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given CDOCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F05 && CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given CDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F05 && !CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.A0007 && CDOCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when CDOCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.A0007 && CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when CDOCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when CDOCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when CDOCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "CDOCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "CDOCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "CDOCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "CDOCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when CDOCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when CDOCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, + CarbonDioxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + } + case 28: { + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -25064,7 +25074,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand { public: Test_TC_CMOCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CMOCONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_CMOCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -25115,8 +25125,8 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -25125,7 +25135,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -25134,7 +25144,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -25143,10 +25153,19 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25156,7 +25175,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25165,7 +25184,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25175,7 +25194,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25184,7 +25203,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25194,7 +25213,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25203,7 +25222,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25213,7 +25232,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25222,7 +25241,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25237,7 +25256,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25251,7 +25270,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25260,7 +25279,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25269,7 +25288,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25281,7 +25300,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25294,7 +25313,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25304,7 +25323,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25314,7 +25333,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25324,7 +25343,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25334,7 +25353,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25343,7 +25362,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25352,7 +25371,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25364,7 +25383,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25376,7 +25395,7 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -25412,185 +25431,190 @@ class Test_TC_CMOCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip( + " !CMOCONC.S.F00 && !CMOCONC.S.F01 && !CMOCONC.S.F02 && !CMOCONC.S.F03 && !CMOCONC.S.F04 && !CMOCONC.S.F05 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given CMOCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given CMOCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given CMOCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given CMOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given CMOCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F02 && CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given CMOCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given CMOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F02 && !CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given CMOCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F03 && CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given CMOCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F03 && !CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given CMOCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F04 && CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given CMOCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F04 && !CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given CMOCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F05 && CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F05 && !CMOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.A0007 && CMOCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when CMOCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.A0007 && CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when CMOCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when CMOCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when CMOCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "CMOCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "CMOCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "CMOCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "CMOCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when CMOCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when CMOCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, + CarbonMonoxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + } + case 28: { + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -25842,7 +25866,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand { public: Test_TC_FLDCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_FLDCONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_FLDCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -25893,8 +25917,8 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -25903,7 +25927,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -25912,7 +25936,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -25921,10 +25945,19 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25934,7 +25967,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25943,7 +25976,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25953,7 +25986,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25962,7 +25995,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25972,7 +26005,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25981,7 +26014,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -25991,7 +26024,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26000,7 +26033,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26015,7 +26048,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26029,7 +26062,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26038,7 +26071,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26047,7 +26080,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26059,7 +26092,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26072,7 +26105,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26082,7 +26115,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26092,7 +26125,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26102,7 +26135,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26112,7 +26145,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26121,7 +26154,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26130,7 +26163,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26142,7 +26175,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26154,7 +26187,7 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26190,185 +26223,190 @@ class Test_TC_FLDCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given FLDCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip( + " !FLDCONC.S.F00 && !FLDCONC.S.F01 && !FLDCONC.S.F02 && !FLDCONC.S.F03 && !FLDCONC.S.F04 && !FLDCONC.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given FLDCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given FLDCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given FLDCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given FLDCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given FLDCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given FLDCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given FLDCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given FLDCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given FLDCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given FLDCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F02 && FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given FLDCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given FLDCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F02 && !FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given FLDCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given FLDCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F03 && FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given FLDCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given FLDCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F03 && !FLDCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given FLDCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given FLDCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F04 && FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given FLDCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given FLDCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F04 && !FLDCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given FLDCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given FLDCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F05 && FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given FLDCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F05 && !FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.A0007 && FLDCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when FLDCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.A0007 && FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when FLDCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when FLDCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when FLDCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "FLDCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "FLDCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "FLDCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "FLDCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when FLDCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when FLDCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, + FormaldehydeConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + } + case 28: { + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -26616,7 +26654,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand { public: Test_TC_NDOCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_NDOCONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_NDOCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -26667,8 +26705,8 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -26677,7 +26715,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -26686,7 +26724,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -26695,10 +26733,19 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26708,7 +26755,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26717,7 +26764,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26727,7 +26774,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26736,7 +26783,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26746,7 +26793,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26755,7 +26802,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26765,7 +26812,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -26774,7 +26821,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26789,7 +26836,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26803,7 +26850,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26812,7 +26859,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26821,7 +26868,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26833,7 +26880,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26846,7 +26893,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26856,7 +26903,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26866,7 +26913,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26876,7 +26923,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26886,7 +26933,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26895,7 +26942,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26904,7 +26951,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26916,7 +26963,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26928,7 +26975,7 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26964,186 +27011,191 @@ class Test_TC_NDOCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given NDOCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip( + " !NDOCONC.S.F00 && !NDOCONC.S.F01 && !NDOCONC.S.F02 && !NDOCONC.S.F03 && !NDOCONC.S.F04 && !NDOCONC.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given NDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given NDOCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given NDOCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given NDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given NDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given NDOCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given NDOCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given NDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given NDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given NDOCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F02 && NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given NDOCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given NDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F02 && !NDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given NDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given NDOCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F03 && NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given NDOCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given NDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F03 && !NDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given NDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given NDOCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F04 && NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given NDOCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given NDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F04 && NDOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given NDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given NDOCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F05 && NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given NDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F05 && !NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.A0007 && NDOCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when NDOCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.A0007 && NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when NDOCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when NDOCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when NDOCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "NDOCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "NDOCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 3i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "NDOCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 3j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 3i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "NDOCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 3k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 3j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 3k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, + NitrogenDioxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + } + case 28: { + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -27395,7 +27447,7 @@ class Test_TC_NDOCONC_2_1Suite : public TestCommand class Test_TC_OZCONC_1_1Suite : public TestCommand { public: - Test_TC_OZCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OZCONC_1_1", 29, credsIssuerConfig) + Test_TC_OZCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OZCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -27446,8 +27498,8 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -27456,7 +27508,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -27465,7 +27517,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -27474,10 +27526,19 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27487,7 +27548,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27496,7 +27557,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27506,7 +27567,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27515,7 +27576,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27525,7 +27586,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27534,7 +27595,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27544,7 +27605,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -27553,7 +27614,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27568,7 +27629,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27582,7 +27643,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27591,7 +27652,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27600,7 +27661,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27612,7 +27673,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27625,7 +27686,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27635,7 +27696,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27645,7 +27706,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27655,7 +27716,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27665,7 +27726,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27674,7 +27735,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27683,7 +27744,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27695,7 +27756,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27707,7 +27768,7 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27743,184 +27804,188 @@ class Test_TC_OZCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given OZCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip(" !OZCONC.S.F00 && !OZCONC.S.F01 && !OZCONC.S.F02 && !OZCONC.S.F03 && !OZCONC.S.F04 && !OZCONC.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given OZCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given OZCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given OZCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given OZCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given OZCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given OZCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given OZCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given OZCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given OZCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given OZCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F02 && OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given OZCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given OZCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F02 && !OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given OZCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given OZCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F03 && OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given OZCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given OZCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F03 && !OZCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given OZCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given OZCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F04 && OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given OZCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given OZCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F04 && !OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given OZCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given OZCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F05 && OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given OZCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F05 && !OZCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && OZCONC.S.A0007 && OZCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when OZCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("OZCONC.S.A0007 && OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when OZCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when OZCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when OZCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "OZCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "OZCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "OZCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "OZCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when OZCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when OZCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !OZCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + OzoneConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, + OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -28164,7 +28229,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand { public: Test_TC_PMHCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PMHCONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_PMHCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -28215,8 +28280,8 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -28225,7 +28290,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -28234,7 +28299,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -28243,10 +28308,19 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28256,7 +28330,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28265,7 +28339,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28275,7 +28349,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28284,7 +28358,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28294,7 +28368,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28303,7 +28377,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28313,7 +28387,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -28322,7 +28396,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28337,7 +28411,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28351,7 +28425,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28360,7 +28434,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28369,7 +28443,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28381,7 +28455,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28394,7 +28468,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28404,7 +28478,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28414,7 +28488,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28424,7 +28498,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28434,7 +28508,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28443,7 +28517,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28452,7 +28526,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28464,7 +28538,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28476,7 +28550,7 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28512,184 +28586,189 @@ class Test_TC_PMHCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given PMHCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip( + " !PMHCONC.S.F00 && !PMHCONC.S.F01 && !PMHCONC.S.F02 && !PMHCONC.S.F03 && !PMHCONC.S.F04 && !PMHCONC.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given PMHCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given PMHCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given PMHCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given PMHCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given PMHCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given PMHCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given PMHCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given PMHCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given PMHCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given PMHCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F02 && PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given PMHCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given PMHCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F02 && !PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given PMHCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given PMHCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F03 && PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given PMHCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given PMHCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F03 && !PMHCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given PMHCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given PMHCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F04 && PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given PMHCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given PMHCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F04 && PMHCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given PMHCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given PMHCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F05 && PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given PMHCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F05 && !PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.A0007 && PMHCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMHCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.A0007 && PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMHCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when PMHCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when PMHCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "PMHCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "PMHCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "PMHCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "PMHCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when PMHCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when PMHCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + Pm1ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, + Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -28933,7 +29012,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand { public: Test_TC_PMICONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PMICONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_PMICONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -28984,8 +29063,8 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -28994,7 +29073,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -29003,7 +29082,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -29012,10 +29091,19 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29025,7 +29113,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29034,7 +29122,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29044,7 +29132,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29053,7 +29141,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29063,7 +29151,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29072,7 +29160,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29082,7 +29170,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29091,7 +29179,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29106,7 +29194,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29120,7 +29208,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29129,7 +29217,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29138,7 +29226,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29150,7 +29238,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29163,7 +29251,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29173,7 +29261,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29183,7 +29271,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29193,7 +29281,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29203,7 +29291,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29212,7 +29300,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29221,7 +29309,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29233,7 +29321,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29245,7 +29333,7 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29281,184 +29369,189 @@ class Test_TC_PMICONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given PMICONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip( + " !PMICONC.S.F00 && !PMICONC.S.F01 && !PMICONC.S.F02 && !PMICONC.S.F03 && !PMICONC.S.F04 && !PMICONC.S.F05 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given PMICONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given PMICONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given PMICONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given PMICONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given PMICONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given PMICONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given PMICONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given PMICONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given PMICONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given PMICONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F02 && PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given PMICONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given PMICONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F02 && !PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given PMICONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given PMICONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F03 && PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given PMICONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given PMICONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F03 && !PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given PMICONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given PMICONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F04 && PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given PMICONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given PMICONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F04 && !PMICONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given PMICONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given PMICONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F05 && PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given PMICONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F05 && !PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && PMICONC.S.A0007 && PMICONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMICONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("PMICONC.S.A0007 && PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMICONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when PMICONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when PMICONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "PMICONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "PMICONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "PMICONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "PMICONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when PMICONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when PMICONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !PMICONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + Pm25ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, + Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -29703,7 +29796,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand { public: Test_TC_PMKCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PMKCONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_PMKCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -29754,8 +29847,8 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -29764,7 +29857,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -29773,7 +29866,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -29782,10 +29875,19 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29795,7 +29897,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29804,7 +29906,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29814,7 +29916,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29823,7 +29925,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29833,7 +29935,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29842,7 +29944,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29852,7 +29954,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -29861,7 +29963,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29876,7 +29978,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29890,7 +29992,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29899,7 +30001,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29908,7 +30010,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29920,7 +30022,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29933,7 +30035,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29943,7 +30045,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29953,7 +30055,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29963,7 +30065,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29973,7 +30075,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29982,7 +30084,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -29991,7 +30093,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30003,7 +30105,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30015,7 +30117,7 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30051,184 +30153,189 @@ class Test_TC_PMKCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given PMKCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip( + " !PMKCONC.S.F00 && !PMKCONC.S.F01 && !PMKCONC.S.F02 && !PMKCONC.S.F03 && !PMKCONC.S.F04 && !PMKCONC.S.F05 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given PMKCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given PMKCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given PMKCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given PMKCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given PMKCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given PMKCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given PMKCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given PMKCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given PMKCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given PMKCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F02 && PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given PMKCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given PMKCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F02 && !PMKCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given PMKCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given PMKCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F03 && PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given PMKCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given PMKCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F03 && !PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given PMKCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given PMKCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F04 && PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given PMKCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given PMKCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F04 && !PMKCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given PMKCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given PMKCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F05 && PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given PMKCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F05 && !PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.A0007 && PMKCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMKCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.A0007 && PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMKCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when PMKCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when PMKCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "PMKCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "PMKCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "PMKCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "PMKCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when PMKCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when PMKCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + Pm10ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, + Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -30472,7 +30579,7 @@ class Test_TC_PMKCONC_2_1Suite : public TestCommand class Test_TC_RNCONC_1_1Suite : public TestCommand { public: - Test_TC_RNCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RNCONC_1_1", 29, credsIssuerConfig) + Test_TC_RNCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RNCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -30523,8 +30630,8 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -30533,7 +30640,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -30542,7 +30649,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -30551,10 +30658,19 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30564,7 +30680,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30573,7 +30689,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30583,7 +30699,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30592,7 +30708,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30602,7 +30718,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30611,7 +30727,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30621,7 +30737,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -30630,7 +30746,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30645,7 +30761,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30659,7 +30775,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30668,7 +30784,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30677,7 +30793,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30689,7 +30805,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30702,7 +30818,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30712,7 +30828,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30722,7 +30838,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30732,7 +30848,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30742,7 +30858,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30751,7 +30867,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30760,7 +30876,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30772,7 +30888,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30784,7 +30900,7 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30820,184 +30936,188 @@ class Test_TC_RNCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given RNCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo( + !ShouldSkip(" !RNCONC.S.F00 && !RNCONC.S.F01 && !RNCONC.S.F02 && !RNCONC.S.F03 && !RNCONC.S.F04 && !RNCONC.S.F05"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given RNCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given RNCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given RNCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given RNCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given RNCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given RNCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given RNCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given RNCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given RNCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given RNCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F02 && RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given RNCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given RNCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F02 && !RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given RNCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given RNCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F03 && RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given RNCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given RNCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F03 && !RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given RNCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given RNCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F04 && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given RNCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given RNCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F04 && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given RNCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given RNCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F05 && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given RNCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F05 && !RNCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && RNCONC.S.A0007 && RNCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep( - 17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when RNCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("RNCONC.S.A0007 && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 18, + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when RNCONC.S.A0007 is not set"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when RNCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when RNCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "RNCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "RNCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "RNCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "RNCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when RNCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when RNCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !RNCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); + RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + RadonConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, + RadonConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, RadonConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -31241,7 +31361,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand { public: Test_TC_TVOCCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_TVOCCONC_1_1", 29, credsIssuerConfig) + TestCommand("Test_TC_TVOCCONC_1_1", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -31292,8 +31412,8 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 3: @@ -31302,7 +31422,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: @@ -31311,7 +31431,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -31320,10 +31440,19 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31333,7 +31462,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31342,7 +31471,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31352,7 +31481,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31361,7 +31490,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31371,7 +31500,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31380,7 +31509,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31390,7 +31519,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -31399,7 +31528,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31414,7 +31543,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31428,7 +31557,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31437,7 +31566,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31446,7 +31575,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31458,7 +31587,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31471,7 +31600,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31481,7 +31610,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31491,7 +31620,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31501,7 +31630,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31511,7 +31640,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31520,7 +31649,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31529,7 +31658,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31541,7 +31670,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31553,7 +31682,7 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31589,211 +31718,216 @@ class Test_TC_TVOCCONC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Step 3b: Given TVOCCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F00 && !TVOCCONC.S.F01 && !TVOCCONC.S.F02 && !TVOCCONC.S.F03 && !TVOCCONC.S.F04 " + "&& !TVOCCONC.S.F05 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Step 3c: Given TVOCCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Step 3b: Given TVOCCONC.S.F00(MEA) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Step 3d: Given TVOCCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "Step 3c: Given TVOCCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 3e: Given TVOCCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Step 3d: Given TVOCCONC.S.F01(LEV) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Step 3f: Given TVOCCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Step 3e: Given TVOCCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Step 3g: Given TVOCCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Step 3f: Given TVOCCONC.S.F02(MED) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F02 && TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 3h: Given TVOCCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Step 3g: Given TVOCCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F02 && !TVOCCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 3i: Given TVOCCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 3h: Given TVOCCONC.S.F03(CRI) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F03 && TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 3j: Given TVOCCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Step 3i: Given TVOCCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F03 && !TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 3k: Given TVOCCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 3j: Given TVOCCONC.S.F04(PEA) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F04 && TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 3l: Given TVOCCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 3k: Given TVOCCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F04 && !TVOCCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 3m: Given TVOCCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 3l: Given TVOCCONC.S.F05(AVG) ensure featuremap has the correct bits set"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F05 && TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 3m: Given TVOCCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F05 && !TVOCCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, + TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 15: { LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.A0007 && TVOCCONC.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep(17, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when TVOCCONC.S.A0007 is not " - "set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.A0007 && TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { LogStep(18, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when TVOCCONC.S.A0007 is not " + "set"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { LogStep(19, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when TVOCCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " + "and Measurement Unit in AttributeList"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { LogStep(20, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " + "excluded from AttributeList when TVOCCONC.S.F00 (MEA) is not set"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 21: { LogStep(21, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "TVOCCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 22: { LogStep(22, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " + "TVOCCONC.S.F04 (PEA) is not set"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 23: { LogStep(23, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "TVOCCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " + "AttributeList"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + "TVOCCONC.S.F05 (AVG) is not set"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Step 4k: Check that LevelValue is excluded from AttributeList when TVOCCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); + VerifyOrDo(!ShouldSkip("TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Step 5l: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when TVOCCONC.S.F01 (LEV) is not set"); + VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::Id, true, + TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Step 6: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "Step 5l: Read the global attribute: EventList"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, + TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, + TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); + } + case 29: { + LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -35314,25 +35448,23 @@ class Test_TC_DESC_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("DESC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { LogStep(2, "Step 3: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("DESC.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DESC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { LogStep(4, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && DESC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -35344,7 +35476,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand "allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) " "and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DESC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -35359,7 +35491,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " "(0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the " "allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DESC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -35374,7 +35506,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DESC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -35389,7 +35521,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DESC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -38685,7 +38817,7 @@ class Test_TC_FAN_3_2Suite : public TestCommand chip::NullOptional); } case 2: { - LogStep(2, "Step 3: TH writes TH writes to the DUT the a value less than or equal to the value read in step 2"); + LogStep(2, "Step 3: TH writes to the DUT the a value less than or equal to the value read in step 2"); VerifyOrDo(!ShouldSkip("FAN.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::Nullable value; @@ -38703,13 +38835,13 @@ class Test_TC_FAN_3_2Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, "Step 4: TH reads from the DUT the the SpeedSetting attribute"); + LogStep(4, "Step 4: TH reads from the DUT the SpeedSetting attribute"); VerifyOrDo(!ShouldSkip("FAN.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedSetting::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Step 5: TH reads from the DUT the the SpeedCurrent attribute"); + LogStep(5, "Step 5: TH reads from the DUT the SpeedCurrent attribute"); VerifyOrDo(!ShouldSkip("FAN.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedCurrent::Id, true, chip::NullOptional); @@ -39913,6 +40045,292 @@ class Test_TC_DGGEN_2_1Suite : public TestCommand } }; +class Test_TC_GRPKEY_1_1Suite : public TestCommand +{ +public: + Test_TC_GRPKEY_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_GRPKEY_1_1", 13, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_GRPKEY_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 2U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Step 3a: TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip(" !GRPKEY.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Step 3b: Given GRPKEY.S.F00(CS) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Step 4a: TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip(" !PICS_EVENT_LIST_ENABLED "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, + "Step 4b: The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - " + "0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain values in the Manufacturer Extensible " + "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " + "these values SHALL be ignored. 3.TThe list SHALL NOT contain any values in the Test Vendor or invalid range: " + "(0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), " + "where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 7: { + LogStep(7, "Step 5a: TH1 reads EventList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::EventList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, + "Step 5b: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " + "standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1)"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 9: { + LogStep(9, "Step 6a: TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 10: { + LogStep(10, + "Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1)"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 11: { + LogStep(11, "Step 7a: TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, + "Step 7b: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " + "is the allowed MEI range (0x0001 - 0xFFF1)"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_ICDM_1_1Suite : public TestCommand { public: @@ -65662,6 +66080,276 @@ class Test_TC_SWTCH_2_1Suite : public TestCommand } }; +class Test_TC_RVCOPSTATE_1_1Suite : public TestCommand +{ +public: + Test_TC_RVCOPSTATE_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_RVCOPSTATE_1_1", 13, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_RVCOPSTATE_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Step 2: TH reads the ClusterRevision attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Step 3: TH reads the FeatureMap attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Step 4a: TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Step 4a: TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList from the DUT"); + VerifyOrDo(!ShouldSkip("RVCOPSTATE.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Step 5a: TH reads from the DUT the EventList attribute."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::EventList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList."); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::EventList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "Step 6a: Read the optional command(Pause) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "Step 6b: Read the optional command(Stop) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 10: { + LogStep(10, "Step 6c: Read the optional command(Start) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("RVCOPSTATE.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "Step 6d: Read the optional command(Resume) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("RVCOPSTATE.S.C03.Rsp || RVCOPSTATE.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, "Step 7: Read the global attribute: GeneratedCommandList"); + VerifyOrDo( + !ShouldSkip(" RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp || RVCOPSTATE.S.C03.Rsp "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, + RvcOperationalState::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_TMP_1_1Suite : public TestCommand { public: @@ -66006,7 +66694,7 @@ class Test_TC_TMP_2_1Suite : public TestCommand class Test_TC_TSTAT_1_1Suite : public TestCommand { public: - Test_TC_TSTAT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_1_1", 26, credsIssuerConfig) + Test_TC_TSTAT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_1_1", 59, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -66045,12 +66733,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -66116,6 +66799,15 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand } break; case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 64UL)); + } + break; + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66132,7 +66824,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66148,7 +66840,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66157,7 +66849,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66166,7 +66858,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66175,7 +66867,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66184,7 +66876,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66193,7 +66885,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66204,7 +66896,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66215,7 +66907,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66226,7 +66918,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 54UL)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66237,16 +66929,295 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 57UL)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 21: + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + } + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); + } + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); + } + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 29UL)); + } + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 35UL)); + } + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 36UL)); + } + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 37UL)); + } + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); + } + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 48UL)); + } + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 49UL)); + } + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 50UL)); + } + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 58UL)); + } + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); + } + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 65UL)); + } + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); + } + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 67UL)); + } + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 68UL)); + } + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 69UL)); + } + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 70UL)); + } + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 71UL)); + } + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + } + break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); + } + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); + } + break; + case 47: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 48: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + } + break; + case 49: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + } + break; + case 50: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); + } + break; + case 51: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 24UL)); + } + break; + case 52: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 30UL)); + } + break; + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66258,7 +67229,16 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 22: + case 54: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } + break; + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66270,7 +67250,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 23: + case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66279,7 +67259,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 24: + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -66288,7 +67268,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 25: + case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -66316,8 +67296,13 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand } case 1: { LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ClusterRevision::Id, true, - chip::NullOptional); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 2: { LogStep(2, "Step 3a: Read the global attribute: FeatureMap"); @@ -66363,102 +67348,301 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand chip::NullOptional); } case 9: { - LogStep(9, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + LogStep(9, "Step 3h: Given TSTAT.S.F06(LTNE) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F06"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 10: { LogStep(10, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Step 4b: Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Step 4a: Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Step 4c: Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Step 4b: Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Step 4d: Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(13, "Step 4c: Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Step 4e: Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Step 4d: Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Step 4f: Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "Step 4e: Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Step 4g: Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Step 4f: Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 17: { - LogStep(17, "Step 4h: Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "Step 4g: Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, "Step 4i: Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(18, "Step 4h: Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 19: { - LogStep(19, "Step 4j: Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(19, "Step 4i: Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, chip::NullOptional); } case 20: { - LogStep(20, "Step 5a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); + LogStep(20, "Step 4j: Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); } case 21: { - LogStep(21, "Step 5b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList"); + LogStep(21, "Step 4k: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 22: { + LogStep(22, "Step 4l: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 23: { + LogStep(23, "Step 4m: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 24: { + LogStep(24, "Step 4n: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 25: { + LogStep(25, "Step 4o: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A001d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 26: { + LogStep(26, "Step 4p: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 27: { + LogStep(27, "Step 4q: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 28: { + LogStep(28, "Step 4r: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 29: { + LogStep(29, "Step 4s: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 30: { + LogStep(30, "Step 4t: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 31: { + LogStep(31, "Step 4u: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 32: { + LogStep(32, "Step 4x: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 33: { + LogStep(33, "Step 5y: Read the optional attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 34: { + LogStep(34, "Step 4z: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0040"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 35: { + LogStep(35, "Step 4A: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0041"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 36: { + LogStep(36, "Step 4B: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0042"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 37: { + LogStep(37, "Step 4C: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0043"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 38: { + LogStep(38, "Step 5D: Read the optional attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0044"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 39: { + LogStep(39, "Step 4E: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0045"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 40: { + LogStep(40, "Step 4F: Read the optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0046"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 41: { + LogStep(41, "Step 5G: Read the optional attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.A0047"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 42: { + LogStep(42, "Step 4H: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 43: { + LogStep(43, "Step 4I: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 44: { + LogStep(44, "Step 4J: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 45: { + LogStep(45, "Step 4K: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 46: { + LogStep(46, "Step 4L: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 47: { + LogStep(47, "Step 4M: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 48: { + LogStep(48, "Step 4N: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 49: { + LogStep(49, "Step 4O: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 50: { + LogStep(50, "Step 4P: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 51: { + LogStep(51, "Step 4Q: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 52: { + LogStep(52, "Step 4R: Read the Feature dependent(TSTAT.S.F05(AUTO)) optional attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.A001e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 53: { + LogStep(53, "Step 5a: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Step 6a: Read the global attribute: GeneratedCommandList"); + case 54: { + LogStep(54, "Step 5b: Read the optional attribute: AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("TSTAT.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AcceptedCommandList::Id, + true, chip::NullOptional); + } + case 55: { + LogStep(55, "Step 6a: Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip(" !TSTAT.S.C04.Rsp && !TSTAT.S.C02.Rsp "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Step 6b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList"); + case 56: { + LogStep(56, "Step 6b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Step 6c: Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList"); + case 57: { + LogStep(57, "Step 6c: Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList"); VerifyOrDo(!ShouldSkip("TSTAT.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, + case 58: { + LogStep(58, "Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " "manufacturer specific event IDs."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -108156,7 +109340,7 @@ class Test_TC_DRLK_2_2Suite : public TestCommand ); } case 16: { - LogStep(16, "TStep 10a: H reads the WrongCodeEntryLimit attribute from the DUT"); + LogStep(16, "Step 10a: H reads the WrongCodeEntryLimit attribute from the DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id, true, chip::NullOptional); @@ -113993,7 +115177,7 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand { public: Test_TC_ACFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ACFREMON_1_1", 14, credsIssuerConfig) + TestCommand("Test_TC_ACFREMON_1_1", 16, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -114125,6 +115309,24 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand } break; case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114136,7 +115338,7 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 11: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114144,7 +115346,7 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 12: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114153,7 +115355,7 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 13: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114236,30 +115438,42 @@ class Test_TC_ACFREMON_1_1Suite : public TestCommand ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0003) in AttributeList"); + VerifyOrDo(!ShouldSkip("ACFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 5: TH reads EventList attribute from DUT"); + LogStep(10, "Step 4d: Read the optional attribute LastChangedTime (ACFREMON.S.A0004) in AttributeList"); + VerifyOrDo(!ShouldSkip("ACFREMON.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "Step 4e: Read the optional attribute ReplacementProductList (ACFREMON.S.F02) in AttributeList"); + VerifyOrDo(!ShouldSkip("ACFREMON.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, "Step 5: TH reads EventList attribute from DUT"); VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Step 6a: Read the global attribute: AcceptedCommandList"); + case 13: { + LogStep(13, "Step 6a: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList"); + case 14: { + LogStep(14, "Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("ACFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Step 7: Read the global attribute: GeneratedCommandList"); + case 15: { + LogStep(15, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -114432,7 +115646,7 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand { public: Test_TC_HEPAFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_HEPAFREMON_1_1", 14, credsIssuerConfig) + TestCommand("Test_TC_HEPAFREMON_1_1", 16, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -114564,6 +115778,24 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand } break; case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114575,7 +115807,7 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 11: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114583,7 +115815,7 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 12: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114592,7 +115824,7 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 13: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -114669,36 +115901,48 @@ class Test_TC_HEPAFREMON_1_1Suite : public TestCommand HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Step 4a: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList"); + LogStep(8, "Step 4b: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList"); VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Step 4b: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Step 4c: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0003) in AttributeList"); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Step 5: TH reads EventList attribute from DUT"); + LogStep(10, "Step 4d: Read the optional attribute LastChangedTime (HEPAFREMON.S.A0004) in AttributeList"); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "Step 4e: Read the optional attribute ReplacementProductList (HEPAFREMON.S.F02) in AttributeList"); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, "Step 5: TH reads EventList attribute from DUT"); VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Step 6a: Read the global attribute: AcceptedCommandList"); + case 13: { + LogStep(13, "Step 6a: Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList"); + case 14: { + LogStep(14, "Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList"); VerifyOrDo(!ShouldSkip("HEPAFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Step 7: Read the global attribute: GeneratedCommandList"); + case 15: { + LogStep(15, "Step 7: Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, HepaFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -117304,6 +118548,61 @@ class Test_TC_G_2_3Suite : public TestCommand } }; +class Test_TC_G_2_4Suite : public TestCommand +{ +public: + Test_TC_G_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_4", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_G_2_4Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + class Test_TC_G_3_2Suite : public TestCommand { public: @@ -119565,65 +120864,10 @@ class Test_TC_CNET_4_16Suite : public TestCommand } }; -class Test_TC_CNET_4_17Suite : public TestCommand -{ -public: - Test_TC_CNET_4_17Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_17", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_17Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_18Suite : public TestCommand +class Test_TC_CNET_4_20Suite : public TestCommand { public: - Test_TC_CNET_4_18Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_18", 0, credsIssuerConfig) + Test_TC_CNET_4_20Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_20", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -119631,7 +120875,7 @@ class Test_TC_CNET_4_18Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_18Suite() {} + ~Test_TC_CNET_4_20Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -119675,10 +120919,10 @@ class Test_TC_CNET_4_18Suite : public TestCommand } }; -class Test_TC_CNET_4_19Suite : public TestCommand +class Test_TC_CNET_4_21Suite : public TestCommand { public: - Test_TC_CNET_4_19Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_19", 0, credsIssuerConfig) + Test_TC_CNET_4_21Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_21", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -119686,7 +120930,7 @@ class Test_TC_CNET_4_19Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_19Suite() {} + ~Test_TC_CNET_4_21Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -119730,10 +120974,10 @@ class Test_TC_CNET_4_19Suite : public TestCommand } }; -class Test_TC_CNET_4_20Suite : public TestCommand +class Test_TC_CNET_4_22Suite : public TestCommand { public: - Test_TC_CNET_4_20Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_20", 0, credsIssuerConfig) + Test_TC_CNET_4_22Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_22", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -119741,7 +120985,7 @@ class Test_TC_CNET_4_20Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_20Suite() {} + ~Test_TC_CNET_4_22Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -119785,10 +121029,10 @@ class Test_TC_CNET_4_20Suite : public TestCommand } }; -class Test_TC_CNET_4_21Suite : public TestCommand +class Test_TC_DLOG_2_1Suite : public TestCommand { public: - Test_TC_CNET_4_21Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_21", 0, credsIssuerConfig) + Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -119796,7 +121040,7 @@ class Test_TC_CNET_4_21Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_21Suite() {} + ~Test_TC_DLOG_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -119840,10 +121084,10 @@ class Test_TC_CNET_4_21Suite : public TestCommand } }; -class Test_TC_CNET_4_22Suite : public TestCommand +class Test_TC_DLOG_2_2Suite : public TestCommand { public: - Test_TC_CNET_4_22Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_22", 0, credsIssuerConfig) + Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -119851,7 +121095,7 @@ class Test_TC_CNET_4_22Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_22Suite() {} + ~Test_TC_DLOG_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -119895,10 +121139,10 @@ class Test_TC_CNET_4_22Suite : public TestCommand } }; -class Test_TC_DLOG_2_1Suite : public TestCommand +class Test_TC_DLOG_3_1Suite : public TestCommand { public: - Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 0, credsIssuerConfig) + Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -119906,7 +121150,7 @@ class Test_TC_DLOG_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_1Suite() {} + ~Test_TC_DLOG_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -119950,10 +121194,11 @@ class Test_TC_DLOG_2_1Suite : public TestCommand } }; -class Test_TC_DLOG_2_2Suite : public TestCommand +class Test_TC_DISHALM_1_1Suite : public TestCommand { public: - Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 0, credsIssuerConfig) + Test_TC_DISHALM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DISHALM_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -119961,7 +121206,7 @@ class Test_TC_DLOG_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_2Suite() {} + ~Test_TC_DISHALM_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -120005,10 +121250,11 @@ class Test_TC_DLOG_2_2Suite : public TestCommand } }; -class Test_TC_DLOG_3_1Suite : public TestCommand +class Test_TC_DISHALM_2_1Suite : public TestCommand { public: - Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) + Test_TC_DISHALM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DISHALM_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -120016,7 +121262,7 @@ class Test_TC_DLOG_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_3_1Suite() {} + ~Test_TC_DISHALM_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -120060,11 +121306,11 @@ class Test_TC_DLOG_3_1Suite : public TestCommand } }; -class Test_TC_DISHALM_1_1Suite : public TestCommand +class Test_TC_DISHALM_3_1Suite : public TestCommand { public: - Test_TC_DISHALM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_1_1", 0, credsIssuerConfig) + Test_TC_DISHALM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DISHALM_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -120072,7 +121318,7 @@ class Test_TC_DISHALM_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DISHALM_1_1Suite() {} + ~Test_TC_DISHALM_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -120116,11 +121362,11 @@ class Test_TC_DISHALM_1_1Suite : public TestCommand } }; -class Test_TC_DISHALM_2_1Suite : public TestCommand +class Test_TC_DISHALM_3_2Suite : public TestCommand { public: - Test_TC_DISHALM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_2_1", 0, credsIssuerConfig) + Test_TC_DISHALM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DISHALM_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -120128,7 +121374,7 @@ class Test_TC_DISHALM_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DISHALM_2_1Suite() {} + ~Test_TC_DISHALM_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -120172,11 +121418,11 @@ class Test_TC_DISHALM_2_1Suite : public TestCommand } }; -class Test_TC_DISHALM_3_1Suite : public TestCommand +class Test_TC_DISHALM_3_3Suite : public TestCommand { public: - Test_TC_DISHALM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_3_1", 0, credsIssuerConfig) + Test_TC_DISHALM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DISHALM_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -120184,119 +121430,7 @@ class Test_TC_DISHALM_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DISHALM_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHALM_3_2Suite : public TestCommand -{ -public: - Test_TC_DISHALM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHALM_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHALM_3_3Suite : public TestCommand -{ -public: - Test_TC_DISHALM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_3_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHALM_3_3Suite() {} + ~Test_TC_DISHALM_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -120893,116 +122027,6 @@ class Test_TC_DESC_2_1Suite : public TestCommand } }; -class Test_TC_FAN_3_3Suite : public TestCommand -{ -public: - Test_TC_FAN_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_3_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FAN_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FAN_3_5Suite : public TestCommand -{ -public: - Test_TC_FAN_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_3_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FAN_3_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - class Test_TC_CGEN_2_2Suite : public TestCommand { public: @@ -121168,10 +122192,10 @@ class Test_TC_DGGEN_2_3Suite : public TestCommand } }; -class Test_TC_DGGEN_3_1Suite : public TestCommand +class Test_TC_ICDM_2_2Suite : public TestCommand { public: - Test_TC_DGGEN_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_3_1", 0, credsIssuerConfig) + Test_TC_ICDM_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ICDM_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121179,7 +122203,7 @@ class Test_TC_DGGEN_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGGEN_3_1Suite() {} + ~Test_TC_ICDM_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121223,10 +122247,10 @@ class Test_TC_DGGEN_3_1Suite : public TestCommand } }; -class Test_TC_ICDM_2_2Suite : public TestCommand +class Test_TC_ICDM_2_3Suite : public TestCommand { public: - Test_TC_ICDM_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ICDM_2_2", 0, credsIssuerConfig) + Test_TC_ICDM_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ICDM_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121234,7 +122258,7 @@ class Test_TC_ICDM_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ICDM_2_2Suite() {} + ~Test_TC_ICDM_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121278,10 +122302,10 @@ class Test_TC_ICDM_2_2Suite : public TestCommand } }; -class Test_TC_ICDM_2_3Suite : public TestCommand +class Test_TC_I_3_2Suite : public TestCommand { public: - Test_TC_ICDM_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ICDM_2_3", 0, credsIssuerConfig) + Test_TC_I_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121289,7 +122313,7 @@ class Test_TC_ICDM_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ICDM_2_3Suite() {} + ~Test_TC_I_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121333,10 +122357,10 @@ class Test_TC_ICDM_2_3Suite : public TestCommand } }; -class Test_TC_I_3_2Suite : public TestCommand +class Test_TC_IDM_1_1Suite : public TestCommand { public: - Test_TC_I_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_2", 0, credsIssuerConfig) + Test_TC_IDM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121344,7 +122368,7 @@ class Test_TC_I_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_I_3_2Suite() {} + ~Test_TC_IDM_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121388,10 +122412,10 @@ class Test_TC_I_3_2Suite : public TestCommand } }; -class Test_TC_IDM_1_1Suite : public TestCommand +class Test_TC_IDM_2_1Suite : public TestCommand { public: - Test_TC_IDM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_1_1", 0, credsIssuerConfig) + Test_TC_IDM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121399,7 +122423,7 @@ class Test_TC_IDM_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_1_1Suite() {} + ~Test_TC_IDM_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121443,10 +122467,10 @@ class Test_TC_IDM_1_1Suite : public TestCommand } }; -class Test_TC_IDM_2_1Suite : public TestCommand +class Test_TC_IDM_2_2Suite : public TestCommand { public: - Test_TC_IDM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_2_1", 0, credsIssuerConfig) + Test_TC_IDM_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121454,7 +122478,7 @@ class Test_TC_IDM_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_2_1Suite() {} + ~Test_TC_IDM_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121498,10 +122522,10 @@ class Test_TC_IDM_2_1Suite : public TestCommand } }; -class Test_TC_IDM_2_2Suite : public TestCommand +class Test_TC_IDM_3_1Suite : public TestCommand { public: - Test_TC_IDM_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_2_2", 0, credsIssuerConfig) + Test_TC_IDM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121509,7 +122533,7 @@ class Test_TC_IDM_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_2_2Suite() {} + ~Test_TC_IDM_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121553,10 +122577,10 @@ class Test_TC_IDM_2_2Suite : public TestCommand } }; -class Test_TC_IDM_3_1Suite : public TestCommand +class Test_TC_IDM_3_2Suite : public TestCommand { public: - Test_TC_IDM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_3_1", 0, credsIssuerConfig) + Test_TC_IDM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121564,7 +122588,7 @@ class Test_TC_IDM_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_3_1Suite() {} + ~Test_TC_IDM_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121608,10 +122632,10 @@ class Test_TC_IDM_3_1Suite : public TestCommand } }; -class Test_TC_IDM_3_2Suite : public TestCommand +class Test_TC_IDM_4_1Suite : public TestCommand { public: - Test_TC_IDM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_3_2", 0, credsIssuerConfig) + Test_TC_IDM_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121619,7 +122643,7 @@ class Test_TC_IDM_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_3_2Suite() {} + ~Test_TC_IDM_4_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121663,10 +122687,10 @@ class Test_TC_IDM_3_2Suite : public TestCommand } }; -class Test_TC_IDM_4_1Suite : public TestCommand +class Test_TC_IDM_4_2Suite : public TestCommand { public: - Test_TC_IDM_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_1", 0, credsIssuerConfig) + Test_TC_IDM_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121674,7 +122698,7 @@ class Test_TC_IDM_4_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_4_1Suite() {} + ~Test_TC_IDM_4_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121718,10 +122742,10 @@ class Test_TC_IDM_4_1Suite : public TestCommand } }; -class Test_TC_IDM_4_2Suite : public TestCommand +class Test_TC_IDM_4_3Suite : public TestCommand { public: - Test_TC_IDM_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_2", 0, credsIssuerConfig) + Test_TC_IDM_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121729,7 +122753,7 @@ class Test_TC_IDM_4_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_4_2Suite() {} + ~Test_TC_IDM_4_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121773,10 +122797,10 @@ class Test_TC_IDM_4_2Suite : public TestCommand } }; -class Test_TC_IDM_4_3Suite : public TestCommand +class Test_TC_IDM_4_4Suite : public TestCommand { public: - Test_TC_IDM_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_3", 0, credsIssuerConfig) + Test_TC_IDM_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121784,7 +122808,7 @@ class Test_TC_IDM_4_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_4_3Suite() {} + ~Test_TC_IDM_4_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121828,10 +122852,10 @@ class Test_TC_IDM_4_3Suite : public TestCommand } }; -class Test_TC_IDM_4_4Suite : public TestCommand +class Test_TC_IDM_5_1Suite : public TestCommand { public: - Test_TC_IDM_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_4", 0, credsIssuerConfig) + Test_TC_IDM_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_5_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121839,7 +122863,7 @@ class Test_TC_IDM_4_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_4_4Suite() {} + ~Test_TC_IDM_5_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121883,10 +122907,10 @@ class Test_TC_IDM_4_4Suite : public TestCommand } }; -class Test_TC_IDM_5_1Suite : public TestCommand +class Test_TC_IDM_5_2Suite : public TestCommand { public: - Test_TC_IDM_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_5_1", 0, credsIssuerConfig) + Test_TC_IDM_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_5_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121894,7 +122918,7 @@ class Test_TC_IDM_5_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_5_1Suite() {} + ~Test_TC_IDM_5_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121938,10 +122962,10 @@ class Test_TC_IDM_5_1Suite : public TestCommand } }; -class Test_TC_IDM_5_2Suite : public TestCommand +class Test_TC_IDM_6_1Suite : public TestCommand { public: - Test_TC_IDM_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_5_2", 0, credsIssuerConfig) + Test_TC_IDM_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121949,7 +122973,7 @@ class Test_TC_IDM_5_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_5_2Suite() {} + ~Test_TC_IDM_6_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121993,10 +123017,10 @@ class Test_TC_IDM_5_2Suite : public TestCommand } }; -class Test_TC_IDM_6_1Suite : public TestCommand +class Test_TC_IDM_6_2Suite : public TestCommand { public: - Test_TC_IDM_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_1", 0, credsIssuerConfig) + Test_TC_IDM_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -122004,7 +123028,7 @@ class Test_TC_IDM_6_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_6_1Suite() {} + ~Test_TC_IDM_6_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -122048,10 +123072,10 @@ class Test_TC_IDM_6_1Suite : public TestCommand } }; -class Test_TC_IDM_6_2Suite : public TestCommand +class Test_TC_IDM_6_3Suite : public TestCommand { public: - Test_TC_IDM_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_2", 0, credsIssuerConfig) + Test_TC_IDM_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -122059,7 +123083,7 @@ class Test_TC_IDM_6_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_6_2Suite() {} + ~Test_TC_IDM_6_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -122103,10 +123127,10 @@ class Test_TC_IDM_6_2Suite : public TestCommand } }; -class Test_TC_IDM_6_3Suite : public TestCommand +class Test_TC_IDM_6_4Suite : public TestCommand { public: - Test_TC_IDM_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_3", 0, credsIssuerConfig) + Test_TC_IDM_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -122114,7 +123138,7 @@ class Test_TC_IDM_6_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_6_3Suite() {} + ~Test_TC_IDM_6_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -122158,10 +123182,10 @@ class Test_TC_IDM_6_3Suite : public TestCommand } }; -class Test_TC_IDM_6_4Suite : public TestCommand +class Test_TC_IDM_7_1Suite : public TestCommand { public: - Test_TC_IDM_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_4", 0, credsIssuerConfig) + Test_TC_IDM_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_7_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -122169,7 +123193,7 @@ class Test_TC_IDM_6_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_6_4Suite() {} + ~Test_TC_IDM_7_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -122213,10 +123237,10 @@ class Test_TC_IDM_6_4Suite : public TestCommand } }; -class Test_TC_IDM_7_1Suite : public TestCommand +class Test_TC_IDM_8_1Suite : public TestCommand { public: - Test_TC_IDM_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_7_1", 0, credsIssuerConfig) + Test_TC_IDM_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_8_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -122224,7 +123248,7 @@ class Test_TC_IDM_7_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_7_1Suite() {} + ~Test_TC_IDM_8_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -122268,10 +123292,10 @@ class Test_TC_IDM_7_1Suite : public TestCommand } }; -class Test_TC_IDM_8_1Suite : public TestCommand +class Test_TC_IDM_10_1Suite : public TestCommand { public: - Test_TC_IDM_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_8_1", 0, credsIssuerConfig) + Test_TC_IDM_10_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_10_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -122279,7 +123303,62 @@ class Test_TC_IDM_8_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_8_1Suite() {} + ~Test_TC_IDM_10_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_IDM_11_1Suite : public TestCommand +{ +public: + Test_TC_IDM_11_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_11_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_IDM_11_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -126923,10 +128002,11 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand } }; -class Test_TC_MOD_1_2Suite : public TestCommand +class Test_TC_CADMIN_1_25Suite : public TestCommand { public: - Test_TC_MOD_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_2", 0, credsIssuerConfig) + Test_TC_CADMIN_1_25Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_25", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -126934,7 +128014,7 @@ class Test_TC_MOD_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_1_2Suite() {} + ~Test_TC_CADMIN_1_25Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -126978,10 +128058,11 @@ class Test_TC_MOD_1_2Suite : public TestCommand } }; -class Test_TC_MOD_1_3Suite : public TestCommand +class Test_TC_CADMIN_1_26Suite : public TestCommand { public: - Test_TC_MOD_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_3", 0, credsIssuerConfig) + Test_TC_CADMIN_1_26Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_26", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -126989,7 +128070,7 @@ class Test_TC_MOD_1_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_1_3Suite() {} + ~Test_TC_CADMIN_1_26Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127033,10 +128114,10 @@ class Test_TC_MOD_1_3Suite : public TestCommand } }; -class Test_TC_MOD_2_1Suite : public TestCommand +class Test_TC_MOD_1_2Suite : public TestCommand { public: - Test_TC_MOD_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_2_1", 0, credsIssuerConfig) + Test_TC_MOD_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127044,7 +128125,7 @@ class Test_TC_MOD_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_2_1Suite() {} + ~Test_TC_MOD_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127088,10 +128169,10 @@ class Test_TC_MOD_2_1Suite : public TestCommand } }; -class Test_TC_MOD_2_2Suite : public TestCommand +class Test_TC_MOD_1_3Suite : public TestCommand { public: - Test_TC_MOD_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_2_2", 0, credsIssuerConfig) + Test_TC_MOD_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127099,7 +128180,7 @@ class Test_TC_MOD_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_2_2Suite() {} + ~Test_TC_MOD_1_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127143,10 +128224,10 @@ class Test_TC_MOD_2_2Suite : public TestCommand } }; -class Test_TC_MOD_3_1Suite : public TestCommand +class Test_TC_MOD_2_1Suite : public TestCommand { public: - Test_TC_MOD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_1", 0, credsIssuerConfig) + Test_TC_MOD_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127154,7 +128235,7 @@ class Test_TC_MOD_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_3_1Suite() {} + ~Test_TC_MOD_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127198,10 +128279,10 @@ class Test_TC_MOD_3_1Suite : public TestCommand } }; -class Test_TC_MOD_3_2Suite : public TestCommand +class Test_TC_MOD_2_2Suite : public TestCommand { public: - Test_TC_MOD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_2", 0, credsIssuerConfig) + Test_TC_MOD_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127209,7 +128290,7 @@ class Test_TC_MOD_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_3_2Suite() {} + ~Test_TC_MOD_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127253,10 +128334,10 @@ class Test_TC_MOD_3_2Suite : public TestCommand } }; -class Test_TC_MOD_3_3Suite : public TestCommand +class Test_TC_MOD_3_1Suite : public TestCommand { public: - Test_TC_MOD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_3", 0, credsIssuerConfig) + Test_TC_MOD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127264,7 +128345,7 @@ class Test_TC_MOD_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_3_3Suite() {} + ~Test_TC_MOD_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127308,10 +128389,10 @@ class Test_TC_MOD_3_3Suite : public TestCommand } }; -class Test_TC_MOD_3_4Suite : public TestCommand +class Test_TC_MOD_3_2Suite : public TestCommand { public: - Test_TC_MOD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_4", 0, credsIssuerConfig) + Test_TC_MOD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127319,7 +128400,7 @@ class Test_TC_MOD_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_3_4Suite() {} + ~Test_TC_MOD_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127363,10 +128444,10 @@ class Test_TC_MOD_3_4Suite : public TestCommand } }; -class Test_TC_SU_1_1Suite : public TestCommand +class Test_TC_MOD_3_3Suite : public TestCommand { public: - Test_TC_SU_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_1_1", 0, credsIssuerConfig) + Test_TC_MOD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127374,7 +128455,7 @@ class Test_TC_SU_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_1_1Suite() {} + ~Test_TC_MOD_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127418,10 +128499,10 @@ class Test_TC_SU_1_1Suite : public TestCommand } }; -class Test_TC_SU_2_1Suite : public TestCommand +class Test_TC_MOD_3_4Suite : public TestCommand { public: - Test_TC_SU_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_1", 0, credsIssuerConfig) + Test_TC_MOD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127429,7 +128510,7 @@ class Test_TC_SU_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_1Suite() {} + ~Test_TC_MOD_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127473,10 +128554,10 @@ class Test_TC_SU_2_1Suite : public TestCommand } }; -class Test_TC_SU_2_2Suite : public TestCommand +class Test_TC_SU_1_1Suite : public TestCommand { public: - Test_TC_SU_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_2", 0, credsIssuerConfig) + Test_TC_SU_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127484,7 +128565,7 @@ class Test_TC_SU_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_2Suite() {} + ~Test_TC_SU_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127528,10 +128609,10 @@ class Test_TC_SU_2_2Suite : public TestCommand } }; -class Test_TC_SU_2_3Suite : public TestCommand +class Test_TC_SU_2_1Suite : public TestCommand { public: - Test_TC_SU_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_3", 0, credsIssuerConfig) + Test_TC_SU_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127539,7 +128620,7 @@ class Test_TC_SU_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_3Suite() {} + ~Test_TC_SU_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127583,10 +128664,10 @@ class Test_TC_SU_2_3Suite : public TestCommand } }; -class Test_TC_SU_2_4Suite : public TestCommand +class Test_TC_SU_2_2Suite : public TestCommand { public: - Test_TC_SU_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_4", 0, credsIssuerConfig) + Test_TC_SU_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127594,7 +128675,7 @@ class Test_TC_SU_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_4Suite() {} + ~Test_TC_SU_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127638,10 +128719,10 @@ class Test_TC_SU_2_4Suite : public TestCommand } }; -class Test_TC_SU_2_5Suite : public TestCommand +class Test_TC_SU_2_3Suite : public TestCommand { public: - Test_TC_SU_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_5", 0, credsIssuerConfig) + Test_TC_SU_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127649,7 +128730,7 @@ class Test_TC_SU_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_5Suite() {} + ~Test_TC_SU_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127693,10 +128774,10 @@ class Test_TC_SU_2_5Suite : public TestCommand } }; -class Test_TC_SU_2_6Suite : public TestCommand +class Test_TC_SU_2_4Suite : public TestCommand { public: - Test_TC_SU_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_6", 0, credsIssuerConfig) + Test_TC_SU_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127704,7 +128785,7 @@ class Test_TC_SU_2_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_6Suite() {} + ~Test_TC_SU_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127748,10 +128829,10 @@ class Test_TC_SU_2_6Suite : public TestCommand } }; -class Test_TC_SU_2_7Suite : public TestCommand +class Test_TC_SU_2_5Suite : public TestCommand { public: - Test_TC_SU_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_7", 0, credsIssuerConfig) + Test_TC_SU_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127759,7 +128840,7 @@ class Test_TC_SU_2_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_7Suite() {} + ~Test_TC_SU_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127803,10 +128884,10 @@ class Test_TC_SU_2_7Suite : public TestCommand } }; -class Test_TC_SU_2_8Suite : public TestCommand +class Test_TC_SU_2_6Suite : public TestCommand { public: - Test_TC_SU_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_8", 0, credsIssuerConfig) + Test_TC_SU_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127814,7 +128895,7 @@ class Test_TC_SU_2_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_8Suite() {} + ~Test_TC_SU_2_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127858,10 +128939,10 @@ class Test_TC_SU_2_8Suite : public TestCommand } }; -class Test_TC_SU_3_1Suite : public TestCommand +class Test_TC_SU_2_7Suite : public TestCommand { public: - Test_TC_SU_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_1", 0, credsIssuerConfig) + Test_TC_SU_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_7", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127869,7 +128950,7 @@ class Test_TC_SU_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_1Suite() {} + ~Test_TC_SU_2_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127913,10 +128994,10 @@ class Test_TC_SU_3_1Suite : public TestCommand } }; -class Test_TC_SU_3_2Suite : public TestCommand +class Test_TC_SU_2_8Suite : public TestCommand { public: - Test_TC_SU_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_2", 0, credsIssuerConfig) + Test_TC_SU_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_8", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127924,7 +129005,7 @@ class Test_TC_SU_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_2Suite() {} + ~Test_TC_SU_2_8Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -127968,10 +129049,10 @@ class Test_TC_SU_3_2Suite : public TestCommand } }; -class Test_TC_SU_3_3Suite : public TestCommand +class Test_TC_SU_3_1Suite : public TestCommand { public: - Test_TC_SU_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_3", 0, credsIssuerConfig) + Test_TC_SU_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -127979,7 +129060,7 @@ class Test_TC_SU_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_3Suite() {} + ~Test_TC_SU_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -128023,10 +129104,10 @@ class Test_TC_SU_3_3Suite : public TestCommand } }; -class Test_TC_SU_3_4Suite : public TestCommand +class Test_TC_SU_3_2Suite : public TestCommand { public: - Test_TC_SU_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_4", 0, credsIssuerConfig) + Test_TC_SU_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -128034,7 +129115,7 @@ class Test_TC_SU_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_4Suite() {} + ~Test_TC_SU_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -128078,10 +129159,10 @@ class Test_TC_SU_3_4Suite : public TestCommand } }; -class Test_TC_SU_4_1Suite : public TestCommand +class Test_TC_SU_3_3Suite : public TestCommand { public: - Test_TC_SU_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_1", 0, credsIssuerConfig) + Test_TC_SU_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -128089,7 +129170,7 @@ class Test_TC_SU_4_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_4_1Suite() {} + ~Test_TC_SU_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -128133,10 +129214,10 @@ class Test_TC_SU_4_1Suite : public TestCommand } }; -class Test_TC_SU_4_2Suite : public TestCommand +class Test_TC_SU_3_4Suite : public TestCommand { public: - Test_TC_SU_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_2", 0, credsIssuerConfig) + Test_TC_SU_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -128144,7 +129225,117 @@ class Test_TC_SU_4_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_4_2Suite() {} + ~Test_TC_SU_3_4Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SU_4_1Suite : public TestCommand +{ +public: + Test_TC_SU_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_SU_4_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SU_4_2Suite : public TestCommand +{ +public: + Test_TC_SU_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_2", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_SU_4_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -132385,7 +133576,7 @@ class Test_TC_CC_3_1Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 13: { - LogStep(13, "TStep 2f: H reads CurrentHue attribute from DUT"); + LogStep(13, "Step 2f: H reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); @@ -132529,8 +133720,7 @@ class Test_TC_CC_3_1Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 27: { - LogStep(27, - "TStep 4b: H sends MoveToHue command to DUT with Hue=120, Direction=0x02 (up) and TransitionTime=300 (30s)"); + LogStep(27, "Step 4b: H sends MoveToHue command to DUT with Hue=120, Direction=0x02 (up) and TransitionTime=300 (30s)"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; @@ -135902,61 +137092,6 @@ class Test_TC_DRLK_3_2Suite : public TestCommand } }; -class Test_TC_DRLK_3_3Suite : public TestCommand -{ -public: - Test_TC_DRLK_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_3_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DRLK_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - class Test_TC_LCFG_2_1Suite : public TestCommand { public: @@ -136012,61 +137147,6 @@ class Test_TC_LCFG_2_1Suite : public TestCommand } }; -class Test_TC_LVL_8_1Suite : public TestCommand -{ -public: - Test_TC_LVL_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_8_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LVL_8_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - class Test_TC_LWM_1_1Suite : public TestCommand { public: @@ -140935,10 +142015,10 @@ class Test_TC_TMP_2_2Suite : public TestCommand } }; -class Test_TC_TSTAT_3_1Suite : public TestCommand +class Test_TC_TSTAT_3_2Suite : public TestCommand { public: - Test_TC_TSTAT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_1", 0, credsIssuerConfig) + Test_TC_TSTAT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -140946,7 +142026,7 @@ class Test_TC_TSTAT_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSTAT_3_1Suite() {} + ~Test_TC_TSTAT_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -140990,10 +142070,11 @@ class Test_TC_TSTAT_3_1Suite : public TestCommand } }; -class Test_TC_TSTAT_3_2Suite : public TestCommand +class Test_TC_DGTHREAD_2_5Suite : public TestCommand { public: - Test_TC_TSTAT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_2", 0, credsIssuerConfig) + Test_TC_DGTHREAD_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -141001,7 +142082,7 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSTAT_3_2Suite() {} + ~Test_TC_DGTHREAD_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -141045,11 +142126,10 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand } }; -class Test_TC_DGTHREAD_2_5Suite : public TestCommand +class Test_TC_ACT_2_1Suite : public TestCommand { public: - Test_TC_DGTHREAD_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_2_5", 0, credsIssuerConfig) + Test_TC_ACT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -141057,7 +142137,7 @@ class Test_TC_DGTHREAD_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_2_5Suite() {} + ~Test_TC_ACT_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -141101,10 +142181,10 @@ class Test_TC_DGTHREAD_2_5Suite : public TestCommand } }; -class Test_TC_ACT_2_1Suite : public TestCommand +class Test_TC_ACT_2_2Suite : public TestCommand { public: - Test_TC_ACT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_1", 0, credsIssuerConfig) + Test_TC_ACT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -141112,7 +142192,7 @@ class Test_TC_ACT_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_2_1Suite() {} + ~Test_TC_ACT_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -141156,10 +142236,10 @@ class Test_TC_ACT_2_1Suite : public TestCommand } }; -class Test_TC_ACT_2_2Suite : public TestCommand +class Test_TC_ACT_3_2Suite : public TestCommand { public: - Test_TC_ACT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_2", 0, credsIssuerConfig) + Test_TC_ACT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -141167,7 +142247,7 @@ class Test_TC_ACT_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_2_2Suite() {} + ~Test_TC_ACT_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -141211,10 +142291,10 @@ class Test_TC_ACT_2_2Suite : public TestCommand } }; -class Test_TC_ACT_3_2Suite : public TestCommand +class Test_TC_LTIME_3_1Suite : public TestCommand { public: - Test_TC_ACT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_2", 0, credsIssuerConfig) + Test_TC_LTIME_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -141222,7 +142302,7 @@ class Test_TC_ACT_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_3_2Suite() {} + ~Test_TC_LTIME_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -141266,10 +142346,10 @@ class Test_TC_ACT_3_2Suite : public TestCommand } }; -class Test_TC_LTIME_2_1Suite : public TestCommand +class Test_TC_BIND_2_1Suite : public TestCommand { public: - Test_TC_LTIME_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_2_1", 0, credsIssuerConfig) + Test_TC_BIND_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -141277,7 +142357,7 @@ class Test_TC_LTIME_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_2_1Suite() {} + ~Test_TC_BIND_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -141321,10 +142401,10 @@ class Test_TC_LTIME_2_1Suite : public TestCommand } }; -class Test_TC_LTIME_3_1Suite : public TestCommand +class Test_TC_BIND_2_2Suite : public TestCommand { public: - Test_TC_LTIME_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_3_1", 0, credsIssuerConfig) + Test_TC_BIND_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -141332,173 +142412,7 @@ class Test_TC_LTIME_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TIMESYNC_2_15Suite : public TestCommand -{ -public: - Test_TC_TIMESYNC_2_15Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_TIMESYNC_2_15", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TIMESYNC_2_15Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BIND_2_1Suite : public TestCommand -{ -public: - Test_TC_BIND_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BIND_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BIND_2_2Suite : public TestCommand -{ -public: - Test_TC_BIND_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BIND_2_2Suite() {} + ~Test_TC_BIND_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -142056,7 +142970,7 @@ class Test_TC_S_2_1Suite : public TestCommand { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "boolean", "int8u")); } break; case 5: @@ -142065,7 +142979,7 @@ class Test_TC_S_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("nameSupport", value, 128U)); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "int8u")); } break; case 6: @@ -142074,7 +142988,7 @@ class Test_TC_S_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("nameSupport", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "int8u")); } break; case 7: @@ -142098,7 +143012,7 @@ class Test_TC_S_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "uint8")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); } break; default: @@ -142182,2409 +143096,6 @@ class Test_TC_S_2_1Suite : public TestCommand } }; -class Test_TC_S_2_2Suite : public TestCommand -{ -public: - Test_TC_S_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_2", 50, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_S_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint16_t maxScenes; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - maxScenes = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), (maxScenes / 2))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("sceneCount", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentScene", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::GroupId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentGroup", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "group_id", "groupid")); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("sceneValid", value, true)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "uint8")); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - VerifyOrReturn(CheckValuePresent("transitionTime", value.transitionTime)); - VerifyOrReturn(CheckValue("transitionTime.Value()", value.transitionTime.Value(), 0U)); - VerifyOrReturn(CheckValuePresent("extensionFieldSets", value.extensionFieldSets)); - { - auto iter_1 = value.extensionFieldSets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].clusterID", iter_1.GetValue().clusterID, 6UL)); - { - auto iter_3 = iter_1.GetValue().attributeValueList.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[0].attributeValueList", iter_3, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].attributeValueList[0].attributeID", - iter_3.GetValue().attributeID, 0UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].attributeValueList[0].attributeValue", - iter_3.GetValue().attributeValue, 1UL)); - VerifyOrReturn(CheckNoMoreListItems( - "extensionFieldSets.Value()[0].attributeValueList", iter_3, 1)); - } - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].clusterID", iter_1.GetValue().clusterID, 8UL)); - { - auto iter_3 = iter_1.GetValue().attributeValueList.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[0].attributeID", - iter_3.GetValue().attributeID, 0UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[0].attributeValue", - iter_3.GetValue().attributeValue, 100UL)); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 1)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[1].attributeID", - iter_3.GetValue().attributeID, 1UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[1].attributeValue", - iter_3.GetValue().attributeValue, 0UL)); - VerifyOrReturn(CheckNoMoreListItems( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 2)); - } - VerifyOrReturn( - CheckNoMoreListItems("extensionFieldSets.Value()", iter_1, 2)); - } - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - VerifyOrReturn(CheckValuePresent("transitionTime", value.transitionTime)); - VerifyOrReturn(CheckValue("transitionTime.Value()", value.transitionTime.Value(), 0U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), static_cast((maxScenes / 2) - 1))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValuePresent("sceneList", value.sceneList)); - { - auto iter_1 = value.sceneList.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("sceneList.Value()[0]", iter_1.GetValue(), 1U)); - VerifyOrReturn(CheckNoMoreListItems("sceneList.Value()", iter_1, 1)); - } - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), (maxScenes / 2))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), static_cast((maxScenes / 2) - 1))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValuePresent("sceneList", value.sceneList)); - { - auto iter_1 = value.sceneList.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("sceneList.Value()[0]", iter_1.GetValue(), 1U)); - VerifyOrReturn(CheckNoMoreListItems("sceneList.Value()", iter_1, 1)); - } - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), (maxScenes / 2))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 2U)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), static_cast((maxScenes / 2) - 2))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValuePresent("sceneList", value.sceneList)); - { - auto iter_1 = value.sceneList.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("sceneList.Value()[0]", iter_1.GetValue(), 1U)); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("sceneList.Value()[1]", iter_1.GetValue(), 2U)); - VerifyOrReturn(CheckNoMoreListItems("sceneList.Value()", iter_1, 2)); - } - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 2U)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 2U)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), static_cast((maxScenes / 2) - 2))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 2U)); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 2U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 3U)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), static_cast((maxScenes / 2) - 3))); - VerifyOrReturn(CheckValue("groupID", value.groupID, 2U)); - VerifyOrReturn(CheckValuePresent("sceneList", value.sceneList)); - { - auto iter_1 = value.sceneList.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("sceneList.Value()[0]", iter_1.GetValue(), 3U)); - VerifyOrReturn(CheckNoMoreListItems("sceneList.Value()", iter_1, 1)); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH sends a RemoveAllGroups command to DUT."); - VerifyOrDo(!ShouldSkip("G.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "TH reads from the DUT the (0x0006) SceneTableSize attribute"); - VerifyOrDo(!ShouldSkip("S.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::SceneTableSize::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 0a: preparation step for using commands from Groups cluster: Add KeySet"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 0ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 0ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 0ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 0b: Preparation step for using commands from Groups cluster: Write Group Keys"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 1U; - listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].groupId = 2U; - listHolder_0->mList[1].groupKeySetID = 417U; - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 1a: TH sends a AddGroup command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("G.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 1U; - value.groupName = chip::Span("Group1garbage: not in length on purpose", 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Step 1b: TH sends a RemoveAllScenes command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RemoveAllScenes::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 1c: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "STep 2a: TH configures AC1 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 100U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Step 2a: TH configures AC1 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC1 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, - "Step 2b: TH sends a StoreScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::StoreScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::StoreScene::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Step 3a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Step 3a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 13: { - LogStep(13, - "Step 3b: TH sends a RecallScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RecallScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RecallScene::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Step 3c: TH reads the SceneCount attribute from DUT."); - VerifyOrDo(!ShouldSkip("S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::SceneCount::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Step 3c: TH reads the CurrentScene attribute from DUT."); - VerifyOrDo(!ShouldSkip("S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::CurrentScene::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 3c: TH reads the CurrentGroup attribute from DUT."); - VerifyOrDo(!ShouldSkip("S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::CurrentGroup::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Step 3c: TH reads the SceneValid attribute from DUT."); - VerifyOrDo(!ShouldSkip("S.S.A0000 && S.S.A0001 && S.S.A0002 && S.S.A0003"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::SceneValid::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Step 4a: Reboot target device"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Step 4a: Reboot target device(DUT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 4c: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Step 4c: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 22: { - LogStep(22, - "Step 4d: TH sends a RecallScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RecallScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RecallScene::Id, value, - chip::NullOptional - - ); - } - case 23: { - LogStep(23, - "Step 5: TH sends a ViewScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set to " - "0x01."); - VerifyOrDo(!ShouldSkip("S.S.C01.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::ViewScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::ViewScene::Id, value, - chip::NullOptional - - ); - } - case 24: { - LogStep(24, - "Step 5: TH sends a ViewScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set to " - "0x01."); - VerifyOrDo(!ShouldSkip("S.S.C01.Rsp && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::ViewScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::ViewScene::Id, value, - chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Step 6: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Step 7a: TH sends a RemoveAllScenes command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RemoveAllScenes::Id, value, - chip::NullOptional - - ); - } - case 27: { - LogStep(27, "Step 7b: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 28: { - LogStep(28, - "Step 8a: TH sends a AddScene command to DUT with the GroupID field set to 0x0001, the SceneID field set to " - "0x01, the TransitionTime field set to 0x0001 and a set of extension fields appropriate to AC1."); - VerifyOrDo(!ShouldSkip("S.S.C00.Rsp && && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::AddScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - value.transitionTime = 1U; - value.sceneName = chip::Span("Scene1garbage: not in length on purpose", 6); - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].clusterID = 6UL; - - { - auto * listHolder_2 = new ListHolder(1); - listFreer.add(listHolder_2); - - listHolder_2->mList[0].attributeID = 0UL; - listHolder_2->mList[0].attributeValue = 1UL; - - listHolder_0->mList[0].attributeValueList = - chip::app::DataModel::List( - listHolder_2->mList, 1); - } - - listHolder_0->mList[1].clusterID = 8UL; - - { - auto * listHolder_2 = new ListHolder(2); - listFreer.add(listHolder_2); - - listHolder_2->mList[0].attributeID = 0UL; - listHolder_2->mList[0].attributeValue = 100UL; - - listHolder_2->mList[1].attributeID = 1UL; - listHolder_2->mList[1].attributeValue = 0UL; - - listHolder_0->mList[1].attributeValueList = - chip::app::DataModel::List( - listHolder_2->mList, 2); - } - - value.extensionFieldSets = - chip::app::DataModel::List(listHolder_0->mList, - 2); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::AddScene::Id, value, chip::NullOptional - - ); - } - case 29: { - LogStep(29, - "Step 8a: TH sends a AddScene command to DUT with the GroupID field set to 0x0001, the SceneID field set to " - "0x01, the TransitionTime field set to 0x0001 and a set of extension fields appropriate to AC1."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please execute the add scene command with extensionfieldsets in accordance with AC1 on DUT " - "and enter 'y' if the command is successfulgarbage: not in length on purpose", - 133); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 30: { - LogStep(30, "Step 8b: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 31: { - LogStep(31, - "Step 9a: TH sends a RemoveScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RemoveScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RemoveScene::Id, value, - chip::NullOptional - - ); - } - case 32: { - LogStep(32, "Step 9b: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 33: { - LogStep(33, "Step 10a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 34: { - LogStep(34, "Step 10a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 35: { - LogStep(35, - "Step 10b: TH sends a RecallScene command to DUT with the GroupID field set to 0x0001 and the SceneID field " - "set to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RecallScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RecallScene::Id, value, - chip::NullOptional - - ); - } - case 36: { - LogStep(36, "Step 11a: TH configures AC1 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 100U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 37: { - LogStep(37, "Step 11a: TH configures AC1 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC1 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 38: { - LogStep(38, - "Step 11b: TH sends a StoreScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::StoreScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::StoreScene::Id, value, - chip::NullOptional - - ); - } - case 39: { - LogStep(39, "Step 12a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 40: { - LogStep(40, "Step 12a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 41: { - LogStep(41, - "Step 12b: TH sends a StoreScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x02."); - VerifyOrDo(!ShouldSkip("S.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::StoreScene::Type value; - value.groupID = 1U; - value.sceneID = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::StoreScene::Id, value, - chip::NullOptional - - ); - } - case 42: { - LogStep(42, "Step 12c: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 43: { - LogStep(43, "Step 13a: If capacity allows, TH sends a AddGroup command to DUT with the GroupID field set to 0x0002."); - VerifyOrDo(!ShouldSkip("G.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 2U; - value.groupName = chip::Span("Group2garbage: not in length on purpose", 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 44: { - LogStep(44, "Step 13b: TH sends a RemoveAllScenes command to DUT with the GroupID field set to 0x0002."); - VerifyOrDo(!ShouldSkip("S.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type value; - value.groupID = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RemoveAllScenes::Id, value, - chip::NullOptional - - ); - } - case 45: { - LogStep(45, "Step 13c: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0002."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 46: { - LogStep(46, "Step 14a: TH configures AC3 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 1U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 47: { - LogStep(47, "Step 14a: TH configures AC3 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC3 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 48: { - LogStep(48, - "Step 14b: TH sends a StoreScene command to DUT with the GroupID field set to 0x0002 and the SceneID field set " - "to 0x03."); - VerifyOrDo(!ShouldSkip("S.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::StoreScene::Type value; - value.groupID = 2U; - value.sceneID = 3U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::StoreScene::Id, value, - chip::NullOptional - - ); - } - case 49: { - LogStep(49, "Step 14c: TH sends a GetSceneMembership command to DUT with the GroupID field set to 0x0002."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_S_2_3Suite : public TestCommand -{ -public: - Test_TC_S_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_3", 24, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("G1", 0, UINT16_MAX, &mG1); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_S_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mG1; - chip::Optional mTimeout; - - uint16_t maxScenes; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - maxScenes = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), (maxScenes / 2))); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValuePresent("sceneList", value.sceneList)); - { - auto iter_1 = value.sceneList.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("sceneList.Value()", iter_1, 0)); - } - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - VerifyOrReturn(CheckValuePresent("transitionTime", value.transitionTime)); - VerifyOrReturn(CheckValue("transitionTime.Value()", value.transitionTime.Value(), 10U)); - VerifyOrReturn(CheckValuePresent("extensionFieldSets", value.extensionFieldSets)); - { - auto iter_1 = value.extensionFieldSets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].clusterID", iter_1.GetValue().clusterID, 6UL)); - { - auto iter_3 = iter_1.GetValue().attributeValueList.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[0].attributeValueList", iter_3, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].attributeValueList[0].attributeID", - iter_3.GetValue().attributeID, 0UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].attributeValueList[0].attributeValue", - iter_3.GetValue().attributeValue, 1UL)); - VerifyOrReturn(CheckNoMoreListItems( - "extensionFieldSets.Value()[0].attributeValueList", iter_3, 1)); - } - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].clusterID", iter_1.GetValue().clusterID, 8UL)); - { - auto iter_3 = iter_1.GetValue().attributeValueList.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[0].attributeID", - iter_3.GetValue().attributeID, 0UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[0].attributeValue", - iter_3.GetValue().attributeValue, 100UL)); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 1)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[1].attributeID", - iter_3.GetValue().attributeID, 1UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[1].attributeValue", - iter_3.GetValue().attributeValue, 0UL)); - VerifyOrReturn(CheckNoMoreListItems( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 2)); - } - VerifyOrReturn( - CheckNoMoreListItems("extensionFieldSets.Value()", iter_1, 2)); - } - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - VerifyOrReturn(CheckValuePresent("transitionTime", value.transitionTime)); - VerifyOrReturn(CheckValue("transitionTime.Value()", value.transitionTime.Value(), 1U)); - VerifyOrReturn(CheckValuePresent("extensionFieldSets", value.extensionFieldSets)); - { - auto iter_1 = value.extensionFieldSets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].clusterID", iter_1.GetValue().clusterID, 6UL)); - { - auto iter_3 = iter_1.GetValue().attributeValueList.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[0].attributeValueList", iter_3, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].attributeValueList[0].attributeID", - iter_3.GetValue().attributeID, 0UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[0].attributeValueList[0].attributeValue", - iter_3.GetValue().attributeValue, 1UL)); - VerifyOrReturn(CheckNoMoreListItems( - "extensionFieldSets.Value()[0].attributeValueList", iter_3, 1)); - } - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].clusterID", iter_1.GetValue().clusterID, 8UL)); - { - auto iter_3 = iter_1.GetValue().attributeValueList.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 0)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[0].attributeID", - iter_3.GetValue().attributeID, 0UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[0].attributeValue", - iter_3.GetValue().attributeValue, 100UL)); - VerifyOrReturn(CheckNextListItemDecodes( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 1)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[1].attributeID", - iter_3.GetValue().attributeID, 1UL)); - VerifyOrReturn(CheckValue("extensionFieldSets.Value()[1].attributeValueList[1].attributeValue", - iter_3.GetValue().attributeValue, 0UL)); - VerifyOrReturn(CheckNoMoreListItems( - "extensionFieldSets.Value()[1].attributeValueList", iter_3, 2)); - } - VerifyOrReturn( - CheckNoMoreListItems("extensionFieldSets.Value()", iter_1, 2)); - } - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), static_cast((maxScenes / 2) - 1))); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValuePresent("sceneList", value.sceneList)); - { - auto iter_1 = value.sceneList.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("sceneList.Value()[0]", iter_1.GetValue(), 1U)); - VerifyOrReturn(CheckNoMoreListItems("sceneList.Value()", iter_1, 1)); - } - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupIdentifierFrom", value.groupIdentifierFrom, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValue("sceneIdentifierFrom", value.sceneIdentifierFrom, 1U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("capacity", value.capacity)); - VerifyOrReturn(CheckValue("capacity.Value()", value.capacity.Value(), static_cast((maxScenes / 2) - 2))); - VerifyOrReturn(CheckValue("groupID", value.groupID, mG1.HasValue() ? mG1.Value() : 1U)); - VerifyOrReturn(CheckValuePresent("sceneList", value.sceneList)); - { - auto iter_1 = value.sceneList.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("sceneList.Value()[0]", iter_1.GetValue(), 1U)); - VerifyOrReturn(CheckNextListItemDecodes("sceneList.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("sceneList.Value()[1]", iter_1.GetValue(), 2U)); - VerifyOrReturn(CheckNoMoreListItems("sceneList.Value()", iter_1, 2)); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads from the DUT the (0x0006) SceneTableSize attribute"); - VerifyOrDo(!ShouldSkip("S.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::SceneTableSize::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 0a: preparation step for using commands from Groups cluster: Add KeySet"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 0ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 0ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 0ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 0b: Preparation step for using commands from Groups cluster: Write Group Keys"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = mG1.HasValue() ? mG1.Value() : 1U; - listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 1a: TH sends a AddGroup command to DUT with the GroupID field set to G1."); - VerifyOrDo(!ShouldSkip("G.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - value.groupName = chip::Span("Group1garbage: not in length on purpose", 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 1b: TH sends a RemoveAllScenes command to DUT with the GroupID field set to G1."); - VerifyOrDo(!ShouldSkip("S.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RemoveAllScenes::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Step 1c: TH sends a GetSceneMembership command to DUT with the GroupID field set to G1."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, - "Step 2a: TH sends a EnhancedAddScene command to DUT with the GroupID field set to G1, the SceneID field set " - "to 0x01, the TransitionTime field set to 0x000a (1s) and a set of extension fields appropriate to AC1."); - VerifyOrDo(!ShouldSkip("S.S.C40.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::EnhancedAddScene::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - value.sceneID = 1U; - value.transitionTime = 10U; - value.sceneName = chip::Span("Scene1garbage: not in length on purpose", 6); - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].clusterID = 6UL; - - { - auto * listHolder_2 = new ListHolder(1); - listFreer.add(listHolder_2); - - listHolder_2->mList[0].attributeID = 0UL; - listHolder_2->mList[0].attributeValue = 1UL; - - listHolder_0->mList[0].attributeValueList = - chip::app::DataModel::List( - listHolder_2->mList, 1); - } - - listHolder_0->mList[1].clusterID = 8UL; - - { - auto * listHolder_2 = new ListHolder(2); - listFreer.add(listHolder_2); - - listHolder_2->mList[0].attributeID = 0UL; - listHolder_2->mList[0].attributeValue = 100UL; - - listHolder_2->mList[1].attributeID = 1UL; - listHolder_2->mList[1].attributeValue = 0UL; - - listHolder_0->mList[1].attributeValueList = - chip::app::DataModel::List( - listHolder_2->mList, 2); - } - - value.extensionFieldSets = - chip::app::DataModel::List(listHolder_0->mList, - 2); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::EnhancedAddScene::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, - "Step 2a: TH sends a AddScene command to DUT with the GroupID field set to G1, the SceneID field set to 0x01, " - "the TransitionTime field set to 0x0001 (1s) and a set of extension fields appropriate to AC1."); - VerifyOrDo(!ShouldSkip("(!S.S.C40.Rsp) && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::AddScene::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - value.sceneID = 1U; - value.transitionTime = 1U; - value.sceneName = chip::Span("Scene1garbage: not in length on purpose", 6); - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].clusterID = 6UL; - - { - auto * listHolder_2 = new ListHolder(1); - listFreer.add(listHolder_2); - - listHolder_2->mList[0].attributeID = 0UL; - listHolder_2->mList[0].attributeValue = 1UL; - - listHolder_0->mList[0].attributeValueList = - chip::app::DataModel::List( - listHolder_2->mList, 1); - } - - listHolder_0->mList[1].clusterID = 8UL; - - { - auto * listHolder_2 = new ListHolder(2); - listFreer.add(listHolder_2); - - listHolder_2->mList[0].attributeID = 0UL; - listHolder_2->mList[0].attributeValue = 100UL; - - listHolder_2->mList[1].attributeID = 1UL; - listHolder_2->mList[1].attributeValue = 0UL; - - listHolder_0->mList[1].attributeValueList = - chip::app::DataModel::List( - listHolder_2->mList, 2); - } - - value.extensionFieldSets = - chip::app::DataModel::List(listHolder_0->mList, - 2); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::AddScene::Id, value, chip::NullOptional - - ); - } - case 9: { - LogStep(9, - "Step 2b: TH sends a EnhancedAddScene command to DUT with the GroupID field set to G1, the SceneID field set " - "to 0x01, the TransitionTime field set to 0x000a and a set of extension fields appropriate to AC1."); - VerifyOrDo(!ShouldSkip("S.S.C40.Rsp && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please execute the enhanced add scene command with extensionfieldsets in accordance with " - "AC1 on DUT and enter 'y' if the command is successfulgarbage: not in length on purpose", - 142); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, - "Step 2b: TH sends a AddScene command to DUT with the GroupID field set to G1, the SceneID field set to 0x01, " - "the TransitionTime field set to 0x0001 and a set of extension fields appropriate to AC1."); - VerifyOrDo(!ShouldSkip("(!S.S.C40.Rsp) && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please execute the add scene command with extensionfieldsets in accordance with AC1 on DUT " - "and enter 'y' if the command is successfulgarbage: not in length on purpose", - 133); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, - "Step 3a: TH sends a EnhancedViewScene command to DUT with the GroupID field set to G1 and the SceneID field " - "set to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C41.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::EnhancedViewScene::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::EnhancedViewScene::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep( - 12, - "Step 3a: TH sends a ViewScene command to DUT with the GroupID field set to G1 and the SceneID field set to 0x01."); - VerifyOrDo(!ShouldSkip("(!S.S.C41.Rsp) && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::ViewScene::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::ViewScene::Id, value, - chip::NullOptional - - ); - } - case 13: { - LogStep(13, - "Step 3b: TH sends a EnhancedViewScene command to DUT with the GroupID field set to G1 and the SceneID field " - "set to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C41.Rsp && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please execute the ehanced-view-scene command and verify that the extensionfieldsets, status, groupID and SceneID " - "are in accordance with AC1 on DUT and enter 'y' if the command is successfulgarbage: not in length on purpose", - 190); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep( - 14, - "Step 3b: TH sends a ViewScene command to DUT with the GroupID field set to G1 and the SceneID field set to 0x01."); - VerifyOrDo(!ShouldSkip("(!S.S.C41.Rsp) && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please execute the view-scene command and verify that the extensionfieldsets, status, groupID and SceneID are in " - "accordance with AC1 on DUT and enter 'y' if the command is successfulgarbage: not in length on purpose", - 182); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Step 4: TH sends a GetSceneMembership command to DUT with the GroupID field set to G1."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Step 5a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Step 5a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 18: { - LogStep(18, - "Step 5b: TH sends a RecallScene command to group G1 with the GroupID field set to G1 and the scene ID field " - "set to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RecallScene::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - value.sceneID = 1U; - return SendGroupCommand(kIdentityAlpha, 1, Scenes::Id, Scenes::Commands::RecallScene::Id, value); - } - case 19: { - LogStep(19, "Wait 1s"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "TH confirm the DUT reached AC1 (on level control cluster) after 1s"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 21: { - LogStep(21, "Verify DUT returns to AC1."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please confirm AC1 on DUT and enter 'y'.garbage: not in length on purpose", 40); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 22: { - LogStep(22, - "Step 6a: TH sends a CopyScene command to DUT with the mode field set to 0x00, the group identifier from field " - "set to G1, the scene identifier from field set to 0x01, the group identifier to field set to G1 and the scene " - "identifier to field set to 0x02."); - VerifyOrDo(!ShouldSkip("S.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::CopyScene::Type value; - value.mode = static_cast>(0U); - value.groupIdentifierFrom = mG1.HasValue() ? mG1.Value() : 1U; - value.sceneIdentifierFrom = 1U; - value.groupIdentifierTo = mG1.HasValue() ? mG1.Value() : 1U; - value.sceneIdentifierTo = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::CopyScene::Id, value, - chip::NullOptional - - ); - } - case 23: { - LogStep(23, "Step 6b: TH sends a GetSceneMembership command to DUT with the GroupID field set to G1."); - VerifyOrDo(!ShouldSkip("S.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type value; - value.groupID = mG1.HasValue() ? mG1.Value() : 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::GetSceneMembership::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_S_2_4Suite : public TestCommand -{ -public: - Test_TC_S_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_4", 27, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_S_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 1U)); - VerifyOrReturn(CheckValue("sceneID", value.sceneID, 1U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 200U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH sends a RemoveAllGroups command to DUT."); - VerifyOrDo(!ShouldSkip("G.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 0a: preparation step for using commands from Groups cluster: Add KeySet"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 0ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 0ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 0ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 0b: Preparation step for using commands from Groups cluster: Write Group Keys"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 1U; - listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2a: TH sends a AddGroup command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("G.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 1U; - value.groupName = chip::Span("Group1garbage: not in length on purpose", 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 2b: TH sends a RemoveAllScenes command to DUT with the GroupID field set to 0x0001."); - VerifyOrDo(!ShouldSkip("S.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type value; - value.groupID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RemoveAllScenes::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, - "Step 3: TH sends a AddScene command to DUT with the GroupID field set to 0x0001, the SceneID field set to " - "0x01, the TransitionTime field set to 0x0001 and a set of extension fields appropriate to AC1."); - VerifyOrDo(!ShouldSkip("S.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::AddScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - value.transitionTime = 20U; - value.sceneName = chip::Span("Scene1garbage: not in length on purpose", 6); - - value.extensionFieldSets = chip::app::DataModel::List(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::AddScene::Id, value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 4a: TH configures AC1 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 100U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Step 4a: TH configures AC1 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC1 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, - "Step 4b: TH sends a StoreScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x01."); - VerifyOrDo(!ShouldSkip("S.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::StoreScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::StoreScene::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Step 5a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Wait 1s for level to change"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "TH confirm the DUT reached AC2 (on level control cluster) after 1s, which is different from AC1"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Step 5a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, - "Step 5b: TH sends a RecallScene command to DUT with the GroupID field set to 0x0001 and the SceneID field set " - "to 0x01 and the TransitionTime field omitted."); - VerifyOrDo(!ShouldSkip("S.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RecallScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RecallScene::Id, value, - chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Wait 20s"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 20000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "TH confirm the DUT reached AC1 (on level control cluster) after 20s"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "DUT transitions to AC1 over 20s."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please confirm that transition to AC1 was made over 20sgarbage: not in length on purpose", 55); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 19: { - LogStep(19, "TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 20: { - LogStep(20, - "Step 6a: TH sends a RecallScene command to DUT with the GroupID field set to 0x0001, the SceneID field set to " - "0x01 and the TransitionTime field set to 0x0032 (5s)."); - VerifyOrDo(!ShouldSkip("S.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RecallScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - value.transitionTime.Emplace(); - value.transitionTime.Value().SetNonNull(); - value.transitionTime.Value().Value() = 50U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RecallScene::Id, value, - chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Wait 5s"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "TH confirm the DUT reached AC2 (on level control cluster) after 5s"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 23: { - LogStep(23, "DUT transitions to AC1 over 5."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please confirm that transition to AC1 was made over 5sgarbage: not in length on purpose", 54); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "Step 7a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Step 7a: TH configures AC2 on DUT for all implemented application clusters supporting scenes."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please configure AC2 on DUT and enter 'y' after the configuration is completegarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 26: { - LogStep(26, - "Step 7b: TH sends a RecallScene command to DUT with the GroupID field set to 0x0001, the SceneID field set to " - "0x01 and the TransitionTime field set to null (no transition time override)."); - VerifyOrDo(!ShouldSkip("S.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Scenes::Commands::RecallScene::Type value; - value.groupID = 1U; - value.sceneID = 1U; - value.transitionTime.Emplace(); - value.transitionTime.Value().SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Commands::RecallScene::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_S_2_5Suite : public TestCommand { public: @@ -144695,61 +143206,6 @@ class Test_TC_S_2_6Suite : public TestCommand } }; -class Test_TC_S_3_1Suite : public TestCommand -{ -public: - Test_TC_S_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_S_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - class Test_TC_BRBINFO_2_2Suite : public TestCommand { public: @@ -145243,6 +143699,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -145336,6 +143793,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -145483,6 +143941,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -145524,9 +143983,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -145548,12 +144004,9 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -145574,6 +144027,8 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -145619,6 +144074,8 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -145683,9 +144140,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -145731,26 +144186,19 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 9de07fa1b127ee..bae08b8fa26891 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -111,6 +111,7 @@ class TestList : public Command { printf("Test_TC_CGEN_2_1\n"); printf("Test_TC_DGGEN_1_1\n"); printf("Test_TC_DGGEN_2_1\n"); + printf("Test_TC_GRPKEY_1_1\n"); printf("Test_TC_ICDM_1_1\n"); printf("Test_TC_ICDM_2_1\n"); printf("Test_TC_I_1_1\n"); @@ -196,6 +197,7 @@ class TestList : public Command { printf("Test_TC_SMOKECO_2_1\n"); printf("Test_TC_SMOKECO_2_6\n"); printf("Test_TC_SWTCH_1_1\n"); + printf("Test_TC_RVCOPSTATE_1_1\n"); printf("Test_TC_TMP_1_1\n"); printf("Test_TC_TMP_2_1\n"); printf("Test_TC_TSTAT_1_1\n"); @@ -7350,6 +7352,10 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: @@ -7635,27 +7641,11 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: TH reads the ClusterRevision from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } CHIP_ERROR TestStep3ThReadsTheFeatureMapFromDut_2() @@ -8815,6 +8805,10 @@ class Test_TC_CC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: read the global attribute: ClusterRevision\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: @@ -9764,25 +9758,11 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestStep2ReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMap_2() @@ -16670,12 +16650,12 @@ class Test_TC_CC_4_3 : public TestCommandBridge { err = TestWait10s_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TStep 3c: H reads CurrentSaturation attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 3c: H reads CurrentSaturation attribute from DUT\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestTStep3cHReadsCurrentSaturationAttributeFromDut_19(); + err = TestStep3cHReadsCurrentSaturationAttributeFromDut_19(); break; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 10s\n"); @@ -16744,12 +16724,12 @@ class Test_TC_CC_4_3 : public TestCommandBridge { err = TestStep4aThReadsColorModeAttributeFromDut_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TStep 4b: H reads EnhancedColorMode attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 4b: H reads EnhancedColorMode attribute from DUT\n"); if (ShouldSkip("CC.S.F00 && CC.S.A4001")) { NextTest(); return; } - err = TestTStep4bHReadsEnhancedColorModeAttributeFromDut_28(); + err = TestStep4bHReadsEnhancedColorModeAttributeFromDut_28(); break; case 29: ChipLogProgress(chipTool, " ***** Test Step 29 : Turn off light that we turned on\n"); @@ -17211,7 +17191,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestTStep3cHReadsCurrentSaturationAttributeFromDut_19() + CHIP_ERROR TestStep3cHReadsCurrentSaturationAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -17219,7 +17199,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TStep 3c: H reads CurrentSaturation attribute from DUT Error: %@", err); + NSLog(@"Step 3c: H reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17374,7 +17354,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTStep4bHReadsEnhancedColorModeAttributeFromDut_28() + CHIP_ERROR TestStep4bHReadsEnhancedColorModeAttributeFromDut_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -17382,7 +17362,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TStep 4b: H reads EnhancedColorMode attribute from DUT Error: %@", err); + NSLog(@"Step 4b: H reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21500,12 +21480,12 @@ class Test_TC_CC_6_1 : public TestCommandBridge { err = TestStep0bThSendsOnCommandToDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TStep 1a: H reads ColorTempPhysicalMinMireds attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 1a: H reads ColorTempPhysicalMinMireds attribute from DUT\n"); if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { NextTest(); return; } - err = TestTStep1aHReadsColorTempPhysicalMinMiredsAttributeFromDut_3(); + err = TestStep1aHReadsColorTempPhysicalMinMiredsAttributeFromDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 1b: TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); @@ -21797,7 +21777,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { } NSNumber * _Nonnull ColorTempPhysicalMinMiredsValue; - CHIP_ERROR TestTStep1aHReadsColorTempPhysicalMinMiredsAttributeFromDut_3() + CHIP_ERROR TestStep1aHReadsColorTempPhysicalMinMiredsAttributeFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -21805,7 +21785,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TStep 1a: H reads ColorTempPhysicalMinMireds attribute from DUT Error: %@", err); + NSLog(@"Step 1a: H reads ColorTempPhysicalMinMireds attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27593,258 +27573,257 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("CDOCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given CDOCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip( + " !CDOCONC.S.F00 && !CDOCONC.S.F01 && !CDOCONC.S.F02 && !CDOCONC.S.F03 && !CDOCONC.S.F04 && !CDOCONC.S.F05")) { NextTest(); return; } - err = TestStep3bGivenCdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given CDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given CDOCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenCdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenCdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given CDOCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given CDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !CDOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenCdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenCdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given CDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given CDOCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenCdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenCdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given CDOCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given CDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !CDOCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenCdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenCdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given CDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given CDOCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CDOCONC.S.F02 && CDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenCdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenCdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given CDOCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given CDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !CDOCONC.S.F02 && !CDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenCdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenCdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given CDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given CDOCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("CDOCONC.S.F03 && CDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenCdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenCdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given CDOCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given CDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !CDOCONC.S.F03 && !CDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3jGivenCdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenCdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given CDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given CDOCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("CDOCONC.S.F04 && CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenCdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenCdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given CDOCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CDOCONC.S.Afffc && CDOCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given CDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !CDOCONC.S.F04 && !CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep3lGivenCdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenCdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given CDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("CDOCONC.S.Afffc && !CDOCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given CDOCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("CDOCONC.S.F05 && CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenCdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenCdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given CDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !CDOCONC.S.F05 && !CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenCdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.A0007 && CDOCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "CDOCONC.S.A0007 is not set\n"); - if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("CDOCONC.S.A0007 && CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCdoconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "CDOCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !CDOCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCdoconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when CDOCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("CDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCdoconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when CDOCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !CDOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCdoconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when CDOCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("CDOCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when CDOCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !CDOCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when CDOCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("CDOCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("CDOCONC.S.Afffb && CDOCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when CDOCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !CDOCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when CDOCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("CDOCONC.S.Afffb && !CDOCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("CDOCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCdoconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && CDOCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when CDOCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !CDOCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCdoconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("CDOCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("CDOCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -27944,6 +27923,9 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -27957,7 +27939,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -27998,7 +27980,33 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenCdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenCdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28019,7 +28027,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenCdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenCdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28040,7 +28048,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenCdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenCdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28061,7 +28069,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenCdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenCdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28082,7 +28090,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenCdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenCdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28103,7 +28111,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenCdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenCdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28124,7 +28132,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenCdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenCdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28145,7 +28153,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenCdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenCdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28166,7 +28174,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenCdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenCdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28187,7 +28195,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenCdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenCdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28208,7 +28216,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenCdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenCdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28229,7 +28237,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenCdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenCdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28250,7 +28258,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28279,7 +28287,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28307,7 +28315,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28330,7 +28338,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCdoconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCdoconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28356,7 +28364,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28385,7 +28393,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCdoconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCdoconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28414,7 +28422,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28441,7 +28449,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28467,7 +28475,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28494,7 +28502,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCdoconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28520,7 +28528,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28543,7 +28551,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCdoconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCdoconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28567,7 +28575,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28593,7 +28601,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29122,258 +29130,257 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("CMOCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip( + " !CMOCONC.S.F00 && !CMOCONC.S.F01 && !CMOCONC.S.F02 && !CMOCONC.S.F03 && !CMOCONC.S.F04 && !CMOCONC.S.F05 ")) { NextTest(); return; } - err = TestStep3bGivenCmoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CMOCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenCmoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenCmoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given CMOCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !CMOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenCmoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenCmoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given CMOCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CMOCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenCmoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenCmoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given CMOCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !CMOCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenCmoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenCmoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given CMOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given CMOCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("CMOCONC.S.F02 && CMOCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenCmoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenCmoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given CMOCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given CMOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !CMOCONC.S.F02 && !CMOCONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenCmoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenCmoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given CMOCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("CMOCONC.S.F03 && CMOCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenCmoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenCmoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given CMOCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !CMOCONC.S.F03 && !CMOCONC.S.F01")) { NextTest(); return; } - err = TestStep3jGivenCmoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenCmoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given CMOCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("CMOCONC.S.F04 && CMOCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenCmoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenCmoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given CMOCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("CMOCONC.S.Afffc && CMOCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !CMOCONC.S.F04 && !CMOCONC.S.F00")) { NextTest(); return; } - err = TestStep3lGivenCmoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenCmoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("CMOCONC.S.Afffc && !CMOCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given CMOCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("CMOCONC.S.F05 && CMOCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenCmoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenCmoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !CMOCONC.S.F05 && !CMOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenCmoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.A0007 && CMOCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "CMOCONC.S.A0007 is not set\n"); - if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("CMOCONC.S.A0007 && CMOCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCmoconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "CMOCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !CMOCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCmoconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when CMOCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("CMOCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCmoconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when CMOCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !CMOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCmoconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when CMOCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("CMOCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when CMOCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !CMOCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when CMOCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("CMOCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("CMOCONC.S.Afffb && CMOCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when CMOCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !CMOCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when CMOCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("CMOCONC.S.Afffb && !CMOCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("CMOCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCmoconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && CMOCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when CMOCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !CMOCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCmoconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("CMOCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("CMOCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -29473,6 +29480,9 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -29486,7 +29496,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -29527,7 +29537,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenCmoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29537,10 +29547,15 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -29548,7 +29563,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenCmoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3bGivenCmoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29558,7 +29573,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3c: Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29569,7 +29584,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenCmoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3cGivenCmoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29579,7 +29594,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3d: Given CMOCONC.S.F01(LEV) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Step 3c: Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29590,7 +29605,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenCmoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3dGivenCmoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29600,7 +29615,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3e: Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Step 3d: Given CMOCONC.S.F01(LEV) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29611,7 +29626,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenCmoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3eGivenCmoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29621,7 +29636,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3f: Given CMOCONC.S.F02(MED) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Step 3e: Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29632,7 +29647,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenCmoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3fGivenCmoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29642,7 +29657,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3g: Given CMOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Step 3f: Given CMOCONC.S.F02(MED) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29653,7 +29668,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenCmoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3gGivenCmoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29663,7 +29678,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3h: Given CMOCONC.S.F03(CRI) ensure featuremap has the correct bits set Error: %@", err); + NSLog(@"Step 3g: Given CMOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29674,7 +29689,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenCmoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3hGivenCmoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29684,7 +29699,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3i: Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Step 3h: Given CMOCONC.S.F03(CRI) ensure featuremap has the correct bits set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29695,7 +29710,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenCmoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3iGivenCmoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29705,7 +29720,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3j: Given CMOCONC.S.F04(PEA) ensure featuremap has the correct bits set Error: %@", err); + NSLog(@"Step 3i: Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29716,7 +29731,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenCmoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3jGivenCmoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29726,7 +29741,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3k: Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Step 3j: Given CMOCONC.S.F04(PEA) ensure featuremap has the correct bits set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29737,7 +29752,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenCmoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3kGivenCmoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29747,7 +29762,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3l: Given CMOCONC.S.F05(AVG) ensure featuremap has the correct bits set Error: %@", err); + NSLog(@"Step 3k: Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29758,7 +29773,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenCmoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3lGivenCmoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29768,7 +29783,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3m: Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear Error: %@", err); + NSLog(@"Step 3l: Given CMOCONC.S.F05(AVG) ensure featuremap has the correct bits set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29779,7 +29794,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep3mGivenCmoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29788,20 +29803,12 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3m: Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -29826,6 +29833,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); @@ -29836,7 +29844,35 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29859,7 +29895,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCmoconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenCmoconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29885,7 +29921,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29914,7 +29950,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCmoconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenCmoconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29943,7 +29979,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29970,7 +30006,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29996,7 +30032,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -30023,7 +30059,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenCmoconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -30049,7 +30085,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -30072,7 +30108,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCmoconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCmoconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -30096,7 +30132,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -30122,7 +30158,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -30651,258 +30687,257 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("FLDCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given FLDCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip( + " !FLDCONC.S.F00 && !FLDCONC.S.F01 && !FLDCONC.S.F02 && !FLDCONC.S.F03 && !FLDCONC.S.F04 && !FLDCONC.S.F05")) { NextTest(); return; } - err = TestStep3bGivenFldconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given FLDCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given FLDCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("FLDCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenFldconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenFldconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given FLDCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given FLDCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !FLDCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenFldconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenFldconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given FLDCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given FLDCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("FLDCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenFldconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenFldconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given FLDCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given FLDCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !FLDCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenFldconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenFldconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given FLDCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given FLDCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("FLDCONC.S.F02 && FLDCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenFldconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenFldconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given FLDCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given FLDCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !FLDCONC.S.F02 && !FLDCONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenFldconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenFldconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given FLDCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given FLDCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("FLDCONC.S.F03 && FLDCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenFldconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenFldconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given FLDCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given FLDCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !FLDCONC.S.F03 && !FLDCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3jGivenFldconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenFldconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given FLDCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given FLDCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("FLDCONC.S.F04 && FLDCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenFldconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenFldconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given FLDCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("FLDCONC.S.Afffc && FLDCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given FLDCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !FLDCONC.S.F04 && !FLDCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3lGivenFldconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenFldconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given FLDCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("FLDCONC.S.Afffc && !FLDCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given FLDCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("FLDCONC.S.F05 && FLDCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenFldconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenFldconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given FLDCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !FLDCONC.S.F05 && !FLDCONC.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenFldconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.A0007 && FLDCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "FLDCONC.S.A0007 is not set\n"); - if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("FLDCONC.S.A0007 && FLDCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenFldconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "FLDCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !FLDCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenFldconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when FLDCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("FLDCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenFldconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when FLDCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !FLDCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenFldconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when FLDCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("FLDCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when FLDCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !FLDCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when FLDCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("FLDCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("FLDCONC.S.Afffb && FLDCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when FLDCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !FLDCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when FLDCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("FLDCONC.S.Afffb && !FLDCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("FLDCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenFldconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && FLDCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when FLDCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !FLDCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenFldconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("FLDCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("FLDCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -31002,6 +31037,9 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -31015,7 +31053,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -31056,7 +31094,33 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenFldconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenFldconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31077,7 +31141,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenFldconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenFldconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31098,7 +31162,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenFldconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenFldconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31119,7 +31183,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenFldconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenFldconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31140,7 +31204,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenFldconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenFldconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31161,7 +31225,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenFldconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenFldconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31182,7 +31246,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenFldconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenFldconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31203,7 +31267,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenFldconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenFldconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31224,7 +31288,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenFldconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenFldconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31245,7 +31309,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenFldconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenFldconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31266,7 +31330,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenFldconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenFldconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31287,7 +31351,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenFldconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenFldconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31308,7 +31372,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31337,7 +31401,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31365,7 +31429,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31388,7 +31452,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenFldconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenFldconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31414,7 +31478,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31443,7 +31507,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenFldconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenFldconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31472,7 +31536,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31499,7 +31563,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31525,7 +31589,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31552,7 +31616,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenFldconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31578,7 +31642,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31601,7 +31665,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenFldconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenFldconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31625,7 +31689,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -31651,7 +31715,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32180,258 +32244,257 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("NDOCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given NDOCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip( + " !NDOCONC.S.F00 && !NDOCONC.S.F01 && !NDOCONC.S.F02 && !NDOCONC.S.F03 && !NDOCONC.S.F04 && !NDOCONC.S.F05")) { NextTest(); return; } - err = TestStep3bGivenNdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given NDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given NDOCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("NDOCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenNdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenNdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given NDOCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given NDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !NDOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenNdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenNdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given NDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given NDOCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("NDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenNdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenNdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given NDOCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given NDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !NDOCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenNdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenNdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given NDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given NDOCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("NDOCONC.S.F02 && NDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenNdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenNdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given NDOCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given NDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !NDOCONC.S.F02 && !NDOCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3hGivenNdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenNdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given NDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given NDOCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("NDOCONC.S.F03 && NDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenNdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenNdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given NDOCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given NDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !NDOCONC.S.F03 && !NDOCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3jGivenNdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenNdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given NDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given NDOCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("NDOCONC.S.F04 && NDOCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenNdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenNdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given NDOCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("NDOCONC.S.Afffc && NDOCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given NDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !NDOCONC.S.F04 && NDOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3lGivenNdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenNdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given NDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("NDOCONC.S.Afffc && !NDOCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given NDOCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("NDOCONC.S.F05 && NDOCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenNdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenNdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given NDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !NDOCONC.S.F05 && !NDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenNdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.A0007 && NDOCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "NDOCONC.S.A0007 is not set\n"); - if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("NDOCONC.S.A0007 && NDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenNdoconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "NDOCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !NDOCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenNdoconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when NDOCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("NDOCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenNdoconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when NDOCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !NDOCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenNdoconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when NDOCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("NDOCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when NDOCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !NDOCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 3i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when NDOCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("NDOCONC.S.F05")) { NextTest(); return; } - err = TestStep3iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 3j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("NDOCONC.S.Afffb && NDOCONC.S.F01")) { + " ***** Test Step 24 : Step 3i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when NDOCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !NDOCONC.S.F05 ")) { NextTest(); return; } - err = TestStep3jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep3iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 3k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("NDOCONC.S.Afffb && !NDOCONC.S.F01")) { + " ***** Test Step 25 : Step 3j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("NDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_25(); + err = TestStep3jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && NDOCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 3k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !NDOCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep3kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("NDOCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("NDOCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -32531,6 +32594,9 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -32544,7 +32610,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -32585,7 +32651,33 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenNdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenNdoconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32606,7 +32698,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenNdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenNdoconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32627,7 +32719,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenNdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenNdoconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32648,7 +32740,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenNdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenNdoconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32669,7 +32761,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenNdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenNdoconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32690,7 +32782,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenNdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenNdoconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32711,7 +32803,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenNdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenNdoconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32732,7 +32824,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenNdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenNdoconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32753,7 +32845,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenNdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenNdoconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32774,7 +32866,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenNdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenNdoconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32795,7 +32887,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenNdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenNdoconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32816,7 +32908,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenNdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenNdoconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32837,7 +32929,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32866,7 +32958,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32894,7 +32986,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32917,7 +33009,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenNdoconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenNdoconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32943,7 +33035,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32972,7 +33064,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenNdoconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenNdoconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33001,7 +33093,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33028,7 +33120,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33054,7 +33146,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33081,7 +33173,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep3iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_23() + TestStep3iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33107,7 +33199,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep3jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33130,7 +33222,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep3kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33154,7 +33246,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33180,7 +33272,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33709,256 +33801,253 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("OZCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given OZCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip(" !OZCONC.S.F00 && !OZCONC.S.F01 && !OZCONC.S.F02 && !OZCONC.S.F03 && !OZCONC.S.F04 && !OZCONC.S.F05")) { NextTest(); return; } - err = TestStep3bGivenOzconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given OZCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given OZCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("OZCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenOzconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenOzconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given OZCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given OZCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !OZCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenOzconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenOzconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given OZCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given OZCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("OZCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenOzconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenOzconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given OZCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given OZCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !OZCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenOzconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenOzconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given OZCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given OZCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("OZCONC.S.F02 && OZCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenOzconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenOzconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given OZCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given OZCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !OZCONC.S.F02 && !OZCONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenOzconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenOzconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given OZCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given OZCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("OZCONC.S.F03 && OZCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenOzconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenOzconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given OZCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given OZCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !OZCONC.S.F03 && !OZCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3jGivenOzconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenOzconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given OZCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given OZCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("OZCONC.S.F04 && OZCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenOzconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenOzconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given OZCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("OZCONC.S.Afffc && OZCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given OZCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !OZCONC.S.F04 && !OZCONC.S.F00")) { NextTest(); return; } - err = TestStep3lGivenOzconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenOzconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given OZCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("OZCONC.S.Afffc && !OZCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given OZCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("OZCONC.S.F05 && OZCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenOzconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenOzconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given OZCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !OZCONC.S.F05 && !OZCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenOzconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.A0007 && OZCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "OZCONC.S.A0007 is not set\n"); - if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("OZCONC.S.A0007 && OZCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenOzconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "OZCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !OZCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenOzconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when OZCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("OZCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenOzconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when OZCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !OZCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenOzconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when OZCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("OZCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when OZCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !OZCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when OZCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("OZCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("OZCONC.S.Afffb && OZCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when OZCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !OZCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when OZCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("OZCONC.S.Afffb && !OZCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("OZCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenOzconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && OZCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when OZCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !OZCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenOzconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("OZCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("OZCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -34058,6 +34147,9 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -34071,7 +34163,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -34112,7 +34204,33 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenOzconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenOzconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34133,7 +34251,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenOzconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenOzconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34154,7 +34272,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenOzconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenOzconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34175,7 +34293,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenOzconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenOzconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34196,7 +34314,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenOzconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenOzconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34217,7 +34335,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenOzconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenOzconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34238,7 +34356,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenOzconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenOzconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34259,7 +34377,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenOzconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenOzconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34280,7 +34398,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenOzconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenOzconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34301,7 +34419,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenOzconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenOzconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34322,7 +34440,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenOzconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenOzconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34343,7 +34461,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenOzconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenOzconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34364,7 +34482,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34393,7 +34511,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34421,7 +34539,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34444,7 +34562,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenOzconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenOzconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34470,7 +34588,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34499,7 +34617,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenOzconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenOzconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34528,7 +34646,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34554,7 +34672,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf04PeaIsNotSet_21() + CHIP_ERROR TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34580,7 +34698,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34607,7 +34725,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenOzconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34633,7 +34751,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34656,7 +34774,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenOzconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenOzconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34680,7 +34798,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -34706,7 +34824,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35235,258 +35353,257 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("PMHCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given PMHCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip( + " !PMHCONC.S.F00 && !PMHCONC.S.F01 && !PMHCONC.S.F02 && !PMHCONC.S.F03 && !PMHCONC.S.F04 && !PMHCONC.S.F05")) { NextTest(); return; } - err = TestStep3bGivenPmhconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given PMHCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given PMHCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMHCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenPmhconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenPmhconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given PMHCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given PMHCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMHCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenPmhconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenPmhconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given PMHCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given PMHCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMHCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenPmhconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenPmhconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given PMHCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given PMHCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMHCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenPmhconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenPmhconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given PMHCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given PMHCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMHCONC.S.F02 && PMHCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenPmhconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenPmhconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given PMHCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given PMHCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMHCONC.S.F02 && !PMHCONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenPmhconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenPmhconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given PMHCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given PMHCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMHCONC.S.F03 && PMHCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenPmhconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenPmhconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given PMHCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given PMHCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMHCONC.S.F03 && !PMHCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3jGivenPmhconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenPmhconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given PMHCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given PMHCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMHCONC.S.F04 && PMHCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenPmhconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenPmhconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given PMHCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMHCONC.S.Afffc && PMHCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given PMHCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMHCONC.S.F04 && PMHCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3lGivenPmhconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenPmhconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given PMHCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("PMHCONC.S.Afffc && !PMHCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given PMHCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMHCONC.S.F05 && PMHCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenPmhconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenPmhconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given PMHCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMHCONC.S.F05 && !PMHCONC.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenPmhconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.A0007 && PMHCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "PMHCONC.S.A0007 is not set\n"); - if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("PMHCONC.S.A0007 && PMHCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmhconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "PMHCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !PMHCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmhconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when PMHCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("PMHCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmhconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when PMHCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !PMHCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmhconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when PMHCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("PMHCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when PMHCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !PMHCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when PMHCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("PMHCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("PMHCONC.S.Afffb && PMHCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when PMHCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !PMHCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when PMHCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("PMHCONC.S.Afffb && !PMHCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("PMHCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmhconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMHCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when PMHCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !PMHCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmhconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("PMHCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PMHCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -35586,6 +35703,9 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -35599,7 +35719,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -35640,7 +35760,33 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenPmhconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenPmhconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35661,7 +35807,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenPmhconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenPmhconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35682,7 +35828,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenPmhconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenPmhconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35703,7 +35849,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenPmhconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenPmhconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35724,7 +35870,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenPmhconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenPmhconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35745,7 +35891,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenPmhconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenPmhconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35766,7 +35912,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenPmhconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenPmhconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35787,7 +35933,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenPmhconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenPmhconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35808,7 +35954,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenPmhconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenPmhconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35829,7 +35975,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenPmhconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenPmhconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35850,7 +35996,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenPmhconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenPmhconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35871,7 +36017,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenPmhconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenPmhconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35892,7 +36038,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35921,7 +36067,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35949,7 +36095,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35972,7 +36118,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmhconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmhconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35998,7 +36144,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36027,7 +36173,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmhconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmhconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36056,7 +36202,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36083,7 +36229,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36109,7 +36255,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36136,7 +36282,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmhconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36162,7 +36308,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36185,7 +36331,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmhconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmhconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36209,7 +36355,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36235,7 +36381,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -36764,258 +36910,257 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("PMICONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given PMICONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip( + " !PMICONC.S.F00 && !PMICONC.S.F01 && !PMICONC.S.F02 && !PMICONC.S.F03 && !PMICONC.S.F04 && !PMICONC.S.F05 ")) { NextTest(); return; } - err = TestStep3bGivenPmiconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given PMICONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given PMICONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMICONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenPmiconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenPmiconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given PMICONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given PMICONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMICONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenPmiconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenPmiconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given PMICONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given PMICONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMICONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenPmiconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenPmiconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given PMICONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given PMICONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMICONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenPmiconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenPmiconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given PMICONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given PMICONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMICONC.S.F02 && PMICONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenPmiconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenPmiconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given PMICONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given PMICONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMICONC.S.F02 && !PMICONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenPmiconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenPmiconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given PMICONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given PMICONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMICONC.S.F03 && PMICONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenPmiconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenPmiconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given PMICONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given PMICONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMICONC.S.F03 && !PMICONC.S.F01")) { NextTest(); return; } - err = TestStep3jGivenPmiconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenPmiconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given PMICONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given PMICONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMICONC.S.F04 && PMICONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenPmiconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenPmiconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given PMICONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMICONC.S.Afffc && PMICONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given PMICONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMICONC.S.F04 && !PMICONC.S.F00 ")) { NextTest(); return; } - err = TestStep3lGivenPmiconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenPmiconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given PMICONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("PMICONC.S.Afffc && !PMICONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given PMICONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMICONC.S.F05 && PMICONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenPmiconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenPmiconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given PMICONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMICONC.S.F05 && !PMICONC.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenPmiconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.A0007 && PMICONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "PMICONC.S.A0007 is not set\n"); - if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("PMICONC.S.A0007 && PMICONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmiconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "PMICONC.S.A0007 is not set\n"); + if (ShouldSkip(" !PMICONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmiconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when PMICONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("PMICONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmiconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when PMICONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !PMICONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmiconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when PMICONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("PMICONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when PMICONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !PMICONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when PMICONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("PMICONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("PMICONC.S.Afffb && PMICONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when PMICONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !PMICONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when PMICONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("PMICONC.S.Afffb && !PMICONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("PMICONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmiconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMICONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when PMICONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !PMICONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmiconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("PMICONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PMICONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -37115,6 +37260,9 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -37128,7 +37276,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -37169,7 +37317,33 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenPmiconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenPmiconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37190,7 +37364,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenPmiconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenPmiconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37211,7 +37385,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenPmiconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenPmiconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37232,7 +37406,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenPmiconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenPmiconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37253,7 +37427,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenPmiconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenPmiconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37274,7 +37448,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenPmiconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenPmiconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37295,7 +37469,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenPmiconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenPmiconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37316,7 +37490,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenPmiconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenPmiconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37337,7 +37511,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenPmiconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenPmiconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37358,7 +37532,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenPmiconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenPmiconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37379,7 +37553,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenPmiconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenPmiconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37400,7 +37574,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenPmiconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenPmiconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37421,7 +37595,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37450,7 +37624,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37478,7 +37652,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37501,7 +37675,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmiconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmiconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37527,7 +37701,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37556,7 +37730,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmiconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmiconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37585,7 +37759,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37612,7 +37786,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37638,7 +37812,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37665,7 +37839,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmiconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37691,7 +37865,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37714,7 +37888,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmiconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmiconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37738,7 +37912,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37764,7 +37938,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38293,258 +38467,257 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("PMKCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given PMKCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip( + " !PMKCONC.S.F00 && !PMKCONC.S.F01 && !PMKCONC.S.F02 && !PMKCONC.S.F03 && !PMKCONC.S.F04 && !PMKCONC.S.F05 ")) { NextTest(); return; } - err = TestStep3bGivenPmkconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given PMKCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given PMKCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMKCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenPmkconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenPmkconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given PMKCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given PMKCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMKCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenPmkconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenPmkconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given PMKCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given PMKCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMKCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenPmkconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenPmkconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given PMKCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given PMKCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMKCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenPmkconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenPmkconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given PMKCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given PMKCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PMKCONC.S.F02 && PMKCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenPmkconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenPmkconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given PMKCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given PMKCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !PMKCONC.S.F02 && !PMKCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3hGivenPmkconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenPmkconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given PMKCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given PMKCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMKCONC.S.F03 && PMKCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenPmkconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenPmkconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given PMKCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given PMKCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMKCONC.S.F03 && !PMKCONC.S.F01")) { NextTest(); return; } - err = TestStep3jGivenPmkconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenPmkconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given PMKCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given PMKCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMKCONC.S.F04 && PMKCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenPmkconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenPmkconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given PMKCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("PMKCONC.S.Afffc && PMKCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given PMKCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMKCONC.S.F04 && !PMKCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3lGivenPmkconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenPmkconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given PMKCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " - "clear\n"); - if (ShouldSkip("PMKCONC.S.Afffc && !PMKCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given PMKCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("PMKCONC.S.F05 && PMKCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenPmkconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenPmkconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given PMKCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + "clear\n"); + if (ShouldSkip(" !PMKCONC.S.F05 && !PMKCONC.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenPmkconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.A0007 && PMKCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "PMKCONC.S.A0007 is not set\n"); - if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("PMKCONC.S.A0007 && PMKCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmkconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "PMKCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !PMKCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmkconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when PMKCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("PMKCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmkconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when PMKCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !PMKCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmkconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when PMKCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("PMKCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when PMKCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !PMKCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when PMKCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("PMKCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("PMKCONC.S.Afffb && PMKCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when PMKCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !PMKCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when PMKCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("PMKCONC.S.Afffb && !PMKCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("PMKCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmkconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PMKCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when PMKCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !PMKCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmkconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("PMKCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PMKCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -38644,6 +38817,9 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -38657,7 +38833,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -38698,7 +38874,33 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenPmkconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenPmkconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38719,7 +38921,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenPmkconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenPmkconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38740,7 +38942,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenPmkconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenPmkconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38761,7 +38963,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenPmkconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenPmkconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38782,7 +38984,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenPmkconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenPmkconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38803,7 +39005,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenPmkconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenPmkconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38824,7 +39026,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenPmkconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenPmkconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38845,7 +39047,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenPmkconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenPmkconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38866,7 +39068,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenPmkconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenPmkconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38887,7 +39089,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenPmkconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenPmkconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38908,7 +39110,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenPmkconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenPmkconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38929,7 +39131,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenPmkconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenPmkconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38950,7 +39152,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38979,7 +39181,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39007,7 +39209,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39030,7 +39232,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmkconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenPmkconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39056,7 +39258,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39085,7 +39287,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmkconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenPmkconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39114,7 +39316,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39141,7 +39343,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39167,7 +39369,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39194,7 +39396,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenPmkconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39220,7 +39422,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39243,7 +39445,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmkconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmkconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39267,7 +39469,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39293,7 +39495,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -39822,256 +40024,253 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("RNCONC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given RNCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip(" !RNCONC.S.F00 && !RNCONC.S.F01 && !RNCONC.S.F02 && !RNCONC.S.F03 && !RNCONC.S.F04 && !RNCONC.S.F05")) { NextTest(); return; } - err = TestStep3bGivenRnconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given RNCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given RNCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("RNCONC.S.F00")) { NextTest(); return; } - err = TestStep3cGivenRnconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3bGivenRnconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given RNCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: Given RNCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !RNCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3dGivenRnconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenRnconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given RNCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F01")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: Given RNCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("RNCONC.S.F01")) { NextTest(); return; } - err = TestStep3eGivenRnconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3dGivenRnconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given RNCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F02")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 3e: Given RNCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !RNCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3fGivenRnconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenRnconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given RNCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F02")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 3f: Given RNCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("RNCONC.S.F02 && RNCONC.S.F01")) { NextTest(); return; } - err = TestStep3gGivenRnconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3fGivenRnconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given RNCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 3g: Given RNCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !RNCONC.S.F02 && !RNCONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenRnconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3gGivenRnconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given RNCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given RNCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("RNCONC.S.F03 && RNCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenRnconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3hGivenRnconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given RNCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 3i: Given RNCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !RNCONC.S.F03 && !RNCONC.S.F01")) { NextTest(); return; } - err = TestStep3jGivenRnconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3iGivenRnconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given RNCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F04")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 3j: Given RNCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("RNCONC.S.F04 && RNCONC.S.F00")) { NextTest(); return; } - err = TestStep3kGivenRnconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3jGivenRnconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given RNCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("RNCONC.S.Afffc && RNCONC.S.F05")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 3k: Given RNCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !RNCONC.S.F04 && RNCONC.S.F00")) { NextTest(); return; } - err = TestStep3lGivenRnconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3kGivenRnconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given RNCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); - if (ShouldSkip("RNCONC.S.Afffc && !RNCONC.S.F05")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 3l: Given RNCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("RNCONC.S.F05 && RNCONC.S.F00")) { NextTest(); return; } - err = TestStep3mGivenRnconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); + err = TestStep3lGivenRnconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 3m: Given RNCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear\n"); + if (ShouldSkip(" !RNCONC.S.F05 && !RNCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenRnconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.A0007 && RNCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "RNCONC.S.A0007 is not set\n"); - if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("RNCONC.S.A0007 && RNCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenRnconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "RNCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !RNCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenRnconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when RNCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("RNCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenRnconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when RNCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !RNCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenRnconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when RNCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("RNCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when RNCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !RNCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when RNCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("RNCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("RNCONC.S.Afffb && RNCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when RNCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !RNCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when RNCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("RNCONC.S.Afffb && !RNCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("RNCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenRnconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && RNCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when RNCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !RNCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenRnconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("RNCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("RNCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -40171,6 +40370,9 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -40184,7 +40386,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -40225,7 +40427,33 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenRnconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenRnconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40246,7 +40474,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenRnconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenRnconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40267,7 +40495,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenRnconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenRnconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40288,7 +40516,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenRnconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenRnconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40309,7 +40537,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenRnconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenRnconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40330,7 +40558,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenRnconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenRnconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40351,7 +40579,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenRnconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenRnconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40372,7 +40600,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenRnconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenRnconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40393,7 +40621,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenRnconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenRnconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40414,7 +40642,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenRnconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenRnconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40435,7 +40663,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenRnconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenRnconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40456,7 +40684,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenRnconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenRnconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40477,7 +40705,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40506,7 +40734,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40534,7 +40762,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40557,7 +40785,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenRnconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenRnconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40583,7 +40811,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40612,7 +40840,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenRnconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenRnconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40641,7 +40869,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40667,7 +40895,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf04PeaIsNotSet_21() + CHIP_ERROR TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40693,7 +40921,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40720,7 +40948,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenRnconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40746,7 +40974,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40769,7 +40997,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenRnconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenRnconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40793,7 +41021,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40819,7 +41047,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41348,262 +41576,260 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("TVOCCONC.S.Afffd")) { + err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); + if (ShouldSkip(" !TVOCCONC.S.F00 && !TVOCCONC.S.F01 && !TVOCCONC.S.F02 && !TVOCCONC.S.F03 && !TVOCCONC.S.F04 && " + "!TVOCCONC.S.F05 ")) { NextTest(); return; } - err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); + err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; - case 2: + case 3: ChipLogProgress( - chipTool, " ***** Test Step 2 : Step 3b: Given TVOCCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F00")) { + chipTool, " ***** Test Step 3 : Step 3b: Given TVOCCONC.S.F00(MEA) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("TVOCCONC.S.F00")) { NextTest(); return; } - err = TestStep3bGivenTvocconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2(); + err = TestStep3bGivenTvocconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3(); break; - case 3: + case 4: ChipLogProgress(chipTool, - " ***** Test Step 3 : Step 3c: Given TVOCCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit " + " ***** Test Step 4 : Step 3c: Given TVOCCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit " "clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F00")) { + if (ShouldSkip(" !TVOCCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3cGivenTvocconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3(); + err = TestStep3cGivenTvocconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4(); break; - case 4: + case 5: ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 3d: Given TVOCCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F01")) { + chipTool, " ***** Test Step 5 : Step 3d: Given TVOCCONC.S.F01(LEV) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("TVOCCONC.S.F01")) { NextTest(); return; } - err = TestStep3dGivenTvocconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3dGivenTvocconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5(); break; - case 5: + case 6: ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3e: Given TVOCCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit " + " ***** Test Step 6 : Step 3e: Given TVOCCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit " "clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F01")) { + if (ShouldSkip(" !TVOCCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3eGivenTvocconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5(); + err = TestStep3eGivenTvocconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6(); break; - case 6: + case 7: ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 3f: Given TVOCCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F02")) { + chipTool, " ***** Test Step 7 : Step 3f: Given TVOCCONC.S.F02(MED) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("TVOCCONC.S.F02 && TVOCCONC.S.F01")) { NextTest(); return; } - err = TestStep3fGivenTvocconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3fGivenTvocconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7(); break; - case 7: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 3g: Given TVOCCONC.S.F02(MED) is not set, ensure featuremap has the correct bit " + " ***** Test Step 8 : Step 3g: Given TVOCCONC.S.F02(MED) is not set, ensure featuremap has the correct bit " "clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F02")) { + if (ShouldSkip(" !TVOCCONC.S.F02 && !TVOCCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3gGivenTvocconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7(); + err = TestStep3gGivenTvocconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8(); break; - case 8: + case 9: ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 3h: Given TVOCCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F03")) { + chipTool, " ***** Test Step 9 : Step 3h: Given TVOCCONC.S.F03(CRI) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("TVOCCONC.S.F03 && TVOCCONC.S.F01")) { NextTest(); return; } - err = TestStep3hGivenTvocconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8(); + err = TestStep3hGivenTvocconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9(); break; - case 9: + case 10: ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3i: Given TVOCCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " + " ***** Test Step 10 : Step 3i: Given TVOCCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit " "clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F03")) { + if (ShouldSkip(" !TVOCCONC.S.F03 && !TVOCCONC.S.F01")) { NextTest(); return; } - err = TestStep3iGivenTvocconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9(); + err = TestStep3iGivenTvocconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10(); break; - case 10: + case 11: ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 3j: Given TVOCCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F04")) { + chipTool, " ***** Test Step 11 : Step 3j: Given TVOCCONC.S.F04(PEA) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("TVOCCONC.S.F04 && TVOCCONC.S.F00")) { NextTest(); return; } - err = TestStep3jGivenTvocconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10(); + err = TestStep3jGivenTvocconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11(); break; - case 11: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3k: Given TVOCCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " + " ***** Test Step 12 : Step 3k: Given TVOCCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit " "clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F04")) { + if (ShouldSkip(" !TVOCCONC.S.F04 && !TVOCCONC.S.F00 ")) { NextTest(); return; } - err = TestStep3kGivenTvocconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11(); + err = TestStep3kGivenTvocconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12(); break; - case 12: + case 13: ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3l: Given TVOCCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && TVOCCONC.S.F05")) { + chipTool, " ***** Test Step 13 : Step 3l: Given TVOCCONC.S.F05(AVG) ensure featuremap has the correct bits set\n"); + if (ShouldSkip("TVOCCONC.S.F05 && TVOCCONC.S.F00")) { NextTest(); return; } - err = TestStep3lGivenTvocconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12(); + err = TestStep3lGivenTvocconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13(); break; - case 13: + case 14: ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3m: Given TVOCCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " + " ***** Test Step 14 : Step 3m: Given TVOCCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit " "clear\n"); - if (ShouldSkip("TVOCCONC.S.Afffc && !TVOCCONC.S.F05")) { - NextTest(); - return; - } - err = TestStep3mGivenTvocconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb")) { + if (ShouldSkip(" !TVOCCONC.S.F05 && !TVOCCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_14(); + err = TestStep3mGivenTvocconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.A0007 && TVOCCONC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16(); + err = TestStep4aReadTheGlobalAttributeAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " - "TVOCCONC.S.A0007 is not set\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: Read the optional attribute Uncertainty in AttributeList\n"); + if (ShouldSkip("TVOCCONC.S.A0007 && TVOCCONC.S.F00")) { NextTest(); return; } - err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenTvocconcsa0007IsNotSet_17(); + err = TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " - "MaxMeasuredValue and Measurement Unit in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F00")) { + " ***** Test Step 18 : Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when " + "TVOCCONC.S.A0007 is not set\n"); + if (ShouldSkip(" !TVOCCONC.S.A0007 ")) { NextTest(); return; } - err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18(); + err = TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenTvocconcsa0007IsNotSet_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " - "Uncertainty are excluded from AttributeList when TVOCCONC.S.F00 (MEA) is not set\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F00")) { + " ***** Test Step 19 : Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, " + "MaxMeasuredValue and Measurement Unit in AttributeList\n"); + if (ShouldSkip("TVOCCONC.S.F00")) { NextTest(); return; } - err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenTvocconcsf00MeaIsNotSet_19(); + err = TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19(); break; case 20: ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " - "PeakMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F04")) { + " ***** Test Step 20 : Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and " + "Uncertainty are excluded from AttributeList when TVOCCONC.S.F00 (MEA) is not set\n"); + if (ShouldSkip(" !TVOCCONC.S.F00 ")) { NextTest(); return; } - err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20(); + err = TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenTvocconcsf00MeaIsNotSet_20(); break; case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " - "AttributeList when TVOCCONC.S.F04 (PEA) is not set\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F04")) { + " ***** Test Step 21 : Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & " + "PeakMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("TVOCCONC.S.F04")) { NextTest(); return; } - err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf04PeaIsNotSet_21(); + err = TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21(); break; case 22: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " - "AverageMeasuredValueWindow in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F05")) { + " ***** Test Step 22 : Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from " + "AttributeList when TVOCCONC.S.F04 (PEA) is not set\n"); + if (ShouldSkip(" !TVOCCONC.S.F04 ")) { NextTest(); return; } - err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22(); + err = TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf04PeaIsNotSet_22(); break; case 23: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " - "AttributeList when TVOCCONC.S.F05 (AVG) is not set\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F05")) { + " ***** Test Step 23 : Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue " + "AverageMeasuredValueWindow in AttributeList\n"); + if (ShouldSkip("TVOCCONC.S.F05")) { NextTest(); return; } - err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf05AvgIsNotSet_23(); + err = TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23(); break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && TVOCCONC.S.F01")) { + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + "AttributeList when TVOCCONC.S.F05 (AVG) is not set\n"); + if (ShouldSkip(" !TVOCCONC.S.F05 ")) { NextTest(); return; } - err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 4k: Check that LevelValue is excluded from AttributeList when TVOCCONC.S.F01 (LEV) is " - "not set\n"); - if (ShouldSkip("TVOCCONC.S.Afffb && !TVOCCONC.S.F01")) { + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + if (ShouldSkip("TVOCCONC.S.F01")) { NextTest(); return; } - err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5l: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && TVOCCONC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when TVOCCONC.S.F01 (LEV) is " + "not set\n"); + if (ShouldSkip(" !TVOCCONC.S.F01 ")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_26(); + break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 6: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("TVOCCONC.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5l: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_27(); - break; + NextTest(); + return; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("TVOCCONC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -41703,6 +41929,9 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -41716,7 +41945,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -41758,7 +41987,34 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenTvocconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = + [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenTvocconcsf00meaEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41780,7 +42036,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cGivenTvocconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_3() + CHIP_ERROR TestStep3cGivenTvocconcsf00meaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41802,7 +42058,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dGivenTvocconcsf01levEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3dGivenTvocconcsf01levEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41824,7 +42080,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eGivenTvocconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_5() + CHIP_ERROR TestStep3eGivenTvocconcsf01levIsNotSetEnsureFeaturemapHasTheCorrectBitClear_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41846,7 +42102,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fGivenTvocconcsf02medEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3fGivenTvocconcsf02medEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41868,7 +42124,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gGivenTvocconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_7() + CHIP_ERROR TestStep3gGivenTvocconcsf02medIsNotSetEnsureFeaturemapHasTheCorrectBitClear_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41890,7 +42146,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hGivenTvocconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_8() + CHIP_ERROR TestStep3hGivenTvocconcsf03criEnsureFeaturemapHasTheCorrectBitsSet_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41912,7 +42168,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iGivenTvocconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_9() + CHIP_ERROR TestStep3iGivenTvocconcsf03criIsNotSetEnsureFeaturemapHasTheCorrectBitClear_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41934,7 +42190,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jGivenTvocconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_10() + CHIP_ERROR TestStep3jGivenTvocconcsf04peaEnsureFeaturemapHasTheCorrectBitsSet_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41956,7 +42212,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kGivenTvocconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_11() + CHIP_ERROR TestStep3kGivenTvocconcsf04peaIsNotSetEnsureFeaturemapHasTheCorrectBitClear_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41978,7 +42234,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3lGivenTvocconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_12() + CHIP_ERROR TestStep3lGivenTvocconcsf05avgEnsureFeaturemapHasTheCorrectBitsSet_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42000,7 +42256,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3mGivenTvocconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_13() + CHIP_ERROR TestStep3mGivenTvocconcsf05avgIsNotSetEnsureFeaturemapHasTheCorrectBitClear_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42022,7 +42278,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_14() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42052,7 +42308,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_15() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42081,7 +42337,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_16() + CHIP_ERROR TestStep4bReadTheOptionalAttributeUncertaintyInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42105,7 +42361,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenTvocconcsa0007IsNotSet_17() + CHIP_ERROR TestStep4cCheckTheOptionalAttributeUncertaintyIsExcludedFromAttributeListWhenTvocconcsa0007IsNotSet_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42132,7 +42388,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_18() + TestStep4dReadTheOptionalFeatureDependentAttributesMeasuredValueMinMeasuredValueMaxMeasuredValueAndMeasurementUnitInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42162,7 +42418,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenTvocconcsf00MeaIsNotSet_19() + TestStep4eCheckThatMeasuredValueMinMeasuredValueMaxMeasuredValueMeasurementUnitAndUncertaintyAreExcludedFromAttributeListWhenTvocconcsf00MeaIsNotSet_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42192,7 +42448,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_20() + CHIP_ERROR TestStep4fReadTheOptionalFeatureDependentAttributesPeakMeasuredValuePeakMeasuredValueWindowInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42220,7 +42476,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf04PeaIsNotSet_21() + TestStep4gCheckThatPeakMeasuredValuePeakMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf04PeaIsNotSet_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42247,7 +42503,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_22() + CHIP_ERROR TestStep4hReadTheOptionalFeatureDependentAttributesAverageMeasuredValueAverageMeasuredValueWindowInAttributeList_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42275,7 +42531,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf05AvgIsNotSet_23() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenTvocconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42302,7 +42558,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_24() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42326,7 +42582,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_25() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42351,7 +42607,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_27() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42378,7 +42634,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_28() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -45820,23 +46076,15 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("DESC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: Read the global attribute: FeatureMap\n"); - if (ShouldSkip("DESC.S.Afffc")) { - NextTest(); - return; - } err = TestStep3ReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DESC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -45844,7 +46092,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && DESC.S.Afffb")) { + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -45858,7 +46106,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afffb")) { + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } @@ -45871,7 +46119,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afffa")) { + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } @@ -45884,7 +46132,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afff9")) { + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } @@ -45897,7 +46145,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DESC.S.Afff8")) { + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } @@ -51649,13 +51897,12 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, - " ***** Test Step 2 : Step 3: TH writes TH writes to the DUT the a value less than or equal to the value read in " - "step 2\n"); + " ***** Test Step 2 : Step 3: TH writes to the DUT the a value less than or equal to the value read in step 2\n"); if (ShouldSkip("FAN.S.A0005")) { NextTest(); return; } - err = TestStep3ThWritesThWritesToTheDutTheAValueLessThanOrEqualToTheValueReadInStep2_2(); + err = TestStep3ThWritesToTheDutTheAValueLessThanOrEqualToTheValueReadInStep2_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 1000ms\n"); @@ -51666,20 +51913,20 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { err = TestWait1000ms_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads from the DUT the the SpeedSetting attribute\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads from the DUT the SpeedSetting attribute\n"); if (ShouldSkip("FAN.S.A0005")) { NextTest(); return; } - err = TestStep4ThReadsFromTheDutTheTheSpeedSettingAttribute_4(); + err = TestStep4ThReadsFromTheDutTheSpeedSettingAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads from the DUT the the SpeedCurrent attribute\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads from the DUT the SpeedCurrent attribute\n"); if (ShouldSkip("FAN.S.A0006")) { NextTest(); return; } - err = TestStep5ThReadsFromTheDutTheTheSpeedCurrentAttribute_5(); + err = TestStep5ThReadsFromTheDutTheSpeedCurrentAttribute_5(); break; } @@ -51761,7 +52008,7 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ThWritesThWritesToTheDutTheAValueLessThanOrEqualToTheValueReadInStep2_2() + CHIP_ERROR TestStep3ThWritesToTheDutTheAValueLessThanOrEqualToTheValueReadInStep2_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -51772,8 +52019,8 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { speedSettingArgument = [rSpeedMax copy]; [cluster writeAttributeSpeedSettingWithValue:speedSettingArgument completion:^(NSError * _Nullable err) { - NSLog(@"Step 3: TH writes TH writes to the DUT the a value less than or equal to the " - @"value read in step 2 Error: %@", + NSLog(@"Step 3: TH writes to the DUT the a value less than or equal to the value " + @"read in step 2 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51792,7 +52039,7 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep4ThReadsFromTheDutTheTheSpeedSettingAttribute_4() + CHIP_ERROR TestStep4ThReadsFromTheDutTheSpeedSettingAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -51800,7 +52047,7 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4: TH reads from the DUT the the SpeedSetting attribute Error: %@", err); + NSLog(@"Step 4: TH reads from the DUT the SpeedSetting attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51820,7 +52067,7 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ThReadsFromTheDutTheTheSpeedCurrentAttribute_5() + CHIP_ERROR TestStep5ThReadsFromTheDutTheSpeedCurrentAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -51828,7 +52075,7 @@ class Test_TC_FAN_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5: TH reads from the DUT the the SpeedCurrent attribute Error: %@", err); + NSLog(@"Step 5: TH reads from the DUT the SpeedCurrent attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53870,11 +54117,11 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { } }; -class Test_TC_ICDM_1_1 : public TestCommandBridge { +class Test_TC_GRPKEY_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ICDM_1_1() - : TestCommandBridge("Test_TC_ICDM_1_1") + Test_TC_GRPKEY_1_1() + : TestCommandBridge("Test_TC_GRPKEY_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -53884,7 +54131,7 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_ICDM_1_1() {} + ~Test_TC_GRPKEY_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -53892,11 +54139,11 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ICDM_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_GRPKEY_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ICDM_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GRPKEY_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -53913,103 +54160,561 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); + err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: Read the global attribute: FeatureMap\n"); - if (ShouldSkip("ICDM.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: TH reads the FeatureMap from DUT\n"); + if (ShouldSkip(" !GRPKEY.S.F00 ")) { NextTest(); return; } - err = TestStep3ReadTheGlobalAttributeFeatureMap_2(); + err = TestStep3aThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: Read the global attribute: FeatureMap\n"); - if (ShouldSkip(" !ICDM.S.F00 ")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given GRPKEY.S.F00(CS) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestStep3ReadTheGlobalAttributeFeatureMap_3(); + err = TestStep3bGivenGrpkeysf00csEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_4(); + err = TestStep4aThReadsAttributeListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip(" !PICS_EVENT_LIST_ENABLED ")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_5(); + err = TestStep4aThReadsAttributeListFromDut_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 4b: Read the optional attribute(RegisteredClients) in AttributeList\n"); - if (ShouldSkip("ICDM.S.A0003")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 4b: The list SHALL NOT contain any additional values in the standard or scoped range: " + "(0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain values in the Manufacturer " + "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range (0x0001 - " + "0xFFF1), these values SHALL be ignored. 3.TThe list SHALL NOT contain any values in the Test Vendor or invalid " + "range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), " + "where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeRegisteredClientsInAttributeList_6(); + err = TestStep4bTheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TTheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4c: Read the optional attribute(IcdCounter) in AttributeList\n"); - if (ShouldSkip("ICDM.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5a: TH1 reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4cReadTheOptionalAttributeIcdCounterInAttributeList_7(); - break; + NextTest(); + return; case 8: ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 4d: Read the optional attribute(ClientsSupportedPerFabric) in AttributeList\n"); - if (ShouldSkip("ICDM.S.A0005")) { + " ***** Test Step 8 : Step 5b: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional " + "values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " + "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " + "(0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values in the Test Vendor or " + "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " + "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep4dReadTheOptionalAttributeClientsSupportedPerFabricInAttributeList_8(); + err = TestStep5bThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6a: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6aThReadsAcceptedCommandListFromDut_9(); + break; + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " + "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " + "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " + "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " + "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - NextTest(); - return; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_10(); + err = TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); break; case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : Step 6b: Read the optional command (StayActiveRequest) in AttributeList\n"); - if (ShouldSkip("ICDM.S.C03.Rsp")) { - NextTest(); - return; - } - err = TestStep6bReadTheOptionalCommandStayActiveRequestInAttributeList_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 7a: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7aThReadsGeneratedCommandListFromDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip(" !ICDM.S.F00 ")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("ICDM.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 7b: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " + "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " + "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " + "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " + "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); + err = TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 13; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads the ClusterRevision from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3aThReadsTheFeatureMapFromDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenGrpkeysf00csEnsureFeaturemapHasTheCorrectBitSet_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3b: Given GRPKEY.S.F00(CS) ensure featuremap has the correct bit set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep4bTheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TTheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestStep5bThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6a: TH reads AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestStep7aThReadsGeneratedCommandListFromDut_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7a: TH reads GeneratedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } +}; + +class Test_TC_ICDM_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_ICDM_1_1() + : TestCommandBridge("Test_TC_ICDM_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_ICDM_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ICDM_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ICDM_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); + err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: Read the global attribute: FeatureMap\n"); + if (ShouldSkip("ICDM.S.F00")) { + NextTest(); + return; + } + err = TestStep3ReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: Read the global attribute: FeatureMap\n"); + if (ShouldSkip(" !ICDM.S.F00 ")) { + NextTest(); + return; + } + err = TestStep3ReadTheGlobalAttributeFeatureMap_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aReadTheGlobalAttributeAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aReadTheGlobalAttributeAttributeList_5(); + break; + case 6: + ChipLogProgress( + chipTool, " ***** Test Step 6 : Step 4b: Read the optional attribute(RegisteredClients) in AttributeList\n"); + if (ShouldSkip("ICDM.S.A0003")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeRegisteredClientsInAttributeList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4c: Read the optional attribute(IcdCounter) in AttributeList\n"); + if (ShouldSkip("ICDM.S.A0004")) { + NextTest(); + return; + } + err = TestStep4cReadTheOptionalAttributeIcdCounterInAttributeList_7(); + break; + case 8: + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 4d: Read the optional attribute(ClientsSupportedPerFabric) in AttributeList\n"); + if (ShouldSkip("ICDM.S.A0005")) { + NextTest(); + return; + } + err = TestStep4dReadTheOptionalAttributeClientsSupportedPerFabricInAttributeList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + NextTest(); + return; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6a: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_10(); + break; + case 11: + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 6b: Read the optional command (StayActiveRequest) in AttributeList\n"); + if (ShouldSkip("ICDM.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestStep6bReadTheOptionalCommandStayActiveRequestInAttributeList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7: Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip(" !ICDM.S.F00 ")) { + NextTest(); + return; + } + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip("ICDM.S.F00")) { + NextTest(); + return; + } + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); break; } @@ -93324,6 +94029,478 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { } }; +class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_RVCOPSTATE_1_1() + : TestCommandBridge("Test_TC_RVCOPSTATE_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_RVCOPSTATE_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_RVCOPSTATE_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RVCOPSTATE_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision attribute from the DUT\n"); + err = TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap attribute from the DUT\n"); + err = TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_4(); + break; + case 5: + ChipLogProgress(chipTool, + " ***** Test Step 5 : Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList " + "from the DUT\n"); + if (ShouldSkip("RVCOPSTATE.S.A0002")) { + NextTest(); + return; + } + err = TestStep4bThReadsFromTheDutTheOptionalAttributeCountdownTimeInTheAttributeListFromTheDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5a: TH reads from the DUT the EventList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + NextTest(); + return; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.E01")) { + NextTest(); + return; + } + NextTest(); + return; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6a: Read the optional command(Pause) in AcceptedCommandList\n"); + if (ShouldSkip("RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestStep6aReadTheOptionalCommandPauseInAcceptedCommandList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6b: Read the optional command(Stop) in AcceptedCommandList\n"); + if (ShouldSkip("RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6c: Read the optional command(Start) in AcceptedCommandList\n"); + if (ShouldSkip("RVCOPSTATE.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestStep6cReadTheOptionalCommandStartInAcceptedCommandList_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6d: Read the optional command(Resume) in AcceptedCommandList\n"); + if (ShouldSkip("RVCOPSTATE.S.C03.Rsp || RVCOPSTATE.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7: Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip(" RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp || RVCOPSTATE.S.C03.Rsp ")) { + NextTest(); + return; + } + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 13; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads the ClusterRevision attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads the FeatureMap attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsFromTheDutTheOptionalAttributeCountdownTimeInTheAttributeListFromTheDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog( + @"Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList from the DUT Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6aReadTheOptionalCommandPauseInAcceptedCommandList_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6a: Read the optional command(Pause) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6b: Read the optional command(Stop) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6cReadTheOptionalCommandStartInAcceptedCommandList_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6c: Read the optional command(Start) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6d: Read the optional command(Resume) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class Test_TC_TMP_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -93968,6 +95145,10 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: @@ -94033,153 +95214,444 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { err = TestStep3gGivenTstatsf05autoEnsureFeaturemapHasTheCorrectBitSet_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 3h: Given TSTAT.S.F06(LTNE) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("TSTAT.S.F06")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_9(); + err = TestStep3hGivenTstatsf06ltneEnsureFeaturemapHasTheCorrectBitSet_9(); break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } err = TestStep4aReadTheGlobalAttributeAttributeList_10(); break; case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 4a: Read the global attribute: AttributeList\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aReadTheGlobalAttributeAttributeList_11(); + break; + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 4b: Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList\n"); + " ***** Test Step 12 : Step 4b: Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F00")) { NextTest(); return; } - err = TestStep4bReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_11(); + err = TestStep4bReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_12(); break; - case 12: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 4c: Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList\n"); + " ***** Test Step 13 : Step 4c: Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F01")) { NextTest(); return; } - err = TestStep4cReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_12(); + err = TestStep4cReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_13(); break; - case 13: + case 14: ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 4d: Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList\n"); + " ***** Test Step 14 : Step 4d: Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F02")) { NextTest(); return; } - err = TestStep4dReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_13(); + err = TestStep4dReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_14(); break; - case 14: + case 15: ChipLogProgress(chipTool, - " ***** Test Step 14 : Step 4e: Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in " + " ***** Test Step 15 : Step 4e: Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in " "AttributeList\n"); if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02")) { NextTest(); return; } - err = TestStep4eReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_14(); + err = TestStep4eReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_15(); break; - case 15: + case 16: ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 4f: Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in " + " ***** Test Step 16 : Step 4f: Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in " "AttributeList\n"); if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02")) { NextTest(); return; } - err = TestStep4fReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_15(); + err = TestStep4fReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_16(); break; - case 16: + case 17: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4g: Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList\n"); + " ***** Test Step 17 : Step 4g: Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F05")) { NextTest(); return; } - err = TestStep4gReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_16(); + err = TestStep4gReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_17(); break; - case 17: + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4h: Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList\n"); + " ***** Test Step 18 : Step 4h: Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestStep4hReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_17(); + err = TestStep4hReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 4i: Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList\n"); + " ***** Test Step 19 : Step 4i: Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList\n"); if (ShouldSkip("TSTAT.S.F04")) { NextTest(); return; } - err = TestStep4iReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_18(); + err = TestStep4iReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_19(); break; - case 19: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4j: Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in " + " ***** Test Step 20 : Step 4j: Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in " "AttributeList\n"); if (ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02")) { NextTest(); return; } - err = TestStep4jReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Step 5a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep5aReadTheGlobalAttributeAcceptedCommandList_20(); + err = TestStep4jReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_20(); break; case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Step 4k: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0001")) { + NextTest(); + return; + } + err = TestStep4kReadTheOptionalAttributeInAttributeList_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Step 4l: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0009")) { + NextTest(); + return; + } + err = TestStep4lReadTheOptionalAttributeInAttributeList_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Step 4m: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0010")) { + NextTest(); + return; + } + err = TestStep4mReadTheOptionalAttributeInAttributeList_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Step 4n: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A001a")) { + NextTest(); + return; + } + err = TestStep4nReadTheOptionalAttributeInAttributeList_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Step 4o: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A001d")) { + NextTest(); + return; + } + err = TestStep4oReadTheOptionalAttributeInAttributeList_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 4p: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0023")) { + NextTest(); + return; + } + err = TestStep4pReadTheOptionalAttributeInAttributeList_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 4q: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0024")) { + NextTest(); + return; + } + err = TestStep4qReadTheOptionalAttributeInAttributeList_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 4r: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0025")) { + NextTest(); + return; + } + err = TestStep4rReadTheOptionalAttributeInAttributeList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 4s: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0029")) { + NextTest(); + return; + } + err = TestStep4sReadTheOptionalAttributeInAttributeList_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Step 4t: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0030")) { + NextTest(); + return; + } + err = TestStep4tReadTheOptionalAttributeInAttributeList_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Step 4u: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0031")) { + NextTest(); + return; + } + err = TestStep4uReadTheOptionalAttributeInAttributeList_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Step 4x: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0032")) { + NextTest(); + return; + } + err = TestStep4xReadTheOptionalAttributeInAttributeList_32(); + break; + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : Step 5y: Read the optional attribute: AttributeList\n"); + if (ShouldSkip("TSTAT.S.A003a")) { + NextTest(); + return; + } + err = TestStep5yReadTheOptionalAttributeAttributeList_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : Step 4z: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0040")) { + NextTest(); + return; + } + err = TestStep4zReadTheOptionalAttributeInAttributeList_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Step 4A: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0041")) { + NextTest(); + return; + } + err = TestStep4aReadTheOptionalAttributeInAttributeList_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : Step 4B: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0042")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeInAttributeList_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : Step 4C: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0043")) { + NextTest(); + return; + } + err = TestStep4cReadTheOptionalAttributeInAttributeList_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Step 5D: Read the optional attribute: AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0044")) { + NextTest(); + return; + } + err = TestStep5dReadTheOptionalAttributeAttributeList_38(); + break; + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : Step 4E: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0045")) { + NextTest(); + return; + } + err = TestStep4eReadTheOptionalAttributeInAttributeList_39(); + break; + case 40: + ChipLogProgress(chipTool, " ***** Test Step 40 : Step 4F: Read the optional attribute in AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0046")) { + NextTest(); + return; + } + err = TestStep4fReadTheOptionalAttributeInAttributeList_40(); + break; + case 41: + ChipLogProgress(chipTool, " ***** Test Step 41 : Step 5G: Read the optional attribute: AttributeList\n"); + if (ShouldSkip("TSTAT.S.A0047")) { + NextTest(); + return; + } + err = TestStep5gReadTheOptionalAttributeAttributeList_41(); + break; + case 42: + ChipLogProgress(chipTool, + " ***** Test Step 42 : Step 4H: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0003")) { + NextTest(); + return; + } + err = TestStep4hReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_42(); + break; + case 43: + ChipLogProgress(chipTool, + " ***** Test Step 43 : Step 4I: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0004")) { + NextTest(); + return; + } + err = TestStep4iReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_43(); + break; + case 44: + ChipLogProgress(chipTool, + " ***** Test Step 44 : Step 4J: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0008")) { + NextTest(); + return; + } + err = TestStep4jReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_44(); + break; + case 45: + ChipLogProgress(chipTool, + " ***** Test Step 45 : Step 4K: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015")) { + NextTest(); + return; + } + err = TestStep4kReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_45(); + break; + case 46: + ChipLogProgress(chipTool, + " ***** Test Step 46 : Step 4L: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016")) { + NextTest(); + return; + } + err = TestStep4lReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_46(); + break; + case 47: + ChipLogProgress(chipTool, + " ***** Test Step 47 : Step 4M: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0005")) { + NextTest(); + return; + } + err = TestStep4mReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_47(); + break; + case 48: + ChipLogProgress(chipTool, + " ***** Test Step 48 : Step 4N: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0007")) { + NextTest(); + return; + } + err = TestStep4nReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_48(); + break; + case 49: + ChipLogProgress(chipTool, + " ***** Test Step 49 : Step 4O: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0007")) { + NextTest(); + return; + } + err = TestStep4oReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_49(); + break; + case 50: + ChipLogProgress(chipTool, + " ***** Test Step 50 : Step 4P: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017")) { + NextTest(); + return; + } + err = TestStep4pReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_50(); + break; + case 51: + ChipLogProgress(chipTool, + " ***** Test Step 51 : Step 4Q: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018")) { + NextTest(); + return; + } + err = TestStep4qReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_51(); + break; + case 52: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 5b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList\n"); + " ***** Test Step 52 : Step 4R: Read the Feature dependent(TSTAT.S.F05(AUTO)) optional attribute in " + "AttributeList\n"); + if (ShouldSkip("TSTAT.S.F05 && TSTAT.S.A001e")) { + NextTest(); + return; + } + err = TestStep4rReadTheFeatureDependentTSTATSF05AUTOOptionalAttributeInAttributeList_52(); + break; + case 53: + ChipLogProgress(chipTool, + " ***** Test Step 53 : Step 5a: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList\n"); if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestStep5bReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_21(); + err = TestStep5aReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_53(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Step 6a: Read the global attribute: GeneratedCommandList\n"); + case 54: + ChipLogProgress(chipTool, " ***** Test Step 54 : Step 5b: Read the optional attribute: AcceptedCommandList\n"); + if (ShouldSkip("TSTAT.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestStep5bReadTheOptionalAttributeAcceptedCommandList_54(); + break; + case 55: + ChipLogProgress(chipTool, " ***** Test Step 55 : Step 6a: Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip(" !TSTAT.S.C04.Rsp && !TSTAT.S.C02.Rsp ")) { NextTest(); return; } - err = TestStep6aReadTheGlobalAttributeGeneratedCommandList_22(); + err = TestStep6aReadTheGlobalAttributeGeneratedCommandList_55(); break; - case 23: + case 56: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 6b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList\n"); + " ***** Test Step 56 : Step 6b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList\n"); if (ShouldSkip("TSTAT.S.F03")) { NextTest(); return; } - err = TestStep6bReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_23(); + err = TestStep6bReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_56(); break; - case 24: + case 57: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 6c: Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList\n"); + " ***** Test Step 57 : Step 6c: Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList\n"); if (ShouldSkip("TSTAT.S.C04.Rsp")) { NextTest(); return; } - err = TestStep6cReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_24(); + err = TestStep6cReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_57(); break; - case 25: + case 58: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty " + " ***** Test Step 58 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty " "but it can contain manufacturer specific event IDs.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_25(); + err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_58(); break; } @@ -94270,6 +95742,105 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 47: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 48: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 49: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 50: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 51: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 52: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 53: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 54: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 55: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 56: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 57: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 58: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -94283,7 +95854,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 26; + const uint16_t mTestCount = 59; chip::Optional mNodeId; chip::Optional mCluster; @@ -94301,25 +95872,11 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestStep2ReadTheGlobalAttributeClusterRevision_1() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: Read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMap_2() @@ -94460,7 +96017,26 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_9() + CHIP_ERROR TestStep3hGivenTstatsf06ltneEnsureFeaturemapHasTheCorrectBitSet_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3h: Given TSTAT.S.F06(LTNE) ensure featuremap has the correct bit set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94489,7 +96065,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_10() + CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94517,7 +96093,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_11() + CHIP_ERROR TestStep4bReadTheFeatureDependentTSTATSF00HEATAttributeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94538,7 +96114,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_12() + CHIP_ERROR TestStep4cReadTheFeatureDependentTSTATSF01COOLAttributeInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94559,7 +96135,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_13() + CHIP_ERROR TestStep4dReadTheFeatureDependentTSTATSF02OCCAttributeInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94580,7 +96156,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_14() + CHIP_ERROR TestStep4eReadTheFeatureDependentTSTATSF00HEATTstatsf02occAttributeInAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94602,7 +96178,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_15() + CHIP_ERROR TestStep4fReadTheFeatureDependentTSTATSF01COOLTstatsf02occAttributeInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94624,7 +96200,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_16() + CHIP_ERROR TestStep4gReadTheFeatureDependentTSTATSF05AUTOAttributeInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94647,7 +96223,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_17() + CHIP_ERROR TestStep4hReadTheFeatureDependentTSTATSF03SCHAttributeInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94670,7 +96246,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4iReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_18() + CHIP_ERROR TestStep4iReadTheFeatureDependentTSTATSF04SBAttributeInAttributeList_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94693,7 +96269,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_19() + CHIP_ERROR TestStep4jReadTheFeatureDependentTSTATSF04SBTstatsf02occAttributeInAttributeList_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94717,20 +96293,671 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5aReadTheGlobalAttributeAcceptedCommandList_20() + CHIP_ERROR TestStep4kReadTheOptionalAttributeInAttributeList_21() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5a: Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4k: Read the optional attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4lReadTheOptionalAttributeInAttributeList_22() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4l: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4mReadTheOptionalAttributeInAttributeList_23() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4m: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4nReadTheOptionalAttributeInAttributeList_24() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4n: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 26UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4oReadTheOptionalAttributeInAttributeList_25() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4o: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 29UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4pReadTheOptionalAttributeInAttributeList_26() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4p: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 35UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4qReadTheOptionalAttributeInAttributeList_27() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4q: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 36UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4rReadTheOptionalAttributeInAttributeList_28() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4r: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 37UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4sReadTheOptionalAttributeInAttributeList_29() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4s: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 41UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4tReadTheOptionalAttributeInAttributeList_30() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4t: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 48UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4uReadTheOptionalAttributeInAttributeList_31() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4u: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 49UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4xReadTheOptionalAttributeInAttributeList_32() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4x: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 50UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep5yReadTheOptionalAttributeAttributeList_33() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5y: Read the optional attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 58UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4zReadTheOptionalAttributeInAttributeList_34() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4z: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 64UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aReadTheOptionalAttributeInAttributeList_35() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4A: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheOptionalAttributeInAttributeList_36() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4B: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 66UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4cReadTheOptionalAttributeInAttributeList_37() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4C: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 67UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep5dReadTheOptionalAttributeAttributeList_38() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5D: Read the optional attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 68UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4eReadTheOptionalAttributeInAttributeList_39() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4E: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 69UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4fReadTheOptionalAttributeInAttributeList_40() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4F: Read the optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 70UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep5gReadTheOptionalAttributeAttributeList_41() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5G: Read the optional attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 71UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4hReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_42() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4H: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4iReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_43() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4I: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4jReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_44() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4J: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4kReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_45() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4K: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 21UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4lReadTheFeatureDependentTSTATSF00HEATOptionalAttributeInAttributeList_46() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4L: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 22UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4mReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_47() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4M: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4nReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_48() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4N: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4oReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_49() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4O: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4pReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_50() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4P: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 23UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4qReadTheFeatureDependentTSTATSF01COOLOptionalAttributeInAttributeList_51() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4Q: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 24UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4rReadTheFeatureDependentTSTATSF05AUTOOptionalAttributeInAttributeList_52() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4R: Read the Feature dependent(TSTAT.S.F05(AUTO)) optional attribute in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 30UL)); NextTest(); }]; @@ -94738,7 +96965,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5bReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_21() + CHIP_ERROR TestStep5aReadFeatureDependentTSTATSF03SCHCommandsInAcceptedCommandList_53() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94746,7 +96973,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList Error: %@", err); + NSLog(@"Step 5a: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94762,7 +96989,28 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheGlobalAttributeGeneratedCommandList_22() + CHIP_ERROR TestStep5bReadTheOptionalAttributeAcceptedCommandList_54() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5b: Read the optional attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6aReadTheGlobalAttributeGeneratedCommandList_55() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94786,7 +97034,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_23() + CHIP_ERROR TestStep6bReadFeatureDependentTSTATSF03SCHCommandsInGeneratedCommandList_56() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94807,7 +97055,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6cReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_24() + CHIP_ERROR TestStep6cReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_57() { MTRBaseDevice * device = GetDevice("alpha"); @@ -94829,7 +97077,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_25() + TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_58() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -165908,12 +168156,12 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { err = TestStep9ThSendsLockDoorCommandToTheDutWithoutAnyArgumentPINCode_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TStep 10a: H reads the WrongCodeEntryLimit attribute from the DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 10a: H reads the WrongCodeEntryLimit attribute from the DUT\n"); if (ShouldSkip("DRLK.S.A0030")) { NextTest(); return; } - err = TestTStep10aHReadsTheWrongCodeEntryLimitAttributeFromTheDut_16(); + err = TestStep10aHReadsTheWrongCodeEntryLimitAttributeFromTheDut_16(); break; case 17: ChipLogProgress(chipTool, @@ -166590,7 +168838,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTStep10aHReadsTheWrongCodeEntryLimitAttributeFromTheDut_16() + CHIP_ERROR TestStep10aHReadsTheWrongCodeEntryLimitAttributeFromTheDut_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -166598,7 +168846,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TStep 10a: H reads the WrongCodeEntryLimit attribute from the DUT Error: %@", err); + NSLog(@"Step 10a: H reads the WrongCodeEntryLimit attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -176380,37 +178628,56 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { break; case 9: ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0002) in AttributeList\n"); - if (ShouldSkip("ACFREMON.S.A0002")) { + " ***** Test Step 9 : Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0003) in AttributeList\n"); + if (ShouldSkip("ACFREMON.S.A0003")) { NextTest(); return; } - err = TestStep4cReadTheOptionalAttributeInPlaceIndicatorAcfremonsa0002InAttributeList_9(); + err = TestStep4cReadTheOptionalAttributeInPlaceIndicatorAcfremonsa0003InAttributeList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 5: TH reads EventList attribute from DUT\n"); + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 4d: Read the optional attribute LastChangedTime (ACFREMON.S.A0004) in AttributeList\n"); + if (ShouldSkip("ACFREMON.S.A0004")) { + NextTest(); + return; + } + err = TestStep4dReadTheOptionalAttributeLastChangedTimeAcfremonsa0004InAttributeList_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : Step 4e: Read the optional attribute ReplacementProductList (ACFREMON.S.F02) in " + "AttributeList\n"); + if (ShouldSkip("ACFREMON.S.F02")) { + NextTest(); + return; + } + err = TestStep4eReadTheOptionalAttributeReplacementProductListAcfremonsf02InAttributeList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5: TH reads EventList attribute from DUT\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_11(); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6a: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_13(); break; - case 12: + case 14: ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 14 : Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList\n"); if (ShouldSkip("ACFREMON.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_12(); + err = TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_14(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_15(); break; } @@ -176465,6 +178732,12 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -176478,7 +178751,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mCluster; @@ -176691,7 +178964,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheOptionalAttributeInPlaceIndicatorAcfremonsa0002InAttributeList_9() + CHIP_ERROR TestStep4cReadTheOptionalAttributeInPlaceIndicatorAcfremonsa0003InAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176701,7 +178974,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0002) in AttributeList Error: %@", err); + NSLog(@"Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0003) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -176714,7 +178987,53 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_11() + CHIP_ERROR TestStep4dReadTheOptionalAttributeLastChangedTimeAcfremonsa0004InAttributeList_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4d: Read the optional attribute LastChangedTime (ACFREMON.S.A0004) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4eReadTheOptionalAttributeReplacementProductListAcfremonsf02InAttributeList_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4e: Read the optional attribute ReplacementProductList (ACFREMON.S.F02) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176735,7 +179054,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_12() + CHIP_ERROR TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176758,7 +179077,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_13() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177175,47 +179494,67 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 4a: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList\n"); + " ***** Test Step 8 : Step 4b: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList\n"); if (ShouldSkip("HEPAFREMON.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheFeatureDependentHEPAFREMONSF00AttributeInAttributeList_8(); + err = TestStep4bReadTheFeatureDependentHEPAFREMONSF00AttributeInAttributeList_8(); break; case 9: ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 4b: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0002) in " + " ***** Test Step 9 : Step 4c: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0003) in " "AttributeList\n"); - if (ShouldSkip("HEPAFREMON.S.A0002")) { + if (ShouldSkip("HEPAFREMON.S.A0003")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeInPlaceIndicatorHepafremonsa0002InAttributeList_9(); + err = TestStep4cReadTheOptionalAttributeInPlaceIndicatorHepafremonsa0003InAttributeList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 5: TH reads EventList attribute from DUT\n"); + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 4d: Read the optional attribute LastChangedTime (HEPAFREMON.S.A0004) in " + "AttributeList\n"); + if (ShouldSkip("HEPAFREMON.S.A0004")) { + NextTest(); + return; + } + err = TestStep4dReadTheOptionalAttributeLastChangedTimeHepafremonsa0004InAttributeList_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : Step 4e: Read the optional attribute ReplacementProductList (HEPAFREMON.S.F02) in " + "AttributeList\n"); + if (ShouldSkip("HEPAFREMON.S.F02")) { + NextTest(); + return; + } + err = TestStep4eReadTheOptionalAttributeReplacementProductListHepafremonsf02InAttributeList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5: TH reads EventList attribute from DUT\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_11(); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6a: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_13(); break; - case 12: + case 14: ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 14 : Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList\n"); if (ShouldSkip("HEPAFREMON.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_12(); + err = TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_14(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_15(); break; } @@ -177270,6 +179609,12 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -177283,7 +179628,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mCluster; @@ -177471,7 +179816,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheFeatureDependentHEPAFREMONSF00AttributeInAttributeList_8() + CHIP_ERROR TestStep4bReadTheFeatureDependentHEPAFREMONSF00AttributeInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177481,7 +179826,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList Error: %@", err); + NSLog(@"Step 4b: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -177496,7 +179841,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeInPlaceIndicatorHepafremonsa0002InAttributeList_9() + CHIP_ERROR TestStep4cReadTheOptionalAttributeInPlaceIndicatorHepafremonsa0003InAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177506,7 +179851,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0002) in AttributeList Error: %@", err); + NSLog(@"Step 4c: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0003) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -177519,7 +179864,54 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_11() + CHIP_ERROR TestStep4dReadTheOptionalAttributeLastChangedTimeHepafremonsa0004InAttributeList_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4d: Read the optional attribute LastChangedTime (HEPAFREMON.S.A0004) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4eReadTheOptionalAttributeReplacementProductListHepafremonsf02InAttributeList_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog( + @"Step 4e: Read the optional attribute ReplacementProductList (HEPAFREMON.S.F02) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177540,7 +179932,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_12() + CHIP_ERROR TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177563,7 +179955,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_13() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177965,6 +180357,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -178050,6 +180443,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), diff --git a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h index c7509b6750793a..85b6ca3fc694ae 100644 --- a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h @@ -23,10 +23,10 @@ #include -class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand +class Test_TC_WNCV_5_1_SimulatedSuite : public TestCommand { public: - Test_TC_ACT_3_1_SimulatedSuite() : TestCommand("Test_TC_ACT_3_1_Simulated", 6) + Test_TC_WNCV_5_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_5_1_Simulated", 5) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -34,7 +34,7 @@ class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_3_1_SimulatedSuite() {} + ~Test_TC_WNCV_5_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -54,18 +54,6 @@ class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -82,64 +70,39 @@ class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: ActionList"); - VerifyOrDo(!ShouldSkip("ACT.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::ActionList::Id); + LogStep(0, "DUT reads the FeatureMap attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::FeatureMap::Id); } case 1: { - LogStep(1, "Read attribute: EndpointLists"); - VerifyOrDo(!ShouldSkip("ACT.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::EndpointLists::Id); + LogStep(1, "DUT reads the Type attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Type::Id); } case 2: { - LogStep(2, "Read attribute: SetupURL"); - VerifyOrDo(!ShouldSkip("ACT.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::SetupURL::Id); + LogStep(2, "DUT reads the EndProductType attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::EndProductType::Id); } case 3: { - LogStep(3, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(3, "DUT reads the Mode attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Mode::Id); } case 4: { - LogStep(4, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACT.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACT.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(4, "DUT reads the ConfigStatus attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand +class Test_TC_OCC_2_4_SimulatedSuite : public TestCommand { public: - Test_TC_BOOL_3_1_SimulatedSuite() : TestCommand("Test_TC_BOOL_3_1_Simulated", 4) + Test_TC_OCC_2_4_SimulatedSuite() : TestCommand("Test_TC_OCC_2_4_Simulated", 2) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -147,7 +110,7 @@ class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BOOL_3_1_SimulatedSuite() {} + ~Test_TC_OCC_2_4_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -167,18 +130,6 @@ class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -195,54 +146,24 @@ class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: StateValue"); - VerifyOrDo(!ShouldSkip("BOOL.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), BooleanState::Id, BooleanState::Attributes::StateValue::Id); + LogStep(0, "TH reads OccupancySensorType attribute from DUT"); + VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); } case 1: { - LogStep(1, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(1, "TH reads OccupancySensorTypeBitmap attribute from DUT"); + VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand +class Test_TC_DGSW_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DESC_2_2_SimulatedSuite() : TestCommand("Test_TC_DESC_2_2_Simulated", 5) + Test_TC_DGSW_3_2_SimulatedSuite() : TestCommand("Test_TC_DGSW_3_2_Simulated", 1) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -250,7 +171,7 @@ class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_2_2_SimulatedSuite() {} + ~Test_TC_DGSW_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -270,10 +191,6 @@ class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -290,44 +207,19 @@ class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "DUT reads DeviceTypeList from TH."); - VerifyOrDo(!ShouldSkip("DESC.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::DeviceTypeList::Id); - } - case 1: { - LogStep(1, "DUT reads ServerList from the TH"); - VerifyOrDo(!ShouldSkip("DESC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ServerList::Id); - } - case 2: { - LogStep(2, "DUT reads ClientList attribute from the TH"); - VerifyOrDo(!ShouldSkip("DESC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ClientList::Id); - } - case 3: { - LogStep(3, "DUT reads PartsList attribute from the TH"); - VerifyOrDo(!ShouldSkip("DESC.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::PartsList::Id); - } - case 4: { - LogStep(4, "DUT reads TagList from the TH"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(0, "DUT sends ResetWatermarks to TH"); + VerifyOrDo(!ShouldSkip("DGSW.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Commands::ResetWatermarks::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGETH_3_1_SimulatedSuite : public TestCommand +class Test_TC_DGETH_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DGETH_3_1_SimulatedSuite() : TestCommand("Test_TC_DGETH_3_1_Simulated", 9) + Test_TC_DGETH_3_2_SimulatedSuite() : TestCommand("Test_TC_DGETH_3_2_Simulated", 1) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -335,7 +227,7 @@ class Test_TC_DGETH_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_3_1_SimulatedSuite() {} + ~Test_TC_DGETH_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -371,68 +263,20 @@ class Test_TC_DGETH_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: PHYRate"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PHYRate::Id); - } - case 1: { - LogStep(1, "Read attribute: FullDuplex"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::FullDuplex::Id); - } - case 2: { - LogStep(2, "Read attribute: PacketRxCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id); - } - case 3: { - LogStep(3, "Read attribute: PacketTxCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id); - } - case 4: { - LogStep(4, "Read attribute: TxErrCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::TxErrCount::Id); - } - case 5: { - LogStep(5, "Read attribute: CollisionCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::CollisionCount::Id); - } - case 6: { - LogStep(6, "Read attribute: OverrunCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::OverrunCount::Id); - } - case 7: { - LogStep(7, "Read attribute: CarrierDetect"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id); - } - case 8: { - LogStep(8, "Read attribute: TimeSinceReset"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id); + LogStep(0, "DUT sends ResetCounts to TH"); + VerifyOrDo(!ShouldSkip("DGETH.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Commands::ResetCounts::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand +class Test_TC_DGWIFI_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DGSW_3_1_SimulatedSuite() : TestCommand("Test_TC_DGSW_3_1_Simulated", 4) + Test_TC_DGWIFI_3_2_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_2_Simulated", 1) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -440,7 +284,7 @@ class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGSW_3_1_SimulatedSuite() {} + ~Test_TC_DGWIFI_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -476,35 +320,19 @@ class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: ThreadMetrics"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::ThreadMetrics::Id); - } - case 1: { - LogStep(1, "Read attribute: CurrentHeapFree"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapFree::Id); - } - case 2: { - LogStep(2, "Read attribute: CurrentHeapUsed"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id); - } - case 3: { - LogStep(3, "Read attribute: CurrentHeapHighWatermark"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id); + LogStep(0, "DUT sends ResetCounts command to TH"); + VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Commands::ResetCounts::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand +class Test_TC_WNCV_6_1_SimulatedSuite : public TestCommand { public: - Test_TC_DGWIFI_3_1_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_1_Simulated", 13) + Test_TC_WNCV_6_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_6_1_Simulated", 3) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -512,7 +340,7 @@ class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGWIFI_3_1_SimulatedSuite() {} + ~Test_TC_WNCV_6_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -548,85 +376,29 @@ class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: BSSID"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Bssid::Id); + LogStep(0, "DUT sends UpOrOpen command to TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::UpOrOpen::Id); } case 1: { - LogStep(1, "Read attribute: SecurityType"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::SecurityType::Id); + LogStep(1, "DUT sends DownOrClose command to TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id); } case 2: { - LogStep(2, "Read attribute: WiFiVersion"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id); - } - case 3: { - LogStep(3, "Read attribute: ChannelNumber"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id); - } - case 4: { - LogStep(4, "Read attribute: RSSI"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Rssi::Id); - } - case 5: { - LogStep(5, "Read attribute: BeaconLostCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id); - } - case 6: { - LogStep(6, "Read attribute: BeaconRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id); - } - case 7: { - LogStep(7, "Read attribute: PacketMulticastRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id); - } - case 8: { - LogStep(8, "Read attribute: PacketMulticastTxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id); - } - case 9: { - LogStep(9, "Read attribute: PacketUnicastRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id); - } - case 10: { - LogStep(10, "Read attribute: PacketUnicastTxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id); - } - case 11: { - LogStep(11, "Read attribute: CurrentMaxRate"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id); - } - case 12: { - LogStep(12, "Read attribute: OverrunCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::OverrunCount::Id); + LogStep(2, "DUT sends StopMotion command to TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::StopMotion::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand +class Test_TC_WNCV_7_1_SimulatedSuite : public TestCommand { public: - Test_TC_FLW_3_1_SimulatedSuite() : TestCommand("Test_TC_FLW_3_1_Simulated", 7) + Test_TC_WNCV_7_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_7_1_Simulated", 2) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -634,7 +406,7 @@ class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_FLW_3_1_SimulatedSuite() {} + ~Test_TC_WNCV_7_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -654,18 +426,6 @@ class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -682,83 +442,40 @@ class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MeasuredValue::Id); + LogStep(0, "If (PA_LF & LF) DUT sends GoToLiftPercentage command with 50% to DUT"); + VerifyOrDo(!ShouldSkip("WNCV.C.C05.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToLiftPercentage::Id); } case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute: Tolerance"); - VerifyOrDo(!ShouldSkip("FLW.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && FLW.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(1, "If (PA_TL & TL) DUT sends GoToTiltPercentage command with 50% to DUT"); + VerifyOrDo(!ShouldSkip("WNCV.C.C08.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToTiltPercentage::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_G_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_3_4_SimulatedSuite : public TestCommand { public: - Test_TC_G_3_1_SimulatedSuite() : TestCommand("Test_TC_G_3_1_Simulated", 1) + Test_TC_CC_3_4_SimulatedSuite() : TestCommand("Test_TC_CC_3_4_Simulated", 16) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_G_3_1_SimulatedSuite() {} + ~Test_TC_CC_3_4_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -772,71 +489,19 @@ class Test_TC_G_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads NameSupport attribute value from TH"); - VerifyOrDo(!ShouldSkip("G.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_I_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_I_3_1_SimulatedSuite() : TestCommand("Test_TC_I_3_1_Simulated", 7) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_I_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 5: + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -856,83 +521,121 @@ class Test_TC_I_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: IdentifyTime"); - VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute: identifytype"); - VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyType::Id); + LogStep(1, "DUT sends MoveToHue command to TH an Hue with _TransitionTime 300"); + VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id); } case 2: { - LogStep(2, "write attribute: IdentifyTime"); - VerifyOrDo(!ShouldSkip("I.C.AM-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); + LogStep(2, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 3: { - LogStep(3, "Readback attribute: IdentifyTime"); - VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); + LogStep(3, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(4, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(5, "DUT sends MoveHue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id); } case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 7: { + LogStep(7, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 9: { + LogStep(9, "DUT sends StepHue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id); + } + case 10: { + LogStep(10, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 11: { + LogStep(11, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 13: { + LogStep(13, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); + } + case 14: { + LogStep(14, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 15: { + LogStep(15, "Over TransitionTime, DUT reads CurrentHue attribute from TH"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_4_5_SimulatedSuite : public TestCommand { public: - Test_TC_PRS_3_1_SimulatedSuite() : TestCommand("Test_TC_PRS_3_1_Simulated", 12) + Test_TC_CC_4_5_SimulatedSuite() : TestCommand("Test_TC_CC_4_5_Simulated", 22) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_PRS_3_1_SimulatedSuite() {} + ~Test_TC_CC_4_5_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -946,11 +649,11 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 9: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -958,6 +661,14 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -974,3183 +685,154 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MeasuredValue::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinMeasuredValue::Id); + LogStep(1, "DUT sends MoveToSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id); } case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxMeasuredValue::Id); + LogStep(2, "DUT reads CurrentSaturation attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 3: { - LogStep(3, "Read attribute: Tolerance"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Tolerance::Id); + LogStep(3, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, "Read attribute: ScaledValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledValue::Id); + LogStep(4, "DUT reads CurrentSaturation attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 5: { - LogStep(5, "Read attribute: MinScaledValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinScaledValue::Id); + LogStep(5, "DUT sends MoveSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id); } case 6: { - LogStep(6, "Read attribute: MaxScaledValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxScaledValue::Id); + LogStep(6, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 7: { - LogStep(7, "Read attribute: ScaledTolerance"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledTolerance::Id); + LogStep(7, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { - LogStep(8, "Read attribute: Scale"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Scale::Id); + LogStep(8, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 9: { - LogStep(9, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(9, "DUT sends StepSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id); } case 10: { - LogStep(10, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(10, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 11: { - LogStep(11, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PSCFG_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_PSCFG_3_1_SimulatedSuite() : TestCommand("Test_TC_PSCFG_3_1_Simulated", 4) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PSCFG_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute: Sources"); - VerifyOrDo(!ShouldSkip("PSCFG.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PowerSourceConfiguration::Id, PowerSourceConfiguration::Attributes::Sources::Id); - } - case 1: { - LogStep(1, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RH_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_RH_3_1_SimulatedSuite() : TestCommand("Test_TC_RH_3_1_Simulated", 7) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RH_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute MeasuredValue"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MeasuredValue::Id); - } - case 1: { - LogStep(1, "Read attribute MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute Tolerance"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SWTCH_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_SWTCH_3_1_SimulatedSuite() : TestCommand("Test_TC_SWTCH_3_1_Simulated", 6) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Read NumberOfPositions attribute"); - VerifyOrDo(!ShouldSkip("SWTCH.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::NumberOfPositions::Id); - } - case 1: { - LogStep(1, "Read CurrentPosition attribute"); - VerifyOrDo(!ShouldSkip("SWTCH.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::CurrentPosition::Id); - } - case 2: { - LogStep(2, "Read MultiPressMax attribute"); - VerifyOrDo(!ShouldSkip("SWTCH.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::MultiPressMax::Id); - } - case 3: { - LogStep(3, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && SWTCH.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_5_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_WNCV_5_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_5_1_Simulated", 5) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_5_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads the FeatureMap attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::FeatureMap::Id); - } - case 1: { - LogStep(1, "DUT reads the Type attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Type::Id); - } - case 2: { - LogStep(2, "DUT reads the EndProductType attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::EndProductType::Id); - } - case 3: { - LogStep(3, "DUT reads the Mode attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Mode::Id); - } - case 4: { - LogStep(4, "DUT reads the ConfigStatus attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LCFG_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LCFG_3_1_SimulatedSuite() : TestCommand("Test_TC_LCFG_3_1_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LCFG_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads SupportedLocales attribute from TH"); - VerifyOrDo(!ShouldSkip("LCFG.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::SupportedLocales::Id); - } - case 1: { - LogStep(1, "DUT reads ActiveLocale attribute from TH"); - VerifyOrDo(!ShouldSkip("LCFG.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::ActiveLocale::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LUNIT_1_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LUNIT_1_1_SimulatedSuite() : TestCommand("Test_TC_LUNIT_1_1_Simulated", 5) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LUNIT_1_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT read (0xFFFD) ClusterRevision attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::ClusterRevision::Id); - } - case 1: { - LogStep(1, "DUT read (0xFFFC) FeatureMap attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id); - } - case 2: { - LogStep(2, "DUT read (0xFFFB) AttributeList attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::AttributeList::Id); - } - case 3: { - LogStep(3, "DUT read (0xFFF9) AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::AcceptedCommandList::Id); - } - case 4: { - LogStep(4, "DUT read (0xFFF8) GeneratedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::GeneratedCommandList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LUNIT_2_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LUNIT_2_1_SimulatedSuite() : TestCommand("Test_TC_LUNIT_2_1_Simulated", 3) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LUNIT_2_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads TemperatureUnit attribute from TH"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); - } - case 1: { - LogStep(1, "DUT writes 2 to TemperatureUnit attribute on TH"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); - } - case 2: { - LogStep(2, "DUT reads TemperatureUnit attribute from TH"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_2_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_OCC_2_2_SimulatedSuite() : TestCommand("Test_TC_OCC_2_2_Simulated", 12) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_2_2_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads from the TH the (0x0000) Occupancy attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id); - } - case 1: { - LogStep(1, "DUT reads from the TH the (0x0001) OccupancySensorType attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); - } - case 2: { - LogStep(2, "DUT reads from the TH the (0x0002) OccupancySensorTypeBitmap attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); - } - case 3: { - LogStep(3, "DUT reads from the TH the (0x0010) PIROccupiedToUnoccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id); - } - case 4: { - LogStep(4, "DUT reads from the TH the (0x0011) PIRUnoccupiedToOccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id); - } - case 5: { - LogStep(5, "DUT reads from the TH the (0x0012) PIRUnoccupiedToOccupiedThreshold optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id); - } - case 6: { - LogStep(6, "DUT reads from the TH the (0x0020) UltrasonicOccupiedToUnoccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id); - } - case 7: { - LogStep(7, "DUT reads from the TH the (0x0021) UltrasonicUnoccupiedToOccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id); - } - case 8: { - LogStep(8, "DUT reads from the TH the (0x0022) UltrasonicUnoccupiedToOccupiedThreshold optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id); - } - case 9: { - LogStep(9, "DUT reads from the TH the (0x0030) PhysicalContactOccupiedToUnoccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id); - } - case 10: { - LogStep(10, "DUT reads from the TH the (0x0031) PhysicalContactUnoccupiedToOccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id); - } - case 11: { - LogStep(11, "DUT reads from the TH the (0x0032) PhysicalContactUnoccupiedToOccupiedThreshold optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_2_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_OCC_2_4_SimulatedSuite() : TestCommand("Test_TC_OCC_2_4_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_2_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "TH reads OccupancySensorType attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); - } - case 1: { - LogStep(1, "TH reads OccupancySensorTypeBitmap attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ULABEL_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_ULABEL_3_1_SimulatedSuite() : TestCommand("Test_TC_ULABEL_3_1_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ULABEL_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Read attribute: LabelList"); - VerifyOrDo(!ShouldSkip("ULABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id); - } - case 1: { - LogStep(1, "Step 2: write attribute: LabelList"); - VerifyOrDo(!ShouldSkip("ULABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FLABEL_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_FLABEL_3_1_SimulatedSuite() : TestCommand("Test_TC_FLABEL_3_1_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FLABEL_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads LabelList from the TH"); - VerifyOrDo(!ShouldSkip("FLABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::LabelList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LTIME_1_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LTIME_1_1_SimulatedSuite() : TestCommand("Test_TC_LTIME_1_1_Simulated", 5) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LTIME_1_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT read (0xFFFD) ClusterRevision attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::ClusterRevision::Id); - } - case 1: { - LogStep(1, "DUT read (0xFFFC) FeatureMap attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::FeatureMap::Id); - } - case 2: { - LogStep(2, "DUT read (0xFFFB) AttributeList attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::AttributeList::Id); - } - case 3: { - LogStep(3, "DUT read (0xFFF9) AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::AcceptedCommandList::Id); - } - case 4: { - LogStep(4, "DUT read (0xFFF8) GeneratedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::GeneratedCommandList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ILL_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_ILL_3_1_SimulatedSuite() : TestCommand("Test_TC_ILL_3_1_Simulated", 8) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ILL_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::MeasuredValue::Id); - } - case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute: Tolerance"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, "Read attribute: LightSensorType"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::LightSensorType::Id); - } - case 5: { - LogStep(5, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGSW_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGSW_3_2_SimulatedSuite() : TestCommand("Test_TC_DGSW_3_2_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGSW_3_2_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetWatermarks to TH"); - VerifyOrDo(!ShouldSkip("DGSW.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Commands::ResetWatermarks::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGETH_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGETH_3_2_SimulatedSuite() : TestCommand("Test_TC_DGETH_3_2_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGETH_3_2_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetCounts to TH"); - VerifyOrDo(!ShouldSkip("DGETH.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Commands::ResetCounts::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGWIFI_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGWIFI_3_2_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_2_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGWIFI_3_2_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetCounts command to TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Commands::ResetCounts::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_6_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_WNCV_6_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_6_1_Simulated", 3) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_6_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends UpOrOpen command to TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::UpOrOpen::Id); - } - case 1: { - LogStep(1, "DUT sends DownOrClose command to TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id); - } - case 2: { - LogStep(2, "DUT sends StopMotion command to TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::StopMotion::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_7_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_WNCV_7_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_7_1_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_7_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "If (PA_LF & LF) DUT sends GoToLiftPercentage command with 50% to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.C.C05.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToLiftPercentage::Id); - } - case 1: { - LogStep(1, "If (PA_TL & TL) DUT sends GoToTiltPercentage command with 50% to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.C.C08.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToTiltPercentage::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_3_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_3_4_SimulatedSuite() : TestCommand("Test_TC_CC_3_4_Simulated", 16) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_3_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - chip::Optional mConfigTransitionTime; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToHue command to TH an Hue with _TransitionTime 300"); - VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id); - } - case 2: { - LogStep(2, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 3: { - LogStep(3, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 5: { - LogStep(5, "DUT sends MoveHue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id); - } - case 6: { - LogStep(6, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 7: { - LogStep(7, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 9: { - LogStep(9, "DUT sends StepHue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id); - } - case 10: { - LogStep(10, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 11: { - LogStep(11, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 13: { - LogStep(13, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 14: { - LogStep(14, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Over TransitionTime, DUT reads CurrentHue attribute from TH"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_4_5_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_4_5_SimulatedSuite() : TestCommand("Test_TC_CC_4_5_Simulated", 22) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_4_5_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - chip::Optional mConfigTransitionTime; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id); - } - case 2: { - LogStep(2, "DUT reads CurrentSaturation attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 3: { - LogStep(3, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads CurrentSaturation attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 5: { - LogStep(5, "DUT sends MoveSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id); - } - case 6: { - LogStep(6, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 7: { - LogStep(7, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 9: { - LogStep(9, "DUT sends StepSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id); - } - case 10: { - LogStep(10, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 11: { - LogStep(11, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 13: { - LogStep(13, "DUT sends MoveToHueAndSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHueAndSaturation::Id); - } - case 14: { - LogStep(14, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 15: { - LogStep(15, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 18: { - LogStep(18, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 19: { - LogStep(19, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 20: { - LogStep(20, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Over TransitionTime, DUT reads CurrentSaturation attribute from TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_5_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_5_4_SimulatedSuite() : TestCommand("Test_TC_CC_5_4_Simulated", 25) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_5_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mConfigTransitionTime; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToColor command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id); - } - case 2: { - LogStep(2, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 3: { - LogStep(3, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 4: { - LogStep(4, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 6: { - LogStep(6, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 7: { - LogStep(7, "DUT sends MoveColor command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id); - } - case 8: { - LogStep(8, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 9: { - LogStep(9, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 10: { - LogStep(10, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 12: { - LogStep(12, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 13: { - LogStep(13, "DUT sends StepColor command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColor::Id); - } - case 14: { - LogStep(14, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 15: { - LogStep(15, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 18: { - LogStep(18, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 19: { - LogStep(19, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 20: { - LogStep(20, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 21: { - LogStep(21, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 22: { - LogStep(22, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 24: { - LogStep( - 24, - "DUT reads CurrentY attribute from ConfiguredTime: type: int16u defaultValue: 30000TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_6_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_6_4_SimulatedSuite() : TestCommand("Test_TC_CC_6_4_Simulated", 18) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_6_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mConfigTransitionTime; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, - "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " - "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " - "attribute ColorTempPhysicalMinMireds from TH"); - VerifyOrDo(!ShouldSkip("CC.C.A400b && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id); - } - case 2: { - LogStep(2, - "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " - "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " - "attribute ColorTempPhysicalMaxMireds from TH"); - VerifyOrDo(!ShouldSkip("CC.C.A400c && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id); - } - case 3: { - LogStep(3, "DUT sends MoveToColorTemperature command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id); - } - case 4: { - LogStep(4, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 5: { - LogStep(5, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 7: { - LogStep(7, "DUT sends MoveColorTemperatureMireds command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id); - } - case 8: { - LogStep(8, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 9: { - LogStep(9, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 11: { - LogStep(11, "DUT sends StepColorTemperature command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id); - } - case 12: { - LogStep(12, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 13: { - LogStep(13, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 15: { - LogStep(15, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_7_5_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_7_5_SimulatedSuite() : TestCommand("Test_TC_CC_7_5_Simulated", 23) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_7_5_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mConfigTransitionTime; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToEnhancedHue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id); - } - case 2: { - LogStep(2, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 3: { - LogStep(3, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 5: { - LogStep(5, "DUT sends MoveEnhanced Hue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id); - } - case 6: { - LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 7: { - LogStep(7, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 9: { - LogStep(9, "DUT sends StepEnhanced command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id); - } - case 10: { - LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 11: { - LogStep(11, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 13: { - LogStep(13, "DUT sends EnhancedMoveToHueAndSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id); - } - case 14: { - LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 15: { - LogStep(15, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 18: { - LogStep(18, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 19: { - LogStep(19, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 20: { - LogStep(20, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 21: { - LogStep(21, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_9_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_9_4_SimulatedSuite() : TestCommand("Test_TC_CC_9_4_Simulated", 19) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - } - - ~Test_TC_CC_9_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mCluster; - chip::Optional mEndpoint; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends ColorLoopSet command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C44.Tx && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id); - } - case 2: { - LogStep(2, "DUT reads ColorLoopActive attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4002 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id); - } - case 3: { - LogStep(3, "DUT reads ColorLoopDirection attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4003 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id); - } - case 4: { - LogStep(4, "DUT reads ColorLoopTime attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4004 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id); - } - case 5: { - LogStep(5, "DUT reads ColorLoopStartEnhancedHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4005 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id); - } - case 6: { - LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 7: { - LogStep(7, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 9: { - LogStep(9, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 11: { - LogStep(11, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 13: { - LogStep(13, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 15: { - LogStep(15, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 17: { - LogStep(17, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGTHREAD_3_2_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_2_Simulated", 17) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_3_2_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads TxTotalCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id); - } - case 1: { - LogStep(1, "DUT reads TxUnicastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id); - } - case 2: { - LogStep(2, "DUT reads TxBroadcastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id); - } - case 3: { - LogStep(3, "DUT reads TxAckRequestedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id); - } - case 4: { - LogStep(4, "DUT reads TxAckedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id); - } - case 5: { - LogStep(5, "DUT reads TxNoAckRequestedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id); - } - case 6: { - LogStep(6, "DUT reads TxDataCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxDataCount::Id); - } - case 7: { - LogStep(7, "DUT reads TxDataPollCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id); - } - case 8: { - LogStep(8, "DUT reads TxBeaconCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id); - } - case 9: { - LogStep(9, "DUT reads TxBeaconRequestCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id); - } - case 10: { - LogStep(10, "DUT reads TxOtherCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id); - } - case 11: { - LogStep(11, "DUT reads TxRetryCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id); - } - case 12: { - LogStep(12, "DUT reads TxDirectMaxRetryExpiryCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id); - } - case 13: { - LogStep(13, "DUT reads TxIndirectMaxRetryExpiryCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id); - } - case 14: { - LogStep(14, "DUT reads TxErrCcaCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id); - } - case 15: { - LogStep(15, "DUT reads TxErrAbortCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id); - } - case 16: { - LogStep(16, "DUT reads TxErrBusyChannelCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_3_3_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGTHREAD_3_3_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_3_Simulated", 17) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_3_3_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads RxTotalCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id); - } - case 1: { - LogStep(1, "DUT reads RxUnicastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id); - } - case 2: { - LogStep(2, "DUT reads RxBroadcastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id); - } - case 3: { - LogStep(3, "DUT reads RxDataCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDataCount::Id); - } - case 4: { - LogStep(4, "DUT reads RxDataPollCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id); - } - case 5: { - LogStep(5, "DUT reads RxBeaconCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id); - } - case 6: { - LogStep(6, "DUT reads RxBeaconRequestCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id); - } - case 7: { - LogStep(7, "DUT reads RxOtherCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id); - } - case 8: { - LogStep(8, "DUT reads RxAddressFilteredCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id); - } - case 9: { - LogStep(9, "DUT reads RxDestAddrFilteredCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id); - } - case 10: { - LogStep(10, "DUT reads RxDuplicatedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id); - } - case 11: { - LogStep(11, "DUT reads RxErrNoFrameCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id); - } - case 12: { - LogStep(12, "DUT reads RxErrUnknownNeighborCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id); - } - case 13: { - LogStep(13, "DUT reads RxErrInvalidSrcAddrCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id); - } - case 14: { - LogStep(14, "DUT reads RxErrSecCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0035"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id); - } - case 15: { - LogStep(15, "DUT reads RxErrFcsCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id); - } - case 16: { - LogStep(16, "DUT reads RxErrOtherCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_3_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGTHREAD_3_4_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_4_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_3_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetCounts command to TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Commands::ResetCounts::Id); - } - case 1: { - LogStep(1, "DUT reads OverrunCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::OverrunCount::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LVL_2_3_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LVL_2_3_SimulatedSuite() : TestCommand("Test_TC_LVL_2_3_Simulated", 24) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LVL_2_3_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Read mandatory attribute CurrentLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id); - } - case 1: { - LogStep(1, "Read mandatory attribute OnLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); - } - case 2: { - LogStep(2, "Read mandatory attribute Options"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); - } - case 3: { - LogStep(3, "Read optional attribute RemainingTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::RemainingTime::Id); - } - case 4: { - LogStep(4, "Read optional attribute StartUpCurrentLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); - } - case 5: { - LogStep(5, "Read optional attribute CurrentFrequency"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentFrequency::Id); - } - case 6: { - LogStep(6, "Read optional attribute MinFrequency"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinFrequency::Id); - } - case 7: { - LogStep(7, "Read optional attribute MaxFrequency"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxFrequency::Id); - } - case 8: { - LogStep(8, "Read optional attribute MinLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id); - } - case 9: { - LogStep(9, "Read optional attribute MaxLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id); - } - case 10: { - LogStep(10, "Read optional attribute OnOffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); - } - case 11: { - LogStep(11, "Read optional attribute OnTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); - } - case 12: { - LogStep(12, "Read optional attribute OffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); + case 12: { + LogStep(12, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 13: { - LogStep(13, "Read optional attribute DefaultMoveRate"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); + LogStep(13, "DUT sends MoveToHueAndSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHueAndSaturation::Id); } case 14: { - LogStep(14, "Write mandatory attribute OnLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); + LogStep(14, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 15: { - LogStep(15, "Write mandatory attribute Options"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); + LogStep(15, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 16: { - LogStep(16, "Write optional attribute OnOffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); + LogStep(16, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { - LogStep(17, "Write optional attribute OnTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); + LogStep(17, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 18: { - LogStep(18, "Write optional attribute OffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); + LogStep(18, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 19: { - LogStep(19, "Write optional attribute DefaultMoveRate"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); + LogStep(19, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); } case 20: { - LogStep(20, "Write optional attribute StartUpCurrentLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); - } - case 21: { - LogStep(21, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(20, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + case 21: { + LogStep(21, "Over TransitionTime, DUT reads CurrentSaturation attribute from TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_OO_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_5_4_SimulatedSuite : public TestCommand { public: - Test_TC_OO_3_1_SimulatedSuite() : TestCommand("Test_TC_OO_3_1_Simulated", 11) + Test_TC_CC_5_4_SimulatedSuite() : TestCommand("Test_TC_CC_5_4_Simulated", 25) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_OO_3_1_SimulatedSuite() {} + ~Test_TC_CC_5_4_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mEndpoint; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4164,15 +846,19 @@ class Test_TC_OO_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 8: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4192,176 +878,164 @@ class Test_TC_OO_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute OnOff"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute GlobalSceneControl"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id); + LogStep(1, "DUT sends MoveToColor command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id); } case 2: { - LogStep(2, "Read attribute OnTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id); + LogStep(2, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } case 3: { - LogStep(3, "Read attribute OffWaitTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id); + LogStep(3, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } case 4: { - LogStep(4, "Read attribute StartUpOnOff"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id); + LogStep(4, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "Write attribute OnTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id); + LogStep(5, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } case 6: { - LogStep(6, "Write attribute OffWaitTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id); + LogStep(6, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } case 7: { - LogStep(7, "Write attribute StartUpOnOff"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id); + LogStep(7, "DUT sends MoveColor command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id); } case 8: { - LogStep(8, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(8, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } case 9: { - LogStep(9, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(9, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } case 10: { - LogStep(10, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Wait for ConfigTransitionTime"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } + case 11: { + LogStep(11, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OO_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_OO_3_2_SimulatedSuite() : TestCommand("Test_TC_OO_3_2_Simulated", 6) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OO_3_2_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + case 12: { + LogStep(12, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + case 13: { + LogStep(13, "DUT sends StepColor command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColor::Id); } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT issues an Off command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id); + case 14: { + LogStep(14, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } - case 1: { - LogStep(1, "DUT issues an On command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); + case 15: { + LogStep(15, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); + } + case 16: { + LogStep(16, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 17: { + LogStep(17, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); + } + case 18: { + LogStep(18, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); + } + case 19: { + LogStep(19, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); } - case 2: { - LogStep(2, "DUT issues an Toggle command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Toggle::Id); + case 20: { + LogStep(20, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } - case 3: { - LogStep(3, "DUT issues an OffWithEffect command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C40.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id); + case 21: { + LogStep(21, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } - case 4: { - LogStep(4, "DUT issues an OnWithRecallGlobalScene command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithRecallGlobalScene::Id); + case 22: { + LogStep(22, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - case 5: { - LogStep(5, "DUT issues an OnWithTimedOff command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id); + case 23: { + LogStep(23, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); + } + case 24: { + LogStep( + 24, + "DUT reads CurrentY attribute from ConfiguredTime: type: int16u defaultValue: 30000TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_TSUIC_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_6_4_SimulatedSuite : public TestCommand { public: - Test_TC_TSUIC_3_1_SimulatedSuite() : TestCommand("Test_TC_TSUIC_3_1_Simulated", 9) + Test_TC_CC_6_4_SimulatedSuite() : TestCommand("Test_TC_CC_6_4_Simulated", 18) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_TSUIC_3_1_SimulatedSuite() {} + ~Test_TC_CC_6_4_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mEndpoint; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4375,15 +1049,19 @@ class Test_TC_TSUIC_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4403,93 +1081,133 @@ class Test_TC_TSUIC_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "DUT reads TemperatureDisplayMode attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "DUT reads KeypadLockout attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id); + LogStep(1, + "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " + "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " + "attribute ColorTempPhysicalMinMireds from TH"); + VerifyOrDo(!ShouldSkip("CC.C.A400b && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id); } case 2: { - LogStep(2, "DUT reads ScheduleProgrammingVisibility attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id); + LogStep(2, + "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " + "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " + "attribute ColorTempPhysicalMaxMireds from TH"); + VerifyOrDo(!ShouldSkip("CC.C.A400c && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id); } case 3: { - LogStep(3, "DUT writes TemperatureDisplayMode attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id); + LogStep(3, "DUT sends MoveToColorTemperature command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id); } case 4: { - LogStep(4, "DUT writes KeypadLockout attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id); + LogStep(4, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); } case 5: { - LogStep(5, "DUT writes ScheduleProgrammingVisibility attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id); + LogStep(5, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { - LogStep(6, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(6, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); } case 7: { - LogStep(7, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(7, "DUT sends MoveColorTemperatureMireds command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id); } case 8: { - LogStep(8, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 9: { + LogStep(9, "Wait for ConfigTransitionTime"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 11: { + LogStep(11, "DUT sends StepColorTemperature command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id); + } + case 12: { + LogStep(12, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 13: { + LogStep(13, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 15: { + LogStep(15, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); + } + case 16: { + LogStep(16, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 17: { + LogStep(17, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_PCC_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_7_5_SimulatedSuite : public TestCommand { public: - Test_TC_PCC_3_1_SimulatedSuite() : TestCommand("Test_TC_PCC_3_1_Simulated", 30) + Test_TC_CC_7_5_SimulatedSuite() : TestCommand("Test_TC_CC_7_5_Simulated", 23) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_PCC_3_1_SimulatedSuite() {} + ~Test_TC_CC_7_5_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mEndpoint; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4503,15 +1221,23 @@ class Test_TC_PCC_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 27: + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 28: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 29: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4531,225 +1257,152 @@ class Test_TC_PCC_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute MaxPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxPressure::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute MaxSpeed"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxSpeed::Id); + LogStep(1, "DUT sends MoveToEnhancedHue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id); } case 2: { - LogStep(2, "Read attribute MaxFlow"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxFlow::Id); + LogStep(2, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 3: { - LogStep(3, "Read attribute EffectiveOperationMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id); + LogStep(3, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, "Read attribute EffectiveControlMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id); + LogStep(4, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 5: { - LogStep(5, "Read attribute Capacity"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::Capacity::Id); + LogStep(5, "DUT sends MoveEnhanced Hue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id); } case 6: { - LogStep(6, "Read attribute OperationMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::OperationMode::Id); + LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 7: { - LogStep(7, "Read attribute MinConstPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstPressure::Id); + LogStep(7, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { - LogStep(8, "Read attribute MaxConstPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstPressure::Id); + LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 9: { - LogStep(9, "Read attribute MinCompPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinCompPressure::Id); + LogStep(9, "DUT sends StepEnhanced command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id); } case 10: { - LogStep(10, "Read attribute MaxCompPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxCompPressure::Id); + LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 11: { - LogStep(11, "Read attribute MinConstSpeed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstSpeed::Id); + LogStep(11, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 12: { - LogStep(12, "Read attribute MaxConstSpeed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id); + LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 13: { - LogStep(13, "Read attribute MinConstFlow"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstFlow::Id); + LogStep(13, "DUT sends EnhancedMoveToHueAndSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id); } case 14: { - LogStep(14, "Read attribute MaxConstFlow"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstFlow::Id); + LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 15: { - LogStep(15, "Read attribute MinConstTemp"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstTemp::Id); + LogStep(15, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 16: { - LogStep(16, "Read attribute MaxConstTemp"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstTemp::Id); + LogStep(16, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { - LogStep(17, "Read attribute PumpStatus"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::PumpStatus::Id); + LogStep(17, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 18: { - LogStep(18, "Read attribute Speed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::Speed::Id); + LogStep(18, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 19: { - LogStep(19, "Read attribute LifetimeRunningHours"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id); + LogStep(19, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); } case 20: { - LogStep(20, "Read attribute Power"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::Power::Id); + LogStep(20, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 21: { - LogStep(21, "Read attribute LifetimeEnergyConsumed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id); - } - case 22: { - LogStep(22, "Read attribute ControlMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ControlMode::Id); - } - case 23: { - LogStep(23, "Write attribute LifetimeRunningHours"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id); - } - case 24: { - LogStep(24, "Write attribute LifetimeEnergyConsumed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id); - } - case 25: { - LogStep(25, "Write attribute OperationMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::OperationMode::Id); - } - case 26: { - LogStep(26, "Write attribute ControlMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ControlMode::Id); - } - case 27: { - LogStep(27, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 28: { - LogStep(28, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(21, "Wait for ConfigTransitionTime"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - case 29: { - LogStep(29, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + case 22: { + LogStep(22, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_TMP_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_9_4_SimulatedSuite : public TestCommand { public: - Test_TC_TMP_3_1_SimulatedSuite() : TestCommand("Test_TC_TMP_3_1_Simulated", 7) + Test_TC_CC_9_4_SimulatedSuite() : TestCommand("Test_TC_CC_9_4_Simulated", 19) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TMP_3_1_SimulatedSuite() {} + ~Test_TC_CC_9_4_SimulatedSuite() {} private: chip::Optional mNodeId; + chip::Optional mTimeout; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4763,15 +1416,27 @@ class Test_TC_TMP_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 4: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 5: + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4791,67 +1456,126 @@ class Test_TC_TMP_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::MeasuredValue::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MinMeasuredValue::Id); + LogStep(1, "DUT sends ColorLoopSet command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C44.Tx && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id); } case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MaxMeasuredValue::Id); + LogStep(2, "DUT reads ColorLoopActive attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4002 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id); } case 3: { - LogStep(3, "Read attribute: Tolerance"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::Tolerance::Id); + LogStep(3, "DUT reads ColorLoopDirection attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4003 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id); } case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(4, "DUT reads ColorLoopTime attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4004 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id); } case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(5, "DUT reads ColorLoopStartEnhancedHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4005 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id); } case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 7: { + LogStep(7, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 9: { + LogStep(9, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 11: { + LogStep(11, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 13: { + LogStep(13, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 15: { + LogStep(15, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 16: { + LogStep(16, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 17: { + LogStep(17, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 18: { + LogStep(18, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_CC_2_2_SimulatedSuite : public TestCommand +class Test_TC_DGTHREAD_3_4_SimulatedSuite : public TestCommand { public: - Test_TC_CC_2_2_SimulatedSuite() : TestCommand("Test_TC_CC_2_2_Simulated", 52) + Test_TC_DGTHREAD_3_4_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_4_Simulated", 2) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -4859,7 +1583,7 @@ class Test_TC_CC_2_2_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_2_2_SimulatedSuite() {} + ~Test_TC_DGTHREAD_3_4_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -4889,280 +1613,31 @@ class Test_TC_CC_2_2_SimulatedSuite : public TestCommand } } - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads from the TH the (0x0000) CurrentHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 1: { - LogStep(1, "DUT reads from the TH the (0x0001) CurrentSaturation attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 2: { - LogStep(2, "DUT reads from the TH the Optional (0x0002) RemainingTime attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::RemainingTime::Id); - } - case 3: { - LogStep(3, "DUT reads from the TH the (0x0003) CurrentX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 4: { - LogStep(4, "DUT reads from the TH the (0x0004) CurrentY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 5: { - LogStep(5, "DUT reads from the TH the Optional (0x0005) DriftCompensation attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::DriftCompensation::Id); - } - case 6: { - LogStep(6, "DUT reads from the TH the Optional (0x0006) CompensationText attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CompensationText::Id); - } - case 7: { - LogStep(7, "DUT reads from the TH the (0x0007) ColorTemperatureMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 8: { - LogStep(8, "DUT reads from the TH the (0x0008) ColorMode attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id); - } - case 9: { - LogStep(9, "DUT reads from the TH the (0x000f) Options attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id); - } - case 10: { - LogStep(10, "DUT reads from the TH the (0x4000) EnhancedCurrentHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 11: { - LogStep(11, "DUT reads from the TH the (0x4001) EnhancedColorMode attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id); - } - case 12: { - LogStep(12, "DUT reads from the TH the (0x4002) ColorLoopActive attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id); - } - case 13: { - LogStep(13, "DUT reads from the TH the (0x4003) ColorLoopDirection attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id); - } - case 14: { - LogStep(14, "DUT reads from the TH the (0x4004) ColorLoopTime attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id); - } - case 15: { - LogStep(15, "DUT reads from the TH the (0x4005) ColorLoopStartEnhancedHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id); - } - case 16: { - LogStep(16, "DUT reads from the TH the (0x4006) ColorLoopStoredEnhancedHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id); - } - case 17: { - LogStep(17, "DUT reads from the TH the (0x400a) ColorCapabilities attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorCapabilities::Id); - } - case 18: { - LogStep(18, "DUT reads from the TH the (0x400b) ColorTempPhysicalMinMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id); - } - case 19: { - LogStep(19, "DUT reads from the TH the (0x400c) ColorTempPhysicalMaxMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id); - } - case 20: { - LogStep(20, "DUT reads from the TH the (0x400d) CoupleColorTempToLevelMinMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id); - } - case 21: { - LogStep(21, "DUT reads from the TH the (0x4010) StartUpColorTemperatureMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::StartUpColorTemperatureMireds::Id); - } - case 22: { - LogStep(22, "DUT reads from the TH the (0x0010) NumberOfPrimaries attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::NumberOfPrimaries::Id); - } - case 23: { - LogStep(23, "DUT reads from the TH the (0x0011) Primary1X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1X::Id); + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "DUT sends ResetCounts command to TH"); + VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Commands::ResetCounts::Id); } - case 24: { - LogStep(24, "DUT reads from the TH the (0x0012) Primary1Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1Y::Id); - } - case 25: { - LogStep(25, "DUT reads from the TH the (0x0013) Primary1Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1Intensity::Id); - } - case 26: { - LogStep(26, "DUT reads from the TH the (0x0015) Primary2X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2X::Id); - } - case 27: { - LogStep(27, "DUT reads from the TH the (0x0016) Primary2Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2Y::Id); - } - case 28: { - LogStep(28, "DUT reads from the TH the (0x0017) Primary2Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2Intensity::Id); - } - case 29: { - LogStep(29, "DUT reads from the TH the (0x0019) Primary3X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3X::Id); - } - case 30: { - LogStep(30, "DUT reads from the TH the (0x001a) Primary3Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3Y::Id); - } - case 31: { - LogStep(31, "DUT reads from the TH the (0x001b) Primary3Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3Intensity::Id); - } - case 32: { - LogStep(32, "DUT reads from the TH the (0x0020) Primary4X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4X::Id); - } - case 33: { - LogStep(33, "DUT reads from the TH the (0x0021) Primary4Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4Y::Id); - } - case 34: { - LogStep(34, "DUT reads from the TH the (0x0022) Primary4Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4Intensity::Id); - } - case 35: { - LogStep(35, "DUT reads from the TH the (0x0024) Primary5X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5X::Id); - } - case 36: { - LogStep(36, "DUT reads from the TH the (0x0025) Primary5Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5Y::Id); - } - case 37: { - LogStep(37, "DUT reads from the TH the (0x0026) Primary5Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5Intensity::Id); - } - case 38: { - LogStep(38, "DUT reads from the TH the (0x0028) Primary6X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6X::Id); - } - case 39: { - LogStep(39, "DUT reads from the TH the (0x0029) Primary6Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6Y::Id); - } - case 40: { - LogStep(40, "DUT reads from the TH the (0x002a) Primary6Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6Intensity::Id); - } - case 41: { - LogStep(41, "DUT reads from the TH the Optional (0x0030) WhitePointX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointX::Id); - } - case 42: { - LogStep(42, "DUT reads from the TH the Optional (0x0031) WhitePointY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointY::Id); - } - case 43: { - LogStep(43, "DUT reads from the TH the Optional (0x0032) ColorPointRX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRX::Id); - } - case 44: { - LogStep(44, "DUT reads from the TH the Optional (0x0033) ColorPointRY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRY::Id); - } - case 45: { - LogStep(45, "DUT reads from the TH the Optional (0x0034) ColorPointRIntensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRIntensity::Id); - } - case 46: { - LogStep(46, "DUT reads from the TH the Optional (0x0036) ColorPointGX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGX::Id); - } - case 47: { - LogStep(47, "DUT reads from the TH the Optional (0x0037) ColorPointGY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGY::Id); - } - case 48: { - LogStep(48, "DUT reads from the TH the Optional (0x0038) ColorPointGIntensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGIntensity::Id); - } - case 49: { - LogStep(49, "DUT reads from the TH the Optional (0x003a) ColorPointBX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBX::Id); - } - case 50: { - LogStep(50, "DUT reads from the TH the Optional (0x003b) ColorPointBY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBY::Id); - } - case 51: { - LogStep(51, "DUT reads from the TH the Optional (0x003c) ColorPointBIntensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBIntensity::Id); + case 1: { + LogStep(1, "DUT reads OverrunCount attribute value from TH"); + VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::OverrunCount::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand +class Test_TC_LVL_2_3_SimulatedSuite : public TestCommand { public: - Test_TC_DGTHREAD_3_1_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_1_Simulated", 30) + Test_TC_LVL_2_3_SimulatedSuite() : TestCommand("Test_TC_LVL_2_3_Simulated", 24) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -5170,7 +1645,7 @@ class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_1_SimulatedSuite() {} + ~Test_TC_LVL_2_3_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -5190,7 +1665,15 @@ class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 0: + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -5210,190 +1693,133 @@ class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); + LogStep(0, "Read mandatory attribute CurrentLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id); } case 1: { - LogStep(1, "DUT reads Channel attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::Channel::Id); + LogStep(1, "Read mandatory attribute OnLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); } case 2: { - LogStep(2, "DUT reads RoutingRole attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RoutingRole::Id); + LogStep(2, "Read mandatory attribute Options"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); } case 3: { - LogStep(3, "DUT reads NetworkName attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::NetworkName::Id); + LogStep(3, "Read optional attribute RemainingTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::RemainingTime::Id); } case 4: { - LogStep(4, "DUT reads PanId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::PanId::Id); + LogStep(4, "Read optional attribute StartUpCurrentLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); } case 5: { - LogStep(5, "DUT reads ExtendedPanId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id); + LogStep(5, "Read optional attribute CurrentFrequency"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentFrequency::Id); } case 6: { - LogStep(6, "DUT reads MeshLocalPrefix attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id); + LogStep(6, "Read optional attribute MinFrequency"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinFrequency::Id); } case 7: { - LogStep(7, "DUT reads OverrunCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::OverrunCount::Id); + LogStep(7, "Read optional attribute MaxFrequency"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxFrequency::Id); } case 8: { - LogStep(8, "DUT reads NeighborTable attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::NeighborTable::Id); + LogStep(8, "Read optional attribute MinLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id); } case 9: { - LogStep(9, "DUT reads RouteTable attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RouteTable::Id); + LogStep(9, "Read optional attribute MaxLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id); } case 10: { - LogStep(10, "DUT reads PartitionId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PartitionId::Id); + LogStep(10, "Read optional attribute OnOffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); } case 11: { - LogStep(11, "DUT reads Weighting attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::Weighting::Id); + LogStep(11, "Read optional attribute OnTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); } case 12: { - LogStep(12, "DUT reads DataVersion attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::DataVersion::Id); + LogStep(12, "Read optional attribute OffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); } case 13: { - LogStep(13, "DUT reads StableDataVersion attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id); + LogStep(13, "Read optional attribute DefaultMoveRate"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); } case 14: { - LogStep(14, "DUT reads LeaderRouterId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id); + LogStep(14, "Write mandatory attribute OnLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); } case 15: { - LogStep(15, "DUT reads DetachedRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id); + LogStep(15, "Write mandatory attribute Options"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); } case 16: { - LogStep(16, "DUT reads ChildRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id); + LogStep(16, "Write optional attribute OnOffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); } case 17: { - LogStep(17, "DUT reads RouterRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id); + LogStep(17, "Write optional attribute OnTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); } case 18: { - LogStep(18, "DUT reads LeaderRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id); + LogStep(18, "Write optional attribute OffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); } case 19: { - LogStep(19, "DUT reads AttachAttemptCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id); + LogStep(19, "Write optional attribute DefaultMoveRate"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); } case 20: { - LogStep(20, "DUT reads PartitionIdChangeCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id); + LogStep(20, "Write optional attribute StartUpCurrentLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); } case 21: { - LogStep(21, "DUT reads BetterPartitionAttachAttemptCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id); + LogStep(21, + "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " + "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " + "DUT to TH again"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 22: { - LogStep(22, "DUT reads ParentChangeCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id); + LogStep(22, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 23: { - LogStep(23, "DUT reads ActiveTimestamp attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id); - } - case 24: { - LogStep(24, "DUT reads PendingTimestamp attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0039"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id); - } - case 25: { - LogStep(25, "DUT reads Delay attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::Delay::Id); - } - case 26: { - LogStep(26, "DUT reads SecurityPolicy attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id); - } - case 27: { - LogStep(27, "DUT reads ChannelPage0Mask attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id); - } - case 28: { - LogStep(28, "DUT reads OperationalDatasetComponents attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id); - } - case 29: { - LogStep(29, "DUT reads ActiveNetworkFaults attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id); + LogStep(23, + "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " + "specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; } }; -class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand +class Test_TC_OO_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DRLK_3_1_SimulatedSuite() : TestCommand("Test_TC_DRLK_3_1_Simulated", 37) + Test_TC_OO_3_2_SimulatedSuite() : TestCommand("Test_TC_OO_3_2_Simulated", 6) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -5401,7 +1827,7 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DRLK_3_1_SimulatedSuite() {} + ~Test_TC_OO_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -5421,10 +1847,6 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -5441,190 +1863,34 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); + LogStep(0, "DUT issues an Off command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id); } case 1: { - LogStep(1, "DUT reads LockState attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LockState::Id); + LogStep(1, "DUT issues an On command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 2: { - LogStep(2, "DUT reads LockType attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LockType::Id); + LogStep(2, "DUT issues an Toggle command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Toggle::Id); } case 3: { - LogStep(3, "DUT reads ActuatorEnabled attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::ActuatorEnabled::Id); + LogStep(3, "DUT issues an OffWithEffect command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C40.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id); } case 4: { - LogStep(4, "DUT reads DoorState attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DoorState::Id); + LogStep(4, "DUT issues an OnWithRecallGlobalScene command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithRecallGlobalScene::Id); } case 5: { - LogStep(5, "DUT reads DoorOpenEvents attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DoorOpenEvents::Id); - } - case 6: { - LogStep(6, "DUT reads DoorClosedEvents attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DoorClosedEvents::Id); - } - case 7: { - LogStep(7, "DUT reads OpenPeriod attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::OpenPeriod::Id); - } - case 8: { - LogStep(8, "DUT reads NumberOfTotalUsersSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfTotalUsersSupported::Id); - } - case 9: { - LogStep(9, "DUT reads NumberofPINUsersSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfPINUsersSupported::Id); - } - case 10: { - LogStep(10, "DUT reads NumberofRFIDUsersSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F01 && DRLK.C.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfRFIDUsersSupported::Id); - } - case 11: { - LogStep(11, "DUT reads NumberofWeekDaysSchedulesSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F04 && DRLK.C.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id); - } - case 12: { - LogStep(12, "DUT reads NumberofYearDaysSchedulesSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F04 && DRLK.C.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id); - } - case 13: { - LogStep(13, "DUT reads NumberofHolidaySchedulesSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F04 && DRLK.C.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id); - } - case 14: { - LogStep(14, "DUT reads MaxPINCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MaxPINCodeLength::Id); - } - case 15: { - LogStep(15, "DUT reads MinPINCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MinPINCodeLength::Id); - } - case 16: { - LogStep(16, "DUT reads MaxRFIDCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F01 && DRLK.C.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MaxRFIDCodeLength::Id); - } - case 17: { - LogStep(17, "DUT reads MinRFIDCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F01 && DRLK.C.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MinRFIDCodeLength::Id); - } - case 18: { - LogStep(18, "DUT reads CredentialRulesSupport attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F08 && DRLK.C.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::CredentialRulesSupport::Id); - } - case 19: { - LogStep(19, "DUT reads Language attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::Language::Id); - } - case 20: { - LogStep(20, "DUT reads LEDSettings attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LEDSettings::Id); - } - case 21: { - LogStep(21, "DUT reads AutoRelockTime attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::AutoRelockTime::Id); - } - case 22: { - LogStep(22, "DUT reads SoundVolume attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::SoundVolume::Id); - } - case 23: { - LogStep(23, "DUT reads OperatingMode attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::OperatingMode::Id); - } - case 24: { - LogStep(24, "DUT reads SupportedOperatingModes attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::SupportedOperatingModes::Id); - } - case 25: { - LogStep(25, "DUT reads DefaultConfigurationRegister attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DefaultConfigurationRegister::Id); - } - case 26: { - LogStep(26, "DUT reads EnableLocalProgramming attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnableLocalProgramming::Id); - } - case 27: { - LogStep(27, "DUT reads EnableOneTouchLocking attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnableOneTouchLocking::Id); - } - case 28: { - LogStep(28, "DUT reads EnableInsideStatusLED attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnableInsideStatusLED::Id); - } - case 29: { - LogStep(29, "DUT reads EnablePrivacyModeButton attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnablePrivacyModeButton::Id); - } - case 30: { - LogStep(30, "DUT reads LocalProgrammingFeatures attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LocalProgrammingFeatures::Id); - } - case 31: { - LogStep(31, "DUT reads WrongCodeEntryLimit attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.F01 && DRLK.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id); - } - case 32: { - LogStep(32, "DUT reads UserCodeTemporaryDisableTime attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.F01 && DRLK.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::UserCodeTemporaryDisableTime::Id); - } - case 33: { - LogStep(33, "DUT reads SendPINOverTheAir attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F07 && DRLK.C.F00 && DRLK.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::SendPINOverTheAir::Id); - } - case 34: { - LogStep(34, "DUT reads RequirePINForRemoteOperation attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F07 && DRLK.C.F00 && DRLK.C.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::RequirePINforRemoteOperation::Id); - } - case 35: { - LogStep(35, "DUT reads ExpiringUserTimeOut attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F08 && DRLK.C.A0035"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::ExpiringUserTimeout::Id); - } - case 36: { - LogStep(36, "DUT reads NumberOfCredentialsSupportedPerUser attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F08 && DRLK.C.A001c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id); + LogStep(5, "DUT issues an OnWithTimedOff command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id); } } return CHIP_NO_ERROR; @@ -5633,98 +1899,14 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand std::unique_ptr GetTestCommand(std::string testName) { - if (testName == "Test_TC_ACT_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_ACT_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_BOOL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_BOOL_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DESC_2_2_Simulated") - { - return std::unique_ptr(new Test_TC_DESC_2_2_SimulatedSuite()); - } - if (testName == "Test_TC_DGETH_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGETH_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DGSW_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGSW_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DGWIFI_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGWIFI_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_FLW_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_FLW_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_G_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_G_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_I_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_I_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PRS_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PRS_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PSCFG_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PSCFG_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_RH_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_RH_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_SWTCH_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_SWTCH_3_1_SimulatedSuite()); - } if (testName == "Test_TC_WNCV_5_1_Simulated") { return std::unique_ptr(new Test_TC_WNCV_5_1_SimulatedSuite()); } - if (testName == "Test_TC_LCFG_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_LCFG_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_LUNIT_1_1_Simulated") - { - return std::unique_ptr(new Test_TC_LUNIT_1_1_SimulatedSuite()); - } - if (testName == "Test_TC_LUNIT_2_1_Simulated") - { - return std::unique_ptr(new Test_TC_LUNIT_2_1_SimulatedSuite()); - } - if (testName == "Test_TC_OCC_2_2_Simulated") - { - return std::unique_ptr(new Test_TC_OCC_2_2_SimulatedSuite()); - } if (testName == "Test_TC_OCC_2_4_Simulated") { return std::unique_ptr(new Test_TC_OCC_2_4_SimulatedSuite()); } - if (testName == "Test_TC_ULABEL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_ULABEL_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_FLABEL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_FLABEL_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_LTIME_1_1_Simulated") - { - return std::unique_ptr(new Test_TC_LTIME_1_1_SimulatedSuite()); - } - if (testName == "Test_TC_ILL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_ILL_3_1_SimulatedSuite()); - } if (testName == "Test_TC_DGSW_3_2_Simulated") { return std::unique_ptr(new Test_TC_DGSW_3_2_SimulatedSuite()); @@ -5769,14 +1951,6 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_CC_9_4_SimulatedSuite()); } - if (testName == "Test_TC_DGTHREAD_3_2_Simulated") - { - return std::unique_ptr(new Test_TC_DGTHREAD_3_2_SimulatedSuite()); - } - if (testName == "Test_TC_DGTHREAD_3_3_Simulated") - { - return std::unique_ptr(new Test_TC_DGTHREAD_3_3_SimulatedSuite()); - } if (testName == "Test_TC_DGTHREAD_3_4_Simulated") { return std::unique_ptr(new Test_TC_DGTHREAD_3_4_SimulatedSuite()); @@ -5785,38 +1959,10 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_LVL_2_3_SimulatedSuite()); } - if (testName == "Test_TC_OO_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_OO_3_1_SimulatedSuite()); - } if (testName == "Test_TC_OO_3_2_Simulated") { return std::unique_ptr(new Test_TC_OO_3_2_SimulatedSuite()); } - if (testName == "Test_TC_TSUIC_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_TSUIC_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PCC_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PCC_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_TMP_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_TMP_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_CC_2_2_Simulated") - { - return std::unique_ptr(new Test_TC_CC_2_2_SimulatedSuite()); - } - if (testName == "Test_TC_DGTHREAD_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGTHREAD_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DRLK_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DRLK_3_1_SimulatedSuite()); - } return nullptr; } @@ -5824,29 +1970,8 @@ std::unique_ptr GetTestCommand(std::string testName) void PrintTestCommands() { ChipLogError(chipTool, "Supported commands:"); - ChipLogError(chipTool, "\t* Test_TC_ACT_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_BOOL_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DESC_2_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGETH_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGSW_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGWIFI_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_FLW_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_G_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_I_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PRS_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PSCFG_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_RH_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_SWTCH_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_WNCV_5_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LCFG_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LUNIT_1_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LUNIT_2_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_OCC_2_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_OCC_2_4_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_ULABEL_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_FLABEL_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LTIME_1_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_ILL_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGSW_3_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGETH_3_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGWIFI_3_2_Simulated"); @@ -5858,16 +1983,7 @@ void PrintTestCommands() ChipLogError(chipTool, "\t* Test_TC_CC_6_4_Simulated"); ChipLogError(chipTool, "\t* Test_TC_CC_7_5_Simulated"); ChipLogError(chipTool, "\t* Test_TC_CC_9_4_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_3_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_4_Simulated"); ChipLogError(chipTool, "\t* Test_TC_LVL_2_3_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_OO_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_OO_3_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_TSUIC_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PCC_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_TMP_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_CC_2_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DRLK_3_1_Simulated"); } diff --git a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h index c7509b6750793a..85b6ca3fc694ae 100644 --- a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h @@ -23,10 +23,10 @@ #include -class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand +class Test_TC_WNCV_5_1_SimulatedSuite : public TestCommand { public: - Test_TC_ACT_3_1_SimulatedSuite() : TestCommand("Test_TC_ACT_3_1_Simulated", 6) + Test_TC_WNCV_5_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_5_1_Simulated", 5) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -34,7 +34,7 @@ class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_3_1_SimulatedSuite() {} + ~Test_TC_WNCV_5_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -54,18 +54,6 @@ class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -82,64 +70,39 @@ class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: ActionList"); - VerifyOrDo(!ShouldSkip("ACT.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::ActionList::Id); + LogStep(0, "DUT reads the FeatureMap attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::FeatureMap::Id); } case 1: { - LogStep(1, "Read attribute: EndpointLists"); - VerifyOrDo(!ShouldSkip("ACT.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::EndpointLists::Id); + LogStep(1, "DUT reads the Type attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Type::Id); } case 2: { - LogStep(2, "Read attribute: SetupURL"); - VerifyOrDo(!ShouldSkip("ACT.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::SetupURL::Id); + LogStep(2, "DUT reads the EndProductType attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::EndProductType::Id); } case 3: { - LogStep(3, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(3, "DUT reads the Mode attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Mode::Id); } case 4: { - LogStep(4, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACT.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACT.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(4, "DUT reads the ConfigStatus attribute from TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand +class Test_TC_OCC_2_4_SimulatedSuite : public TestCommand { public: - Test_TC_BOOL_3_1_SimulatedSuite() : TestCommand("Test_TC_BOOL_3_1_Simulated", 4) + Test_TC_OCC_2_4_SimulatedSuite() : TestCommand("Test_TC_OCC_2_4_Simulated", 2) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -147,7 +110,7 @@ class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BOOL_3_1_SimulatedSuite() {} + ~Test_TC_OCC_2_4_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -167,18 +130,6 @@ class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -195,54 +146,24 @@ class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: StateValue"); - VerifyOrDo(!ShouldSkip("BOOL.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), BooleanState::Id, BooleanState::Attributes::StateValue::Id); + LogStep(0, "TH reads OccupancySensorType attribute from DUT"); + VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); } case 1: { - LogStep(1, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(1, "TH reads OccupancySensorTypeBitmap attribute from DUT"); + VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand +class Test_TC_DGSW_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DESC_2_2_SimulatedSuite() : TestCommand("Test_TC_DESC_2_2_Simulated", 5) + Test_TC_DGSW_3_2_SimulatedSuite() : TestCommand("Test_TC_DGSW_3_2_Simulated", 1) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -250,7 +171,7 @@ class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_2_2_SimulatedSuite() {} + ~Test_TC_DGSW_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -270,10 +191,6 @@ class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -290,44 +207,19 @@ class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "DUT reads DeviceTypeList from TH."); - VerifyOrDo(!ShouldSkip("DESC.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::DeviceTypeList::Id); - } - case 1: { - LogStep(1, "DUT reads ServerList from the TH"); - VerifyOrDo(!ShouldSkip("DESC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ServerList::Id); - } - case 2: { - LogStep(2, "DUT reads ClientList attribute from the TH"); - VerifyOrDo(!ShouldSkip("DESC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ClientList::Id); - } - case 3: { - LogStep(3, "DUT reads PartsList attribute from the TH"); - VerifyOrDo(!ShouldSkip("DESC.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::PartsList::Id); - } - case 4: { - LogStep(4, "DUT reads TagList from the TH"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(0, "DUT sends ResetWatermarks to TH"); + VerifyOrDo(!ShouldSkip("DGSW.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Commands::ResetWatermarks::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGETH_3_1_SimulatedSuite : public TestCommand +class Test_TC_DGETH_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DGETH_3_1_SimulatedSuite() : TestCommand("Test_TC_DGETH_3_1_Simulated", 9) + Test_TC_DGETH_3_2_SimulatedSuite() : TestCommand("Test_TC_DGETH_3_2_Simulated", 1) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -335,7 +227,7 @@ class Test_TC_DGETH_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_3_1_SimulatedSuite() {} + ~Test_TC_DGETH_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -371,68 +263,20 @@ class Test_TC_DGETH_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: PHYRate"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PHYRate::Id); - } - case 1: { - LogStep(1, "Read attribute: FullDuplex"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::FullDuplex::Id); - } - case 2: { - LogStep(2, "Read attribute: PacketRxCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id); - } - case 3: { - LogStep(3, "Read attribute: PacketTxCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id); - } - case 4: { - LogStep(4, "Read attribute: TxErrCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::TxErrCount::Id); - } - case 5: { - LogStep(5, "Read attribute: CollisionCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::CollisionCount::Id); - } - case 6: { - LogStep(6, "Read attribute: OverrunCount"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::OverrunCount::Id); - } - case 7: { - LogStep(7, "Read attribute: CarrierDetect"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id); - } - case 8: { - LogStep(8, "Read attribute: TimeSinceReset"); - VerifyOrDo(!ShouldSkip("DGETH.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id); + LogStep(0, "DUT sends ResetCounts to TH"); + VerifyOrDo(!ShouldSkip("DGETH.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Commands::ResetCounts::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand +class Test_TC_DGWIFI_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DGSW_3_1_SimulatedSuite() : TestCommand("Test_TC_DGSW_3_1_Simulated", 4) + Test_TC_DGWIFI_3_2_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_2_Simulated", 1) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -440,7 +284,7 @@ class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGSW_3_1_SimulatedSuite() {} + ~Test_TC_DGWIFI_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -476,35 +320,19 @@ class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: ThreadMetrics"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::ThreadMetrics::Id); - } - case 1: { - LogStep(1, "Read attribute: CurrentHeapFree"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapFree::Id); - } - case 2: { - LogStep(2, "Read attribute: CurrentHeapUsed"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id); - } - case 3: { - LogStep(3, "Read attribute: CurrentHeapHighWatermark"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id); + LogStep(0, "DUT sends ResetCounts command to TH"); + VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Commands::ResetCounts::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand +class Test_TC_WNCV_6_1_SimulatedSuite : public TestCommand { public: - Test_TC_DGWIFI_3_1_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_1_Simulated", 13) + Test_TC_WNCV_6_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_6_1_Simulated", 3) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -512,7 +340,7 @@ class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGWIFI_3_1_SimulatedSuite() {} + ~Test_TC_WNCV_6_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -548,85 +376,29 @@ class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: BSSID"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Bssid::Id); + LogStep(0, "DUT sends UpOrOpen command to TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::UpOrOpen::Id); } case 1: { - LogStep(1, "Read attribute: SecurityType"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::SecurityType::Id); + LogStep(1, "DUT sends DownOrClose command to TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id); } case 2: { - LogStep(2, "Read attribute: WiFiVersion"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id); - } - case 3: { - LogStep(3, "Read attribute: ChannelNumber"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id); - } - case 4: { - LogStep(4, "Read attribute: RSSI"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Rssi::Id); - } - case 5: { - LogStep(5, "Read attribute: BeaconLostCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id); - } - case 6: { - LogStep(6, "Read attribute: BeaconRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id); - } - case 7: { - LogStep(7, "Read attribute: PacketMulticastRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id); - } - case 8: { - LogStep(8, "Read attribute: PacketMulticastTxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id); - } - case 9: { - LogStep(9, "Read attribute: PacketUnicastRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id); - } - case 10: { - LogStep(10, "Read attribute: PacketUnicastTxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id); - } - case 11: { - LogStep(11, "Read attribute: CurrentMaxRate"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id); - } - case 12: { - LogStep(12, "Read attribute: OverrunCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::OverrunCount::Id); + LogStep(2, "DUT sends StopMotion command to TH"); + VerifyOrDo(!ShouldSkip("WNCV.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::StopMotion::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand +class Test_TC_WNCV_7_1_SimulatedSuite : public TestCommand { public: - Test_TC_FLW_3_1_SimulatedSuite() : TestCommand("Test_TC_FLW_3_1_Simulated", 7) + Test_TC_WNCV_7_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_7_1_Simulated", 2) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -634,7 +406,7 @@ class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_FLW_3_1_SimulatedSuite() {} + ~Test_TC_WNCV_7_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -654,18 +426,6 @@ class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -682,83 +442,40 @@ class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MeasuredValue::Id); + LogStep(0, "If (PA_LF & LF) DUT sends GoToLiftPercentage command with 50% to DUT"); + VerifyOrDo(!ShouldSkip("WNCV.C.C05.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToLiftPercentage::Id); } case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute: Tolerance"); - VerifyOrDo(!ShouldSkip("FLW.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && FLW.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(1, "If (PA_TL & TL) DUT sends GoToTiltPercentage command with 50% to DUT"); + VerifyOrDo(!ShouldSkip("WNCV.C.C08.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToTiltPercentage::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_G_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_3_4_SimulatedSuite : public TestCommand { public: - Test_TC_G_3_1_SimulatedSuite() : TestCommand("Test_TC_G_3_1_Simulated", 1) + Test_TC_CC_3_4_SimulatedSuite() : TestCommand("Test_TC_CC_3_4_Simulated", 16) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_G_3_1_SimulatedSuite() {} + ~Test_TC_CC_3_4_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -772,71 +489,19 @@ class Test_TC_G_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads NameSupport attribute value from TH"); - VerifyOrDo(!ShouldSkip("G.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_I_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_I_3_1_SimulatedSuite() : TestCommand("Test_TC_I_3_1_Simulated", 7) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_I_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 5: + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -856,83 +521,121 @@ class Test_TC_I_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: IdentifyTime"); - VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute: identifytype"); - VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyType::Id); + LogStep(1, "DUT sends MoveToHue command to TH an Hue with _TransitionTime 300"); + VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id); } case 2: { - LogStep(2, "write attribute: IdentifyTime"); - VerifyOrDo(!ShouldSkip("I.C.AM-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); + LogStep(2, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 3: { - LogStep(3, "Readback attribute: IdentifyTime"); - VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); + LogStep(3, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(4, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(5, "DUT sends MoveHue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id); } case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 7: { + LogStep(7, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 9: { + LogStep(9, "DUT sends StepHue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id); + } + case 10: { + LogStep(10, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 11: { + LogStep(11, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "DUT reads CurrentHue attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); + } + case 13: { + LogStep(13, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); + } + case 14: { + LogStep(14, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 15: { + LogStep(15, "Over TransitionTime, DUT reads CurrentHue attribute from TH"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_4_5_SimulatedSuite : public TestCommand { public: - Test_TC_PRS_3_1_SimulatedSuite() : TestCommand("Test_TC_PRS_3_1_Simulated", 12) + Test_TC_CC_4_5_SimulatedSuite() : TestCommand("Test_TC_CC_4_5_Simulated", 22) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_PRS_3_1_SimulatedSuite() {} + ~Test_TC_CC_4_5_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -946,11 +649,11 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 9: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -958,6 +661,14 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -974,3183 +685,154 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MeasuredValue::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinMeasuredValue::Id); + LogStep(1, "DUT sends MoveToSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id); } case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxMeasuredValue::Id); + LogStep(2, "DUT reads CurrentSaturation attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 3: { - LogStep(3, "Read attribute: Tolerance"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Tolerance::Id); + LogStep(3, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, "Read attribute: ScaledValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledValue::Id); + LogStep(4, "DUT reads CurrentSaturation attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 5: { - LogStep(5, "Read attribute: MinScaledValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinScaledValue::Id); + LogStep(5, "DUT sends MoveSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id); } case 6: { - LogStep(6, "Read attribute: MaxScaledValue"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxScaledValue::Id); + LogStep(6, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 7: { - LogStep(7, "Read attribute: ScaledTolerance"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledTolerance::Id); + LogStep(7, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { - LogStep(8, "Read attribute: Scale"); - VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Scale::Id); + LogStep(8, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 9: { - LogStep(9, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(9, "DUT sends StepSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id); } case 10: { - LogStep(10, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(10, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 11: { - LogStep(11, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PSCFG_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_PSCFG_3_1_SimulatedSuite() : TestCommand("Test_TC_PSCFG_3_1_Simulated", 4) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PSCFG_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute: Sources"); - VerifyOrDo(!ShouldSkip("PSCFG.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PowerSourceConfiguration::Id, PowerSourceConfiguration::Attributes::Sources::Id); - } - case 1: { - LogStep(1, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RH_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_RH_3_1_SimulatedSuite() : TestCommand("Test_TC_RH_3_1_Simulated", 7) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RH_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute MeasuredValue"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MeasuredValue::Id); - } - case 1: { - LogStep(1, "Read attribute MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute Tolerance"); - return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SWTCH_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_SWTCH_3_1_SimulatedSuite() : TestCommand("Test_TC_SWTCH_3_1_Simulated", 6) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Read NumberOfPositions attribute"); - VerifyOrDo(!ShouldSkip("SWTCH.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::NumberOfPositions::Id); - } - case 1: { - LogStep(1, "Read CurrentPosition attribute"); - VerifyOrDo(!ShouldSkip("SWTCH.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::CurrentPosition::Id); - } - case 2: { - LogStep(2, "Read MultiPressMax attribute"); - VerifyOrDo(!ShouldSkip("SWTCH.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::MultiPressMax::Id); - } - case 3: { - LogStep(3, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && SWTCH.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_5_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_WNCV_5_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_5_1_Simulated", 5) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_5_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads the FeatureMap attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::FeatureMap::Id); - } - case 1: { - LogStep(1, "DUT reads the Type attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Type::Id); - } - case 2: { - LogStep(2, "DUT reads the EndProductType attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::EndProductType::Id); - } - case 3: { - LogStep(3, "DUT reads the Mode attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::Mode::Id); - } - case 4: { - LogStep(4, "DUT reads the ConfigStatus attribute from TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LCFG_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LCFG_3_1_SimulatedSuite() : TestCommand("Test_TC_LCFG_3_1_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LCFG_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads SupportedLocales attribute from TH"); - VerifyOrDo(!ShouldSkip("LCFG.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::SupportedLocales::Id); - } - case 1: { - LogStep(1, "DUT reads ActiveLocale attribute from TH"); - VerifyOrDo(!ShouldSkip("LCFG.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::ActiveLocale::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LUNIT_1_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LUNIT_1_1_SimulatedSuite() : TestCommand("Test_TC_LUNIT_1_1_Simulated", 5) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LUNIT_1_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT read (0xFFFD) ClusterRevision attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::ClusterRevision::Id); - } - case 1: { - LogStep(1, "DUT read (0xFFFC) FeatureMap attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id); - } - case 2: { - LogStep(2, "DUT read (0xFFFB) AttributeList attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::AttributeList::Id); - } - case 3: { - LogStep(3, "DUT read (0xFFF9) AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::AcceptedCommandList::Id); - } - case 4: { - LogStep(4, "DUT read (0xFFF8) GeneratedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::GeneratedCommandList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LUNIT_2_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LUNIT_2_1_SimulatedSuite() : TestCommand("Test_TC_LUNIT_2_1_Simulated", 3) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LUNIT_2_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads TemperatureUnit attribute from TH"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); - } - case 1: { - LogStep(1, "DUT writes 2 to TemperatureUnit attribute on TH"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); - } - case 2: { - LogStep(2, "DUT reads TemperatureUnit attribute from TH"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_2_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_OCC_2_2_SimulatedSuite() : TestCommand("Test_TC_OCC_2_2_Simulated", 12) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_2_2_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads from the TH the (0x0000) Occupancy attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id); - } - case 1: { - LogStep(1, "DUT reads from the TH the (0x0001) OccupancySensorType attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); - } - case 2: { - LogStep(2, "DUT reads from the TH the (0x0002) OccupancySensorTypeBitmap attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); - } - case 3: { - LogStep(3, "DUT reads from the TH the (0x0010) PIROccupiedToUnoccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id); - } - case 4: { - LogStep(4, "DUT reads from the TH the (0x0011) PIRUnoccupiedToOccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id); - } - case 5: { - LogStep(5, "DUT reads from the TH the (0x0012) PIRUnoccupiedToOccupiedThreshold optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id); - } - case 6: { - LogStep(6, "DUT reads from the TH the (0x0020) UltrasonicOccupiedToUnoccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id); - } - case 7: { - LogStep(7, "DUT reads from the TH the (0x0021) UltrasonicUnoccupiedToOccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id); - } - case 8: { - LogStep(8, "DUT reads from the TH the (0x0022) UltrasonicUnoccupiedToOccupiedThreshold optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id); - } - case 9: { - LogStep(9, "DUT reads from the TH the (0x0030) PhysicalContactOccupiedToUnoccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id); - } - case 10: { - LogStep(10, "DUT reads from the TH the (0x0031) PhysicalContactUnoccupiedToOccupiedDelay optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id); - } - case 11: { - LogStep(11, "DUT reads from the TH the (0x0032) PhysicalContactUnoccupiedToOccupiedThreshold optional attribute"); - VerifyOrDo(!ShouldSkip("OCC.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_2_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_OCC_2_4_SimulatedSuite() : TestCommand("Test_TC_OCC_2_4_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_2_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "TH reads OccupancySensorType attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); - } - case 1: { - LogStep(1, "TH reads OccupancySensorTypeBitmap attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ULABEL_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_ULABEL_3_1_SimulatedSuite() : TestCommand("Test_TC_ULABEL_3_1_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ULABEL_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Read attribute: LabelList"); - VerifyOrDo(!ShouldSkip("ULABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id); - } - case 1: { - LogStep(1, "Step 2: write attribute: LabelList"); - VerifyOrDo(!ShouldSkip("ULABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FLABEL_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_FLABEL_3_1_SimulatedSuite() : TestCommand("Test_TC_FLABEL_3_1_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FLABEL_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads LabelList from the TH"); - VerifyOrDo(!ShouldSkip("FLABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::LabelList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LTIME_1_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LTIME_1_1_SimulatedSuite() : TestCommand("Test_TC_LTIME_1_1_Simulated", 5) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LTIME_1_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT read (0xFFFD) ClusterRevision attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::ClusterRevision::Id); - } - case 1: { - LogStep(1, "DUT read (0xFFFC) FeatureMap attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::FeatureMap::Id); - } - case 2: { - LogStep(2, "DUT read (0xFFFB) AttributeList attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::AttributeList::Id); - } - case 3: { - LogStep(3, "DUT read (0xFFF9) AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::AcceptedCommandList::Id); - } - case 4: { - LogStep(4, "DUT read (0xFFF8) GeneratedCommandList attribute"); - VerifyOrDo(!ShouldSkip("LTIME.C.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::GeneratedCommandList::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ILL_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_ILL_3_1_SimulatedSuite() : TestCommand("Test_TC_ILL_3_1_Simulated", 8) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ILL_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::MeasuredValue::Id); - } - case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute: Tolerance"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, "Read attribute: LightSensorType"); - return WaitAttribute(GetEndpoint(0), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::LightSensorType::Id); - } - case 5: { - LogStep(5, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGSW_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGSW_3_2_SimulatedSuite() : TestCommand("Test_TC_DGSW_3_2_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGSW_3_2_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetWatermarks to TH"); - VerifyOrDo(!ShouldSkip("DGSW.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Commands::ResetWatermarks::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGETH_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGETH_3_2_SimulatedSuite() : TestCommand("Test_TC_DGETH_3_2_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGETH_3_2_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetCounts to TH"); - VerifyOrDo(!ShouldSkip("DGETH.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Commands::ResetCounts::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGWIFI_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGWIFI_3_2_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_2_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGWIFI_3_2_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetCounts command to TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Commands::ResetCounts::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_6_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_WNCV_6_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_6_1_Simulated", 3) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_6_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends UpOrOpen command to TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::UpOrOpen::Id); - } - case 1: { - LogStep(1, "DUT sends DownOrClose command to TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id); - } - case 2: { - LogStep(2, "DUT sends StopMotion command to TH"); - VerifyOrDo(!ShouldSkip("WNCV.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::StopMotion::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_7_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_WNCV_7_1_SimulatedSuite() : TestCommand("Test_TC_WNCV_7_1_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_7_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "If (PA_LF & LF) DUT sends GoToLiftPercentage command with 50% to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.C.C05.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToLiftPercentage::Id); - } - case 1: { - LogStep(1, "If (PA_TL & TL) DUT sends GoToTiltPercentage command with 50% to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.C.C08.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WindowCovering::Id, WindowCovering::Commands::GoToTiltPercentage::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_3_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_3_4_SimulatedSuite() : TestCommand("Test_TC_CC_3_4_Simulated", 16) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_3_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - chip::Optional mConfigTransitionTime; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToHue command to TH an Hue with _TransitionTime 300"); - VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id); - } - case 2: { - LogStep(2, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 3: { - LogStep(3, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C00.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 5: { - LogStep(5, "DUT sends MoveHue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id); - } - case 6: { - LogStep(6, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 7: { - LogStep(7, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C01.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 9: { - LogStep(9, "DUT sends StepHue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id); - } - case 10: { - LogStep(10, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 11: { - LogStep(11, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads CurrentHue attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C02.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 13: { - LogStep(13, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 14: { - LogStep(14, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Over TransitionTime, DUT reads CurrentHue attribute from TH"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_4_5_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_4_5_SimulatedSuite() : TestCommand("Test_TC_CC_4_5_Simulated", 22) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_4_5_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - chip::Optional mConfigTransitionTime; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id); - } - case 2: { - LogStep(2, "DUT reads CurrentSaturation attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 3: { - LogStep(3, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads CurrentSaturation attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C03.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 5: { - LogStep(5, "DUT sends MoveSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id); - } - case 6: { - LogStep(6, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 7: { - LogStep(7, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C04.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 9: { - LogStep(9, "DUT sends StepSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id); - } - case 10: { - LogStep(10, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 11: { - LogStep(11, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 13: { - LogStep(13, "DUT sends MoveToHueAndSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHueAndSaturation::Id); - } - case 14: { - LogStep(14, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 15: { - LogStep(15, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads CurrentSaturation attribute from TH several times."); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 18: { - LogStep(18, "DUT reads CurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 19: { - LogStep(19, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 20: { - LogStep(20, "Wait for ConfigTransitionTime"); - VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Over TransitionTime, DUT reads CurrentSaturation attribute from TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_5_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_5_4_SimulatedSuite() : TestCommand("Test_TC_CC_5_4_Simulated", 25) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_5_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mConfigTransitionTime; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToColor command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id); - } - case 2: { - LogStep(2, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 3: { - LogStep(3, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 4: { - LogStep(4, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 6: { - LogStep(6, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 7: { - LogStep(7, "DUT sends MoveColor command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id); - } - case 8: { - LogStep(8, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 9: { - LogStep(9, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 10: { - LogStep(10, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 12: { - LogStep(12, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 13: { - LogStep(13, "DUT sends StepColor command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColor::Id); - } - case 14: { - LogStep(14, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 15: { - LogStep(15, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 18: { - LogStep(18, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 19: { - LogStep(19, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 20: { - LogStep(20, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 21: { - LogStep(21, "DUT reads CurrentY attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 22: { - LogStep(22, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "DUT reads CurrentX attribute from TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 24: { - LogStep( - 24, - "DUT reads CurrentY attribute from ConfiguredTime: type: int16u defaultValue: 30000TH(potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_6_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_6_4_SimulatedSuite() : TestCommand("Test_TC_CC_6_4_Simulated", 18) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_6_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mConfigTransitionTime; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, - "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " - "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " - "attribute ColorTempPhysicalMinMireds from TH"); - VerifyOrDo(!ShouldSkip("CC.C.A400b && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id); - } - case 2: { - LogStep(2, - "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " - "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " - "attribute ColorTempPhysicalMaxMireds from TH"); - VerifyOrDo(!ShouldSkip("CC.C.A400c && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id); - } - case 3: { - LogStep(3, "DUT sends MoveToColorTemperature command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id); - } - case 4: { - LogStep(4, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 5: { - LogStep(5, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 7: { - LogStep(7, "DUT sends MoveColorTemperatureMireds command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id); - } - case 8: { - LogStep(8, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 9: { - LogStep(9, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 11: { - LogStep(11, "DUT sends StepColorTemperature command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id); - } - case 12: { - LogStep(12, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 13: { - LogStep(13, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 15: { - LogStep(15, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_7_5_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_7_5_SimulatedSuite() : TestCommand("Test_TC_CC_7_5_Simulated", 23) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); - } - - ~Test_TC_CC_7_5_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mConfigTransitionTime; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends MoveToEnhancedHue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id); - } - case 2: { - LogStep(2, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 3: { - LogStep(3, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 5: { - LogStep(5, "DUT sends MoveEnhanced Hue command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id); - } - case 6: { - LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 7: { - LogStep(7, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 9: { - LogStep(9, "DUT sends StepEnhanced command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id); - } - case 10: { - LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 11: { - LogStep(11, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 13: { - LogStep(13, "DUT sends EnhancedMoveToHueAndSaturation command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id); - } - case 14: { - LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 15: { - LogStep(15, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 16: { - LogStep(16, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 18: { - LogStep(18, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 19: { - LogStep(19, "DUT sends StopMoveStep command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); - } - case 20: { - LogStep(20, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 21: { - LogStep(21, "Wait for ConfigTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); - VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_9_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_CC_9_4_SimulatedSuite() : TestCommand("Test_TC_CC_9_4_Simulated", 19) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - } - - ~Test_TC_CC_9_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mCluster; - chip::Optional mEndpoint; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "PreCondition: Set TH OnOff to On"); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); - } - case 1: { - LogStep(1, "DUT sends ColorLoopSet command to TH"); - VerifyOrDo(!ShouldSkip("CC.C.C44.Tx && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id); - } - case 2: { - LogStep(2, "DUT reads ColorLoopActive attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4002 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id); - } - case 3: { - LogStep(3, "DUT reads ColorLoopDirection attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4003 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id); - } - case 4: { - LogStep(4, "DUT reads ColorLoopTime attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4004 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id); - } - case 5: { - LogStep(5, "DUT reads ColorLoopStartEnhancedHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4005 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id); - } - case 6: { - LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 7: { - LogStep(7, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 9: { - LogStep(9, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 11: { - LogStep(11, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 13: { - LogStep(13, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 15: { - LogStep(15, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 17: { - LogStep(17, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "DUT reads EnhancedCurrentHue attribute from TH periodically"); - VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGTHREAD_3_2_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_2_Simulated", 17) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_3_2_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads TxTotalCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id); - } - case 1: { - LogStep(1, "DUT reads TxUnicastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id); - } - case 2: { - LogStep(2, "DUT reads TxBroadcastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id); - } - case 3: { - LogStep(3, "DUT reads TxAckRequestedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id); - } - case 4: { - LogStep(4, "DUT reads TxAckedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id); - } - case 5: { - LogStep(5, "DUT reads TxNoAckRequestedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id); - } - case 6: { - LogStep(6, "DUT reads TxDataCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxDataCount::Id); - } - case 7: { - LogStep(7, "DUT reads TxDataPollCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id); - } - case 8: { - LogStep(8, "DUT reads TxBeaconCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id); - } - case 9: { - LogStep(9, "DUT reads TxBeaconRequestCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A001f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id); - } - case 10: { - LogStep(10, "DUT reads TxOtherCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id); - } - case 11: { - LogStep(11, "DUT reads TxRetryCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id); - } - case 12: { - LogStep(12, "DUT reads TxDirectMaxRetryExpiryCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id); - } - case 13: { - LogStep(13, "DUT reads TxIndirectMaxRetryExpiryCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id); - } - case 14: { - LogStep(14, "DUT reads TxErrCcaCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id); - } - case 15: { - LogStep(15, "DUT reads TxErrAbortCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id); - } - case 16: { - LogStep(16, "DUT reads TxErrBusyChannelCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_3_3_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGTHREAD_3_3_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_3_Simulated", 17) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_3_3_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads RxTotalCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id); - } - case 1: { - LogStep(1, "DUT reads RxUnicastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id); - } - case 2: { - LogStep(2, "DUT reads RxBroadcastCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id); - } - case 3: { - LogStep(3, "DUT reads RxDataCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDataCount::Id); - } - case 4: { - LogStep(4, "DUT reads RxDataPollCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id); - } - case 5: { - LogStep(5, "DUT reads RxBeaconCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id); - } - case 6: { - LogStep(6, "DUT reads RxBeaconRequestCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id); - } - case 7: { - LogStep(7, "DUT reads RxOtherCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id); - } - case 8: { - LogStep(8, "DUT reads RxAddressFilteredCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A002f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id); - } - case 9: { - LogStep(9, "DUT reads RxDestAddrFilteredCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id); - } - case 10: { - LogStep(10, "DUT reads RxDuplicatedCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id); - } - case 11: { - LogStep(11, "DUT reads RxErrNoFrameCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id); - } - case 12: { - LogStep(12, "DUT reads RxErrUnknownNeighborCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id); - } - case 13: { - LogStep(13, "DUT reads RxErrInvalidSrcAddrCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id); - } - case 14: { - LogStep(14, "DUT reads RxErrSecCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0035"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id); - } - case 15: { - LogStep(15, "DUT reads RxErrFcsCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id); - } - case 16: { - LogStep(16, "DUT reads RxErrOtherCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_3_4_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGTHREAD_3_4_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_4_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_3_4_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT sends ResetCounts command to TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Commands::ResetCounts::Id); - } - case 1: { - LogStep(1, "DUT reads OverrunCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::OverrunCount::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LVL_2_3_SimulatedSuite : public TestCommand -{ -public: - Test_TC_LVL_2_3_SimulatedSuite() : TestCommand("Test_TC_LVL_2_3_Simulated", 24) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LVL_2_3_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Read mandatory attribute CurrentLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id); - } - case 1: { - LogStep(1, "Read mandatory attribute OnLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); - } - case 2: { - LogStep(2, "Read mandatory attribute Options"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); - } - case 3: { - LogStep(3, "Read optional attribute RemainingTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::RemainingTime::Id); - } - case 4: { - LogStep(4, "Read optional attribute StartUpCurrentLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); - } - case 5: { - LogStep(5, "Read optional attribute CurrentFrequency"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentFrequency::Id); - } - case 6: { - LogStep(6, "Read optional attribute MinFrequency"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinFrequency::Id); - } - case 7: { - LogStep(7, "Read optional attribute MaxFrequency"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxFrequency::Id); - } - case 8: { - LogStep(8, "Read optional attribute MinLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id); - } - case 9: { - LogStep(9, "Read optional attribute MaxLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id); - } - case 10: { - LogStep(10, "Read optional attribute OnOffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); - } - case 11: { - LogStep(11, "Read optional attribute OnTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); - } - case 12: { - LogStep(12, "Read optional attribute OffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); + case 12: { + LogStep(12, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C05.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 13: { - LogStep(13, "Read optional attribute DefaultMoveRate"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); + LogStep(13, "DUT sends MoveToHueAndSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHueAndSaturation::Id); } case 14: { - LogStep(14, "Write mandatory attribute OnLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); + LogStep(14, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 15: { - LogStep(15, "Write mandatory attribute Options"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); + LogStep(15, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 16: { - LogStep(16, "Write optional attribute OnOffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); + LogStep(16, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { - LogStep(17, "Write optional attribute OnTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); + LogStep(17, "DUT reads CurrentSaturation attribute from TH several times."); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 18: { - LogStep(18, "Write optional attribute OffTransitionTime"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); + LogStep(18, "DUT reads CurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.C06.Tx && CC.C.A0000 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); } case 19: { - LogStep(19, "Write optional attribute DefaultMoveRate"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); + LogStep(19, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); } case 20: { - LogStep(20, "Write optional attribute StartUpCurrentLevel"); - return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); - } - case 21: { - LogStep(21, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(20, "Wait for ConfigTransitionTime"); + VerifyOrDo(!ShouldSkip("CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + case 21: { + LogStep(21, "Over TransitionTime, DUT reads CurrentSaturation attribute from TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0001 && CC.C.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_OO_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_5_4_SimulatedSuite : public TestCommand { public: - Test_TC_OO_3_1_SimulatedSuite() : TestCommand("Test_TC_OO_3_1_Simulated", 11) + Test_TC_CC_5_4_SimulatedSuite() : TestCommand("Test_TC_CC_5_4_Simulated", 25) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_OO_3_1_SimulatedSuite() {} + ~Test_TC_CC_5_4_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mEndpoint; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4164,15 +846,19 @@ class Test_TC_OO_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 8: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4192,176 +878,164 @@ class Test_TC_OO_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute OnOff"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute GlobalSceneControl"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id); + LogStep(1, "DUT sends MoveToColor command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id); } case 2: { - LogStep(2, "Read attribute OnTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id); + LogStep(2, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } case 3: { - LogStep(3, "Read attribute OffWaitTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id); + LogStep(3, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } case 4: { - LogStep(4, "Read attribute StartUpOnOff"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id); + LogStep(4, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "Write attribute OnTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id); + LogStep(5, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } case 6: { - LogStep(6, "Write attribute OffWaitTime"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id); + LogStep(6, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C07.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } case 7: { - LogStep(7, "Write attribute StartUpOnOff"); - return WaitAttribute(GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id); + LogStep(7, "DUT sends MoveColor command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id); } case 8: { - LogStep(8, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(8, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } case 9: { - LogStep(9, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(9, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } case 10: { - LogStep(10, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "Wait for ConfigTransitionTime"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } + case 11: { + LogStep(11, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OO_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_OO_3_2_SimulatedSuite() : TestCommand("Test_TC_OO_3_2_Simulated", 6) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OO_3_2_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + case 12: { + LogStep(12, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C08.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + case 13: { + LogStep(13, "DUT sends StepColor command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColor::Id); } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT issues an Off command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id); + case 14: { + LogStep(14, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } - case 1: { - LogStep(1, "DUT issues an On command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); + case 15: { + LogStep(15, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); + } + case 16: { + LogStep(16, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 17: { + LogStep(17, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); + } + case 18: { + LogStep(18, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C09.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); + } + case 19: { + LogStep(19, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); } - case 2: { - LogStep(2, "DUT issues an Toggle command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Toggle::Id); + case 20: { + LogStep(20, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); } - case 3: { - LogStep(3, "DUT issues an OffWithEffect command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C40.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id); + case 21: { + LogStep(21, "DUT reads CurrentY attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } - case 4: { - LogStep(4, "DUT issues an OnWithRecallGlobalScene command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithRecallGlobalScene::Id); + case 22: { + LogStep(22, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - case 5: { - LogStep(5, "DUT issues an OnWithTimedOff command to the TH"); - VerifyOrDo(!ShouldSkip("OO.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id); + case 23: { + LogStep(23, "DUT reads CurrentX attribute from TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0003 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); + } + case 24: { + LogStep( + 24, + "DUT reads CurrentY attribute from ConfiguredTime: type: int16u defaultValue: 30000TH(potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0004 && CC.C.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_TSUIC_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_6_4_SimulatedSuite : public TestCommand { public: - Test_TC_TSUIC_3_1_SimulatedSuite() : TestCommand("Test_TC_TSUIC_3_1_Simulated", 9) + Test_TC_CC_6_4_SimulatedSuite() : TestCommand("Test_TC_CC_6_4_Simulated", 18) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_TSUIC_3_1_SimulatedSuite() {} + ~Test_TC_CC_6_4_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mEndpoint; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4375,15 +1049,19 @@ class Test_TC_TSUIC_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4403,93 +1081,133 @@ class Test_TC_TSUIC_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "DUT reads TemperatureDisplayMode attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "DUT reads KeypadLockout attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id); + LogStep(1, + "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " + "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " + "attribute ColorTempPhysicalMinMireds from TH"); + VerifyOrDo(!ShouldSkip("CC.C.A400b && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id); } case 2: { - LogStep(2, "DUT reads ScheduleProgrammingVisibility attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id); + LogStep(2, + "* TH provides a server implementation of Color Control with F04(CT)=true and reasonable values of " + "ColorTempPhysicalMinMireds (e.g. 153 (6500K), ColorTempPhysicalMaxMireds (e.g. 454 (2200K)) DUT read " + "attribute ColorTempPhysicalMaxMireds from TH"); + VerifyOrDo(!ShouldSkip("CC.C.A400c && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id); } case 3: { - LogStep(3, "DUT writes TemperatureDisplayMode attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id); + LogStep(3, "DUT sends MoveToColorTemperature command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id); } case 4: { - LogStep(4, "DUT writes KeypadLockout attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id); + LogStep(4, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); } case 5: { - LogStep(5, "DUT writes ScheduleProgrammingVisibility attribute from TH"); - return WaitAttribute(GetEndpoint(0), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id); + LogStep(5, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { - LogStep(6, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(6, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C0a.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); } case 7: { - LogStep(7, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(7, "DUT sends MoveColorTemperatureMireds command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id); } case 8: { - LogStep(8, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 9: { + LogStep(9, "Wait for ConfigTransitionTime"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4b.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 11: { + LogStep(11, "DUT sends StepColorTemperature command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id); + } + case 12: { + LogStep(12, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 13: { + LogStep(13, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C4c.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); + } + case 15: { + LogStep(15, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); + } + case 16: { + LogStep(16, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 17: { + LogStep(17, "DUT reads CurrentColorTemperatureMireds attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A0007 && CC.C.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_PCC_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_7_5_SimulatedSuite : public TestCommand { public: - Test_TC_PCC_3_1_SimulatedSuite() : TestCommand("Test_TC_PCC_3_1_Simulated", 30) + Test_TC_CC_7_5_SimulatedSuite() : TestCommand("Test_TC_CC_7_5_Simulated", 23) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("ConfigTransitionTime", 0, UINT16_MAX, &mConfigTransitionTime); } - ~Test_TC_PCC_3_1_SimulatedSuite() {} + ~Test_TC_CC_7_5_SimulatedSuite() {} private: chip::Optional mNodeId; chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mEndpoint; + chip::Optional mConfigTransitionTime; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4503,15 +1221,23 @@ class Test_TC_PCC_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 27: + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 28: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 29: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4531,225 +1257,152 @@ class Test_TC_PCC_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute MaxPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxPressure::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute MaxSpeed"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxSpeed::Id); + LogStep(1, "DUT sends MoveToEnhancedHue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id); } case 2: { - LogStep(2, "Read attribute MaxFlow"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxFlow::Id); + LogStep(2, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 3: { - LogStep(3, "Read attribute EffectiveOperationMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id); + LogStep(3, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, "Read attribute EffectiveControlMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id); + LogStep(4, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C40.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 5: { - LogStep(5, "Read attribute Capacity"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::Capacity::Id); + LogStep(5, "DUT sends MoveEnhanced Hue command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id); } case 6: { - LogStep(6, "Read attribute OperationMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::OperationMode::Id); + LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 7: { - LogStep(7, "Read attribute MinConstPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstPressure::Id); + LogStep(7, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { - LogStep(8, "Read attribute MaxConstPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstPressure::Id); + LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C41.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 9: { - LogStep(9, "Read attribute MinCompPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinCompPressure::Id); + LogStep(9, "DUT sends StepEnhanced command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id); } case 10: { - LogStep(10, "Read attribute MaxCompPressure"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxCompPressure::Id); + LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 11: { - LogStep(11, "Read attribute MinConstSpeed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstSpeed::Id); + LogStep(11, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 12: { - LogStep(12, "Read attribute MaxConstSpeed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id); + LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C42.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 13: { - LogStep(13, "Read attribute MinConstFlow"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstFlow::Id); + LogStep(13, "DUT sends EnhancedMoveToHueAndSaturation command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id); } case 14: { - LogStep(14, "Read attribute MaxConstFlow"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstFlow::Id); + LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 15: { - LogStep(15, "Read attribute MinConstTemp"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstTemp::Id); + LogStep(15, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 16: { - LogStep(16, "Read attribute MaxConstTemp"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstTemp::Id); + LogStep(16, "Wait for ConfigTransitionTime"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { - LogStep(17, "Read attribute PumpStatus"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::PumpStatus::Id); + LogStep(17, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 18: { - LogStep(18, "Read attribute Speed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::Speed::Id); + LogStep(18, "DUT reads CurrentSaturation attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C43.Tx && CC.C.A0001 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); } case 19: { - LogStep(19, "Read attribute LifetimeRunningHours"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id); + LogStep(19, "DUT sends StopMoveStep command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id); } case 20: { - LogStep(20, "Read attribute Power"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::Power::Id); + LogStep(20, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } case 21: { - LogStep(21, "Read attribute LifetimeEnergyConsumed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id); - } - case 22: { - LogStep(22, "Read attribute ControlMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ControlMode::Id); - } - case 23: { - LogStep(23, "Write attribute LifetimeRunningHours"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id); - } - case 24: { - LogStep(24, "Write attribute LifetimeEnergyConsumed"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id); - } - case 25: { - LogStep(25, "Write attribute OperationMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::OperationMode::Id); - } - case 26: { - LogStep(26, "Write attribute ControlMode"); - VerifyOrDo(!ShouldSkip("PCC.C.AO-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ControlMode::Id); - } - case 27: { - LogStep(27, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 28: { - LogStep(28, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(21, "Wait for ConfigTransitionTime"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mConfigTransitionTime.HasValue() ? mConfigTransitionTime.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } - case 29: { - LogStep(29, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + case 22: { + LogStep(22, "DUT reads EnhancedCurrentHue attribute from TH (potentially multiple times)"); + VerifyOrDo(!ShouldSkip("CC.C.C47.Tx && CC.C.A4000 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_TMP_3_1_SimulatedSuite : public TestCommand +class Test_TC_CC_9_4_SimulatedSuite : public TestCommand { public: - Test_TC_TMP_3_1_SimulatedSuite() : TestCommand("Test_TC_TMP_3_1_Simulated", 7) + Test_TC_CC_9_4_SimulatedSuite() : TestCommand("Test_TC_CC_9_4_Simulated", 19) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TMP_3_1_SimulatedSuite() {} + ~Test_TC_CC_9_4_SimulatedSuite() {} private: chip::Optional mNodeId; + chip::Optional mTimeout; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4763,15 +1416,27 @@ class Test_TC_TMP_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 4: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 5: + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -4791,67 +1456,126 @@ class Test_TC_TMP_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::MeasuredValue::Id); + LogStep(0, "PreCondition: Set TH OnOff to On"); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MinMeasuredValue::Id); + LogStep(1, "DUT sends ColorLoopSet command to TH"); + VerifyOrDo(!ShouldSkip("CC.C.C44.Tx && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id); } case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MaxMeasuredValue::Id); + LogStep(2, "DUT reads ColorLoopActive attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4002 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id); } case 3: { - LogStep(3, "Read attribute: Tolerance"); - return WaitAttribute(GetEndpoint(0), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::Tolerance::Id); + LogStep(3, "DUT reads ColorLoopDirection attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4003 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id); } case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(4, "DUT reads ColorLoopTime attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4004 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id); } case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(5, "DUT reads ColorLoopStartEnhancedHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4005 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id); } case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 7: { + LogStep(7, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 9: { + LogStep(9, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 11: { + LogStep(11, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 13: { + LogStep(13, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 15: { + LogStep(15, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 16: { + LogStep(16, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); + } + case 17: { + LogStep(17, "Wait 5000ms"); + VerifyOrDo(!ShouldSkip("CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 18: { + LogStep(18, "DUT reads EnhancedCurrentHue attribute from TH periodically"); + VerifyOrDo(!ShouldSkip("CC.C.A4000 && CC.C.F02 && CC.C.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_CC_2_2_SimulatedSuite : public TestCommand +class Test_TC_DGTHREAD_3_4_SimulatedSuite : public TestCommand { public: - Test_TC_CC_2_2_SimulatedSuite() : TestCommand("Test_TC_CC_2_2_Simulated", 52) + Test_TC_DGTHREAD_3_4_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_4_Simulated", 2) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -4859,7 +1583,7 @@ class Test_TC_CC_2_2_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_2_2_SimulatedSuite() {} + ~Test_TC_DGTHREAD_3_4_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -4889,280 +1613,31 @@ class Test_TC_CC_2_2_SimulatedSuite : public TestCommand } } - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "DUT reads from the TH the (0x0000) CurrentHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id); - } - case 1: { - LogStep(1, "DUT reads from the TH the (0x0001) CurrentSaturation attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id); - } - case 2: { - LogStep(2, "DUT reads from the TH the Optional (0x0002) RemainingTime attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::RemainingTime::Id); - } - case 3: { - LogStep(3, "DUT reads from the TH the (0x0003) CurrentX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id); - } - case 4: { - LogStep(4, "DUT reads from the TH the (0x0004) CurrentY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id); - } - case 5: { - LogStep(5, "DUT reads from the TH the Optional (0x0005) DriftCompensation attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::DriftCompensation::Id); - } - case 6: { - LogStep(6, "DUT reads from the TH the Optional (0x0006) CompensationText attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CompensationText::Id); - } - case 7: { - LogStep(7, "DUT reads from the TH the (0x0007) ColorTemperatureMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperatureMireds::Id); - } - case 8: { - LogStep(8, "DUT reads from the TH the (0x0008) ColorMode attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id); - } - case 9: { - LogStep(9, "DUT reads from the TH the (0x000f) Options attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id); - } - case 10: { - LogStep(10, "DUT reads from the TH the (0x4000) EnhancedCurrentHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id); - } - case 11: { - LogStep(11, "DUT reads from the TH the (0x4001) EnhancedColorMode attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id); - } - case 12: { - LogStep(12, "DUT reads from the TH the (0x4002) ColorLoopActive attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id); - } - case 13: { - LogStep(13, "DUT reads from the TH the (0x4003) ColorLoopDirection attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id); - } - case 14: { - LogStep(14, "DUT reads from the TH the (0x4004) ColorLoopTime attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id); - } - case 15: { - LogStep(15, "DUT reads from the TH the (0x4005) ColorLoopStartEnhancedHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id); - } - case 16: { - LogStep(16, "DUT reads from the TH the (0x4006) ColorLoopStoredEnhancedHue attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id); - } - case 17: { - LogStep(17, "DUT reads from the TH the (0x400a) ColorCapabilities attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorCapabilities::Id); - } - case 18: { - LogStep(18, "DUT reads from the TH the (0x400b) ColorTempPhysicalMinMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id); - } - case 19: { - LogStep(19, "DUT reads from the TH the (0x400c) ColorTempPhysicalMaxMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id); - } - case 20: { - LogStep(20, "DUT reads from the TH the (0x400d) CoupleColorTempToLevelMinMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A400d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id); - } - case 21: { - LogStep(21, "DUT reads from the TH the (0x4010) StartUpColorTemperatureMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::StartUpColorTemperatureMireds::Id); - } - case 22: { - LogStep(22, "DUT reads from the TH the (0x0010) NumberOfPrimaries attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::NumberOfPrimaries::Id); - } - case 23: { - LogStep(23, "DUT reads from the TH the (0x0011) Primary1X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1X::Id); + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "DUT sends ResetCounts command to TH"); + VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Commands::ResetCounts::Id); } - case 24: { - LogStep(24, "DUT reads from the TH the (0x0012) Primary1Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1Y::Id); - } - case 25: { - LogStep(25, "DUT reads from the TH the (0x0013) Primary1Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1Intensity::Id); - } - case 26: { - LogStep(26, "DUT reads from the TH the (0x0015) Primary2X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2X::Id); - } - case 27: { - LogStep(27, "DUT reads from the TH the (0x0016) Primary2Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2Y::Id); - } - case 28: { - LogStep(28, "DUT reads from the TH the (0x0017) Primary2Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2Intensity::Id); - } - case 29: { - LogStep(29, "DUT reads from the TH the (0x0019) Primary3X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3X::Id); - } - case 30: { - LogStep(30, "DUT reads from the TH the (0x001a) Primary3Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3Y::Id); - } - case 31: { - LogStep(31, "DUT reads from the TH the (0x001b) Primary3Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3Intensity::Id); - } - case 32: { - LogStep(32, "DUT reads from the TH the (0x0020) Primary4X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4X::Id); - } - case 33: { - LogStep(33, "DUT reads from the TH the (0x0021) Primary4Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4Y::Id); - } - case 34: { - LogStep(34, "DUT reads from the TH the (0x0022) Primary4Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4Intensity::Id); - } - case 35: { - LogStep(35, "DUT reads from the TH the (0x0024) Primary5X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5X::Id); - } - case 36: { - LogStep(36, "DUT reads from the TH the (0x0025) Primary5Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5Y::Id); - } - case 37: { - LogStep(37, "DUT reads from the TH the (0x0026) Primary5Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5Intensity::Id); - } - case 38: { - LogStep(38, "DUT reads from the TH the (0x0028) Primary6X attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6X::Id); - } - case 39: { - LogStep(39, "DUT reads from the TH the (0x0029) Primary6Y attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6Y::Id); - } - case 40: { - LogStep(40, "DUT reads from the TH the (0x002a) Primary6Intensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6Intensity::Id); - } - case 41: { - LogStep(41, "DUT reads from the TH the Optional (0x0030) WhitePointX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointX::Id); - } - case 42: { - LogStep(42, "DUT reads from the TH the Optional (0x0031) WhitePointY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointY::Id); - } - case 43: { - LogStep(43, "DUT reads from the TH the Optional (0x0032) ColorPointRX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRX::Id); - } - case 44: { - LogStep(44, "DUT reads from the TH the Optional (0x0033) ColorPointRY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRY::Id); - } - case 45: { - LogStep(45, "DUT reads from the TH the Optional (0x0034) ColorPointRIntensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRIntensity::Id); - } - case 46: { - LogStep(46, "DUT reads from the TH the Optional (0x0036) ColorPointGX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGX::Id); - } - case 47: { - LogStep(47, "DUT reads from the TH the Optional (0x0037) ColorPointGY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGY::Id); - } - case 48: { - LogStep(48, "DUT reads from the TH the Optional (0x0038) ColorPointGIntensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGIntensity::Id); - } - case 49: { - LogStep(49, "DUT reads from the TH the Optional (0x003a) ColorPointBX attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBX::Id); - } - case 50: { - LogStep(50, "DUT reads from the TH the Optional (0x003b) ColorPointBY attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBY::Id); - } - case 51: { - LogStep(51, "DUT reads from the TH the Optional (0x003c) ColorPointBIntensity attribute"); - VerifyOrDo(!ShouldSkip("CC.C.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBIntensity::Id); + case 1: { + LogStep(1, "DUT reads OverrunCount attribute value from TH"); + VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::OverrunCount::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand +class Test_TC_LVL_2_3_SimulatedSuite : public TestCommand { public: - Test_TC_DGTHREAD_3_1_SimulatedSuite() : TestCommand("Test_TC_DGTHREAD_3_1_Simulated", 30) + Test_TC_LVL_2_3_SimulatedSuite() : TestCommand("Test_TC_LVL_2_3_Simulated", 24) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -5170,7 +1645,7 @@ class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_1_SimulatedSuite() {} + ~Test_TC_LVL_2_3_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -5190,7 +1665,15 @@ class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 0: + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -5210,190 +1693,133 @@ class Test_TC_DGTHREAD_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); + LogStep(0, "Read mandatory attribute CurrentLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id); } case 1: { - LogStep(1, "DUT reads Channel attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::Channel::Id); + LogStep(1, "Read mandatory attribute OnLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); } case 2: { - LogStep(2, "DUT reads RoutingRole attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RoutingRole::Id); + LogStep(2, "Read mandatory attribute Options"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); } case 3: { - LogStep(3, "DUT reads NetworkName attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::NetworkName::Id); + LogStep(3, "Read optional attribute RemainingTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::RemainingTime::Id); } case 4: { - LogStep(4, "DUT reads PanId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::PanId::Id); + LogStep(4, "Read optional attribute StartUpCurrentLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); } case 5: { - LogStep(5, "DUT reads ExtendedPanId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id); + LogStep(5, "Read optional attribute CurrentFrequency"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentFrequency::Id); } case 6: { - LogStep(6, "DUT reads MeshLocalPrefix attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id); + LogStep(6, "Read optional attribute MinFrequency"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinFrequency::Id); } case 7: { - LogStep(7, "DUT reads OverrunCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::OverrunCount::Id); + LogStep(7, "Read optional attribute MaxFrequency"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxFrequency::Id); } case 8: { - LogStep(8, "DUT reads NeighborTable attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::NeighborTable::Id); + LogStep(8, "Read optional attribute MinLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id); } case 9: { - LogStep(9, "DUT reads RouteTable attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RouteTable::Id); + LogStep(9, "Read optional attribute MaxLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id); } case 10: { - LogStep(10, "DUT reads PartitionId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PartitionId::Id); + LogStep(10, "Read optional attribute OnOffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); } case 11: { - LogStep(11, "DUT reads Weighting attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::Weighting::Id); + LogStep(11, "Read optional attribute OnTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); } case 12: { - LogStep(12, "DUT reads DataVersion attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::DataVersion::Id); + LogStep(12, "Read optional attribute OffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); } case 13: { - LogStep(13, "DUT reads StableDataVersion attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id); + LogStep(13, "Read optional attribute DefaultMoveRate"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); } case 14: { - LogStep(14, "DUT reads LeaderRouterId attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id); + LogStep(14, "Write mandatory attribute OnLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id); } case 15: { - LogStep(15, "DUT reads DetachedRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id); + LogStep(15, "Write mandatory attribute Options"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id); } case 16: { - LogStep(16, "DUT reads ChildRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id); + LogStep(16, "Write optional attribute OnOffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id); } case 17: { - LogStep(17, "DUT reads RouterRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id); + LogStep(17, "Write optional attribute OnTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id); } case 18: { - LogStep(18, "DUT reads LeaderRoleCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id); + LogStep(18, "Write optional attribute OffTransitionTime"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id); } case 19: { - LogStep(19, "DUT reads AttachAttemptCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id); + LogStep(19, "Write optional attribute DefaultMoveRate"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id); } case 20: { - LogStep(20, "DUT reads PartitionIdChangeCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id); + LogStep(20, "Write optional attribute StartUpCurrentLevel"); + return WaitAttribute(GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id); } case 21: { - LogStep(21, "DUT reads BetterPartitionAttachAttemptCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id); + LogStep(21, + "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " + "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " + "DUT to TH again"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 22: { - LogStep(22, "DUT reads ParentChangeCount attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id); + LogStep(22, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 23: { - LogStep(23, "DUT reads ActiveTimestamp attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id); - } - case 24: { - LogStep(24, "DUT reads PendingTimestamp attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0039"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id); - } - case 25: { - LogStep(25, "DUT reads Delay attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::Delay::Id); - } - case 26: { - LogStep(26, "DUT reads SecurityPolicy attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id); - } - case 27: { - LogStep(27, "DUT reads ChannelPage0Mask attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id); - } - case 28: { - LogStep(28, "DUT reads OperationalDatasetComponents attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id); - } - case 29: { - LogStep(29, "DUT reads ActiveNetworkFaults attribute value from TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A003e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id); + LogStep(23, + "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " + "specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; } }; -class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand +class Test_TC_OO_3_2_SimulatedSuite : public TestCommand { public: - Test_TC_DRLK_3_1_SimulatedSuite() : TestCommand("Test_TC_DRLK_3_1_Simulated", 37) + Test_TC_OO_3_2_SimulatedSuite() : TestCommand("Test_TC_OO_3_2_Simulated", 6) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -5401,7 +1827,7 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DRLK_3_1_SimulatedSuite() {} + ~Test_TC_OO_3_2_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -5421,10 +1847,6 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -5441,190 +1863,34 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); + LogStep(0, "DUT issues an Off command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id); } case 1: { - LogStep(1, "DUT reads LockState attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LockState::Id); + LogStep(1, "DUT issues an On command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id); } case 2: { - LogStep(2, "DUT reads LockType attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LockType::Id); + LogStep(2, "DUT issues an Toggle command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C02.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::Toggle::Id); } case 3: { - LogStep(3, "DUT reads ActuatorEnabled attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::ActuatorEnabled::Id); + LogStep(3, "DUT issues an OffWithEffect command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C40.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id); } case 4: { - LogStep(4, "DUT reads DoorState attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DoorState::Id); + LogStep(4, "DUT issues an OnWithRecallGlobalScene command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C41.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithRecallGlobalScene::Id); } case 5: { - LogStep(5, "DUT reads DoorOpenEvents attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DoorOpenEvents::Id); - } - case 6: { - LogStep(6, "DUT reads DoorClosedEvents attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DoorClosedEvents::Id); - } - case 7: { - LogStep(7, "DUT reads OpenPeriod attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::OpenPeriod::Id); - } - case 8: { - LogStep(8, "DUT reads NumberOfTotalUsersSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F05 && DRLK.C.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfTotalUsersSupported::Id); - } - case 9: { - LogStep(9, "DUT reads NumberofPINUsersSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfPINUsersSupported::Id); - } - case 10: { - LogStep(10, "DUT reads NumberofRFIDUsersSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F01 && DRLK.C.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfRFIDUsersSupported::Id); - } - case 11: { - LogStep(11, "DUT reads NumberofWeekDaysSchedulesSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F04 && DRLK.C.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id); - } - case 12: { - LogStep(12, "DUT reads NumberofYearDaysSchedulesSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F04 && DRLK.C.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id); - } - case 13: { - LogStep(13, "DUT reads NumberofHolidaySchedulesSupported attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F04 && DRLK.C.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id); - } - case 14: { - LogStep(14, "DUT reads MaxPINCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MaxPINCodeLength::Id); - } - case 15: { - LogStep(15, "DUT reads MinPINCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MinPINCodeLength::Id); - } - case 16: { - LogStep(16, "DUT reads MaxRFIDCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F01 && DRLK.C.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MaxRFIDCodeLength::Id); - } - case 17: { - LogStep(17, "DUT reads MinRFIDCodeLength attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F01 && DRLK.C.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::MinRFIDCodeLength::Id); - } - case 18: { - LogStep(18, "DUT reads CredentialRulesSupport attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F08 && DRLK.C.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::CredentialRulesSupport::Id); - } - case 19: { - LogStep(19, "DUT reads Language attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::Language::Id); - } - case 20: { - LogStep(20, "DUT reads LEDSettings attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LEDSettings::Id); - } - case 21: { - LogStep(21, "DUT reads AutoRelockTime attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::AutoRelockTime::Id); - } - case 22: { - LogStep(22, "DUT reads SoundVolume attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::SoundVolume::Id); - } - case 23: { - LogStep(23, "DUT reads OperatingMode attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::OperatingMode::Id); - } - case 24: { - LogStep(24, "DUT reads SupportedOperatingModes attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::SupportedOperatingModes::Id); - } - case 25: { - LogStep(25, "DUT reads DefaultConfigurationRegister attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::DefaultConfigurationRegister::Id); - } - case 26: { - LogStep(26, "DUT reads EnableLocalProgramming attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnableLocalProgramming::Id); - } - case 27: { - LogStep(27, "DUT reads EnableOneTouchLocking attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnableOneTouchLocking::Id); - } - case 28: { - LogStep(28, "DUT reads EnableInsideStatusLED attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnableInsideStatusLED::Id); - } - case 29: { - LogStep(29, "DUT reads EnablePrivacyModeButton attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::EnablePrivacyModeButton::Id); - } - case 30: { - LogStep(30, "DUT reads LocalProgrammingFeatures attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::LocalProgrammingFeatures::Id); - } - case 31: { - LogStep(31, "DUT reads WrongCodeEntryLimit attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.F01 && DRLK.C.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id); - } - case 32: { - LogStep(32, "DUT reads UserCodeTemporaryDisableTime attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F00 && DRLK.C.F01 && DRLK.C.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::UserCodeTemporaryDisableTime::Id); - } - case 33: { - LogStep(33, "DUT reads SendPINOverTheAir attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F07 && DRLK.C.F00 && DRLK.C.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::SendPINOverTheAir::Id); - } - case 34: { - LogStep(34, "DUT reads RequirePINForRemoteOperation attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F07 && DRLK.C.F00 && DRLK.C.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::RequirePINforRemoteOperation::Id); - } - case 35: { - LogStep(35, "DUT reads ExpiringUserTimeOut attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F08 && DRLK.C.A0035"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::ExpiringUserTimeout::Id); - } - case 36: { - LogStep(36, "DUT reads NumberOfCredentialsSupportedPerUser attribute value from TH"); - VerifyOrDo(!ShouldSkip("DRLK.C.F08 && DRLK.C.A001c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), DoorLock::Id, DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id); + LogStep(5, "DUT issues an OnWithTimedOff command to the TH"); + VerifyOrDo(!ShouldSkip("OO.C.C42.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitCommand(GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id); } } return CHIP_NO_ERROR; @@ -5633,98 +1899,14 @@ class Test_TC_DRLK_3_1_SimulatedSuite : public TestCommand std::unique_ptr GetTestCommand(std::string testName) { - if (testName == "Test_TC_ACT_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_ACT_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_BOOL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_BOOL_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DESC_2_2_Simulated") - { - return std::unique_ptr(new Test_TC_DESC_2_2_SimulatedSuite()); - } - if (testName == "Test_TC_DGETH_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGETH_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DGSW_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGSW_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DGWIFI_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGWIFI_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_FLW_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_FLW_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_G_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_G_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_I_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_I_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PRS_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PRS_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PSCFG_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PSCFG_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_RH_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_RH_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_SWTCH_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_SWTCH_3_1_SimulatedSuite()); - } if (testName == "Test_TC_WNCV_5_1_Simulated") { return std::unique_ptr(new Test_TC_WNCV_5_1_SimulatedSuite()); } - if (testName == "Test_TC_LCFG_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_LCFG_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_LUNIT_1_1_Simulated") - { - return std::unique_ptr(new Test_TC_LUNIT_1_1_SimulatedSuite()); - } - if (testName == "Test_TC_LUNIT_2_1_Simulated") - { - return std::unique_ptr(new Test_TC_LUNIT_2_1_SimulatedSuite()); - } - if (testName == "Test_TC_OCC_2_2_Simulated") - { - return std::unique_ptr(new Test_TC_OCC_2_2_SimulatedSuite()); - } if (testName == "Test_TC_OCC_2_4_Simulated") { return std::unique_ptr(new Test_TC_OCC_2_4_SimulatedSuite()); } - if (testName == "Test_TC_ULABEL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_ULABEL_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_FLABEL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_FLABEL_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_LTIME_1_1_Simulated") - { - return std::unique_ptr(new Test_TC_LTIME_1_1_SimulatedSuite()); - } - if (testName == "Test_TC_ILL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_ILL_3_1_SimulatedSuite()); - } if (testName == "Test_TC_DGSW_3_2_Simulated") { return std::unique_ptr(new Test_TC_DGSW_3_2_SimulatedSuite()); @@ -5769,14 +1951,6 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_CC_9_4_SimulatedSuite()); } - if (testName == "Test_TC_DGTHREAD_3_2_Simulated") - { - return std::unique_ptr(new Test_TC_DGTHREAD_3_2_SimulatedSuite()); - } - if (testName == "Test_TC_DGTHREAD_3_3_Simulated") - { - return std::unique_ptr(new Test_TC_DGTHREAD_3_3_SimulatedSuite()); - } if (testName == "Test_TC_DGTHREAD_3_4_Simulated") { return std::unique_ptr(new Test_TC_DGTHREAD_3_4_SimulatedSuite()); @@ -5785,38 +1959,10 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_LVL_2_3_SimulatedSuite()); } - if (testName == "Test_TC_OO_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_OO_3_1_SimulatedSuite()); - } if (testName == "Test_TC_OO_3_2_Simulated") { return std::unique_ptr(new Test_TC_OO_3_2_SimulatedSuite()); } - if (testName == "Test_TC_TSUIC_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_TSUIC_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PCC_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PCC_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_TMP_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_TMP_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_CC_2_2_Simulated") - { - return std::unique_ptr(new Test_TC_CC_2_2_SimulatedSuite()); - } - if (testName == "Test_TC_DGTHREAD_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DGTHREAD_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_DRLK_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_DRLK_3_1_SimulatedSuite()); - } return nullptr; } @@ -5824,29 +1970,8 @@ std::unique_ptr GetTestCommand(std::string testName) void PrintTestCommands() { ChipLogError(chipTool, "Supported commands:"); - ChipLogError(chipTool, "\t* Test_TC_ACT_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_BOOL_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DESC_2_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGETH_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGSW_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGWIFI_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_FLW_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_G_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_I_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PRS_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PSCFG_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_RH_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_SWTCH_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_WNCV_5_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LCFG_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LUNIT_1_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LUNIT_2_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_OCC_2_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_OCC_2_4_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_ULABEL_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_FLABEL_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_LTIME_1_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_ILL_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGSW_3_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGETH_3_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGWIFI_3_2_Simulated"); @@ -5858,16 +1983,7 @@ void PrintTestCommands() ChipLogError(chipTool, "\t* Test_TC_CC_6_4_Simulated"); ChipLogError(chipTool, "\t* Test_TC_CC_7_5_Simulated"); ChipLogError(chipTool, "\t* Test_TC_CC_9_4_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_3_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_4_Simulated"); ChipLogError(chipTool, "\t* Test_TC_LVL_2_3_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_OO_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_OO_3_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_TSUIC_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PCC_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_TMP_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_CC_2_2_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGTHREAD_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DRLK_3_1_Simulated"); } From a598efd32723d41f0f126c41cb8e6f4b01e7fc7c Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 8 Aug 2023 22:12:21 -0400 Subject: [PATCH 53/74] Add an attestation challenge to MTROperationalCredentialsClusterAttestationResponseParams. (#28586) Not public API, for now, but is needed to make sense of the data returned by this response command. --- .../Framework/CHIP/MTRCallbackBridgeBase.h | 37 ++++++++++- .../MTRCommandPayloads_Internal.zapt | 4 ++ .../templates/partials/MTRCallbackBridge.zapt | 1 + .../CHIP/zap-generated/MTRCallbackBridge.mm | 63 +++++++++++++++++++ .../MTRCommandPayloads_Internal.h | 4 ++ 5 files changed, 108 insertions(+), 1 deletion(-) diff --git a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h index da8772f2464ace..9f2f6170327b94 100644 --- a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h +++ b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h @@ -20,13 +20,18 @@ #import "MTRBaseDevice_Internal.h" #import "MTRDeviceController_Internal.h" #import "MTRError_Internal.h" +#import "NSDataSpanConversion.h" #import "zap-generated/MTRBaseClusters.h" +#import "zap-generated/MTRCommandPayloads_Internal.h" +#include #include #include #include #include +#include + NS_ASSUME_NONNULL_BEGIN /** @@ -147,7 +152,23 @@ using MTRActionBlockT = CHIP_ERROR (^)(chip::Messaging::ExchangeManager & exchan template using MTRLocalActionBlockT = CHIP_ERROR (^)(SuccessCallback successCb, MTRErrorCallback failureCb); -template class MTRCallbackBridge : public MTRCallbackBridgeBase { +class NoAttestationChallenge { +}; + +class HaveAttestationChallenge { +protected: + NSData * mAttestationChallenge; +}; + +namespace detail { +using AttestationResponseCallback + = void (*)(void *, const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType &); +} // namespace detail + +template +class MTRCallbackBridge : public MTRCallbackBridgeBase, + protected std::conditional, + HaveAttestationChallenge, NoAttestationChallenge>::type { public: using MTRActionBlock = MTRActionBlockT; using MTRLocalActionBlock = MTRLocalActionBlockT; @@ -232,6 +253,10 @@ template class MTRCallbackBridge : public MTRCallbackBridgeBase { return; } + if constexpr (HaveAttestationChallenge()) { + this->mAttestationChallenge = AsData(session.Value()->AsSecureSession()->GetCryptoContext().GetAttestationChallenge()); + } + CHIP_ERROR err = action(*exchangeManager, session.Value(), mSuccess, mFailure, this); if (err != CHIP_NO_ERROR) { ChipLogError(Controller, "Failure performing action. C++-mangled success callback type: '%s', error: %s", @@ -252,7 +277,17 @@ template class MTRCallbackBridge : public MTRCallbackBridgeBase { static void DispatchFailure(void * context, NSError * error) { DispatchCallbackResult(context, error, nil); } + template static void SetAttestationChallengeIfNeeded(void * context, ResponseType * _Nonnull response) + { + if constexpr (HaveAttestationChallenge()) { + auto * self = static_cast(context); + response.attestationChallenge = self->mAttestationChallenge; + } + } + private: + static constexpr bool HaveAttestationChallenge() { return std::is_same_v; } + static void DispatchCallbackResult(void * context, NSError * _Nullable error, id _Nullable value) { MTRCallbackBridge * callbackBridge = static_cast(context); diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloads_Internal.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloads_Internal.zapt index 84fb84e238c07f..b17994a5da6502 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloads_Internal.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloads_Internal.zapt @@ -6,6 +6,10 @@ NS_ASSUME_NONNULL_BEGIN +@interface MTROperationalCredentialsClusterAttestationResponseParams () +@property (nonatomic, strong) NSData * attestationChallenge; +@end + {{#zcl_clusters}} {{#zcl_commands}} {{! We only need to generate conversion functions for the server-generated commands }} diff --git a/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt b/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt index d24776d1ae5059..aea117477b3bb8 100644 --- a/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt @@ -83,6 +83,7 @@ void MTR{{> @partial-block}}Bridge::OnSuccessFn(void * context OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); {{else if (isStrEqual partial-type "CommandStatus")}} DispatchSuccess(context, nil); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index c6806421244642..7c1c7daec4dc44 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -19617,6 +19617,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19629,6 +19630,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19641,6 +19643,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19653,6 +19656,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19665,6 +19669,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19677,6 +19682,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19689,6 +19695,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19701,6 +19708,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19713,6 +19721,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19725,6 +19734,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19737,6 +19747,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19749,6 +19760,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19761,6 +19773,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19773,6 +19786,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19785,6 +19799,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19797,6 +19812,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19809,6 +19825,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19821,6 +19838,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19833,6 +19851,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19845,6 +19864,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19857,6 +19877,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19869,6 +19890,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19881,6 +19903,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19893,6 +19916,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19905,6 +19929,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19917,6 +19942,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19929,6 +19955,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19941,6 +19968,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19953,6 +19981,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19965,6 +19994,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19977,6 +20007,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -19990,6 +20021,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20002,6 +20034,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20014,6 +20047,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20026,6 +20060,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20038,6 +20073,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20050,6 +20086,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20062,6 +20099,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20074,6 +20112,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20086,6 +20125,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20098,6 +20138,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20110,6 +20151,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20122,6 +20164,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20134,6 +20177,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20146,6 +20190,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20158,6 +20203,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20170,6 +20216,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20182,6 +20229,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20194,6 +20242,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20206,6 +20255,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20218,6 +20268,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20230,6 +20281,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20242,6 +20294,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20254,6 +20307,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20266,6 +20320,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20278,6 +20333,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20290,6 +20346,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20302,6 +20359,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20314,6 +20372,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20326,6 +20385,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20338,6 +20398,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20350,6 +20411,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; @@ -20362,6 +20424,7 @@ OnFailureFn(context, err); return; } + SetAttestationChallengeIfNeeded(context, response); DispatchSuccess(context, response); }; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 18639dbed88eb0..16acf214e7f7b8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -21,6 +21,10 @@ NS_ASSUME_NONNULL_BEGIN +@interface MTROperationalCredentialsClusterAttestationResponseParams () +@property (nonatomic, strong) NSData * attestationChallenge; +@end + @interface MTRGroupsClusterAddGroupResponseParams (InternalMethods) - (CHIP_ERROR)_setFieldsFromDecodableStruct: From 4111aac97151acb9adfbaaf5790cfff16620a99e Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 9 Aug 2023 00:58:44 -0400 Subject: [PATCH 54/74] Reduce the amount of code generated for MTRClusters. (#28594) 1. Push endpoint property up to MTRCluster, instead of having it be on every MTRCluster* and MTRBaseCluster* instance. 2. Instead of duplicating all the command bridge code for MTRCluster* commands, just instantiate the relevant MTRBaseCluster and delegate to it. --- src/darwin/Framework/CHIP/MTRCluster.mm | 5 +- .../Framework/CHIP/MTRCluster_Internal.h | 5 +- .../CHIP/templates/MTRBaseClusters-src.zapt | 13 +- .../templates/MTRBaseClusters_Internal.zapt | 1 - .../CHIP/templates/MTRClusters-src.zapt | 105 +- .../CHIP/templates/MTRClusters_Internal.zapt | 1 - .../CHIP/zap-generated/MTRBaseClusters.mm | 7315 ++++--- .../zap-generated/MTRBaseClusters_Internal.h | 93 - .../CHIP/zap-generated/MTRClusters.mm | 17298 +++++----------- .../CHIP/zap-generated/MTRClusters_Internal.h | 93 - 10 files changed, 8410 insertions(+), 16519 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRCluster.mm b/src/darwin/Framework/CHIP/MTRCluster.mm index eab05409e23af0..dae2acc9d57f62 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.mm +++ b/src/darwin/Framework/CHIP/MTRCluster.mm @@ -23,9 +23,12 @@ using namespace ::chip; @implementation MTRCluster -- (instancetype)initWithQueue:(dispatch_queue_t)queue +- (instancetype)initWithEndpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue; { if (self = [super init]) { + // TODO consider range-checking the incoming number to make sure it's + // actually in the EndpointId range + _endpoint = endpointID.unsignedShortValue; _callbackQueue = queue; } return self; diff --git a/src/darwin/Framework/CHIP/MTRCluster_Internal.h b/src/darwin/Framework/CHIP/MTRCluster_Internal.h index 077628fd118a09..f3fd0f2722e323 100644 --- a/src/darwin/Framework/CHIP/MTRCluster_Internal.h +++ b/src/darwin/Framework/CHIP/MTRCluster_Internal.h @@ -24,12 +24,15 @@ #import "zap-generated/MTRBaseClusters.h" #include +#include NS_ASSUME_NONNULL_BEGIN @interface MTRCluster () @property (readonly, nonatomic) dispatch_queue_t callbackQueue; -- (instancetype _Nullable)initWithQueue:(dispatch_queue_t)queue; +@property (nonatomic, readonly) chip::EndpointId endpoint; + +- (instancetype)initWithEndpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue; - (chip::ByteSpan)asByteSpan:(NSData *)value; - (chip::CharSpan)asCharSpan:(NSString *)value; @end diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt index c88866ee76358a..bd903274e66fbf 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt @@ -34,15 +34,12 @@ using chip::System::Clock::Seconds16; - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - {{!TODO consider range-checking the incoming number to make sure it's - actually in the uint16_t range}} - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -122,7 +119,7 @@ MTR{{cluster}}Cluster{{command}}Params {{/last}} {{/zcl_command_arguments}} - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -156,7 +153,7 @@ MTR{{cluster}}Cluster{{command}}Params using TypeInfo = {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; return MTRReadAttributeattribute_data_callback_name}}CallbackBridge, {{asObjectiveCClass type parent.name}}, - TypeInfo::DecodableType>(params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + TypeInfo::DecodableType>(params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } {{#if isWritableAttribute}} @@ -196,7 +193,7 @@ MTR{{cluster}}Cluster{{command}}Params TypeInfo::Type cppValue; {{>encode_value target="cppValue" source="value" cluster=parent.name errorCode="return CHIP_ERROR_INVALID_ARGUMENT;" depth=0}} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -209,7 +206,7 @@ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptio reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; - MTRSubscribeAttributeattribute_data_callback_name}}CallbackSubscriptionBridge, {{asObjectiveCClass type parent.name}}, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + MTRSubscribeAttributeattribute_data_callback_name}}CallbackSubscriptionBridge, {{asObjectiveCClass type parent.name}}, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void) read{{>attribute}}WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters_Internal.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters_Internal.zapt index 73ac0c844c96e7..9d40126f3a857d 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters_Internal.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters_Internal.zapt @@ -10,7 +10,6 @@ {{#if (isSupported (asUpperCamelCase name preserveAcronyms=true))}} @interface MTRBaseCluster{{asUpperCamelCase name preserveAcronyms=true}} () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end {{/if}} diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt index 0790729ce756e5..6ae259be2877e2 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt @@ -1,6 +1,7 @@ {{> header excludeZapComment=true}} #import +#import #import "MTRAsyncCallbackWorkQueue.h" #import "MTRBaseClusterUtils.h" @@ -49,14 +50,11 @@ static void MTRClustersLogCompletion(NSString *logPrefix, id value, NSError *err - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - {{!TODO consider range-checking the incoming number to make sure it's - actually in the uint16_t range}} - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -90,6 +88,20 @@ MTRClusterIDType{{cluster}}ID MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID {{/unless}} {{/inline}} +{{#*inline "baseCluster"}} +{{#if (isSupported cluster command=command)}} +MTRBaseCluster{{cluster}} +{{else}} +MTRBaseCluster{{compatClusterNameRemapping parent.name}} +{{/if}} +{{/inline}} +{{#*inline "completionName"}} +{{#if (isSupported cluster command=command)}} +completion +{{else}} +completionHandler +{{/if}} +{{/inline}} {{#unless hasArguments}} - (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion { @@ -98,73 +110,38 @@ MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID {{/unless}} - (void){{asLowerCamelCase name}}WithParams: ({{> paramsType}} * {{#unless commandHasRequiredField}}_Nullable{{/unless}})params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion { - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, (unsigned int){{> clusterId}}, (unsigned int){{> commandId}}]; + NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int){{> clusterId}}, (unsigned int){{> commandId}}]; // Make a copy of params before we go async. params = [params copy]; - NSNumber *timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice *baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - auto * bridge = new MTR{{>callbackName}}CallbackBridge(self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[{{> baseCluster}} alloc] initWithDevice:baseDevice endpointID:@(self.endpoint) queue:self.device.queue]; + [cluster {{asLowerCamelCase name}}WithParams:params {{> completionName}}: + {{#if hasSpecificResponse}} + ^(MTR{{cluster}}Cluster{{asUpperCamelCase responseName preserveAcronyms=true}}Params * _Nullable value, NSError * _Nullable error) { MTRClustersLogCompletion(logPrefix, value, error); dispatch_async(self.callbackQueue, ^{ - {{#if hasSpecificResponse}} - {{! This treats completion as taking an id for the data. This is - not great from a type-safety perspective, of course. }} - completion(value, error); - {{else}} - {{! For now, don't change the bridge API; instead just use an adapter - to invoke our completion handler. This is not great from a - type-safety perspective, of course. }} - completion(error); - {{/if}} + {{! This treats completion as taking an id for the data. This is + not great from a type-safety perspective, of course. }} + completion(value, error); }); [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, {{>callbackName}}CallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_castcallbackName}}CallbackBridge *>(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - {{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - {{#if mustUseTimedInvoke}} - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - {{/if}} - {{#zcl_command_arguments}} - {{#first}} - {{#unless parent.commandHasRequiredField}} - if (params != nil) { - {{/unless}} - {{/first}} - {{>encode_value target=(concat "request." (asLowerCamelCase label)) source=(concat "params." (asStructPropertyName label)) cluster=parent.parent.name errorCode="return CHIP_ERROR_INVALID_ARGUMENT;" depth=0}} - {{#last}} - {{#unless parent.commandHasRequiredField}} - } - {{/unless}} - {{/last}} - {{/zcl_command_arguments}} - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + } + {{else}} + ^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + {{! For now, don't change the bridge API; instead just use an adapter + to invoke our completion handler. This is not great from a + type-safety perspective, of course. }} + completion(error); + }); + [workItem endWork]; + } + {{/if}} + ]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -198,7 +175,7 @@ MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID {{#*inline "cluster"}}{{asUpperCamelCase parent.name preserveAcronyms=true}}{{/inline}} {{#*inline "attribute"}}Attribute{{asUpperCamelCase name preserveAcronyms=true}}{{/inline}} - (NSDictionary *)read{{>attribute}}WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) params:params]; } {{#if isWritableAttribute}} @@ -216,7 +193,7 @@ MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID } {{/if}} - [self.device writeAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } {{/if}} diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters_Internal.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters_Internal.zapt index 8af0b89a300cf1..a8d80d094743d2 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters_Internal.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters_Internal.zapt @@ -10,7 +10,6 @@ {{#if (isSupported (asUpperCamelCase name preserveAcronyms=true))}} @interface MTRCluster{{asUpperCamelCase name preserveAcronyms=true}} () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice *device; @end {{/if}} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 4123b1d90123c2..5e6aa53256bb6f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -47,13 +47,12 @@ @implementation MTRBaseClusterIdentify - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -88,7 +87,7 @@ - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completion } request.identifyTime = params.identifyTime.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127,7 +126,7 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params request.effectVariant = static_cast>(params.effectVariant.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -138,7 +137,7 @@ - (void)readAttributeIdentifyTimeWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -172,7 +171,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -184,7 +183,7 @@ - (void)subscribeAttributeIdentifyTimeWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -218,7 +217,7 @@ - (void)readAttributeIdentifyTypeWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeIdentifyTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -227,7 +226,7 @@ - (void)subscribeAttributeIdentifyTypeWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -261,7 +260,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -271,7 +270,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -306,7 +305,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -316,7 +315,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -351,7 +350,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -360,7 +359,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Identify::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -394,7 +393,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -403,7 +402,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -437,7 +436,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -446,7 +445,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -480,7 +479,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -489,7 +488,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -859,13 +858,12 @@ @implementation MTRBaseClusterGroups - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -898,7 +896,7 @@ - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params request.groupID = params.groupID.unsignedShortValue; request.groupName = [self asCharSpan:params.groupName]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -932,7 +930,7 @@ - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params } request.groupID = params.groupID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -988,7 +986,7 @@ - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams * } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1022,7 +1020,7 @@ - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params } request.groupID = params.groupID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1062,7 +1060,7 @@ - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Null } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1100,7 +1098,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa request.groupID = params.groupID.unsignedShortValue; request.groupName = [self asCharSpan:params.groupName]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1111,7 +1109,7 @@ - (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1120,7 +1118,7 @@ - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1154,7 +1152,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1164,7 +1162,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1199,7 +1197,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1209,7 +1207,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1244,7 +1242,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1253,7 +1251,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Groups::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1287,7 +1285,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1296,7 +1294,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1330,7 +1328,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1339,7 +1337,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1373,7 +1371,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1382,7 +1380,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1745,13 +1743,12 @@ @implementation MTRBaseClusterScenes - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -1833,7 +1830,7 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1868,7 +1865,7 @@ - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params request.groupID = params.groupID.unsignedShortValue; request.sceneID = params.sceneID.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1903,7 +1900,7 @@ - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params request.groupID = params.groupID.unsignedShortValue; request.sceneID = params.sceneID.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1938,7 +1935,7 @@ - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)param } request.groupID = params.groupID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1973,7 +1970,7 @@ - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params request.groupID = params.groupID.unsignedShortValue; request.sceneID = params.sceneID.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2019,7 +2016,7 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params comple } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2054,7 +2051,7 @@ - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams * } request.groupID = params.groupID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2139,7 +2136,7 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2175,7 +2172,7 @@ - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)p request.groupID = params.groupID.unsignedShortValue; request.sceneID = params.sceneID.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2213,7 +2210,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params request.groupIdentifierTo = params.groupIdentifierTo.unsignedShortValue; request.sceneIdentifierTo = params.sceneIdentifierTo.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2224,7 +2221,7 @@ - (void)readAttributeSceneCountWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2233,7 +2230,7 @@ - (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2267,7 +2264,7 @@ - (void)readAttributeCurrentSceneWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2276,7 +2273,7 @@ - (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2310,7 +2307,7 @@ - (void)readAttributeCurrentGroupWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2319,7 +2316,7 @@ - (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2353,7 +2350,7 @@ - (void)readAttributeSceneValidWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2362,7 +2359,7 @@ - (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2396,7 +2393,7 @@ - (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2405,7 +2402,7 @@ - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2439,7 +2436,7 @@ - (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2448,7 +2445,7 @@ - (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2483,7 +2480,7 @@ - (void)readAttributeSceneTableSizeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::SceneTableSize::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2492,7 +2489,7 @@ - (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = Scenes::Attributes::SceneTableSize::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2526,7 +2523,7 @@ - (void)readAttributeRemainingCapacityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::RemainingCapacity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRemainingCapacityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2535,7 +2532,7 @@ - (void)subscribeAttributeRemainingCapacityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Scenes::Attributes::RemainingCapacity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2570,7 +2567,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2580,7 +2577,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2615,7 +2612,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2625,7 +2622,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2660,7 +2657,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2669,7 +2666,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Scenes::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2703,7 +2700,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2712,7 +2709,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2746,7 +2743,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2755,7 +2752,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2789,7 +2786,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2798,7 +2795,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3416,13 +3413,12 @@ @implementation MTRBaseClusterOnOff - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -3460,7 +3456,7 @@ - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completion:(M } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3499,7 +3495,7 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completion:(MTR } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3538,7 +3534,7 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params complet } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3576,7 +3572,7 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params com params.effectIdentifier.unsignedCharValue); request.effectVariant = params.effectVariant.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3616,7 +3612,7 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3655,7 +3651,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params c request.onTime = params.onTime.unsignedShortValue; request.offWaitTime = params.offWaitTime.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3666,7 +3662,7 @@ - (void)readAttributeOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams * _Nonnull)params @@ -3675,7 +3671,7 @@ - (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3709,7 +3705,7 @@ - (void)readAttributeGlobalSceneControlWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams * _Nonnull)params @@ -3719,7 +3715,7 @@ - (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams * _No { using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3754,7 +3750,7 @@ - (void)readAttributeOnTimeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -3788,7 +3784,7 @@ - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3800,7 +3796,7 @@ - (void)subscribeAttributeOnTimeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3834,7 +3830,7 @@ - (void)readAttributeOffWaitTimeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -3868,7 +3864,7 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3880,7 +3876,7 @@ - (void)subscribeAttributeOffWaitTimeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3914,7 +3910,7 @@ - (void)readAttributeStartUpOnOffWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -3953,7 +3949,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedCharValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3965,7 +3961,7 @@ - (void)subscribeAttributeStartUpOnOffWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3999,7 +3995,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4009,7 +4005,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4044,7 +4040,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4054,7 +4050,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4089,7 +4085,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4098,7 +4094,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OnOff::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4132,7 +4128,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4141,7 +4137,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4175,7 +4171,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4184,7 +4180,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4218,7 +4214,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4227,7 +4223,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4778,13 +4774,12 @@ @implementation MTRBaseClusterOnOffSwitchConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -4794,7 +4789,7 @@ - (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4803,7 +4798,7 @@ - (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4837,7 +4832,7 @@ - (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -4871,7 +4866,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -4883,7 +4878,7 @@ - (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4918,7 +4913,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4928,7 +4923,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4964,7 +4959,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4974,7 +4969,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5009,7 +5004,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5018,7 +5013,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5052,7 +5047,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5061,7 +5056,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5095,7 +5090,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5104,7 +5099,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5138,7 +5133,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5147,7 +5142,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5507,13 +5502,12 @@ @implementation MTRBaseClusterLevelControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -5558,7 +5552,7 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5604,7 +5598,7 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completion:(MT request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5651,7 +5645,7 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completion:(MT request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5690,7 +5684,7 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completion:(MT request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5737,7 +5731,7 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5783,7 +5777,7 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5830,7 +5824,7 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5869,7 +5863,7 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)par request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5906,7 +5900,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre } request.frequency = params.frequency.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5917,7 +5911,7 @@ - (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5926,7 +5920,7 @@ - (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5960,7 +5954,7 @@ - (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5969,7 +5963,7 @@ - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6003,7 +5997,7 @@ - (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6012,7 +6006,7 @@ - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6046,7 +6040,7 @@ - (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6055,7 +6049,7 @@ - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6089,7 +6083,7 @@ - (void)readAttributeCurrentFrequencyWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6098,7 +6092,7 @@ - (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6133,7 +6127,7 @@ - (void)readAttributeMinFrequencyWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6142,7 +6136,7 @@ - (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6176,7 +6170,7 @@ - (void)readAttributeMaxFrequencyWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6185,7 +6179,7 @@ - (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6219,7 +6213,7 @@ - (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::Options::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -6253,7 +6247,7 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6265,7 +6259,7 @@ - (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = LevelControl::Attributes::Options::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6299,7 +6293,7 @@ - (void)readAttributeOnOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -6333,7 +6327,7 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6346,7 +6340,7 @@ - (void)subscribeAttributeOnOffTransitionTimeWithParams:(MTRSubscribeParams * _N { using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6381,7 +6375,7 @@ - (void)readAttributeOnLevelWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6420,7 +6414,7 @@ - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6432,7 +6426,7 @@ - (void)subscribeAttributeOnLevelWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6466,7 +6460,7 @@ - (void)readAttributeOnTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6505,7 +6499,7 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6517,7 +6511,7 @@ - (void)subscribeAttributeOnTransitionTimeWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6552,7 +6546,7 @@ - (void)readAttributeOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6591,7 +6585,7 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6603,7 +6597,7 @@ - (void)subscribeAttributeOffTransitionTimeWithParams:(MTRSubscribeParams * _Non { using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6638,7 +6632,7 @@ - (void)readAttributeDefaultMoveRateWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6677,7 +6671,7 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6689,7 +6683,7 @@ - (void)subscribeAttributeDefaultMoveRateWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6724,7 +6718,7 @@ - (void)readAttributeStartUpCurrentLevelWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6763,7 +6757,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6776,7 +6770,7 @@ - (void)subscribeAttributeStartUpCurrentLevelWithParams:(MTRSubscribeParams * _N { using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6811,7 +6805,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6821,7 +6815,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6856,7 +6850,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6866,7 +6860,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6901,7 +6895,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6910,7 +6904,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6944,7 +6938,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6953,7 +6947,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6987,7 +6981,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6996,7 +6990,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -7030,7 +7024,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -7039,7 +7033,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8025,13 +8019,12 @@ @implementation MTRBaseClusterBinaryInputBasic - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -8041,7 +8034,7 @@ - (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8075,7 +8068,7 @@ - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8087,7 +8080,7 @@ - (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8121,7 +8114,7 @@ - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8155,7 +8148,7 @@ - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8167,7 +8160,7 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8201,7 +8194,7 @@ - (void)readAttributeInactiveTextWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8235,7 +8228,7 @@ - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8247,7 +8240,7 @@ - (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8281,7 +8274,7 @@ - (void)readAttributeOutOfServiceWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8315,7 +8308,7 @@ - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8327,7 +8320,7 @@ - (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8361,7 +8354,7 @@ - (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8370,7 +8363,7 @@ - (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8404,7 +8397,7 @@ - (void)readAttributePresentValueWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8438,7 +8431,7 @@ - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8450,7 +8443,7 @@ - (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8484,7 +8477,7 @@ - (void)readAttributeReliabilityWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8518,7 +8511,7 @@ - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8530,7 +8523,7 @@ - (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8564,7 +8557,7 @@ - (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8573,7 +8566,7 @@ - (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8607,7 +8600,7 @@ - (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8616,7 +8609,7 @@ - (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8651,7 +8644,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8661,7 +8654,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8696,7 +8689,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8706,7 +8699,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8741,7 +8734,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8750,7 +8743,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8784,7 +8777,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8793,7 +8786,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8827,7 +8820,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8836,7 +8829,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8870,7 +8863,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8879,7 +8872,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9589,13 +9582,12 @@ @implementation MTRBaseClusterPulseWidthModulation - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -9606,7 +9598,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9616,7 +9608,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9652,7 +9644,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9662,7 +9654,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9697,7 +9689,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9706,7 +9698,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9740,7 +9732,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9749,7 +9741,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9783,7 +9775,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9792,7 +9784,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9826,7 +9818,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9835,7 +9827,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9871,13 +9863,12 @@ @implementation MTRBaseClusterDescriptor - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -9887,7 +9878,7 @@ - (void)readAttributeDeviceTypeListWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9896,7 +9887,7 @@ - (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9930,7 +9921,7 @@ - (void)readAttributeServerListWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9939,7 +9930,7 @@ - (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9973,7 +9964,7 @@ - (void)readAttributeClientListWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9982,7 +9973,7 @@ - (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10016,7 +10007,7 @@ - (void)readAttributePartsListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10025,7 +10016,7 @@ - (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10059,7 +10050,7 @@ - (void)readAttributeTagListWithCompletion:(void (^)(NSArray * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::TagList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTagListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10068,7 +10059,7 @@ - (void)subscribeAttributeTagListWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = Descriptor::Attributes::TagList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10102,7 +10093,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10112,7 +10103,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10147,7 +10138,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10157,7 +10148,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10192,7 +10183,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10201,7 +10192,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10235,7 +10226,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10244,7 +10235,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10278,7 +10269,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10287,7 +10278,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10321,7 +10312,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10330,7 +10321,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10762,13 +10753,12 @@ @implementation MTRBaseClusterBinding - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -10779,7 +10769,7 @@ - (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = Binding::Attributes::Binding::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -10850,7 +10840,7 @@ - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -10862,7 +10852,7 @@ - (void)subscribeAttributeBindingWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = Binding::Attributes::Binding::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10896,7 +10886,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10906,7 +10896,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10941,7 +10931,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10951,7 +10941,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10986,7 +10976,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Binding::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10995,7 +10985,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Binding::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11029,7 +11019,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11038,7 +11028,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11072,7 +11062,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11081,7 +11071,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11115,7 +11105,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11124,7 +11114,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11441,13 +11431,12 @@ @implementation MTRBaseClusterAccessControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -11458,7 +11447,7 @@ - (void)readAttributeACLWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -11592,7 +11581,7 @@ - (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -11604,7 +11593,7 @@ - (void)subscribeAttributeACLWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11639,7 +11628,7 @@ - (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -11695,7 +11684,7 @@ - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -11707,7 +11696,7 @@ - (void)subscribeAttributeExtensionWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11742,7 +11731,7 @@ - (void)readAttributeSubjectsPerAccessControlEntryWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11753,7 +11742,7 @@ - (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeP { using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11789,7 +11778,7 @@ - (void)readAttributeTargetsPerAccessControlEntryWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11800,7 +11789,7 @@ - (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribePa { using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11836,7 +11825,7 @@ - (void)readAttributeAccessControlEntriesPerFabricWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11847,7 +11836,7 @@ - (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeP { using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11882,7 +11871,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11892,7 +11881,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11927,7 +11916,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11937,7 +11926,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11972,7 +11961,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11981,7 +11970,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -12015,7 +12004,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -12024,7 +12013,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -12058,7 +12047,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -12067,7 +12056,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -12101,7 +12090,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -12110,7 +12099,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -12615,13 +12604,12 @@ @implementation MTRBaseClusterActions - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -12660,7 +12648,7 @@ - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params c definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12702,7 +12690,7 @@ - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWit } request.transitionTime = params.transitionTime.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12742,7 +12730,7 @@ - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params compl definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12784,7 +12772,7 @@ - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurat } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12824,7 +12812,7 @@ - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params complet definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12864,7 +12852,7 @@ - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params compl definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12906,7 +12894,7 @@ - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurat } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12946,7 +12934,7 @@ - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params com definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12986,7 +12974,7 @@ - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params com definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -13028,7 +13016,7 @@ - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDur } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -13068,7 +13056,7 @@ - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params c definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -13110,7 +13098,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -13121,7 +13109,7 @@ - (void)readAttributeActionListWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::ActionList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13130,7 +13118,7 @@ - (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Actions::Attributes::ActionList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13164,7 +13152,7 @@ - (void)readAttributeEndpointListsWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13173,7 +13161,7 @@ - (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13207,7 +13195,7 @@ - (void)readAttributeSetupURLWithCompletion:(void (^)(NSString * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13216,7 +13204,7 @@ - (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13250,7 +13238,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13260,7 +13248,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13295,7 +13283,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13305,7 +13293,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13340,7 +13328,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13349,7 +13337,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Actions::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13383,7 +13371,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13392,7 +13380,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13426,7 +13414,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13435,7 +13423,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13469,7 +13457,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13478,7 +13466,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13927,13 +13915,12 @@ @implementation MTRBaseClusterBasicInformation - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -13972,7 +13959,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -13983,7 +13970,7 @@ - (void)readAttributeDataModelRevisionWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::DataModelRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13992,7 +13979,7 @@ - (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams * _Non { using TypeInfo = BasicInformation::Attributes::DataModelRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14027,7 +14014,7 @@ - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::VendorName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14036,7 +14023,7 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BasicInformation::Attributes::VendorName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14070,7 +14057,7 @@ - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::VendorID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14079,7 +14066,7 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BasicInformation::Attributes::VendorID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14113,7 +14100,7 @@ - (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ProductName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14122,7 +14109,7 @@ - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = BasicInformation::Attributes::ProductName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14156,7 +14143,7 @@ - (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ProductID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14165,7 +14152,7 @@ - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BasicInformation::Attributes::ProductID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14199,7 +14186,7 @@ - (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -14233,7 +14220,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -14245,7 +14232,7 @@ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14279,7 +14266,7 @@ - (void)readAttributeLocationWithCompletion:(void (^)(NSString * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -14313,7 +14300,7 @@ - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -14325,7 +14312,7 @@ - (void)subscribeAttributeLocationWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14359,7 +14346,7 @@ - (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::HardwareVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14368,7 +14355,7 @@ - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BasicInformation::Attributes::HardwareVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14403,7 +14390,7 @@ - (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::HardwareVersionString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14413,7 +14400,7 @@ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * { using TypeInfo = BasicInformation::Attributes::HardwareVersionString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14448,7 +14435,7 @@ - (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::SoftwareVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14457,7 +14444,7 @@ - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BasicInformation::Attributes::SoftwareVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14492,7 +14479,7 @@ - (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::SoftwareVersionString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14502,7 +14489,7 @@ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * { using TypeInfo = BasicInformation::Attributes::SoftwareVersionString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14537,7 +14524,7 @@ - (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ManufacturingDate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14546,7 +14533,7 @@ - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Non { using TypeInfo = BasicInformation::Attributes::ManufacturingDate::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14581,7 +14568,7 @@ - (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::PartNumber::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14590,7 +14577,7 @@ - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BasicInformation::Attributes::PartNumber::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14624,7 +14611,7 @@ - (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ProductURL::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14633,7 +14620,7 @@ - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BasicInformation::Attributes::ProductURL::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14667,7 +14654,7 @@ - (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ProductLabel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14676,7 +14663,7 @@ - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BasicInformation::Attributes::ProductLabel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14710,7 +14697,7 @@ - (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::SerialNumber::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14719,7 +14706,7 @@ - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BasicInformation::Attributes::SerialNumber::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14753,7 +14740,7 @@ - (void)readAttributeLocalConfigDisabledWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -14787,7 +14774,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -14800,7 +14787,7 @@ - (void)subscribeAttributeLocalConfigDisabledWithParams:(MTRSubscribeParams * _N { using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14835,7 +14822,7 @@ - (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::Reachable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14844,7 +14831,7 @@ - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BasicInformation::Attributes::Reachable::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14878,7 +14865,7 @@ - (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::UniqueID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14887,7 +14874,7 @@ - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BasicInformation::Attributes::UniqueID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14923,7 +14910,7 @@ - (void)readAttributeCapabilityMinimaWithCompletion:(void (^)(MTRBasicInformatio using TypeInfo = BasicInformation::Attributes::CapabilityMinima::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14934,7 +14921,7 @@ - (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = BasicInformation::Attributes::CapabilityMinima::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeCapabilityMinimaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -14971,7 +14958,7 @@ - (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBasicInformati using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14982,7 +14969,7 @@ - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Non using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -15017,7 +15004,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15027,7 +15014,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -15062,7 +15049,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15072,7 +15059,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BasicInformation::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -15107,7 +15094,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15116,7 +15103,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -15150,7 +15137,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15159,7 +15146,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BasicInformation::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -15193,7 +15180,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15202,7 +15189,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BasicInformation::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -15236,7 +15223,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15245,7 +15232,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BasicInformation::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16422,13 +16409,12 @@ @implementation MTRBaseClusterOTASoftwareUpdateProvider - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -16503,7 +16489,7 @@ - (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParam definedValue_0 = [self asByteSpan:params.metadataForProvider]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -16539,7 +16525,7 @@ - (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUp request.updateToken = [self asByteSpan:params.updateToken]; request.newVersion = params.newVersion.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -16577,7 +16563,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify request.updateToken = [self asByteSpan:params.updateToken]; request.softwareVersion = params.softwareVersion.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -16589,7 +16575,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16599,7 +16585,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16635,7 +16621,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16645,7 +16631,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16680,7 +16666,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16689,7 +16675,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16723,7 +16709,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16732,7 +16718,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16766,7 +16752,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16775,7 +16761,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16809,7 +16795,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16818,7 +16804,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17114,13 +17100,12 @@ @implementation MTRBaseClusterOTASoftwareUpdateRequestor - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -17164,7 +17149,7 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou } request.endpoint = params.endpoint.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -17177,7 +17162,7 @@ - (void)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)pa using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -17234,7 +17219,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -17247,7 +17232,7 @@ - (void)subscribeAttributeDefaultOTAProvidersWithParams:(MTRSubscribeParams * _N { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17282,7 +17267,7 @@ - (void)readAttributeUpdatePossibleWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17291,7 +17276,7 @@ - (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17326,7 +17311,7 @@ - (void)readAttributeUpdateStateWithCompletion:(void (^)(NSNumber * _Nullable va using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17335,7 +17320,7 @@ - (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17369,7 +17354,7 @@ - (void)readAttributeUpdateStateProgressWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17379,7 +17364,7 @@ - (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _N { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17415,7 +17400,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17425,7 +17410,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17461,7 +17446,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17471,7 +17456,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17506,7 +17491,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17515,7 +17500,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17550,7 +17535,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17559,7 +17544,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17593,7 +17578,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17602,7 +17587,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17636,7 +17621,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17645,7 +17630,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18107,13 +18092,12 @@ @implementation MTRBaseClusterLocalizationConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -18123,7 +18107,7 @@ - (void)readAttributeActiveLocaleWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -18157,7 +18141,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -18169,7 +18153,7 @@ - (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18204,7 +18188,7 @@ - (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullabl using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18213,7 +18197,7 @@ - (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18249,7 +18233,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18259,7 +18243,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18295,7 +18279,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18305,7 +18289,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18340,7 +18324,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18349,7 +18333,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18383,7 +18367,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18392,7 +18376,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18426,7 +18410,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18435,7 +18419,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18469,7 +18453,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18478,7 +18462,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18839,13 +18823,12 @@ @implementation MTRBaseClusterTimeFormatLocalization - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -18856,7 +18839,7 @@ - (void)readAttributeHourFormatWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -18890,7 +18873,7 @@ - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -18902,7 +18885,7 @@ - (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18937,7 +18920,7 @@ - (void)readAttributeActiveCalendarTypeWithCompletion:(void (^)(NSNumber * _Null using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -18971,7 +18954,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -18984,7 +18967,7 @@ - (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams * _No { using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19020,7 +19003,7 @@ - (void)readAttributeSupportedCalendarTypesWithCompletion:(void (^)(NSArray * _N using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19030,7 +19013,7 @@ - (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * { using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19066,7 +19049,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19076,7 +19059,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19112,7 +19095,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19122,7 +19105,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19157,7 +19140,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19166,7 +19149,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19200,7 +19183,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19209,7 +19192,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19243,7 +19226,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19252,7 +19235,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19286,7 +19269,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19295,7 +19278,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19712,13 +19695,12 @@ @implementation MTRBaseClusterUnitLocalization - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -19728,7 +19710,7 @@ - (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -19762,7 +19744,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -19774,7 +19756,7 @@ - (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19809,7 +19791,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19819,7 +19801,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19854,7 +19836,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19864,7 +19846,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19899,7 +19881,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19908,7 +19890,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19942,7 +19924,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19951,7 +19933,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19985,7 +19967,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19994,7 +19976,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20028,7 +20010,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20037,7 +20019,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20355,13 +20337,12 @@ @implementation MTRBaseClusterPowerSourceConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -20371,7 +20352,7 @@ - (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20380,7 +20361,7 @@ - (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20415,7 +20396,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20425,7 +20406,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20461,7 +20442,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20471,7 +20452,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20506,7 +20487,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20515,7 +20496,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20549,7 +20530,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20558,7 +20539,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20592,7 +20573,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20601,7 +20582,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20635,7 +20616,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20644,7 +20625,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20949,13 +20930,12 @@ @implementation MTRBaseClusterPowerSource - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -20965,7 +20945,7 @@ - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::Status::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20974,7 +20954,7 @@ - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = PowerSource::Attributes::Status::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21008,7 +20988,7 @@ - (void)readAttributeOrderWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::Order::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21017,7 +20997,7 @@ - (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = PowerSource::Attributes::Order::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21051,7 +21031,7 @@ - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::Description::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21060,7 +21040,7 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PowerSource::Attributes::Description::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21095,7 +21075,7 @@ - (void)readAttributeWiredAssessedInputVoltageWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21105,7 +21085,7 @@ - (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParam { using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21141,7 +21121,7 @@ - (void)readAttributeWiredAssessedInputFrequencyWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21151,7 +21131,7 @@ - (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribePar { using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21186,7 +21166,7 @@ - (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21195,7 +21175,7 @@ - (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21230,7 +21210,7 @@ - (void)readAttributeWiredAssessedCurrentWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21240,7 +21220,7 @@ - (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21275,7 +21255,7 @@ - (void)readAttributeWiredNominalVoltageWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21285,7 +21265,7 @@ - (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21320,7 +21300,7 @@ - (void)readAttributeWiredMaximumCurrentWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21330,7 +21310,7 @@ - (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21365,7 +21345,7 @@ - (void)readAttributeWiredPresentWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21374,7 +21354,7 @@ - (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21408,7 +21388,7 @@ - (void)readAttributeActiveWiredFaultsWithCompletion:(void (^)(NSArray * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21417,7 +21397,7 @@ - (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Non { using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21452,7 +21432,7 @@ - (void)readAttributeBatVoltageWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21461,7 +21441,7 @@ - (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21495,7 +21475,7 @@ - (void)readAttributeBatPercentRemainingWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21505,7 +21485,7 @@ - (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21540,7 +21520,7 @@ - (void)readAttributeBatTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21549,7 +21529,7 @@ - (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21584,7 +21564,7 @@ - (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21593,7 +21573,7 @@ - (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21627,7 +21607,7 @@ - (void)readAttributeBatReplacementNeededWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21637,7 +21617,7 @@ - (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21672,7 +21652,7 @@ - (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21681,7 +21661,7 @@ - (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21716,7 +21696,7 @@ - (void)readAttributeBatPresentWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21725,7 +21705,7 @@ - (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21759,7 +21739,7 @@ - (void)readAttributeActiveBatFaultsWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21768,7 +21748,7 @@ - (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21803,7 +21783,7 @@ - (void)readAttributeBatReplacementDescriptionWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21813,7 +21793,7 @@ - (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParam { using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21849,7 +21829,7 @@ - (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21859,7 +21839,7 @@ - (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21894,7 +21874,7 @@ - (void)readAttributeBatANSIDesignationWithCompletion:(void (^)(NSString * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21904,7 +21884,7 @@ - (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _No { using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21939,7 +21919,7 @@ - (void)readAttributeBatIECDesignationWithCompletion:(void (^)(NSString * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21948,7 +21928,7 @@ - (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Non { using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21984,7 +21964,7 @@ - (void)readAttributeBatApprovedChemistryWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21994,7 +21974,7 @@ - (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22029,7 +22009,7 @@ - (void)readAttributeBatCapacityWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22038,7 +22018,7 @@ - (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22072,7 +22052,7 @@ - (void)readAttributeBatQuantityWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22081,7 +22061,7 @@ - (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22115,7 +22095,7 @@ - (void)readAttributeBatChargeStateWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22124,7 +22104,7 @@ - (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22158,7 +22138,7 @@ - (void)readAttributeBatTimeToFullChargeWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22168,7 +22148,7 @@ - (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22204,7 +22184,7 @@ - (void)readAttributeBatFunctionalWhileChargingWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22214,7 +22194,7 @@ - (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribePara { using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22249,7 +22229,7 @@ - (void)readAttributeBatChargingCurrentWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22259,7 +22239,7 @@ - (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _No { using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22294,7 +22274,7 @@ - (void)readAttributeActiveBatChargeFaultsWithCompletion:(void (^)(NSArray * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22304,7 +22284,7 @@ - (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * { using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22339,7 +22319,7 @@ - (void)readAttributeEndpointListWithCompletion:(void (^)(NSArray * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22348,7 +22328,7 @@ - (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22382,7 +22362,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22392,7 +22372,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22427,7 +22407,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22437,7 +22417,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22472,7 +22452,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22481,7 +22461,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22515,7 +22495,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22524,7 +22504,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22558,7 +22538,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22567,7 +22547,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22601,7 +22581,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22610,7 +22590,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24241,13 +24221,12 @@ @implementation MTRBaseClusterGeneralCommissioning - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -24282,7 +24261,7 @@ - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams * request.expiryLengthSeconds = params.expiryLengthSeconds.unsignedShortValue; request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -24320,7 +24299,7 @@ - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulato request.countryCode = [self asCharSpan:params.countryCode]; request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -24361,7 +24340,7 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -24372,7 +24351,7 @@ - (void)readAttributeBreadcrumbWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -24406,7 +24385,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -24418,7 +24397,7 @@ - (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24454,7 +24433,7 @@ - (void)readAttributeBasicCommissioningInfoWithCompletion: using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24466,7 +24445,7 @@ - (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, - reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void) @@ -24504,7 +24483,7 @@ - (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullab using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24513,7 +24492,7 @@ - (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24549,7 +24528,7 @@ - (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Null using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24559,7 +24538,7 @@ - (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _No { using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24595,7 +24574,7 @@ - (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24606,7 +24585,7 @@ - (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribePa { using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24642,7 +24621,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24652,7 +24631,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24688,7 +24667,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24698,7 +24677,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24733,7 +24712,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24742,7 +24721,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24776,7 +24755,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24785,7 +24764,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24819,7 +24798,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24828,7 +24807,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24862,7 +24841,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24871,7 +24850,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25423,13 +25402,12 @@ @implementation MTRBaseClusterNetworkCommissioning - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -25477,7 +25455,7 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25517,7 +25495,7 @@ - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpd definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25556,7 +25534,7 @@ - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrU definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25595,7 +25573,7 @@ - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkPara definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25634,7 +25612,7 @@ - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkPa definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25674,7 +25652,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25685,7 +25663,7 @@ - (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25694,7 +25672,7 @@ - (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25728,7 +25706,7 @@ - (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25737,7 +25715,7 @@ - (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25771,7 +25749,7 @@ - (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25781,7 +25759,7 @@ - (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _No { using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25816,7 +25794,7 @@ - (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25826,7 +25804,7 @@ - (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * { using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25861,7 +25839,7 @@ - (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -25895,7 +25873,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25907,7 +25885,7 @@ - (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25943,7 +25921,7 @@ - (void)readAttributeLastNetworkingStatusWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25954,7 +25932,7 @@ - (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _ using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLastNetworkingStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -25990,7 +25968,7 @@ - (void)readAttributeLastNetworkIDWithCompletion:(void (^)(NSData * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25999,7 +25977,7 @@ - (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26033,7 +26011,7 @@ - (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26043,7 +26021,7 @@ - (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * { using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26079,7 +26057,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26089,7 +26067,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26125,7 +26103,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26135,7 +26113,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26170,7 +26148,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26179,7 +26157,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26213,7 +26191,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26222,7 +26200,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26256,7 +26234,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26265,7 +26243,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26299,7 +26277,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26308,7 +26286,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27004,13 +26982,12 @@ @implementation MTRBaseClusterDiagnosticLogs - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -27050,7 +27027,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque definedValue_0 = [self asCharSpan:params.transferFileDesignator]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -27061,7 +27038,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27071,7 +27048,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27106,7 +27083,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27116,7 +27093,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27151,7 +27128,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27160,7 +27137,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27194,7 +27171,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27203,7 +27180,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27237,7 +27214,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27246,7 +27223,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27280,7 +27257,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27289,7 +27266,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27565,13 +27542,12 @@ @implementation MTRBaseClusterGeneralDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -27608,7 +27584,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger request.enableKey = [self asByteSpan:params.enableKey]; request.eventTrigger = params.eventTrigger.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -27619,7 +27595,7 @@ - (void)readAttributeNetworkInterfacesWithCompletion:(void (^)(NSArray * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27628,7 +27604,7 @@ - (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Non { using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27663,7 +27639,7 @@ - (void)readAttributeRebootCountWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27672,7 +27648,7 @@ - (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27706,7 +27682,7 @@ - (void)readAttributeUpTimeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27715,7 +27691,7 @@ - (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27749,7 +27725,7 @@ - (void)readAttributeTotalOperationalHoursWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27759,7 +27735,7 @@ - (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * { using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27794,7 +27770,7 @@ - (void)readAttributeBootReasonWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBootReasonWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27803,7 +27779,7 @@ - (void)subscribeAttributeBootReasonWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27837,7 +27813,7 @@ - (void)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27847,7 +27823,7 @@ - (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _ { using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27882,7 +27858,7 @@ - (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27891,7 +27867,7 @@ - (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Non { using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27926,7 +27902,7 @@ - (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27936,7 +27912,7 @@ - (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _N { using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27972,7 +27948,7 @@ - (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27982,7 +27958,7 @@ - (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams { using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28017,7 +27993,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28027,7 +28003,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28062,7 +28038,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28072,7 +28048,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28107,7 +28083,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28116,7 +28092,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28150,7 +28126,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28159,7 +28135,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28193,7 +28169,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28202,7 +28178,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28236,7 +28212,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28245,7 +28221,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28910,13 +28886,12 @@ @implementation MTRBaseClusterSoftwareDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -28955,7 +28930,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -28966,7 +28941,7 @@ - (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28975,7 +28950,7 @@ - (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29009,7 +28984,7 @@ - (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29018,7 +28993,7 @@ - (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29053,7 +29028,7 @@ - (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29062,7 +29037,7 @@ - (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29098,7 +29073,7 @@ - (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29108,7 +29083,7 @@ - (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29144,7 +29119,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29154,7 +29129,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29189,7 +29164,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29199,7 +29174,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29234,7 +29209,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29243,7 +29218,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29277,7 +29252,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29286,7 +29261,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29320,7 +29295,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29329,7 +29304,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29363,7 +29338,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29372,7 +29347,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29822,13 +29797,12 @@ @implementation MTRBaseClusterThreadNetworkDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -29867,7 +29841,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -29878,7 +29852,7 @@ - (void)readAttributeChannelWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29887,7 +29861,7 @@ - (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29922,7 +29896,7 @@ - (void)readAttributeRoutingRoleWithCompletion:(void (^)(NSNumber * _Nullable va using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29931,7 +29905,7 @@ - (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29965,7 +29939,7 @@ - (void)readAttributeNetworkNameWithCompletion:(void (^)(NSString * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29974,7 +29948,7 @@ - (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30008,7 +29982,7 @@ - (void)readAttributePanIdWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30017,7 +29991,7 @@ - (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30051,7 +30025,7 @@ - (void)readAttributeExtendedPanIdWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30060,7 +30034,7 @@ - (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30094,7 +30068,7 @@ - (void)readAttributeMeshLocalPrefixWithCompletion:(void (^)(NSData * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30103,7 +30077,7 @@ - (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30137,7 +30111,7 @@ - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30146,7 +30120,7 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30180,7 +30154,7 @@ - (void)readAttributeNeighborTableWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNeighborTableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30189,7 +30163,7 @@ - (void)subscribeAttributeNeighborTableWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30223,7 +30197,7 @@ - (void)readAttributeRouteTableWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRouteTableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30232,7 +30206,7 @@ - (void)subscribeAttributeRouteTableWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30266,7 +30240,7 @@ - (void)readAttributePartitionIdWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30275,7 +30249,7 @@ - (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30309,7 +30283,7 @@ - (void)readAttributeWeightingWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30318,7 +30292,7 @@ - (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30352,7 +30326,7 @@ - (void)readAttributeDataVersionWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30361,7 +30335,7 @@ - (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30395,7 +30369,7 @@ - (void)readAttributeStableDataVersionWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30404,7 +30378,7 @@ - (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30439,7 +30413,7 @@ - (void)readAttributeLeaderRouterIdWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30448,7 +30422,7 @@ - (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30482,7 +30456,7 @@ - (void)readAttributeDetachedRoleCountWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30491,7 +30465,7 @@ - (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30526,7 +30500,7 @@ - (void)readAttributeChildRoleCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30535,7 +30509,7 @@ - (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30569,7 +30543,7 @@ - (void)readAttributeRouterRoleCountWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30578,7 +30552,7 @@ - (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30613,7 +30587,7 @@ - (void)readAttributeLeaderRoleCountWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30622,7 +30596,7 @@ - (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30657,7 +30631,7 @@ - (void)readAttributeAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30667,7 +30641,7 @@ - (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _No { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30703,7 +30677,7 @@ - (void)readAttributePartitionIdChangeCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30713,7 +30687,7 @@ - (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30749,7 +30723,7 @@ - (void)readAttributeBetterPartitionAttachAttemptCountWithCompletion:(void (^)(N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30760,7 +30734,7 @@ - (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscr { using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30796,7 +30770,7 @@ - (void)readAttributeParentChangeCountWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30805,7 +30779,7 @@ - (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30840,7 +30814,7 @@ - (void)readAttributeTxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30849,7 +30823,7 @@ - (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30883,7 +30857,7 @@ - (void)readAttributeTxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30892,7 +30866,7 @@ - (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30926,7 +30900,7 @@ - (void)readAttributeTxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30935,7 +30909,7 @@ - (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30970,7 +30944,7 @@ - (void)readAttributeTxAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30980,7 +30954,7 @@ - (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _N { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31015,7 +30989,7 @@ - (void)readAttributeTxAckedCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31024,7 +30998,7 @@ - (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31058,7 +31032,7 @@ - (void)readAttributeTxNoAckRequestedCountWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31068,7 +31042,7 @@ - (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31103,7 +31077,7 @@ - (void)readAttributeTxDataCountWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31112,7 +31086,7 @@ - (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31146,7 +31120,7 @@ - (void)readAttributeTxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31155,7 +31129,7 @@ - (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31190,7 +31164,7 @@ - (void)readAttributeTxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31199,7 +31173,7 @@ - (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31233,7 +31207,7 @@ - (void)readAttributeTxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31243,7 +31217,7 @@ - (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _ { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31278,7 +31252,7 @@ - (void)readAttributeTxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31287,7 +31261,7 @@ - (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31321,7 +31295,7 @@ - (void)readAttributeTxRetryCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31330,7 +31304,7 @@ - (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31365,7 +31339,7 @@ - (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31375,7 +31349,7 @@ - (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribePar { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31411,7 +31385,7 @@ - (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31422,7 +31396,7 @@ - (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeP { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31457,7 +31431,7 @@ - (void)readAttributeTxErrCcaCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31466,7 +31440,7 @@ - (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31500,7 +31474,7 @@ - (void)readAttributeTxErrAbortCountWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31509,7 +31483,7 @@ - (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31544,7 +31518,7 @@ - (void)readAttributeTxErrBusyChannelCountWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31554,7 +31528,7 @@ - (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31589,7 +31563,7 @@ - (void)readAttributeRxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31598,7 +31572,7 @@ - (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31632,7 +31606,7 @@ - (void)readAttributeRxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31641,7 +31615,7 @@ - (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31675,7 +31649,7 @@ - (void)readAttributeRxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31684,7 +31658,7 @@ - (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31719,7 +31693,7 @@ - (void)readAttributeRxDataCountWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31728,7 +31702,7 @@ - (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31762,7 +31736,7 @@ - (void)readAttributeRxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31771,7 +31745,7 @@ - (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31806,7 +31780,7 @@ - (void)readAttributeRxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31815,7 +31789,7 @@ - (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31849,7 +31823,7 @@ - (void)readAttributeRxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31859,7 +31833,7 @@ - (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _ { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31894,7 +31868,7 @@ - (void)readAttributeRxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31903,7 +31877,7 @@ - (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31938,7 +31912,7 @@ - (void)readAttributeRxAddressFilteredCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31948,7 +31922,7 @@ - (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31984,7 +31958,7 @@ - (void)readAttributeRxDestAddrFilteredCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31994,7 +31968,7 @@ - (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32029,7 +32003,7 @@ - (void)readAttributeRxDuplicatedCountWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32038,7 +32012,7 @@ - (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32073,7 +32047,7 @@ - (void)readAttributeRxErrNoFrameCountWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32082,7 +32056,7 @@ - (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32118,7 +32092,7 @@ - (void)readAttributeRxErrUnknownNeighborCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32128,7 +32102,7 @@ - (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParam { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32164,7 +32138,7 @@ - (void)readAttributeRxErrInvalidSrcAddrCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32174,7 +32148,7 @@ - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32209,7 +32183,7 @@ - (void)readAttributeRxErrSecCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32218,7 +32192,7 @@ - (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32252,7 +32226,7 @@ - (void)readAttributeRxErrFcsCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32261,7 +32235,7 @@ - (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32295,7 +32269,7 @@ - (void)readAttributeRxErrOtherCountWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32304,7 +32278,7 @@ - (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32339,7 +32313,7 @@ - (void)readAttributeActiveTimestampWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32348,7 +32322,7 @@ - (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32383,7 +32357,7 @@ - (void)readAttributePendingTimestampWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32392,7 +32366,7 @@ - (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32427,7 +32401,7 @@ - (void)readAttributeDelayWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32436,7 +32410,7 @@ - (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32472,7 +32446,7 @@ - (void)readAttributeSecurityPolicyWithCompletion:(void (^)(MTRThreadNetworkDiag using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32483,7 +32457,7 @@ - (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSecurityPolicyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -32518,7 +32492,7 @@ - (void)readAttributeChannelPage0MaskWithCompletion:(void (^)(NSData * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32527,7 +32501,7 @@ - (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32564,7 +32538,7 @@ - (void)readAttributeOperationalDatasetComponentsWithCompletion: using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void) @@ -32578,7 +32552,7 @@ - (void)readAttributeOperationalDatasetComponentsWithCompletion: using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, - reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void) @@ -32617,7 +32591,7 @@ - (void)readAttributeActiveNetworkFaultsListWithCompletion:(void (^)( using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32627,7 +32601,7 @@ - (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32663,7 +32637,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32673,7 +32647,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32709,7 +32683,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32719,7 +32693,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32754,7 +32728,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32763,7 +32737,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32797,7 +32771,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32806,7 +32780,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32840,7 +32814,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32849,7 +32823,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32883,7 +32857,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32892,7 +32866,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -35965,13 +35939,12 @@ @implementation MTRBaseClusterWiFiNetworkDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -36010,7 +35983,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -36021,7 +35994,7 @@ - (void)readAttributeBSSIDWithCompletion:(void (^)(NSData * _Nullable value, NSE MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBSSIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36030,7 +36003,7 @@ - (void)subscribeAttributeBSSIDWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36065,7 +36038,7 @@ - (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable v using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36074,7 +36047,7 @@ - (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36109,7 +36082,7 @@ - (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable va using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36118,7 +36091,7 @@ - (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36152,7 +36125,7 @@ - (void)readAttributeChannelNumberWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36161,7 +36134,7 @@ - (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36195,7 +36168,7 @@ - (void)readAttributeRSSIWithCompletion:(void (^)(NSNumber * _Nullable value, NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRSSIWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36204,7 +36177,7 @@ - (void)subscribeAttributeRSSIWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36238,7 +36211,7 @@ - (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36247,7 +36220,7 @@ - (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36282,7 +36255,7 @@ - (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36291,7 +36264,7 @@ - (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36326,7 +36299,7 @@ - (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36336,7 +36309,7 @@ - (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36372,7 +36345,7 @@ - (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36382,7 +36355,7 @@ - (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36417,7 +36390,7 @@ - (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36427,7 +36400,7 @@ - (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _ { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36462,7 +36435,7 @@ - (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36472,7 +36445,7 @@ - (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _ { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36507,7 +36480,7 @@ - (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36516,7 +36489,7 @@ - (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36550,7 +36523,7 @@ - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36559,7 +36532,7 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36594,7 +36567,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36604,7 +36577,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36640,7 +36613,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36650,7 +36623,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36685,7 +36658,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36694,7 +36667,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36728,7 +36701,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36737,7 +36710,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36771,7 +36744,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36780,7 +36753,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36814,7 +36787,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36823,7 +36796,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37664,13 +37637,12 @@ @implementation MTRBaseClusterEthernetNetworkDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -37709,7 +37681,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -37721,7 +37693,7 @@ - (void)readAttributePHYRateWithCompletion:(void (^)(NSNumber * _Nullable value, using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37730,7 +37702,7 @@ - (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37764,7 +37736,7 @@ - (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37773,7 +37745,7 @@ - (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37807,7 +37779,7 @@ - (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37816,7 +37788,7 @@ - (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37850,7 +37822,7 @@ - (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37859,7 +37831,7 @@ - (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37893,7 +37865,7 @@ - (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37902,7 +37874,7 @@ - (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37936,7 +37908,7 @@ - (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37945,7 +37917,7 @@ - (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37979,7 +37951,7 @@ - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37988,7 +37960,7 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38022,7 +37994,7 @@ - (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38031,7 +38003,7 @@ - (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38065,7 +38037,7 @@ - (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38074,7 +38046,7 @@ - (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38109,7 +38081,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38119,7 +38091,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38155,7 +38127,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38165,7 +38137,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38200,7 +38172,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38209,7 +38181,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38244,7 +38216,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38253,7 +38225,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38287,7 +38259,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38296,7 +38268,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38330,7 +38302,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38339,7 +38311,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39001,13 +38973,12 @@ @implementation MTRBaseClusterTimeSynchronization - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -39049,7 +39020,7 @@ - (void)setUTCTimeWithParams:(MTRTimeSynchronizationClusterSetUTCTimeParams *)pa = static_cast>(params.timeSource.unsignedCharValue); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -39092,7 +39063,7 @@ - (void)setTrustedTimeSourceWithParams:(MTRTimeSynchronizationClusterSetTrustedT nonNullValue_0.endpoint = params.trustedTimeSource.endpoint.unsignedShortValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -39153,7 +39124,7 @@ - (void)setTimeZoneWithParams:(MTRTimeSynchronizationClusterSetTimeZoneParams *) } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -39217,7 +39188,7 @@ - (void)setDSTOffsetWithParams:(MTRTimeSynchronizationClusterSetDSTOffsetParams } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -39259,7 +39230,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam nonNullValue_0 = [self asCharSpan:params.defaultNTP]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -39270,7 +39241,7 @@ - (void)readAttributeUTCTimeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUTCTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39279,7 +39250,7 @@ - (void)subscribeAttributeUTCTimeWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39313,7 +39284,7 @@ - (void)readAttributeGranularityWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGranularityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39322,7 +39293,7 @@ - (void)subscribeAttributeGranularityWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39356,7 +39327,7 @@ - (void)readAttributeTimeSourceWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39365,7 +39336,7 @@ - (void)subscribeAttributeTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39401,7 +39372,7 @@ - (void)readAttributeTrustedTimeSourceWithCompletion: using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTrustedTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39413,7 +39384,7 @@ - (void)subscribeAttributeTrustedTimeSourceWithParams:(MTRSubscribeParams * _Non using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, - reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeTrustedTimeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -39449,7 +39420,7 @@ - (void)readAttributeDefaultNTPWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDefaultNTPWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39458,7 +39429,7 @@ - (void)subscribeAttributeDefaultNTPWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39492,7 +39463,7 @@ - (void)readAttributeTimeZoneWithCompletion:(void (^)(NSArray * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeZoneWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39501,7 +39472,7 @@ - (void)subscribeAttributeTimeZoneWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39535,7 +39506,7 @@ - (void)readAttributeDSTOffsetWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDSTOffsetWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39544,7 +39515,7 @@ - (void)subscribeAttributeDSTOffsetWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39578,7 +39549,7 @@ - (void)readAttributeLocalTimeWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLocalTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39587,7 +39558,7 @@ - (void)subscribeAttributeLocalTimeWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39622,7 +39593,7 @@ - (void)readAttributeTimeZoneDatabaseWithCompletion:(void (^)(NSNumber * _Nullab using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeZoneDatabaseWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39631,7 +39602,7 @@ - (void)subscribeAttributeTimeZoneDatabaseWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39666,7 +39637,7 @@ - (void)readAttributeNTPServerAvailableWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNTPServerAvailableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39676,7 +39647,7 @@ - (void)subscribeAttributeNTPServerAvailableWithParams:(MTRSubscribeParams * _No { using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39711,7 +39682,7 @@ - (void)readAttributeTimeZoneListMaxSizeWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeZoneListMaxSizeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39721,7 +39692,7 @@ - (void)subscribeAttributeTimeZoneListMaxSizeWithParams:(MTRSubscribeParams * _N { using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39756,7 +39727,7 @@ - (void)readAttributeDSTOffsetListMaxSizeWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDSTOffsetListMaxSizeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39766,7 +39737,7 @@ - (void)subscribeAttributeDSTOffsetListMaxSizeWithParams:(MTRSubscribeParams * _ { using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39801,7 +39772,7 @@ - (void)readAttributeSupportsDNSResolveWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportsDNSResolveWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39811,7 +39782,7 @@ - (void)subscribeAttributeSupportsDNSResolveWithParams:(MTRSubscribeParams * _No { using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39847,7 +39818,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39857,7 +39828,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39892,7 +39863,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39902,7 +39873,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39937,7 +39908,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39946,7 +39917,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39980,7 +39951,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39989,7 +39960,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40023,7 +39994,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40032,7 +40003,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40066,7 +40037,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40075,7 +40046,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40111,13 +40082,12 @@ @implementation MTRBaseClusterBridgedDeviceBasicInformation - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -40127,7 +40097,7 @@ - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40136,7 +40106,7 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40170,7 +40140,7 @@ - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40179,7 +40149,7 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40213,7 +40183,7 @@ - (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40222,7 +40192,7 @@ - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40256,7 +40226,7 @@ - (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -40290,7 +40260,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -40302,7 +40272,7 @@ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40336,7 +40306,7 @@ - (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40345,7 +40315,7 @@ - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40380,7 +40350,7 @@ - (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40390,7 +40360,7 @@ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * { using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40425,7 +40395,7 @@ - (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40434,7 +40404,7 @@ - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40469,7 +40439,7 @@ - (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40479,7 +40449,7 @@ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * { using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40514,7 +40484,7 @@ - (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40523,7 +40493,7 @@ - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Non { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40558,7 +40528,7 @@ - (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40567,7 +40537,7 @@ - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40601,7 +40571,7 @@ - (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40610,7 +40580,7 @@ - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40644,7 +40614,7 @@ - (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40653,7 +40623,7 @@ - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40687,7 +40657,7 @@ - (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40696,7 +40666,7 @@ - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40730,7 +40700,7 @@ - (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40739,7 +40709,7 @@ - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40773,7 +40743,7 @@ - (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40782,7 +40752,7 @@ - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40819,7 +40789,7 @@ - (void)readAttributeProductAppearanceWithCompletion: using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40832,7 +40802,7 @@ - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Non using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, - reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void) @@ -40870,7 +40840,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40880,7 +40850,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40916,7 +40886,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40926,7 +40896,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40961,7 +40931,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40970,7 +40940,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -41005,7 +40975,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -41014,7 +40984,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -41048,7 +41018,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -41057,7 +41027,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -41091,7 +41061,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -41100,7 +41070,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42023,13 +41993,12 @@ @implementation MTRBaseClusterSwitch - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -42039,7 +42008,7 @@ - (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42048,7 +42017,7 @@ - (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42083,7 +42052,7 @@ - (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42092,7 +42061,7 @@ - (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42127,7 +42096,7 @@ - (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42136,7 +42105,7 @@ - (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42170,7 +42139,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42180,7 +42149,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42215,7 +42184,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42225,7 +42194,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42260,7 +42229,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42269,7 +42238,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Switch::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42303,7 +42272,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42312,7 +42281,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42346,7 +42315,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42355,7 +42324,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42389,7 +42358,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42398,7 +42367,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42795,13 +42764,12 @@ @implementation MTRBaseClusterAdministratorCommissioning - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -42844,7 +42812,7 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO request.iterations = params.iterations.unsignedIntValue; request.salt = [self asByteSpan:params.salt]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -42884,7 +42852,7 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu } request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -42927,7 +42895,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok timedInvokeTimeoutMs.SetValue(10000); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -42939,7 +42907,7 @@ - (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable v using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42949,7 +42917,7 @@ - (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeWindowStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -42982,7 +42950,7 @@ - (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42991,7 +42959,7 @@ - (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43026,7 +42994,7 @@ - (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43035,7 +43003,7 @@ - (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43070,7 +43038,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43080,7 +43048,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43116,7 +43084,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43126,7 +43094,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43161,7 +43129,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43170,7 +43138,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43205,7 +43173,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43214,7 +43182,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43248,7 +43216,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43257,7 +43225,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43291,7 +43259,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43300,7 +43268,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43715,13 +43683,12 @@ @implementation MTRBaseClusterOperationalCredentials - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -43755,7 +43722,7 @@ - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestatio } request.attestationNonce = [self asByteSpan:params.attestationNonce]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43791,7 +43758,7 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti request.certificateType = static_cast>(params.certificateType.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43830,7 +43797,7 @@ - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams * definedValue_0 = params.isForUpdateNOC.boolValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43873,7 +43840,7 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params request.adminVendorId = static_cast>(params.adminVendorId.unsignedShortValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43912,7 +43879,7 @@ - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)p definedValue_0 = [self asByteSpan:params.icacValue]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43947,7 +43914,7 @@ - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabri } request.label = [self asCharSpan:params.label]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43982,7 +43949,7 @@ - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricPara } request.fabricIndex = params.fabricIndex.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -44019,7 +43986,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd } request.rootCACertificate = [self asByteSpan:params.rootCACertificate]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -44031,7 +43998,7 @@ - (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44040,7 +44007,7 @@ - (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44075,7 +44042,7 @@ - (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44084,7 +44051,7 @@ - (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44118,7 +44085,7 @@ - (void)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44127,7 +44094,7 @@ - (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44162,7 +44129,7 @@ - (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44172,7 +44139,7 @@ - (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _N { using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44209,7 +44176,7 @@ - (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)( using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44219,7 +44186,7 @@ - (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams { using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44254,7 +44221,7 @@ - (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44264,7 +44231,7 @@ - (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _No { using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44300,7 +44267,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44310,7 +44277,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44346,7 +44313,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44356,7 +44323,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44391,7 +44358,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44400,7 +44367,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44434,7 +44401,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44443,7 +44410,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44477,7 +44444,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44486,7 +44453,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44520,7 +44487,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44529,7 +44496,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45140,13 +45107,12 @@ @implementation MTRBaseClusterGroupKeyManagement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -45220,7 +45186,7 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p nonNullValue_1 = params.groupKeySet.epochStartTime2.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -45255,7 +45221,7 @@ - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)par } request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -45291,7 +45257,7 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * } request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -45330,7 +45296,7 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -45342,7 +45308,7 @@ - (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -45399,7 +45365,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -45411,7 +45377,7 @@ - (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45446,7 +45412,7 @@ - (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45455,7 +45421,7 @@ - (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45489,7 +45455,7 @@ - (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45499,7 +45465,7 @@ - (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _No { using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45534,7 +45500,7 @@ - (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45544,7 +45510,7 @@ - (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * { using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45579,7 +45545,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45589,7 +45555,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45624,7 +45590,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45634,7 +45600,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45669,7 +45635,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45678,7 +45644,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45712,7 +45678,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45721,7 +45687,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45755,7 +45721,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45764,7 +45730,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45798,7 +45764,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45807,7 +45773,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46290,13 +46256,12 @@ @implementation MTRBaseClusterFixedLabel - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -46306,7 +46271,7 @@ - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46315,7 +46280,7 @@ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46349,7 +46314,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46359,7 +46324,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46394,7 +46359,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46404,7 +46369,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46439,7 +46404,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46448,7 +46413,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46482,7 +46447,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46491,7 +46456,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46525,7 +46490,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46534,7 +46499,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46568,7 +46533,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46577,7 +46542,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46883,13 +46848,12 @@ @implementation MTRBaseClusterUserLabel - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -46899,7 +46863,7 @@ - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -46955,7 +46919,7 @@ - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -46967,7 +46931,7 @@ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47001,7 +46965,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47011,7 +46975,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47046,7 +47010,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47056,7 +47020,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47091,7 +47055,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47100,7 +47064,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47134,7 +47098,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47143,7 +47107,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47177,7 +47141,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47186,7 +47150,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47220,7 +47184,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47229,7 +47193,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47545,13 +47509,12 @@ @implementation MTRBaseClusterBooleanState - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -47561,7 +47524,7 @@ - (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47570,7 +47533,7 @@ - (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47604,7 +47567,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47614,7 +47577,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47649,7 +47612,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47659,7 +47622,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47694,7 +47657,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47703,7 +47666,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47737,7 +47700,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47746,7 +47709,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47780,7 +47743,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47789,7 +47752,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47823,7 +47786,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47832,7 +47795,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48138,13 +48101,12 @@ @implementation MTRBaseClusterICDManagement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -48184,7 +48146,7 @@ - (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *) definedValue_0 = [self asByteSpan:params.verificationKey]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -48225,7 +48187,7 @@ - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParam definedValue_0 = [self asByteSpan:params.verificationKey]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -48265,7 +48227,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -48276,7 +48238,7 @@ - (void)readAttributeIdleModeIntervalWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::IdleModeInterval::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeIdleModeIntervalWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48285,7 +48247,7 @@ - (void)subscribeAttributeIdleModeIntervalWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = IcdManagement::Attributes::IdleModeInterval::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48320,7 +48282,7 @@ - (void)readAttributeActiveModeIntervalWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::ActiveModeInterval::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveModeIntervalWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48330,7 +48292,7 @@ - (void)subscribeAttributeActiveModeIntervalWithParams:(MTRSubscribeParams * _No { using TypeInfo = IcdManagement::Attributes::ActiveModeInterval::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48365,7 +48327,7 @@ - (void)readAttributeActiveModeThresholdWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveModeThresholdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48375,7 +48337,7 @@ - (void)subscribeAttributeActiveModeThresholdWithParams:(MTRSubscribeParams * _N { using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48411,7 +48373,7 @@ - (void)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)para params = [params copy]; using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRegisteredClientsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48420,7 +48382,7 @@ - (void)subscribeAttributeRegisteredClientsWithParams:(MTRSubscribeParams * _Non { using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48455,7 +48417,7 @@ - (void)readAttributeICDCounterWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeICDCounterWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48464,7 +48426,7 @@ - (void)subscribeAttributeICDCounterWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48499,7 +48461,7 @@ - (void)readAttributeClientsSupportedPerFabricWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClientsSupportedPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48509,7 +48471,7 @@ - (void)subscribeAttributeClientsSupportedPerFabricWithParams:(MTRSubscribeParam { using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48544,7 +48506,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48554,7 +48516,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48589,7 +48551,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48599,7 +48561,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48634,7 +48596,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48643,7 +48605,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48677,7 +48639,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48686,7 +48648,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48720,7 +48682,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48729,7 +48691,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48763,7 +48725,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48772,7 +48734,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48808,13 +48770,12 @@ @implementation MTRBaseClusterModeSelect - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -48849,7 +48810,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -48860,7 +48821,7 @@ - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48869,7 +48830,7 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48903,7 +48864,7 @@ - (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48912,7 +48873,7 @@ - (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48947,7 +48908,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48956,7 +48917,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48990,7 +48951,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48999,7 +48960,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49033,7 +48994,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -49072,7 +49033,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -49084,7 +49045,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49118,7 +49079,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -49157,7 +49118,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -49169,7 +49130,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49203,7 +49164,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49213,7 +49174,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49248,7 +49209,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49258,7 +49219,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49293,7 +49254,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49302,7 +49263,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49336,7 +49297,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49345,7 +49306,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49379,7 +49340,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49388,7 +49349,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49422,7 +49383,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49431,7 +49392,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49980,13 +49941,12 @@ @implementation MTRBaseClusterLaundryWasherMode - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -50020,7 +49980,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50031,7 +49991,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50040,7 +50000,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50074,7 +50034,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50083,7 +50043,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50117,7 +50077,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -50156,7 +50116,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50168,7 +50128,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50202,7 +50162,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -50241,7 +50201,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50253,7 +50213,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50287,7 +50247,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50297,7 +50257,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50332,7 +50292,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50342,7 +50302,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50377,7 +50337,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50386,7 +50346,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50420,7 +50380,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50429,7 +50389,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50463,7 +50423,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50472,7 +50432,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50506,7 +50466,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50515,7 +50475,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50551,13 +50511,12 @@ @implementation MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -50596,7 +50555,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50608,7 +50567,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50618,7 +50577,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -50653,7 +50612,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50662,7 +50621,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50696,7 +50655,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -50735,7 +50694,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50747,7 +50706,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50781,7 +50740,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -50820,7 +50779,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50832,7 +50791,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50867,7 +50826,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50878,7 +50837,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute< MTRRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListListAttributeCallbackSubscriptionBridge, NSArray, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50916,7 +50875,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50927,7 +50886,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute< MTRRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListListAttributeCallbackSubscriptionBridge, NSArray, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50965,7 +50924,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50975,7 +50934,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -51009,7 +50968,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51019,7 +50978,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -51053,7 +51012,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51062,7 +51021,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51096,7 +51055,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51105,7 +51064,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51141,13 +51100,12 @@ @implementation MTRBaseClusterLaundryWasherControls - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -51157,7 +51115,7 @@ - (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51166,7 +51124,7 @@ - (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51200,7 +51158,7 @@ - (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -51239,7 +51197,7 @@ - (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -51251,7 +51209,7 @@ - (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51287,7 +51245,7 @@ - (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -51321,7 +51279,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -51333,7 +51291,7 @@ - (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51367,7 +51325,7 @@ - (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51376,7 +51334,7 @@ - (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51411,7 +51369,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51421,7 +51379,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51457,7 +51415,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51467,7 +51425,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51502,7 +51460,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51511,7 +51469,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51545,7 +51503,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51554,7 +51512,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51588,7 +51546,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51597,7 +51555,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51631,7 +51589,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51640,7 +51598,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51676,13 +51634,12 @@ @implementation MTRBaseClusterRVCRunMode - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -51716,7 +51673,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -51727,7 +51684,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51736,7 +51693,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51770,7 +51727,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51779,7 +51736,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51813,7 +51770,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -51852,7 +51809,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -51864,7 +51821,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RvcRunMode::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51898,7 +51855,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -51937,7 +51894,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -51949,7 +51906,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51983,7 +51940,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51993,7 +51950,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52028,7 +51985,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52038,7 +51995,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52073,7 +52030,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52082,7 +52039,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52116,7 +52073,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52125,7 +52082,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52159,7 +52116,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52168,7 +52125,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52202,7 +52159,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52211,7 +52168,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52247,13 +52204,12 @@ @implementation MTRBaseClusterRVCCleanMode - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -52287,7 +52243,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -52298,7 +52254,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52307,7 +52263,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52341,7 +52297,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52350,7 +52306,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52384,7 +52340,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -52423,7 +52379,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -52435,7 +52391,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RvcCleanMode::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52469,7 +52425,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -52508,7 +52464,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -52520,7 +52476,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52554,7 +52510,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52564,7 +52520,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52599,7 +52555,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52609,7 +52565,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52644,7 +52600,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52653,7 +52609,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52687,7 +52643,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52696,7 +52652,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52730,7 +52686,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52739,7 +52695,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52773,7 +52729,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52782,7 +52738,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52818,13 +52774,12 @@ @implementation MTRBaseClusterTemperatureControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -52869,7 +52824,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -52880,7 +52835,7 @@ - (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52890,7 +52845,7 @@ - (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _N { using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52925,7 +52880,7 @@ - (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52934,7 +52889,7 @@ - (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52968,7 +52923,7 @@ - (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52977,7 +52932,7 @@ - (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53011,7 +52966,7 @@ - (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53020,7 +52975,7 @@ - (void)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53055,7 +53010,7 @@ - (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53065,7 +53020,7 @@ - (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams { using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53102,7 +53057,7 @@ - (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)( using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53112,7 +53067,7 @@ - (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribePara { using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53147,7 +53102,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53157,7 +53112,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53192,7 +53147,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53202,7 +53157,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53237,7 +53192,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53246,7 +53201,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53280,7 +53235,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53289,7 +53244,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53323,7 +53278,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53332,7 +53287,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53366,7 +53321,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53375,7 +53330,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53411,13 +53366,12 @@ @implementation MTRBaseClusterRefrigeratorAlarm - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -53427,7 +53381,7 @@ - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53436,7 +53390,7 @@ - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53470,7 +53424,7 @@ - (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53479,7 +53433,7 @@ - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53513,7 +53467,7 @@ - (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53522,7 +53476,7 @@ - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53556,7 +53510,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53566,7 +53520,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53601,7 +53555,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53611,7 +53565,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53646,7 +53600,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53655,7 +53609,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53689,7 +53643,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53698,7 +53652,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53732,7 +53686,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53741,7 +53695,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53775,7 +53729,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53784,7 +53738,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53820,13 +53774,12 @@ @implementation MTRBaseClusterDishwasherMode - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -53860,7 +53813,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -53871,7 +53824,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53880,7 +53833,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53914,7 +53867,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53923,7 +53876,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53957,7 +53910,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -53996,7 +53949,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -54008,7 +53961,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54042,7 +53995,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -54081,7 +54034,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -54093,7 +54046,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54127,7 +54080,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54137,7 +54090,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54172,7 +54125,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54182,7 +54135,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54217,7 +54170,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54226,7 +54179,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54260,7 +54213,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54269,7 +54222,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54303,7 +54256,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54312,7 +54265,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54346,7 +54299,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54355,7 +54308,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54391,13 +54344,12 @@ @implementation MTRBaseClusterAirQuality - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -54407,7 +54359,7 @@ - (void)readAttributeAirQualityWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAirQualityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54416,7 +54368,7 @@ - (void)subscribeAttributeAirQualityWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54450,7 +54402,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54460,7 +54412,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54495,7 +54447,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54505,7 +54457,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54540,7 +54492,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54549,7 +54501,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54583,7 +54535,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54592,7 +54544,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54626,7 +54578,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54635,7 +54587,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54669,7 +54621,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54678,7 +54630,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54714,13 +54666,12 @@ @implementation MTRBaseClusterSmokeCOAlarm - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -54759,7 +54710,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -54770,7 +54721,7 @@ - (void)readAttributeExpressedStateWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeExpressedStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54779,7 +54730,7 @@ - (void)subscribeAttributeExpressedStateWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54813,7 +54764,7 @@ - (void)readAttributeSmokeStateWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSmokeStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54822,7 +54773,7 @@ - (void)subscribeAttributeSmokeStateWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54856,7 +54807,7 @@ - (void)readAttributeCOStateWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCOStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54865,7 +54816,7 @@ - (void)subscribeAttributeCOStateWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54899,7 +54850,7 @@ - (void)readAttributeBatteryAlertWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatteryAlertWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54908,7 +54859,7 @@ - (void)subscribeAttributeBatteryAlertWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54942,7 +54893,7 @@ - (void)readAttributeDeviceMutedWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDeviceMutedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54951,7 +54902,7 @@ - (void)subscribeAttributeDeviceMutedWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54985,7 +54936,7 @@ - (void)readAttributeTestInProgressWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTestInProgressWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54994,7 +54945,7 @@ - (void)subscribeAttributeTestInProgressWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55028,7 +54979,7 @@ - (void)readAttributeHardwareFaultAlertWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareFaultAlertWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55038,7 +54989,7 @@ - (void)subscribeAttributeHardwareFaultAlertWithParams:(MTRSubscribeParams * _No { using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55073,7 +55024,7 @@ - (void)readAttributeEndOfServiceAlertWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEndOfServiceAlertWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55082,7 +55033,7 @@ - (void)subscribeAttributeEndOfServiceAlertWithParams:(MTRSubscribeParams * _Non { using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55118,7 +55069,7 @@ - (void)readAttributeInterconnectSmokeAlarmWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInterconnectSmokeAlarmWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55128,7 +55079,7 @@ - (void)subscribeAttributeInterconnectSmokeAlarmWithParams:(MTRSubscribeParams * { using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55163,7 +55114,7 @@ - (void)readAttributeInterconnectCOAlarmWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInterconnectCOAlarmWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55173,7 +55124,7 @@ - (void)subscribeAttributeInterconnectCOAlarmWithParams:(MTRSubscribeParams * _N { using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55208,7 +55159,7 @@ - (void)readAttributeContaminationStateWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeContaminationStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55218,7 +55169,7 @@ - (void)subscribeAttributeContaminationStateWithParams:(MTRSubscribeParams * _No { using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55253,7 +55204,7 @@ - (void)readAttributeSmokeSensitivityLevelWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -55287,7 +55238,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -55300,7 +55251,7 @@ - (void)subscribeAttributeSmokeSensitivityLevelWithParams:(MTRSubscribeParams * { using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55335,7 +55286,7 @@ - (void)readAttributeExpiryDateWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeExpiryDateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55344,7 +55295,7 @@ - (void)subscribeAttributeExpiryDateWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55378,7 +55329,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55388,7 +55339,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55423,7 +55374,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55433,7 +55384,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55468,7 +55419,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55477,7 +55428,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55511,7 +55462,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55520,7 +55471,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55554,7 +55505,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55563,7 +55514,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55597,7 +55548,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55606,7 +55557,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55642,13 +55593,12 @@ @implementation MTRBaseClusterDishwasherAlarm - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -55683,7 +55633,7 @@ - (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completio } request.alarms = static_cast>(params.alarms.unsignedIntValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -55720,7 +55670,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla } request.mask = static_cast>(params.mask.unsignedIntValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -55731,7 +55681,7 @@ - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55740,7 +55690,7 @@ - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55774,7 +55724,7 @@ - (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55783,7 +55733,7 @@ - (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55817,7 +55767,7 @@ - (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55826,7 +55776,7 @@ - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55860,7 +55810,7 @@ - (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55869,7 +55819,7 @@ - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55903,7 +55853,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55913,7 +55863,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55948,7 +55898,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55958,7 +55908,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55993,7 +55943,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56002,7 +55952,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56036,7 +55986,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56045,7 +55995,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56079,7 +56029,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56088,7 +56038,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56122,7 +56072,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56131,7 +56081,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56167,13 +56117,12 @@ @implementation MTRBaseClusterOperationalState - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -56211,7 +56160,7 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56250,7 +56199,7 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56289,7 +56238,7 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56328,7 +56277,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56339,7 +56288,7 @@ - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56348,7 +56297,7 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56382,7 +56331,7 @@ - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56391,7 +56340,7 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56425,7 +56374,7 @@ - (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56434,7 +56383,7 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56468,7 +56417,7 @@ - (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56478,7 +56427,7 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56514,7 +56463,7 @@ - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullab using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56523,7 +56472,7 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56560,7 +56509,7 @@ - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROperationalStat using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56571,7 +56520,7 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -56605,7 +56554,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56615,7 +56564,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56650,7 +56599,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56660,7 +56609,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56695,7 +56644,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56704,7 +56653,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56738,7 +56687,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56747,7 +56696,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56781,7 +56730,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56790,7 +56739,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56824,7 +56773,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56833,7 +56782,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56869,13 +56818,12 @@ @implementation MTRBaseClusterRVCOperationalState - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -56913,7 +56861,7 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56952,7 +56900,7 @@ - (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)para } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56991,7 +56939,7 @@ - (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)pa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -57030,7 +56978,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -57041,7 +56989,7 @@ - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57050,7 +56998,7 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57084,7 +57032,7 @@ - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57093,7 +57041,7 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57127,7 +57075,7 @@ - (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57136,7 +57084,7 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57171,7 +57119,7 @@ - (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57181,7 +57129,7 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57216,7 +57164,7 @@ - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57225,7 +57173,7 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57262,7 +57210,7 @@ - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTRRVCOperationalS using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57273,7 +57221,7 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -57309,7 +57257,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57319,7 +57267,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57354,7 +57302,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57364,7 +57312,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57399,7 +57347,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57408,7 +57356,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57442,7 +57390,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57451,7 +57399,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57485,7 +57433,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57494,7 +57442,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57528,7 +57476,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57537,7 +57485,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57573,13 +57521,12 @@ @implementation MTRBaseClusterHEPAFilterMonitoring - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -57618,7 +57565,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -57629,7 +57576,7 @@ - (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57638,7 +57585,7 @@ - (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57673,7 +57620,7 @@ - (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57683,7 +57630,7 @@ - (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _ { using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57719,7 +57666,7 @@ - (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullab using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57728,7 +57675,7 @@ - (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57763,7 +57710,7 @@ - (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57772,7 +57719,7 @@ - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57807,7 +57754,7 @@ - (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -57846,7 +57793,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -57858,7 +57805,7 @@ - (void)subscribeAttributeLastChangedTimeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57894,7 +57841,7 @@ - (void)readAttributeReplacementProductListWithCompletion:(void (^)(NSArray * _N using TypeInfo = HepaFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57904,7 +57851,7 @@ - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * { using TypeInfo = HepaFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57940,7 +57887,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57950,7 +57897,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57986,7 +57933,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57996,7 +57943,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58031,7 +57978,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58040,7 +57987,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58074,7 +58021,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58083,7 +58030,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58117,7 +58064,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58126,7 +58073,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58160,7 +58107,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58169,7 +58116,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58205,13 +58152,12 @@ @implementation MTRBaseClusterActivatedCarbonFilterMonitoring - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -58250,7 +58196,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -58261,7 +58207,7 @@ - (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58270,7 +58216,7 @@ - (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58305,7 +58251,7 @@ - (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58316,7 +58262,7 @@ - (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _ using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeDegradationDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -58351,7 +58297,7 @@ - (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullab using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58361,7 +58307,7 @@ - (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -58395,7 +58341,7 @@ - (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58404,7 +58350,7 @@ - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58439,7 +58385,7 @@ - (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -58478,7 +58424,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -58490,7 +58436,7 @@ - (void)subscribeAttributeLastChangedTimeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58526,7 +58472,7 @@ - (void)readAttributeReplacementProductListWithCompletion:(void (^)(NSArray * _N using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58536,7 +58482,7 @@ - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58572,7 +58518,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58582,7 +58528,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58618,7 +58564,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58628,7 +58574,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58664,7 +58610,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58673,7 +58619,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58708,7 +58654,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58717,7 +58663,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58751,7 +58697,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58760,7 +58706,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58794,7 +58740,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58803,7 +58749,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58839,13 +58785,12 @@ @implementation MTRBaseClusterDoorLock - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -58888,7 +58833,7 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -58932,7 +58877,7 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -58975,7 +58920,7 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * definedValue_0 = [self asByteSpan:params.pinCode]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59017,7 +58962,7 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams request.endHour = params.endHour.unsignedCharValue; request.endMinute = params.endMinute.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59053,7 +58998,7 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams request.weekDayIndex = params.weekDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59091,7 +59036,7 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa request.weekDayIndex = params.weekDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59130,7 +59075,7 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams request.localStartTime = params.localStartTime.unsignedIntValue; request.localEndTime = params.localEndTime.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59166,7 +59111,7 @@ - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams request.yearDayIndex = params.yearDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59204,7 +59149,7 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa request.yearDayIndex = params.yearDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59244,7 +59189,7 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams request.operatingMode = static_cast>(params.operatingMode.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59279,7 +59224,7 @@ - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams } request.holidayIndex = params.holidayIndex.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59316,7 +59261,7 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa } request.holidayIndex = params.holidayIndex.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59389,7 +59334,7 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:( = static_cast>(params.credentialRule.unsignedCharValue); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59422,7 +59367,7 @@ - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params } request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59461,7 +59406,7 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completi } request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59523,7 +59468,7 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params nonNullValue_0 = static_cast>(params.userType.unsignedCharValue); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59560,7 +59505,7 @@ - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusPara params.credential.credentialType.unsignedCharValue); request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59606,7 +59551,7 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par nonNullValue_0.credentialIndex = params.credential.credentialIndex.unsignedShortValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59650,7 +59595,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59661,7 +59606,7 @@ - (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59670,7 +59615,7 @@ - (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59704,7 +59649,7 @@ - (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59713,7 +59658,7 @@ - (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59747,7 +59692,7 @@ - (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59756,7 +59701,7 @@ - (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59791,7 +59736,7 @@ - (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59800,7 +59745,7 @@ - (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59834,7 +59779,7 @@ - (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -59868,7 +59813,7 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59880,7 +59825,7 @@ - (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59914,7 +59859,7 @@ - (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -59948,7 +59893,7 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59960,7 +59905,7 @@ - (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59995,7 +59940,7 @@ - (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60029,7 +59974,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60041,7 +59986,7 @@ - (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60076,7 +60021,7 @@ - (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60086,7 +60031,7 @@ - (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribePar { using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60122,7 +60067,7 @@ - (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60132,7 +60077,7 @@ - (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParam { using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60168,7 +60113,7 @@ - (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60178,7 +60123,7 @@ - (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribePara { using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60214,7 +60159,7 @@ - (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:(voi MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60225,7 +60170,7 @@ - (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MT { using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60262,7 +60207,7 @@ - (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(voi MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60273,7 +60218,7 @@ - (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MT { using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60310,7 +60255,7 @@ - (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60321,7 +60266,7 @@ - (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscr { using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60357,7 +60302,7 @@ - (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60366,7 +60311,7 @@ - (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60401,7 +60346,7 @@ - (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60410,7 +60355,7 @@ - (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60445,7 +60390,7 @@ - (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60454,7 +60399,7 @@ - (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Non { using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60489,7 +60434,7 @@ - (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60498,7 +60443,7 @@ - (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Non { using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60534,7 +60479,7 @@ - (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60544,7 +60489,7 @@ - (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * { using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60580,7 +60525,7 @@ - (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:(void (^) MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60591,7 +60536,7 @@ - (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubs { using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60627,7 +60572,7 @@ - (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::Language::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60661,7 +60606,7 @@ - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60673,7 +60618,7 @@ - (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = DoorLock::Attributes::Language::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60707,7 +60652,7 @@ - (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60741,7 +60686,7 @@ - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60753,7 +60698,7 @@ - (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60787,7 +60732,7 @@ - (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60821,7 +60766,7 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60833,7 +60778,7 @@ - (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60867,7 +60812,7 @@ - (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60901,7 +60846,7 @@ - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60913,7 +60858,7 @@ - (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60947,7 +60892,7 @@ - (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60981,7 +60926,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60993,7 +60938,7 @@ - (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61028,7 +60973,7 @@ - (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -61038,7 +60983,7 @@ - (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams { using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61074,7 +61019,7 @@ - (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams * _Nonnull)params @@ -61085,7 +61030,7 @@ - (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribePa { using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61121,7 +61066,7 @@ - (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61155,7 +61100,7 @@ - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61168,7 +61113,7 @@ - (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams * { using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61203,7 +61148,7 @@ - (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61237,7 +61182,7 @@ - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61250,7 +61195,7 @@ - (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams * { using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61285,7 +61230,7 @@ - (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61319,7 +61264,7 @@ - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61332,7 +61277,7 @@ - (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams * { using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61368,7 +61313,7 @@ - (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61402,7 +61347,7 @@ - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61415,7 +61360,7 @@ - (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams { using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61451,7 +61396,7 @@ - (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61485,7 +61430,7 @@ - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)val TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61498,7 +61443,7 @@ - (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams { using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61533,7 +61478,7 @@ - (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61567,7 +61512,7 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61580,7 +61525,7 @@ - (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams * _N { using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61616,7 +61561,7 @@ - (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61650,7 +61595,7 @@ - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61664,7 +61609,7 @@ - (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribePa { using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61699,7 +61644,7 @@ - (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61733,7 +61678,7 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61745,7 +61690,7 @@ - (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams * _Non { using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61781,7 +61726,7 @@ - (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61815,7 +61760,7 @@ - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61829,7 +61774,7 @@ - (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribePa { using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61864,7 +61809,7 @@ - (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61898,7 +61843,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61911,7 +61856,7 @@ - (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams * _N { using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61946,7 +61891,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -61956,7 +61901,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61991,7 +61936,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62001,7 +61946,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -62036,7 +61981,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62045,7 +61990,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -62079,7 +62024,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62088,7 +62033,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -62122,7 +62067,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62131,7 +62076,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -62165,7 +62110,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62174,7 +62119,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64359,13 +64304,12 @@ @implementation MTRBaseClusterWindowCovering - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -64403,7 +64347,7 @@ - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)p } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64443,7 +64387,7 @@ - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Null } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64482,7 +64426,7 @@ - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullab } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64518,7 +64462,7 @@ - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)p } request.liftValue = params.liftValue.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64555,7 +64499,7 @@ - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentage } request.liftPercent100thsValue = params.liftPercent100thsValue.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64591,7 +64535,7 @@ - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)p } request.tiltValue = params.tiltValue.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64628,7 +64572,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage } request.tiltPercent100thsValue = params.tiltPercent100thsValue.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64639,7 +64583,7 @@ - (void)readAttributeTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64648,7 +64592,7 @@ - (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64683,7 +64627,7 @@ - (void)readAttributePhysicalClosedLimitLiftWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64693,7 +64637,7 @@ - (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams { using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64729,7 +64673,7 @@ - (void)readAttributePhysicalClosedLimitTiltWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64739,7 +64683,7 @@ - (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams { using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64774,7 +64718,7 @@ - (void)readAttributeCurrentPositionLiftWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64784,7 +64728,7 @@ - (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams * _N { using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64819,7 +64763,7 @@ - (void)readAttributeCurrentPositionTiltWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64829,7 +64773,7 @@ - (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams * _N { using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64865,7 +64809,7 @@ - (void)readAttributeNumberOfActuationsLiftWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64875,7 +64819,7 @@ - (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams * { using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64911,7 +64855,7 @@ - (void)readAttributeNumberOfActuationsTiltWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64921,7 +64865,7 @@ - (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams * { using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64956,7 +64900,7 @@ - (void)readAttributeConfigStatusWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64965,7 +64909,7 @@ - (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65000,7 +64944,7 @@ - (void)readAttributeCurrentPositionLiftPercentageWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65011,7 +64955,7 @@ - (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeP { using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65047,7 +64991,7 @@ - (void)readAttributeCurrentPositionTiltPercentageWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65058,7 +65002,7 @@ - (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeP { using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65093,7 +65037,7 @@ - (void)readAttributeOperationalStatusWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65102,7 +65046,7 @@ - (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams * _Non { using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65138,7 +65082,7 @@ - (void)readAttributeTargetPositionLiftPercent100thsWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65149,7 +65093,7 @@ - (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscrib { using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65186,7 +65130,7 @@ - (void)readAttributeTargetPositionTiltPercent100thsWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65197,7 +65141,7 @@ - (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscrib { using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65233,7 +65177,7 @@ - (void)readAttributeEndProductTypeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65242,7 +65186,7 @@ - (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65277,7 +65221,7 @@ - (void)readAttributeCurrentPositionLiftPercent100thsWithCompletion:(void (^)(NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65288,7 +65232,7 @@ - (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscri { using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65325,7 +65269,7 @@ - (void)readAttributeCurrentPositionTiltPercent100thsWithCompletion:(void (^)(NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65336,7 +65280,7 @@ - (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscri { using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65373,7 +65317,7 @@ - (void)readAttributeInstalledOpenLimitLiftWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65383,7 +65327,7 @@ - (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams * { using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65419,7 +65363,7 @@ - (void)readAttributeInstalledClosedLimitLiftWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65429,7 +65373,7 @@ - (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams { using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65465,7 +65409,7 @@ - (void)readAttributeInstalledOpenLimitTiltWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65475,7 +65419,7 @@ - (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams * { using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65511,7 +65455,7 @@ - (void)readAttributeInstalledClosedLimitTiltWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65521,7 +65465,7 @@ - (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams { using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65556,7 +65500,7 @@ - (void)readAttributeModeWithCompletion:(void (^)(NSNumber * _Nullable value, NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -65590,7 +65534,7 @@ - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -65602,7 +65546,7 @@ - (void)subscribeAttributeModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65636,7 +65580,7 @@ - (void)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65645,7 +65589,7 @@ - (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65679,7 +65623,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65689,7 +65633,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65724,7 +65668,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65734,7 +65678,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65769,7 +65713,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65778,7 +65722,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65812,7 +65756,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65821,7 +65765,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65855,7 +65799,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65864,7 +65808,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65898,7 +65842,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65907,7 +65851,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67210,13 +67154,12 @@ @implementation MTRBaseClusterBarrierControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -67252,7 +67195,7 @@ - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierCont } request.percentOpen = params.percentOpen.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67292,7 +67235,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67303,7 +67246,7 @@ - (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67313,7 +67256,7 @@ - (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _No { using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67348,7 +67291,7 @@ - (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67358,7 +67301,7 @@ - (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _N { using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67393,7 +67336,7 @@ - (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67403,7 +67346,7 @@ - (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _N { using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67438,7 +67381,7 @@ - (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67472,7 +67415,7 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67484,7 +67427,7 @@ - (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams * _Non { using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67519,7 +67462,7 @@ - (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67553,7 +67496,7 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67566,7 +67509,7 @@ - (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams * _No { using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67602,7 +67545,7 @@ - (void)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67636,7 +67579,7 @@ - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)val TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67649,7 +67592,7 @@ - (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams { using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67685,7 +67628,7 @@ - (void)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67719,7 +67662,7 @@ - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)va TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67732,7 +67675,7 @@ - (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParam { using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67767,7 +67710,7 @@ - (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67801,7 +67744,7 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67813,7 +67756,7 @@ - (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams * _Non { using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67848,7 +67791,7 @@ - (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67882,7 +67825,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67895,7 +67838,7 @@ - (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams * _No { using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67930,7 +67873,7 @@ - (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67939,7 +67882,7 @@ - (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67974,7 +67917,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67984,7 +67927,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68019,7 +67962,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68029,7 +67972,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68064,7 +68007,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68073,7 +68016,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68107,7 +68050,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68116,7 +68059,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68150,7 +68093,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68159,7 +68102,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68193,7 +68136,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68202,7 +68145,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68994,13 +68937,12 @@ @implementation MTRBaseClusterPumpConfigurationAndControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -69010,7 +68952,7 @@ - (void)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69019,7 +68961,7 @@ - (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69053,7 +68995,7 @@ - (void)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69062,7 +69004,7 @@ - (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69096,7 +69038,7 @@ - (void)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69105,7 +69047,7 @@ - (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69139,7 +69081,7 @@ - (void)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69148,7 +69090,7 @@ - (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69183,7 +69125,7 @@ - (void)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69192,7 +69134,7 @@ - (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69227,7 +69169,7 @@ - (void)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69236,7 +69178,7 @@ - (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69271,7 +69213,7 @@ - (void)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69280,7 +69222,7 @@ - (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69315,7 +69257,7 @@ - (void)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69324,7 +69266,7 @@ - (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69358,7 +69300,7 @@ - (void)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69367,7 +69309,7 @@ - (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69401,7 +69343,7 @@ - (void)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69410,7 +69352,7 @@ - (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69444,7 +69386,7 @@ - (void)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69453,7 +69395,7 @@ - (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69487,7 +69429,7 @@ - (void)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69496,7 +69438,7 @@ - (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69530,7 +69472,7 @@ - (void)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69539,7 +69481,7 @@ - (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69573,7 +69515,7 @@ - (void)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69582,7 +69524,7 @@ - (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69618,7 +69560,7 @@ - (void)readAttributeEffectiveOperationModeWithCompletion:(void (^)( using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69628,7 +69570,7 @@ - (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * { using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69664,7 +69606,7 @@ - (void)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69674,7 +69616,7 @@ - (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _ { using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69709,7 +69651,7 @@ - (void)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69718,7 +69660,7 @@ - (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69752,7 +69694,7 @@ - (void)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69761,7 +69703,7 @@ - (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69795,7 +69737,7 @@ - (void)readAttributeLifetimeRunningHoursWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -69834,7 +69776,7 @@ - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -69847,7 +69789,7 @@ - (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams * _ { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69882,7 +69824,7 @@ - (void)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69891,7 +69833,7 @@ - (void)subscribeAttributePowerWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69926,7 +69868,7 @@ - (void)readAttributeLifetimeEnergyConsumedWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -69965,7 +69907,7 @@ - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)valu nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -69978,7 +69920,7 @@ - (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams * { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70014,7 +69956,7 @@ - (void)readAttributeOperationModeWithCompletion:(void (^)(NSNumber * _Nullable using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -70048,7 +69990,7 @@ - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -70060,7 +70002,7 @@ - (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70095,7 +70037,7 @@ - (void)readAttributeControlModeWithCompletion:(void (^)(NSNumber * _Nullable va using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -70129,7 +70071,7 @@ - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -70141,7 +70083,7 @@ - (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70176,7 +70118,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70186,7 +70128,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70222,7 +70164,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70232,7 +70174,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70267,7 +70209,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70276,7 +70218,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70311,7 +70253,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70320,7 +70262,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70354,7 +70296,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70363,7 +70305,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70397,7 +70339,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70406,7 +70348,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71707,13 +71649,12 @@ @implementation MTRBaseClusterThermostat - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -71750,7 +71691,7 @@ - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerPara request.mode = static_cast>(params.mode.unsignedCharValue); request.amount = params.amount.charValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -71824,7 +71765,7 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -71862,7 +71803,7 @@ - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams request.modeToReturn = static_cast>(params.modeToReturn.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -71902,7 +71843,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -71913,7 +71854,7 @@ - (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -71922,7 +71863,7 @@ - (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71957,7 +71898,7 @@ - (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -71967,7 +71908,7 @@ - (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _No { using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72002,7 +71943,7 @@ - (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72011,7 +71952,7 @@ - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72046,7 +71987,7 @@ - (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72056,7 +71997,7 @@ - (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72092,7 +72033,7 @@ - (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72102,7 +72043,7 @@ - (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72138,7 +72079,7 @@ - (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72148,7 +72089,7 @@ - (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72184,7 +72125,7 @@ - (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72194,7 +72135,7 @@ - (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72229,7 +72170,7 @@ - (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72238,7 +72179,7 @@ - (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72273,7 +72214,7 @@ - (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72282,7 +72223,7 @@ - (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72318,7 +72259,7 @@ - (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72352,7 +72293,7 @@ - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72365,7 +72306,7 @@ - (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribePar { using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72401,7 +72342,7 @@ - (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72435,7 +72376,7 @@ - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72448,7 +72389,7 @@ - (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribePar { using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72484,7 +72425,7 @@ - (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72518,7 +72459,7 @@ - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72531,7 +72472,7 @@ - (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72567,7 +72508,7 @@ - (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72601,7 +72542,7 @@ - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72614,7 +72555,7 @@ - (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72650,7 +72591,7 @@ - (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72684,7 +72625,7 @@ - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)va TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72697,7 +72638,7 @@ - (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParam { using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72733,7 +72674,7 @@ - (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72767,7 +72708,7 @@ - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)va TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72780,7 +72721,7 @@ - (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParam { using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72815,7 +72756,7 @@ - (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72849,7 +72790,7 @@ - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72862,7 +72803,7 @@ - (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72897,7 +72838,7 @@ - (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72931,7 +72872,7 @@ - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72944,7 +72885,7 @@ - (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72979,7 +72920,7 @@ - (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73013,7 +72954,7 @@ - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73026,7 +72967,7 @@ - (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73061,7 +73002,7 @@ - (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73095,7 +73036,7 @@ - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73108,7 +73049,7 @@ - (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73143,7 +73084,7 @@ - (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73177,7 +73118,7 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73190,7 +73131,7 @@ - (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams * _N { using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73225,7 +73166,7 @@ - (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73259,7 +73200,7 @@ - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73271,7 +73212,7 @@ - (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73307,7 +73248,7 @@ - (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)( using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73341,7 +73282,7 @@ - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)v TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73354,7 +73295,7 @@ - (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribePara { using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73389,7 +73330,7 @@ - (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73423,7 +73364,7 @@ - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73435,7 +73376,7 @@ - (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73469,7 +73410,7 @@ - (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73479,7 +73420,7 @@ - (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * { using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73514,7 +73455,7 @@ - (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73523,7 +73464,7 @@ - (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73558,7 +73499,7 @@ - (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73568,7 +73509,7 @@ - (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParam { using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73604,7 +73545,7 @@ - (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73614,7 +73555,7 @@ - (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73650,7 +73591,7 @@ - (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73684,7 +73625,7 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73697,7 +73638,7 @@ - (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73733,7 +73674,7 @@ - (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value @@ -73773,7 +73714,7 @@ - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Null nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73787,7 +73728,7 @@ - (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscrib { using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73824,7 +73765,7 @@ - (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value @@ -73859,7 +73800,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _N TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73873,7 +73814,7 @@ - (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubsc { using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73910,7 +73851,7 @@ - (void)readAttributeThermostatRunningStateWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73920,7 +73861,7 @@ - (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * { using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73955,7 +73896,7 @@ - (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73965,7 +73906,7 @@ - (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74000,7 +73941,7 @@ - (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74010,7 +73951,7 @@ - (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74046,7 +73987,7 @@ - (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74057,7 +73998,7 @@ - (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeP { using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74092,7 +74033,7 @@ - (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -74131,7 +74072,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74143,7 +74084,7 @@ - (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74178,7 +74119,7 @@ - (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74188,7 +74129,7 @@ - (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _No { using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74223,7 +74164,7 @@ - (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74233,7 +74174,7 @@ - (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _No { using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74268,7 +74209,7 @@ - (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -74307,7 +74248,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74319,7 +74260,7 @@ - (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74354,7 +74295,7 @@ - (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74364,7 +74305,7 @@ - (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74399,7 +74340,7 @@ - (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74409,7 +74350,7 @@ - (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74444,7 +74385,7 @@ - (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74478,7 +74419,7 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74491,7 +74432,7 @@ - (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams * _No { using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74526,7 +74467,7 @@ - (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74560,7 +74501,7 @@ - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74572,7 +74513,7 @@ - (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74606,7 +74547,7 @@ - (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74640,7 +74581,7 @@ - (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74652,7 +74593,7 @@ - (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74686,7 +74627,7 @@ - (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74720,7 +74661,7 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74732,7 +74673,7 @@ - (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74767,7 +74708,7 @@ - (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74801,7 +74742,7 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74813,7 +74754,7 @@ - (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74848,7 +74789,7 @@ - (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74882,7 +74823,7 @@ - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74894,7 +74835,7 @@ - (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74928,7 +74869,7 @@ - (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74962,7 +74903,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74974,7 +74915,7 @@ - (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75009,7 +74950,7 @@ - (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75018,7 +74959,7 @@ - (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75053,7 +74994,7 @@ - (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -75087,7 +75028,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -75099,7 +75040,7 @@ - (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75134,7 +75075,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75144,7 +75085,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75179,7 +75120,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75189,7 +75130,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75224,7 +75165,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75233,7 +75174,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75267,7 +75208,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75276,7 +75217,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75310,7 +75251,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75319,7 +75260,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75353,7 +75294,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75362,7 +75303,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78126,13 +78067,12 @@ @implementation MTRBaseClusterFanControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -78176,7 +78116,7 @@ - (void)stepWithParams:(MTRFanControlClusterStepParams *)params completion:(MTRS definedValue_0 = params.lowestOff.boolValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78187,7 +78127,7 @@ - (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -78221,7 +78161,7 @@ - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78233,7 +78173,7 @@ - (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78267,7 +78207,7 @@ - (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -78301,7 +78241,7 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78313,7 +78253,7 @@ - (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78348,7 +78288,7 @@ - (void)readAttributePercentSettingWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -78387,7 +78327,7 @@ - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78399,7 +78339,7 @@ - (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78433,7 +78373,7 @@ - (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78442,7 +78382,7 @@ - (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78476,7 +78416,7 @@ - (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78485,7 +78425,7 @@ - (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78519,7 +78459,7 @@ - (void)readAttributeSpeedSettingWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -78558,7 +78498,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78570,7 +78510,7 @@ - (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78604,7 +78544,7 @@ - (void)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78613,7 +78553,7 @@ - (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78647,7 +78587,7 @@ - (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78656,7 +78596,7 @@ - (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78690,7 +78630,7 @@ - (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -78724,7 +78664,7 @@ - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78736,7 +78676,7 @@ - (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78770,7 +78710,7 @@ - (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78779,7 +78719,7 @@ - (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78813,7 +78753,7 @@ - (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -78847,7 +78787,7 @@ - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78859,7 +78799,7 @@ - (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78893,7 +78833,7 @@ - (void)readAttributeAirflowDirectionWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -78927,7 +78867,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78939,7 +78879,7 @@ - (void)subscribeAttributeAirflowDirectionWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78974,7 +78914,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78984,7 +78924,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79019,7 +78959,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -79029,7 +78969,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79064,7 +79004,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -79073,7 +79013,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FanControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79107,7 +79047,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -79116,7 +79056,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79150,7 +79090,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -79159,7 +79099,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79193,7 +79133,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -79202,7 +79142,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79999,13 +79939,12 @@ @implementation MTRBaseClusterThermostatUserInterfaceConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -80016,7 +79955,7 @@ - (void)readAttributeTemperatureDisplayModeWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -80050,7 +79989,7 @@ - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -80063,7 +80002,7 @@ - (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams * { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80098,7 +80037,7 @@ - (void)readAttributeKeypadLockoutWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -80132,7 +80071,7 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -80144,7 +80083,7 @@ - (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80179,7 +80118,7 @@ - (void)readAttributeScheduleProgrammingVisibilityWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -80213,7 +80152,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnul TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -80227,7 +80166,7 @@ - (void)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeP { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80263,7 +80202,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80274,7 +80213,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -80309,7 +80248,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80320,7 +80259,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -80355,7 +80294,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80364,7 +80303,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80399,7 +80338,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80408,7 +80347,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80442,7 +80381,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80451,7 +80390,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80485,7 +80424,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80494,7 +80433,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80924,13 +80863,12 @@ @implementation MTRBaseClusterColorControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -80970,7 +80908,7 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params comp request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81009,7 +80947,7 @@ - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completi request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81049,7 +80987,7 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completi request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81088,7 +81026,7 @@ - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81127,7 +81065,7 @@ - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)p request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81167,7 +81105,7 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81208,7 +81146,7 @@ - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSatu request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81248,7 +81186,7 @@ - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81287,7 +81225,7 @@ - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params comp request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81327,7 +81265,7 @@ - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params comp request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81367,7 +81305,7 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81409,7 +81347,7 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81448,7 +81386,7 @@ - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams * request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81488,7 +81426,7 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81529,7 +81467,7 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81573,7 +81511,7 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81610,7 +81548,7 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81652,7 +81590,7 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81695,7 +81633,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81706,7 +81644,7 @@ - (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81715,7 +81653,7 @@ - (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81749,7 +81687,7 @@ - (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81758,7 +81696,7 @@ - (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81793,7 +81731,7 @@ - (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81802,7 +81740,7 @@ - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81836,7 +81774,7 @@ - (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81845,7 +81783,7 @@ - (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81879,7 +81817,7 @@ - (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81888,7 +81826,7 @@ - (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81922,7 +81860,7 @@ - (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81931,7 +81869,7 @@ - (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81966,7 +81904,7 @@ - (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81975,7 +81913,7 @@ - (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82011,7 +81949,7 @@ - (void)readAttributeColorTemperatureMiredsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82021,7 +81959,7 @@ - (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * { using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82056,7 +81994,7 @@ - (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82065,7 +82003,7 @@ - (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82099,7 +82037,7 @@ - (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Options::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -82133,7 +82071,7 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -82145,7 +82083,7 @@ - (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = ColorControl::Attributes::Options::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82179,7 +82117,7 @@ - (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82188,7 +82126,7 @@ - (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82223,7 +82161,7 @@ - (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82232,7 +82170,7 @@ - (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82266,7 +82204,7 @@ - (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82275,7 +82213,7 @@ - (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82309,7 +82247,7 @@ - (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82318,7 +82256,7 @@ - (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82353,7 +82291,7 @@ - (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82362,7 +82300,7 @@ - (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82396,7 +82334,7 @@ - (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82405,7 +82343,7 @@ - (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82439,7 +82377,7 @@ - (void)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82448,7 +82386,7 @@ - (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82483,7 +82421,7 @@ - (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82492,7 +82430,7 @@ - (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82526,7 +82464,7 @@ - (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82535,7 +82473,7 @@ - (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82569,7 +82507,7 @@ - (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82578,7 +82516,7 @@ - (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82613,7 +82551,7 @@ - (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82622,7 +82560,7 @@ - (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82656,7 +82594,7 @@ - (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82665,7 +82603,7 @@ - (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82699,7 +82637,7 @@ - (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82708,7 +82646,7 @@ - (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82743,7 +82681,7 @@ - (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82752,7 +82690,7 @@ - (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82786,7 +82724,7 @@ - (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82795,7 +82733,7 @@ - (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82829,7 +82767,7 @@ - (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82838,7 +82776,7 @@ - (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82873,7 +82811,7 @@ - (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82882,7 +82820,7 @@ - (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82916,7 +82854,7 @@ - (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82925,7 +82863,7 @@ - (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82959,7 +82897,7 @@ - (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82968,7 +82906,7 @@ - (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83003,7 +82941,7 @@ - (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83037,7 +82975,7 @@ - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83049,7 +82987,7 @@ - (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83083,7 +83021,7 @@ - (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83117,7 +83055,7 @@ - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83129,7 +83067,7 @@ - (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83163,7 +83101,7 @@ - (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83197,7 +83135,7 @@ - (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83209,7 +83147,7 @@ - (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83243,7 +83181,7 @@ - (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83277,7 +83215,7 @@ - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83289,7 +83227,7 @@ - (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83323,7 +83261,7 @@ - (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -83362,7 +83300,7 @@ - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83375,7 +83313,7 @@ - (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams * _ { using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83410,7 +83348,7 @@ - (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83444,7 +83382,7 @@ - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83456,7 +83394,7 @@ - (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83490,7 +83428,7 @@ - (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83524,7 +83462,7 @@ - (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83536,7 +83474,7 @@ - (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83570,7 +83508,7 @@ - (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -83609,7 +83547,7 @@ - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83622,7 +83560,7 @@ - (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams * _ { using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83657,7 +83595,7 @@ - (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83691,7 +83629,7 @@ - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83703,7 +83641,7 @@ - (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83737,7 +83675,7 @@ - (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83771,7 +83709,7 @@ - (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83783,7 +83721,7 @@ - (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83817,7 +83755,7 @@ - (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -83856,7 +83794,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83869,7 +83807,7 @@ - (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams * _ { using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83904,7 +83842,7 @@ - (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -83914,7 +83852,7 @@ - (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _No { using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83949,7 +83887,7 @@ - (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -83958,7 +83896,7 @@ - (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83993,7 +83931,7 @@ - (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84002,7 +83940,7 @@ - (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84037,7 +83975,7 @@ - (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84047,7 +83985,7 @@ - (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _No { using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84082,7 +84020,7 @@ - (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84091,7 +84029,7 @@ - (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84126,7 +84064,7 @@ - (void)readAttributeColorLoopStartEnhancedHueWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84136,7 +84074,7 @@ - (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParam { using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84172,7 +84110,7 @@ - (void)readAttributeColorLoopStoredEnhancedHueWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84182,7 +84120,7 @@ - (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribePara { using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84217,7 +84155,7 @@ - (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84226,7 +84164,7 @@ - (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84262,7 +84200,7 @@ - (void)readAttributeColorTempPhysicalMinMiredsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84272,7 +84210,7 @@ - (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribePara { using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84308,7 +84246,7 @@ - (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84318,7 +84256,7 @@ - (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribePara { using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84354,7 +84292,7 @@ - (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84365,7 +84303,7 @@ - (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscrib { using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84402,7 +84340,7 @@ - (void)readAttributeStartUpColorTemperatureMiredsWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -84441,7 +84379,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullab nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -84455,7 +84393,7 @@ - (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeP { using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84490,7 +84428,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84500,7 +84438,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84535,7 +84473,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84545,7 +84483,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84580,7 +84518,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84589,7 +84527,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84623,7 +84561,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84632,7 +84570,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84666,7 +84604,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84675,7 +84613,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84709,7 +84647,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84718,7 +84656,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87476,13 +87414,12 @@ @implementation MTRBaseClusterBallastConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -87492,7 +87429,7 @@ - (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -87501,7 +87438,7 @@ - (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87536,7 +87473,7 @@ - (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -87545,7 +87482,7 @@ - (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87580,7 +87517,7 @@ - (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -87589,7 +87526,7 @@ - (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87623,7 +87560,7 @@ - (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -87657,7 +87594,7 @@ - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -87669,7 +87606,7 @@ - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87703,7 +87640,7 @@ - (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -87737,7 +87674,7 @@ - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -87749,7 +87686,7 @@ - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87784,7 +87721,7 @@ - (void)readAttributeIntrinsicBallastFactorWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -87823,7 +87760,7 @@ - (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)valu nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -87836,7 +87773,7 @@ - (void)subscribeAttributeIntrinsicBallastFactorWithParams:(MTRSubscribeParams * { using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87872,7 +87809,7 @@ - (void)readAttributeBallastFactorAdjustmentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -87911,7 +87848,7 @@ - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)val nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -87924,7 +87861,7 @@ - (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams { using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87959,7 +87896,7 @@ - (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -87968,7 +87905,7 @@ - (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88002,7 +87939,7 @@ - (void)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -88036,7 +87973,7 @@ - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88048,7 +87985,7 @@ - (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88082,7 +88019,7 @@ - (void)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -88116,7 +88053,7 @@ - (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88128,7 +88065,7 @@ - (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88163,7 +88100,7 @@ - (void)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -88202,7 +88139,7 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88214,7 +88151,7 @@ - (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88248,7 +88185,7 @@ - (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -88287,7 +88224,7 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88299,7 +88236,7 @@ - (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88333,7 +88270,7 @@ - (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -88367,7 +88304,7 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88379,7 +88316,7 @@ - (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88414,7 +88351,7 @@ - (void)readAttributeLampBurnHoursTripPointWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -88453,7 +88390,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)valu nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88466,7 +88403,7 @@ - (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams * { using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88502,7 +88439,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88512,7 +88449,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88548,7 +88485,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88558,7 +88495,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88593,7 +88530,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88602,7 +88539,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88636,7 +88573,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88645,7 +88582,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88679,7 +88616,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88688,7 +88625,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88722,7 +88659,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88731,7 +88668,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89710,13 +89647,12 @@ @implementation MTRBaseClusterIlluminanceMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -89726,7 +89662,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89735,7 +89671,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89769,7 +89705,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89778,7 +89714,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89813,7 +89749,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89822,7 +89758,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89857,7 +89793,7 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89866,7 +89802,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89901,7 +89837,7 @@ - (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89910,7 +89846,7 @@ - (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89946,7 +89882,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89956,7 +89892,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89992,7 +89928,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90002,7 +89938,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90037,7 +89973,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90046,7 +89982,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90080,7 +90016,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90089,7 +90025,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90123,7 +90059,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90132,7 +90068,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90166,7 +90102,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90175,7 +90111,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90657,13 +90593,12 @@ @implementation MTRBaseClusterTemperatureMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -90673,7 +90608,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90682,7 +90617,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90716,7 +90651,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90725,7 +90660,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90760,7 +90695,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90769,7 +90704,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90804,7 +90739,7 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90813,7 +90748,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90848,7 +90783,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90858,7 +90793,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90894,7 +90829,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90904,7 +90839,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90939,7 +90874,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90948,7 +90883,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90982,7 +90917,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90991,7 +90926,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91025,7 +90960,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91034,7 +90969,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91068,7 +91003,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91077,7 +91012,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91515,13 +91450,12 @@ @implementation MTRBaseClusterPressureMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -91531,7 +91465,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91540,7 +91474,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91574,7 +91508,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91583,7 +91517,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91618,7 +91552,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91627,7 +91561,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91662,7 +91596,7 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91671,7 +91605,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91705,7 +91639,7 @@ - (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91714,7 +91648,7 @@ - (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91748,7 +91682,7 @@ - (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91757,7 +91691,7 @@ - (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91791,7 +91725,7 @@ - (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91800,7 +91734,7 @@ - (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91834,7 +91768,7 @@ - (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91843,7 +91777,7 @@ - (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91878,7 +91812,7 @@ - (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91887,7 +91821,7 @@ - (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91922,7 +91856,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91932,7 +91866,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91967,7 +91901,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91977,7 +91911,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92012,7 +91946,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92021,7 +91955,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92055,7 +91989,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92064,7 +91998,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92098,7 +92032,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92107,7 +92041,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92141,7 +92075,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92150,7 +92084,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92804,13 +92738,12 @@ @implementation MTRBaseClusterFlowMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -92820,7 +92753,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92829,7 +92762,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92863,7 +92796,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92872,7 +92805,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92907,7 +92840,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92916,7 +92849,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92951,7 +92884,7 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92960,7 +92893,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92994,7 +92927,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93004,7 +92937,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93039,7 +92972,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93049,7 +92982,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93084,7 +93017,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93093,7 +93026,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93127,7 +93060,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93136,7 +93069,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93170,7 +93103,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93179,7 +93112,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93213,7 +93146,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93222,7 +93155,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93660,13 +93593,12 @@ @implementation MTRBaseClusterRelativeHumidityMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -93676,7 +93608,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93685,7 +93617,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93719,7 +93651,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93728,7 +93660,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93763,7 +93695,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93772,7 +93704,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93807,7 +93739,7 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93816,7 +93748,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93851,7 +93783,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93861,7 +93793,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93897,7 +93829,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93907,7 +93839,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93942,7 +93874,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93951,7 +93883,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93986,7 +93918,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93995,7 +93927,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94029,7 +93961,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94038,7 +93970,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94072,7 +94004,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94081,7 +94013,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94519,13 +94451,12 @@ @implementation MTRBaseClusterOccupancySensing - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -94535,7 +94466,7 @@ - (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94544,7 +94475,7 @@ - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94579,7 +94510,7 @@ - (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nul using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94589,7 +94520,7 @@ - (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _N { using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94625,7 +94556,7 @@ - (void)readAttributeOccupancySensorTypeBitmapWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94635,7 +94566,7 @@ - (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParam { using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94671,7 +94602,7 @@ - (void)readAttributePIROccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -94705,7 +94636,7 @@ - (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -94719,7 +94650,7 @@ - (void)subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRSubscribePa { using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94755,7 +94686,7 @@ - (void)readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -94789,7 +94720,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -94803,7 +94734,7 @@ - (void)subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRSubscribePa { using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94839,7 +94770,7 @@ - (void)readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value @@ -94874,7 +94805,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Non TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -94888,7 +94819,7 @@ - (void)subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRSubscri { using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94925,7 +94856,7 @@ - (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:(void (^) MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -94960,7 +94891,7 @@ - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _ TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -94974,7 +94905,7 @@ - (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubs { using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95011,7 +94942,7 @@ - (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:(void (^) MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -95046,7 +94977,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _ TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -95060,7 +94991,7 @@ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubs { using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95097,7 +95028,7 @@ - (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:(void MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value @@ -95134,7 +95065,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -95148,7 +95079,7 @@ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTR { using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95185,7 +95116,7 @@ - (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:(voi MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -95222,7 +95153,7 @@ - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumbe TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -95236,7 +95167,7 @@ - (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MT { using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95273,7 +95204,7 @@ - (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:(voi MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -95310,7 +95241,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumbe TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -95324,7 +95255,7 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MT { using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95361,7 +95292,7 @@ - (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion: MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value @@ -95398,7 +95329,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSN TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -95412,7 +95343,7 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams { using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95448,7 +95379,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95458,7 +95389,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95493,7 +95424,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95503,7 +95434,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95538,7 +95469,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95547,7 +95478,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95581,7 +95512,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95590,7 +95521,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95624,7 +95555,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95633,7 +95564,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95667,7 +95598,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95676,7 +95607,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96605,13 +96536,12 @@ @implementation MTRBaseClusterCarbonMonoxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -96621,7 +96551,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96630,7 +96560,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96664,7 +96594,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96673,7 +96603,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96708,7 +96638,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96717,7 +96647,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96752,7 +96682,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96761,7 +96691,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96797,7 +96727,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96807,7 +96737,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96842,7 +96772,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96852,7 +96782,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96888,7 +96818,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96898,7 +96828,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96933,7 +96863,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96942,7 +96872,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96977,7 +96907,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96987,7 +96917,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97023,7 +96953,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97033,7 +96963,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97070,7 +97000,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97080,7 +97010,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97114,7 +97044,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97125,7 +97055,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97160,7 +97090,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97171,7 +97101,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97206,7 +97136,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97215,7 +97145,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97250,7 +97180,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97259,7 +97189,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97293,7 +97223,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97302,7 +97232,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97336,7 +97266,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97345,7 +97275,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97381,13 +97311,12 @@ @implementation MTRBaseClusterCarbonDioxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -97397,7 +97326,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97406,7 +97335,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97440,7 +97369,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97449,7 +97378,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97484,7 +97413,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97493,7 +97422,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97528,7 +97457,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97537,7 +97466,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97573,7 +97502,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97583,7 +97512,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97618,7 +97547,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97628,7 +97557,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97664,7 +97593,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97674,7 +97603,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97709,7 +97638,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97718,7 +97647,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97753,7 +97682,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97763,7 +97692,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97799,7 +97728,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97809,7 +97738,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97846,7 +97775,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97856,7 +97785,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97890,7 +97819,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97901,7 +97830,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97936,7 +97865,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97947,7 +97876,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97982,7 +97911,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97991,7 +97920,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98026,7 +97955,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98035,7 +97964,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98069,7 +97998,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98078,7 +98007,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98112,7 +98041,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98121,7 +98050,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98157,13 +98086,12 @@ @implementation MTRBaseClusterNitrogenDioxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -98173,7 +98101,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98182,7 +98110,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98216,7 +98144,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98225,7 +98153,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98260,7 +98188,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98269,7 +98197,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98304,7 +98232,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98313,7 +98241,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98349,7 +98277,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98359,7 +98287,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98394,7 +98322,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98404,7 +98332,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98440,7 +98368,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98450,7 +98378,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98485,7 +98413,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98494,7 +98422,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98529,7 +98457,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98539,7 +98467,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -98576,7 +98504,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98586,7 +98514,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -98623,7 +98551,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98633,7 +98561,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -98667,7 +98595,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98678,7 +98606,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -98714,7 +98642,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98725,7 +98653,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -98760,7 +98688,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98769,7 +98697,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98804,7 +98732,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98813,7 +98741,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98847,7 +98775,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98856,7 +98784,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98890,7 +98818,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98899,7 +98827,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98935,13 +98863,12 @@ @implementation MTRBaseClusterOzoneConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -98951,7 +98878,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98960,7 +98887,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98994,7 +98921,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99003,7 +98930,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99038,7 +98965,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99047,7 +98974,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99082,7 +99009,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99091,7 +99018,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99127,7 +99054,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99137,7 +99064,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99172,7 +99099,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99182,7 +99109,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99218,7 +99145,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99228,7 +99155,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99263,7 +99190,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99272,7 +99199,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99307,7 +99234,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99316,7 +99243,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99352,7 +99279,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99361,7 +99288,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99397,7 +99324,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99406,7 +99333,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99441,7 +99368,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99451,7 +99378,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99487,7 +99414,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99497,7 +99424,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99532,7 +99459,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99541,7 +99468,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99576,7 +99503,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99585,7 +99512,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99619,7 +99546,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99628,7 +99555,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99662,7 +99589,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99671,7 +99598,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99707,13 +99634,12 @@ @implementation MTRBaseClusterPM25ConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -99723,7 +99649,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99732,7 +99658,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99766,7 +99692,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99775,7 +99701,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99810,7 +99736,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99819,7 +99745,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99854,7 +99780,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99863,7 +99789,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99899,7 +99825,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99909,7 +99835,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99944,7 +99870,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99954,7 +99880,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99990,7 +99916,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100000,7 +99926,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100035,7 +99961,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100044,7 +99970,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100079,7 +100005,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100088,7 +100014,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100124,7 +100050,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100133,7 +100059,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100169,7 +100095,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100178,7 +100104,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100213,7 +100139,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100223,7 +100149,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100259,7 +100185,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100269,7 +100195,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100304,7 +100230,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100313,7 +100239,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100348,7 +100274,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100357,7 +100283,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100391,7 +100317,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100400,7 +100326,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100434,7 +100360,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100443,7 +100369,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100479,13 +100405,12 @@ @implementation MTRBaseClusterFormaldehydeConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -100495,7 +100420,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100504,7 +100429,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100538,7 +100463,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100547,7 +100472,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100582,7 +100507,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100591,7 +100516,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100626,7 +100551,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100635,7 +100560,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100671,7 +100596,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100681,7 +100606,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100716,7 +100641,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100726,7 +100651,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100762,7 +100687,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100772,7 +100697,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100807,7 +100732,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100816,7 +100741,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100851,7 +100776,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100861,7 +100786,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -100896,7 +100821,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100906,7 +100831,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -100942,7 +100867,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100951,7 +100876,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100986,7 +100911,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100997,7 +100922,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -101032,7 +100957,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101043,7 +100968,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -101078,7 +101003,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101087,7 +101012,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101122,7 +101047,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101131,7 +101056,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101165,7 +101090,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101174,7 +101099,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101208,7 +101133,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101217,7 +101142,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101253,13 +101178,12 @@ @implementation MTRBaseClusterPM1ConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -101269,7 +101193,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101278,7 +101202,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101312,7 +101236,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101321,7 +101245,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101356,7 +101280,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101365,7 +101289,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101400,7 +101324,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101409,7 +101333,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101445,7 +101369,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101455,7 +101379,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101490,7 +101414,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101500,7 +101424,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101536,7 +101460,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101546,7 +101470,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101581,7 +101505,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101590,7 +101514,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101625,7 +101549,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101634,7 +101558,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101670,7 +101594,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101679,7 +101603,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101715,7 +101639,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101724,7 +101648,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101759,7 +101683,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101769,7 +101693,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101805,7 +101729,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101815,7 +101739,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101850,7 +101774,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101859,7 +101783,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101894,7 +101818,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101903,7 +101827,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101937,7 +101861,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101946,7 +101870,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101980,7 +101904,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101989,7 +101913,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102025,13 +101949,12 @@ @implementation MTRBaseClusterPM10ConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -102041,7 +101964,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102050,7 +101973,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102084,7 +102007,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102093,7 +102016,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102128,7 +102051,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102137,7 +102060,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102172,7 +102095,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102181,7 +102104,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102217,7 +102140,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102227,7 +102150,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102262,7 +102185,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102272,7 +102195,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102308,7 +102231,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102318,7 +102241,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102353,7 +102276,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102362,7 +102285,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102397,7 +102320,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102406,7 +102329,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102442,7 +102365,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102451,7 +102374,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102487,7 +102410,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102496,7 +102419,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102531,7 +102454,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102541,7 +102464,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102577,7 +102500,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102587,7 +102510,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102622,7 +102545,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102631,7 +102554,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102666,7 +102589,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102675,7 +102598,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102709,7 +102632,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102718,7 +102641,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102752,7 +102675,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102761,7 +102684,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102797,13 +102720,12 @@ @implementation MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurem - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -102813,7 +102735,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102822,7 +102744,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102856,7 +102778,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102865,7 +102787,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102900,7 +102822,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102909,7 +102831,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102944,7 +102866,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102953,7 +102875,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102989,7 +102911,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102999,7 +102921,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103035,7 +102957,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103045,7 +102967,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103081,7 +103003,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103091,7 +103013,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103127,7 +103049,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103136,7 +103058,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103172,7 +103094,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl return MTRReadAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge, NSNumber, TypeInfo::DecodableType>( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103183,7 +103105,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge, NSNumber, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -103221,7 +103143,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla return MTRReadAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge, NSNumber, TypeInfo::DecodableType>( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103232,7 +103154,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge, NSNumber, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -103269,7 +103191,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103279,7 +103201,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge, NSNumber, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103316,7 +103238,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103328,7 +103250,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge, NSArray, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -103365,7 +103287,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103376,7 +103298,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge, NSArray, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103414,7 +103336,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103424,7 +103346,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -103460,7 +103382,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103470,7 +103392,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge, NSArray, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103506,7 +103428,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103515,7 +103437,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103549,7 +103471,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103558,7 +103480,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103594,13 +103516,12 @@ @implementation MTRBaseClusterRadonConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -103610,7 +103531,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103619,7 +103540,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103653,7 +103574,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103662,7 +103583,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103697,7 +103618,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103706,7 +103627,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103741,7 +103662,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103750,7 +103671,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103786,7 +103707,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103796,7 +103717,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103831,7 +103752,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103841,7 +103762,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103877,7 +103798,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103887,7 +103808,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103922,7 +103843,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103931,7 +103852,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103966,7 +103887,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103975,7 +103896,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104011,7 +103932,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104020,7 +103941,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non { using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104056,7 +103977,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104065,7 +103986,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104100,7 +104021,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104110,7 +104031,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104146,7 +104067,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104156,7 +104077,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104191,7 +104112,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104200,7 +104121,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104235,7 +104156,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104244,7 +104165,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104278,7 +104199,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104287,7 +104208,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104321,7 +104242,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104330,7 +104251,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104366,13 +104287,12 @@ @implementation MTRBaseClusterWakeOnLAN - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -104382,7 +104302,7 @@ - (void)readAttributeMACAddressWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104391,7 +104311,7 @@ - (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104425,7 +104345,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104435,7 +104355,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104470,7 +104390,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104480,7 +104400,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104515,7 +104435,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104524,7 +104444,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104558,7 +104478,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104567,7 +104487,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104601,7 +104521,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104610,7 +104530,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104644,7 +104564,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104653,7 +104573,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104962,13 +104882,12 @@ @implementation MTRBaseClusterChannel - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -105001,7 +104920,7 @@ - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params } request.match = [self asCharSpan:params.match]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -105039,7 +104958,7 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP request.majorNumber = params.majorNumber.unsignedShortValue; request.minorNumber = params.minorNumber.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -105075,7 +104994,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params compl } request.count = params.count.shortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -105086,7 +105005,7 @@ - (void)readAttributeChannelListWithCompletion:(void (^)(NSArray * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105095,7 +105014,7 @@ - (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105131,7 +105050,7 @@ - (void)readAttributeLineupWithCompletion:(void (^)(MTRChannelClusterLineupInfoS using TypeInfo = Channel::Attributes::Lineup::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105141,7 +105060,7 @@ - (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = Channel::Attributes::Lineup::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105178,7 +105097,7 @@ - (void)readAttributeCurrentChannelWithCompletion:(void (^)(MTRChannelClusterCha using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105188,7 +105107,7 @@ - (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105223,7 +105142,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105233,7 +105152,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105268,7 +105187,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105278,7 +105197,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105313,7 +105232,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Channel::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105322,7 +105241,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Channel::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105356,7 +105275,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105365,7 +105284,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105399,7 +105318,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105408,7 +105327,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105442,7 +105361,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105451,7 +105370,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105869,13 +105788,12 @@ @implementation MTRBaseClusterTargetNavigator - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -105913,7 +105831,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams definedValue_0 = [self asCharSpan:params.data]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -105924,7 +105842,7 @@ - (void)readAttributeTargetListWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105933,7 +105851,7 @@ - (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105967,7 +105885,7 @@ - (void)readAttributeCurrentTargetWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105976,7 +105894,7 @@ - (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106010,7 +105928,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106020,7 +105938,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106055,7 +105973,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106065,7 +105983,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106100,7 +106018,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106109,7 +106027,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106143,7 +106061,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106152,7 +106070,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106186,7 +106104,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106195,7 +106113,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106229,7 +106147,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106238,7 +106156,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106600,13 +106518,12 @@ @implementation MTRBaseClusterMediaPlayback - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -106644,7 +106561,7 @@ - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106683,7 +106600,7 @@ - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106722,7 +106639,7 @@ - (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106761,7 +106678,7 @@ - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable) } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106800,7 +106717,7 @@ - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)pa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106839,7 +106756,7 @@ - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106878,7 +106795,7 @@ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106917,7 +106834,7 @@ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nulla } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106952,7 +106869,7 @@ - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params } request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106987,7 +106904,7 @@ - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)para } request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -107022,7 +106939,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params } request.position = params.position.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -107033,7 +106950,7 @@ - (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107042,7 +106959,7 @@ - (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107076,7 +106993,7 @@ - (void)readAttributeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107085,7 +107002,7 @@ - (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107119,7 +107036,7 @@ - (void)readAttributeDurationWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107128,7 +107045,7 @@ - (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107164,7 +107081,7 @@ - (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClu using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107175,7 +107092,7 @@ - (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSampledPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -107209,7 +107126,7 @@ - (void)readAttributePlaybackSpeedWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107218,7 +107135,7 @@ - (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107252,7 +107169,7 @@ - (void)readAttributeSeekRangeEndWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107261,7 +107178,7 @@ - (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107295,7 +107212,7 @@ - (void)readAttributeSeekRangeStartWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107304,7 +107221,7 @@ - (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107338,7 +107255,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107348,7 +107265,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107383,7 +107300,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107393,7 +107310,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107428,7 +107345,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107437,7 +107354,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107471,7 +107388,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107480,7 +107397,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107514,7 +107431,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107523,7 +107440,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107557,7 +107474,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107566,7 +107483,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108287,13 +108204,12 @@ @implementation MTRBaseClusterMediaInput - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -108328,7 +108244,7 @@ - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params co } request.index = params.index.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -108368,7 +108284,7 @@ - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _ } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -108408,7 +108324,7 @@ - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _ } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -108445,7 +108361,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params co request.index = params.index.unsignedCharValue; request.name = [self asCharSpan:params.name]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -108456,7 +108372,7 @@ - (void)readAttributeInputListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108465,7 +108381,7 @@ - (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108499,7 +108415,7 @@ - (void)readAttributeCurrentInputWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108508,7 +108424,7 @@ - (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108542,7 +108458,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108552,7 +108468,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108587,7 +108503,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108597,7 +108513,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108632,7 +108548,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108641,7 +108557,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108675,7 +108591,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108684,7 +108600,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108718,7 +108634,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108727,7 +108643,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108761,7 +108677,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108770,7 +108686,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109148,13 +109064,12 @@ @implementation MTRBaseClusterLowPower - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -109192,7 +109107,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params comple } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -109203,7 +109118,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109213,7 +109128,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109248,7 +109163,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109258,7 +109173,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109293,7 +109208,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LowPower::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109302,7 +109217,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = LowPower::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109336,7 +109251,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109345,7 +109260,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109379,7 +109294,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109388,7 +109303,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109422,7 +109337,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109431,7 +109346,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109704,13 +109619,12 @@ @implementation MTRBaseClusterKeypadInput - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -109743,7 +109657,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params } request.keyCode = static_cast>(params.keyCode.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -109754,7 +109668,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109764,7 +109678,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109799,7 +109713,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109809,7 +109723,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109844,7 +109758,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109853,7 +109767,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109887,7 +109801,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109896,7 +109810,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109930,7 +109844,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109939,7 +109853,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109973,7 +109887,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109982,7 +109896,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110257,13 +110171,12 @@ @implementation MTRBaseClusterContentLauncher - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -110354,7 +110267,7 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) definedValue_0 = [self asCharSpan:params.data]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -110487,7 +110400,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -110498,7 +110411,7 @@ - (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110507,7 +110420,7 @@ - (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110542,7 +110455,7 @@ - (void)readAttributeSupportedStreamingProtocolsWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -110576,7 +110489,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -110589,7 +110502,7 @@ - (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribePar { using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110624,7 +110537,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110634,7 +110547,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110669,7 +110582,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110679,7 +110592,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110714,7 +110627,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110723,7 +110636,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110757,7 +110670,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110766,7 +110679,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110800,7 +110713,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110809,7 +110722,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110843,7 +110756,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110852,7 +110765,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111236,13 +111149,12 @@ @implementation MTRBaseClusterAudioOutput - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -111277,7 +111189,7 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params } request.index = params.index.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -111314,7 +111226,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params request.index = params.index.unsignedCharValue; request.name = [self asCharSpan:params.name]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -111325,7 +111237,7 @@ - (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111334,7 +111246,7 @@ - (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111368,7 +111280,7 @@ - (void)readAttributeCurrentOutputWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111377,7 +111289,7 @@ - (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111411,7 +111323,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111421,7 +111333,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111456,7 +111368,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111466,7 +111378,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111501,7 +111413,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111510,7 +111422,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111544,7 +111456,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111553,7 +111465,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111587,7 +111499,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111596,7 +111508,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111630,7 +111542,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111639,7 +111551,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112000,13 +111912,12 @@ @implementation MTRBaseClusterApplicationLauncher - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -112050,7 +111961,7 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nul } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -112091,7 +112002,7 @@ - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullabl } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -112132,7 +112043,7 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -112143,7 +112054,7 @@ - (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112152,7 +112063,7 @@ - (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112188,7 +112099,7 @@ - (void)readAttributeCurrentAppWithCompletion:(void (^)(MTRApplicationLauncherCl using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable)value @@ -112235,7 +112146,7 @@ - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicat } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -112249,7 +112160,7 @@ - (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentAppWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -112284,7 +112195,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112294,7 +112205,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112329,7 +112240,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112339,7 +112250,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112374,7 +112285,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112383,7 +112294,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112417,7 +112328,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112426,7 +112337,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112460,7 +112371,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112469,7 +112380,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112503,7 +112414,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112512,7 +112423,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112908,13 +112819,12 @@ @implementation MTRBaseClusterApplicationBasic - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -112924,7 +112834,7 @@ - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112933,7 +112843,7 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112967,7 +112877,7 @@ - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112976,7 +112886,7 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113010,7 +112920,7 @@ - (void)readAttributeApplicationNameWithCompletion:(void (^)(NSString * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113019,7 +112929,7 @@ - (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113054,7 +112964,7 @@ - (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113063,7 +112973,7 @@ - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113099,7 +113009,7 @@ - (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClus using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113110,7 +113020,7 @@ - (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeApplicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -113145,7 +113055,7 @@ - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113154,7 +113064,7 @@ - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113188,7 +113098,7 @@ - (void)readAttributeApplicationVersionWithCompletion:(void (^)(NSString * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113198,7 +113108,7 @@ - (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _No { using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113233,7 +113143,7 @@ - (void)readAttributeAllowedVendorListWithCompletion:(void (^)(NSArray * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113242,7 +113152,7 @@ - (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113277,7 +113187,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113287,7 +113197,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113322,7 +113232,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113332,7 +113242,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113367,7 +113277,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113376,7 +113286,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113410,7 +113320,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113419,7 +113329,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113453,7 +113363,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113462,7 +113372,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113496,7 +113406,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113505,7 +113415,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114121,13 +114031,12 @@ @implementation MTRBaseClusterAccountLogin - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -114164,7 +114073,7 @@ - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params } request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -114204,7 +114113,7 @@ - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:( request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; request.setupPIN = [self asCharSpan:params.setupPIN]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -114246,7 +114155,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params timedInvokeTimeoutMs.SetValue(10000); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -114257,7 +114166,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114267,7 +114176,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114302,7 +114211,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114312,7 +114221,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114347,7 +114256,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114356,7 +114265,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114390,7 +114299,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114399,7 +114308,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114433,7 +114342,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114442,7 +114351,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114476,7 +114385,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114485,7 +114394,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114773,13 +114682,12 @@ @implementation MTRBaseClusterElectricalMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -114818,7 +114726,7 @@ - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfi } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -114857,7 +114765,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG request.startTime = params.startTime.unsignedIntValue; request.numberOfIntervals = params.numberOfIntervals.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -114868,7 +114776,7 @@ - (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114877,7 +114785,7 @@ - (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114912,7 +114820,7 @@ - (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114921,7 +114829,7 @@ - (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114955,7 +114863,7 @@ - (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114964,7 +114872,7 @@ - (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114998,7 +114906,7 @@ - (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115007,7 +114915,7 @@ - (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115041,7 +114949,7 @@ - (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115050,7 +114958,7 @@ - (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115084,7 +114992,7 @@ - (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115093,7 +115001,7 @@ - (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115127,7 +115035,7 @@ - (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115136,7 +115044,7 @@ - (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115170,7 +115078,7 @@ - (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115179,7 +115087,7 @@ - (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115213,7 +115121,7 @@ - (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115222,7 +115130,7 @@ - (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115256,7 +115164,7 @@ - (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115265,7 +115173,7 @@ - (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115299,7 +115207,7 @@ - (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115309,7 +115217,7 @@ - (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115344,7 +115252,7 @@ - (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115353,7 +115261,7 @@ - (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115388,7 +115296,7 @@ - (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115398,7 +115306,7 @@ - (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115433,7 +115341,7 @@ - (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115442,7 +115350,7 @@ - (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115477,7 +115385,7 @@ - (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115486,7 +115394,7 @@ - (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115521,7 +115429,7 @@ - (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115530,7 +115438,7 @@ - (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115564,7 +115472,7 @@ - (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115573,7 +115481,7 @@ - (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115607,7 +115515,7 @@ - (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115616,7 +115524,7 @@ - (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115650,7 +115558,7 @@ - (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115659,7 +115567,7 @@ - (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115693,7 +115601,7 @@ - (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115702,7 +115610,7 @@ - (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115736,7 +115644,7 @@ - (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115745,7 +115653,7 @@ - (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115780,7 +115688,7 @@ - (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115790,7 +115698,7 @@ - (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _No { using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115825,7 +115733,7 @@ - (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115835,7 +115743,7 @@ - (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _No { using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115871,7 +115779,7 @@ - (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115881,7 +115789,7 @@ - (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115917,7 +115825,7 @@ - (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115927,7 +115835,7 @@ - (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115963,7 +115871,7 @@ - (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115973,7 +115881,7 @@ - (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116009,7 +115917,7 @@ - (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116019,7 +115927,7 @@ - (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116055,7 +115963,7 @@ - (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116065,7 +115973,7 @@ - (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116101,7 +116009,7 @@ - (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116111,7 +116019,7 @@ - (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribePar { using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116147,7 +116055,7 @@ - (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116158,7 +116066,7 @@ - (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscrib { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116195,7 +116103,7 @@ - (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116206,7 +116114,7 @@ - (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscrib { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116243,7 +116151,7 @@ - (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116254,7 +116162,7 @@ - (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscrib { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116291,7 +116199,7 @@ - (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116302,7 +116210,7 @@ - (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscrib { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116339,7 +116247,7 @@ - (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSN MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116350,7 +116258,7 @@ - (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscrib { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116387,7 +116295,7 @@ - (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116398,7 +116306,7 @@ - (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscri { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116434,7 +116342,7 @@ - (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116444,7 +116352,7 @@ - (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116479,7 +116387,7 @@ - (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116489,7 +116397,7 @@ - (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _No { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116524,7 +116432,7 @@ - (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116533,7 +116441,7 @@ - (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116568,7 +116476,7 @@ - (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116577,7 +116485,7 @@ - (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116612,7 +116520,7 @@ - (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116622,7 +116530,7 @@ - (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParam { using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116658,7 +116566,7 @@ - (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116669,7 +116577,7 @@ - (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribe { using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116704,7 +116612,7 @@ - (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116714,7 +116622,7 @@ - (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116750,7 +116658,7 @@ - (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116760,7 +116668,7 @@ - (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116796,7 +116704,7 @@ - (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116806,7 +116714,7 @@ - (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116842,7 +116750,7 @@ - (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116853,7 +116761,7 @@ - (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribePa { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116888,7 +116796,7 @@ - (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116898,7 +116806,7 @@ - (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _No { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116933,7 +116841,7 @@ - (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116942,7 +116850,7 @@ - (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116976,7 +116884,7 @@ - (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116985,7 +116893,7 @@ - (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117019,7 +116927,7 @@ - (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117028,7 +116936,7 @@ - (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117062,7 +116970,7 @@ - (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117071,7 +116979,7 @@ - (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117105,7 +117013,7 @@ - (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117114,7 +117022,7 @@ - (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117148,7 +117056,7 @@ - (void)readAttributeRmsCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117157,7 +117065,7 @@ - (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117191,7 +117099,7 @@ - (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117200,7 +117108,7 @@ - (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117234,7 +117142,7 @@ - (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117243,7 +117151,7 @@ - (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117277,7 +117185,7 @@ - (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117286,7 +117194,7 @@ - (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117320,7 +117228,7 @@ - (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117329,7 +117237,7 @@ - (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117363,7 +117271,7 @@ - (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117372,7 +117280,7 @@ - (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117406,7 +117314,7 @@ - (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117415,7 +117323,7 @@ - (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117450,7 +117358,7 @@ - (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value @@ -117485,7 +117393,7 @@ - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _N TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117499,7 +117407,7 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubsc { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117536,7 +117444,7 @@ - (void)readAttributeAverageRmsUnderVoltageCounterWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -117570,7 +117478,7 @@ - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnul TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117584,7 +117492,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeP { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117620,7 +117528,7 @@ - (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -117654,7 +117562,7 @@ - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117667,7 +117575,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribePar { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117703,7 +117611,7 @@ - (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -117737,7 +117645,7 @@ - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117751,7 +117659,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribePa { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117786,7 +117694,7 @@ - (void)readAttributeRmsVoltageSagPeriodWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -117820,7 +117728,7 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117833,7 +117741,7 @@ - (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117868,7 +117776,7 @@ - (void)readAttributeRmsVoltageSwellPeriodWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -117902,7 +117810,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117915,7 +117823,7 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117950,7 +117858,7 @@ - (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117960,7 +117868,7 @@ - (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117995,7 +117903,7 @@ - (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118004,7 +117912,7 @@ - (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118039,7 +117947,7 @@ - (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118049,7 +117957,7 @@ - (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118084,7 +117992,7 @@ - (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118093,7 +118001,7 @@ - (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118128,7 +118036,7 @@ - (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118137,7 +118045,7 @@ - (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118172,7 +118080,7 @@ - (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118181,7 +118089,7 @@ - (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118215,7 +118123,7 @@ - (void)readAttributeOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -118249,7 +118157,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -118262,7 +118170,7 @@ - (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _No { using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118297,7 +118205,7 @@ - (void)readAttributeVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118306,7 +118214,7 @@ - (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118341,7 +118249,7 @@ - (void)readAttributeCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118350,7 +118258,7 @@ - (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118385,7 +118293,7 @@ - (void)readAttributeAcOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -118419,7 +118327,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -118432,7 +118340,7 @@ - (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118467,7 +118375,7 @@ - (void)readAttributeAcVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118476,7 +118384,7 @@ - (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118511,7 +118419,7 @@ - (void)readAttributeAcCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118520,7 +118428,7 @@ - (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118555,7 +118463,7 @@ - (void)readAttributeAcActivePowerOverloadWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118565,7 +118473,7 @@ - (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118601,7 +118509,7 @@ - (void)readAttributeAcReactivePowerOverloadWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118611,7 +118519,7 @@ - (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams { using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118646,7 +118554,7 @@ - (void)readAttributeAverageRmsOverVoltageWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118656,7 +118564,7 @@ - (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118692,7 +118600,7 @@ - (void)readAttributeAverageRmsUnderVoltageWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118702,7 +118610,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118737,7 +118645,7 @@ - (void)readAttributeRmsExtremeOverVoltageWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118747,7 +118655,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118783,7 +118691,7 @@ - (void)readAttributeRmsExtremeUnderVoltageWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118793,7 +118701,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118828,7 +118736,7 @@ - (void)readAttributeRmsVoltageSagWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118837,7 +118745,7 @@ - (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118871,7 +118779,7 @@ - (void)readAttributeRmsVoltageSwellWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118880,7 +118788,7 @@ - (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118915,7 +118823,7 @@ - (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118924,7 +118832,7 @@ - (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118959,7 +118867,7 @@ - (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118969,7 +118877,7 @@ - (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119004,7 +118912,7 @@ - (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119014,7 +118922,7 @@ - (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119049,7 +118957,7 @@ - (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119058,7 +118966,7 @@ - (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119093,7 +119001,7 @@ - (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119103,7 +119011,7 @@ - (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119138,7 +119046,7 @@ - (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119148,7 +119056,7 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119183,7 +119091,7 @@ - (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119192,7 +119100,7 @@ - (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119227,7 +119135,7 @@ - (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119237,7 +119145,7 @@ - (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119272,7 +119180,7 @@ - (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119282,7 +119190,7 @@ - (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119317,7 +119225,7 @@ - (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119326,7 +119234,7 @@ - (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119361,7 +119269,7 @@ - (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119371,7 +119279,7 @@ - (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119406,7 +119314,7 @@ - (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119416,7 +119324,7 @@ - (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119451,7 +119359,7 @@ - (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119461,7 +119369,7 @@ - (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119496,7 +119404,7 @@ - (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119506,7 +119414,7 @@ - (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119541,7 +119449,7 @@ - (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119550,7 +119458,7 @@ - (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119586,7 +119494,7 @@ - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:(voi MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119597,7 +119505,7 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MT { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119634,7 +119542,7 @@ - (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119645,7 +119553,7 @@ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubsc { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119682,7 +119590,7 @@ - (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:(void (^) MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119693,7 +119601,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubs { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119730,7 +119638,7 @@ - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:(void (^)(N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119741,7 +119649,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscr { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119778,7 +119686,7 @@ - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119789,7 +119697,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubsc { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119826,7 +119734,7 @@ - (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119836,7 +119744,7 @@ - (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParam { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119872,7 +119780,7 @@ - (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119882,7 +119790,7 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribePar { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119917,7 +119825,7 @@ - (void)readAttributeLineCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119926,7 +119834,7 @@ - (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119961,7 +119869,7 @@ - (void)readAttributeActiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119971,7 +119879,7 @@ - (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120006,7 +119914,7 @@ - (void)readAttributeReactiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120016,7 +119924,7 @@ - (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120051,7 +119959,7 @@ - (void)readAttributeRmsVoltagePhaseCWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120060,7 +119968,7 @@ - (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120095,7 +120003,7 @@ - (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120105,7 +120013,7 @@ - (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120140,7 +120048,7 @@ - (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120150,7 +120058,7 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120185,7 +120093,7 @@ - (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120194,7 +120102,7 @@ - (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120229,7 +120137,7 @@ - (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120239,7 +120147,7 @@ - (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120274,7 +120182,7 @@ - (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120284,7 +120192,7 @@ - (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120319,7 +120227,7 @@ - (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120328,7 +120236,7 @@ - (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120363,7 +120271,7 @@ - (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120373,7 +120281,7 @@ - (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120408,7 +120316,7 @@ - (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120418,7 +120326,7 @@ - (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120453,7 +120361,7 @@ - (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120463,7 +120371,7 @@ - (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120498,7 +120406,7 @@ - (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120508,7 +120416,7 @@ - (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120543,7 +120451,7 @@ - (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120552,7 +120460,7 @@ - (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120588,7 +120496,7 @@ - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:(voi MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120599,7 +120507,7 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MT { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120636,7 +120544,7 @@ - (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120647,7 +120555,7 @@ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubsc { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120684,7 +120592,7 @@ - (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:(void (^) MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120695,7 +120603,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubs { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120732,7 +120640,7 @@ - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:(void (^)(N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120743,7 +120651,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscr { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120780,7 +120688,7 @@ - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120791,7 +120699,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubsc { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120828,7 +120736,7 @@ - (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120838,7 +120746,7 @@ - (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParam { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120874,7 +120782,7 @@ - (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120884,7 +120792,7 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribePar { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120920,7 +120828,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120930,7 +120838,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120966,7 +120874,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120976,7 +120884,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -121011,7 +120919,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -121020,7 +120928,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -121054,7 +120962,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -121063,7 +120971,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -121097,7 +121005,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -121106,7 +121014,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -121140,7 +121048,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -121149,7 +121057,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -127240,13 +127148,12 @@ @implementation MTRBaseClusterUnitTesting - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -127284,7 +127191,7 @@ - (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params compl } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127324,7 +127231,7 @@ - (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _N } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127363,7 +127270,7 @@ - (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nulla } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127403,7 +127310,7 @@ - (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandPar } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127439,7 +127346,7 @@ - (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams request.arg1 = params.arg1.unsignedCharValue; request.arg2 = params.arg2.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127474,7 +127381,7 @@ - (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgu } request.arg1 = params.arg1.boolValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127719,7 +127626,7 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStruc request.arg5 = static_cast>(params.arg5.unsignedCharValue); request.arg6 = params.arg6.boolValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127760,7 +127667,7 @@ - (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgu request.arg1.g = params.arg1.g.floatValue; request.arg1.h = params.arg1.h.doubleValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127803,7 +127710,7 @@ - (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNest request.arg1.c.g = params.arg1.c.g.floatValue; request.arg1.c.h = params.arg1.c.h.doubleValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127867,7 +127774,7 @@ - (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListSt } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127922,7 +127829,7 @@ - (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128062,7 +127969,7 @@ - (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTest } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128228,7 +128135,7 @@ - (void)testListNestedStructListArgumentRequestWithParams: } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128284,7 +128191,7 @@ - (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8 } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128319,7 +128226,7 @@ - (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams request.arg1 = static_cast>(params.arg1.unsignedShortValue); request.arg2 = static_cast>(params.arg2.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128364,7 +128271,7 @@ - (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullable } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128569,7 +128476,7 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestC } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128611,7 +128518,7 @@ - (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEcho request.arg1.g = params.arg1.g.floatValue; request.arg1.h = params.arg1.h.doubleValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128654,7 +128561,7 @@ - (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestPar timedInvokeTimeoutMs.SetValue(10000); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128696,7 +128603,7 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSi } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128733,7 +128640,7 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve request.arg2 = static_cast>(params.arg2.unsignedCharValue); request.arg3 = params.arg3.boolValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128771,7 +128678,7 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve } request.arg1 = params.arg1.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128782,7 +128689,7 @@ - (void)readAttributeBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Boolean::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -128816,7 +128723,7 @@ - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128828,7 +128735,7 @@ - (void)subscribeAttributeBooleanWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = UnitTesting::Attributes::Boolean::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -128862,7 +128769,7 @@ - (void)readAttributeBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Bitmap8::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -128896,7 +128803,7 @@ - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128908,7 +128815,7 @@ - (void)subscribeAttributeBitmap8WithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = UnitTesting::Attributes::Bitmap8::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -128942,7 +128849,7 @@ - (void)readAttributeBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Bitmap16::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -128976,7 +128883,7 @@ - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedShortValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128988,7 +128895,7 @@ - (void)subscribeAttributeBitmap16WithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = UnitTesting::Attributes::Bitmap16::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129022,7 +128929,7 @@ - (void)readAttributeBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Bitmap32::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129056,7 +128963,7 @@ - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedIntValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129068,7 +128975,7 @@ - (void)subscribeAttributeBitmap32WithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = UnitTesting::Attributes::Bitmap32::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129102,7 +129009,7 @@ - (void)readAttributeBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Bitmap64::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129136,7 +129043,7 @@ - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedLongLongValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129148,7 +129055,7 @@ - (void)subscribeAttributeBitmap64WithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = UnitTesting::Attributes::Bitmap64::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129182,7 +129089,7 @@ - (void)readAttributeInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int8u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129216,7 +129123,7 @@ - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129228,7 +129135,7 @@ - (void)subscribeAttributeInt8uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129262,7 +129169,7 @@ - (void)readAttributeInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int16u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129296,7 +129203,7 @@ - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129308,7 +129215,7 @@ - (void)subscribeAttributeInt16uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int16u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129342,7 +129249,7 @@ - (void)readAttributeInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int24u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129376,7 +129283,7 @@ - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129388,7 +129295,7 @@ - (void)subscribeAttributeInt24uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int24u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129422,7 +129329,7 @@ - (void)readAttributeInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int32u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129456,7 +129363,7 @@ - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129468,7 +129375,7 @@ - (void)subscribeAttributeInt32uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int32u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129502,7 +129409,7 @@ - (void)readAttributeInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int40u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129536,7 +129443,7 @@ - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129548,7 +129455,7 @@ - (void)subscribeAttributeInt40uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int40u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129582,7 +129489,7 @@ - (void)readAttributeInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int48u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129616,7 +129523,7 @@ - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129628,7 +129535,7 @@ - (void)subscribeAttributeInt48uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int48u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129662,7 +129569,7 @@ - (void)readAttributeInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int56u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129696,7 +129603,7 @@ - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129708,7 +129615,7 @@ - (void)subscribeAttributeInt56uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int56u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129742,7 +129649,7 @@ - (void)readAttributeInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int64u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129776,7 +129683,7 @@ - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129788,7 +129695,7 @@ - (void)subscribeAttributeInt64uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int64u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129822,7 +129729,7 @@ - (void)readAttributeInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int8s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129856,7 +129763,7 @@ - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129868,7 +129775,7 @@ - (void)subscribeAttributeInt8sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int8s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129902,7 +129809,7 @@ - (void)readAttributeInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int16s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129936,7 +129843,7 @@ - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129948,7 +129855,7 @@ - (void)subscribeAttributeInt16sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int16s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129982,7 +129889,7 @@ - (void)readAttributeInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int24s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130016,7 +129923,7 @@ - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.intValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130028,7 +129935,7 @@ - (void)subscribeAttributeInt24sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int24s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130062,7 +129969,7 @@ - (void)readAttributeInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int32s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130096,7 +130003,7 @@ - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.intValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130108,7 +130015,7 @@ - (void)subscribeAttributeInt32sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int32s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130142,7 +130049,7 @@ - (void)readAttributeInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int40s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130176,7 +130083,7 @@ - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130188,7 +130095,7 @@ - (void)subscribeAttributeInt40sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int40s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130222,7 +130129,7 @@ - (void)readAttributeInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int48s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130256,7 +130163,7 @@ - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130268,7 +130175,7 @@ - (void)subscribeAttributeInt48sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int48s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130302,7 +130209,7 @@ - (void)readAttributeInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int56s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130336,7 +130243,7 @@ - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130348,7 +130255,7 @@ - (void)subscribeAttributeInt56sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int56s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130382,7 +130289,7 @@ - (void)readAttributeInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Int64s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130416,7 +130323,7 @@ - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130428,7 +130335,7 @@ - (void)subscribeAttributeInt64sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int64s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130462,7 +130369,7 @@ - (void)readAttributeEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Enum8::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130496,7 +130403,7 @@ - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130508,7 +130415,7 @@ - (void)subscribeAttributeEnum8WithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Enum8::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130542,7 +130449,7 @@ - (void)readAttributeEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Enum16::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130576,7 +130483,7 @@ - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130588,7 +130495,7 @@ - (void)subscribeAttributeEnum16WithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Enum16::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130622,7 +130529,7 @@ - (void)readAttributeFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::FloatSingle::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130656,7 +130563,7 @@ - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.floatValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130668,7 +130575,7 @@ - (void)subscribeAttributeFloatSingleWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = UnitTesting::Attributes::FloatSingle::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130702,7 +130609,7 @@ - (void)readAttributeFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::FloatDouble::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130736,7 +130643,7 @@ - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.doubleValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130748,7 +130655,7 @@ - (void)subscribeAttributeFloatDoubleWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = UnitTesting::Attributes::FloatDouble::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130782,7 +130689,7 @@ - (void)readAttributeOctetStringWithCompletion:(void (^)(NSData * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::OctetString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130816,7 +130723,7 @@ - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asByteSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130828,7 +130735,7 @@ - (void)subscribeAttributeOctetStringWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = UnitTesting::Attributes::OctetString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130862,7 +130769,7 @@ - (void)readAttributeListInt8uWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::ListInt8u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130917,7 +130824,7 @@ - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130929,7 +130836,7 @@ - (void)subscribeAttributeListInt8uWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = UnitTesting::Attributes::ListInt8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130963,7 +130870,7 @@ - (void)readAttributeListOctetStringWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::ListOctetString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131018,7 +130925,7 @@ - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131030,7 +130937,7 @@ - (void)subscribeAttributeListOctetStringWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitTesting::Attributes::ListOctetString::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131064,7 +130971,7 @@ - (void)readAttributeListStructOctetStringWithCompletion:(void (^)(NSArray * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::ListStructOctetString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131120,7 +131027,7 @@ - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131133,7 +131040,7 @@ - (void)subscribeAttributeListStructOctetStringWithParams:(MTRSubscribeParams * { using TypeInfo = UnitTesting::Attributes::ListStructOctetString::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131168,7 +131075,7 @@ - (void)readAttributeLongOctetStringWithCompletion:(void (^)(NSData * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::LongOctetString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131202,7 +131109,7 @@ - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asByteSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131214,7 +131121,7 @@ - (void)subscribeAttributeLongOctetStringWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitTesting::Attributes::LongOctetString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131248,7 +131155,7 @@ - (void)readAttributeCharStringWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::CharString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131282,7 +131189,7 @@ - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131294,7 +131201,7 @@ - (void)subscribeAttributeCharStringWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = UnitTesting::Attributes::CharString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131328,7 +131235,7 @@ - (void)readAttributeLongCharStringWithCompletion:(void (^)(NSString * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::LongCharString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131362,7 +131269,7 @@ - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131374,7 +131281,7 @@ - (void)subscribeAttributeLongCharStringWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::LongCharString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131408,7 +131315,7 @@ - (void)readAttributeEpochUsWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::EpochUs::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131442,7 +131349,7 @@ - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131454,7 +131361,7 @@ - (void)subscribeAttributeEpochUsWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = UnitTesting::Attributes::EpochUs::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131488,7 +131395,7 @@ - (void)readAttributeEpochSWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::EpochS::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131522,7 +131429,7 @@ - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131534,7 +131441,7 @@ - (void)subscribeAttributeEpochSWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::EpochS::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131568,7 +131475,7 @@ - (void)readAttributeVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::VendorId::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131602,7 +131509,7 @@ - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedShortValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131614,7 +131521,7 @@ - (void)subscribeAttributeVendorIdWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = UnitTesting::Attributes::VendorId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131650,7 +131557,7 @@ - (void)readAttributeListNullablesAndOptionalsStructWithCompletion:(void (^)(NSA using TypeInfo = UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131877,7 +131784,7 @@ - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnu } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131891,7 +131798,7 @@ - (void)subscribeAttributeListNullablesAndOptionalsStructWithParams:(MTRSubscrib { using TypeInfo = UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131927,7 +131834,7 @@ - (void)readAttributeEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::EnumAttr::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131961,7 +131868,7 @@ - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131973,7 +131880,7 @@ - (void)subscribeAttributeEnumAttrWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = UnitTesting::Attributes::EnumAttr::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132009,7 +131916,7 @@ - (void)readAttributeStructAttrWithCompletion:(void (^)(MTRUnitTestingClusterSim using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value @@ -132051,7 +131958,7 @@ - (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _ cppValue.g = value.g.floatValue; cppValue.h = value.h.doubleValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132064,7 +131971,7 @@ - (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132099,7 +132006,7 @@ - (void)readAttributeRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132133,7 +132040,7 @@ - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132146,7 +132053,7 @@ - (void)subscribeAttributeRangeRestrictedInt8uWithParams:(MTRSubscribeParams * _ { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132181,7 +132088,7 @@ - (void)readAttributeRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132215,7 +132122,7 @@ - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132228,7 +132135,7 @@ - (void)subscribeAttributeRangeRestrictedInt8sWithParams:(MTRSubscribeParams * _ { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132263,7 +132170,7 @@ - (void)readAttributeRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132297,7 +132204,7 @@ - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132310,7 +132217,7 @@ - (void)subscribeAttributeRangeRestrictedInt16uWithParams:(MTRSubscribeParams * { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132345,7 +132252,7 @@ - (void)readAttributeRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132379,7 +132286,7 @@ - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132392,7 +132299,7 @@ - (void)subscribeAttributeRangeRestrictedInt16sWithParams:(MTRSubscribeParams * { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132427,7 +132334,7 @@ - (void)readAttributeListLongOctetStringWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::ListLongOctetString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132482,7 +132389,7 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132495,7 +132402,7 @@ - (void)subscribeAttributeListLongOctetStringWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::ListLongOctetString::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132531,7 +132438,7 @@ - (void)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)param params = [params copy]; using TypeInfo = UnitTesting::Attributes::ListFabricScoped::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132642,7 +132549,7 @@ - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132654,7 +132561,7 @@ - (void)subscribeAttributeListFabricScopedWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = UnitTesting::Attributes::ListFabricScoped::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132689,7 +132596,7 @@ - (void)readAttributeTimedWriteBooleanWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::TimedWriteBoolean::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132723,7 +132630,7 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132735,7 +132642,7 @@ - (void)subscribeAttributeTimedWriteBooleanWithParams:(MTRSubscribeParams * _Non { using TypeInfo = UnitTesting::Attributes::TimedWriteBoolean::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132770,7 +132677,7 @@ - (void)readAttributeGeneralErrorBooleanWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132804,7 +132711,7 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132817,7 +132724,7 @@ - (void)subscribeAttributeGeneralErrorBooleanWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132852,7 +132759,7 @@ - (void)readAttributeClusterErrorBooleanWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132886,7 +132793,7 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132899,7 +132806,7 @@ - (void)subscribeAttributeClusterErrorBooleanWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132934,7 +132841,7 @@ - (void)readAttributeUnsupportedWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::Unsupported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132968,7 +132875,7 @@ - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132980,7 +132887,7 @@ - (void)subscribeAttributeUnsupportedWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = UnitTesting::Attributes::Unsupported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133014,7 +132921,7 @@ - (void)readAttributeNullableBooleanWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableBoolean::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133053,7 +132960,7 @@ - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.boolValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133065,7 +132972,7 @@ - (void)subscribeAttributeNullableBooleanWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitTesting::Attributes::NullableBoolean::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133100,7 +133007,7 @@ - (void)readAttributeNullableBitmap8WithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableBitmap8::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133139,7 +133046,7 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedCharValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133151,7 +133058,7 @@ - (void)subscribeAttributeNullableBitmap8WithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitTesting::Attributes::NullableBitmap8::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133186,7 +133093,7 @@ - (void)readAttributeNullableBitmap16WithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableBitmap16::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133225,7 +133132,7 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedShortValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133237,7 +133144,7 @@ - (void)subscribeAttributeNullableBitmap16WithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = UnitTesting::Attributes::NullableBitmap16::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133272,7 +133179,7 @@ - (void)readAttributeNullableBitmap32WithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableBitmap32::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133311,7 +133218,7 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedIntValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133323,7 +133230,7 @@ - (void)subscribeAttributeNullableBitmap32WithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = UnitTesting::Attributes::NullableBitmap32::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133358,7 +133265,7 @@ - (void)readAttributeNullableBitmap64WithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableBitmap64::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133397,7 +133304,7 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedLongLongValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133409,7 +133316,7 @@ - (void)subscribeAttributeNullableBitmap64WithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = UnitTesting::Attributes::NullableBitmap64::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133444,7 +133351,7 @@ - (void)readAttributeNullableInt8uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt8u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133483,7 +133390,7 @@ - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133495,7 +133402,7 @@ - (void)subscribeAttributeNullableInt8uWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UnitTesting::Attributes::NullableInt8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133529,7 +133436,7 @@ - (void)readAttributeNullableInt16uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt16u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133568,7 +133475,7 @@ - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133580,7 +133487,7 @@ - (void)subscribeAttributeNullableInt16uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt16u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133614,7 +133521,7 @@ - (void)readAttributeNullableInt24uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt24u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133653,7 +133560,7 @@ - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133665,7 +133572,7 @@ - (void)subscribeAttributeNullableInt24uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt24u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133699,7 +133606,7 @@ - (void)readAttributeNullableInt32uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt32u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133738,7 +133645,7 @@ - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133750,7 +133657,7 @@ - (void)subscribeAttributeNullableInt32uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt32u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133784,7 +133691,7 @@ - (void)readAttributeNullableInt40uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt40u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133823,7 +133730,7 @@ - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133835,7 +133742,7 @@ - (void)subscribeAttributeNullableInt40uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt40u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133869,7 +133776,7 @@ - (void)readAttributeNullableInt48uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt48u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133908,7 +133815,7 @@ - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133920,7 +133827,7 @@ - (void)subscribeAttributeNullableInt48uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt48u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133954,7 +133861,7 @@ - (void)readAttributeNullableInt56uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt56u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133993,7 +133900,7 @@ - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134005,7 +133912,7 @@ - (void)subscribeAttributeNullableInt56uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt56u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134039,7 +133946,7 @@ - (void)readAttributeNullableInt64uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt64u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134078,7 +133985,7 @@ - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134090,7 +133997,7 @@ - (void)subscribeAttributeNullableInt64uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt64u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134124,7 +134031,7 @@ - (void)readAttributeNullableInt8sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt8s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134163,7 +134070,7 @@ - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.charValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134175,7 +134082,7 @@ - (void)subscribeAttributeNullableInt8sWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UnitTesting::Attributes::NullableInt8s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134209,7 +134116,7 @@ - (void)readAttributeNullableInt16sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt16s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134248,7 +134155,7 @@ - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.shortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134260,7 +134167,7 @@ - (void)subscribeAttributeNullableInt16sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt16s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134294,7 +134201,7 @@ - (void)readAttributeNullableInt24sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt24s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134333,7 +134240,7 @@ - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.intValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134345,7 +134252,7 @@ - (void)subscribeAttributeNullableInt24sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt24s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134379,7 +134286,7 @@ - (void)readAttributeNullableInt32sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt32s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134418,7 +134325,7 @@ - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.intValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134430,7 +134337,7 @@ - (void)subscribeAttributeNullableInt32sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt32s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134464,7 +134371,7 @@ - (void)readAttributeNullableInt40sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt40s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134503,7 +134410,7 @@ - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134515,7 +134422,7 @@ - (void)subscribeAttributeNullableInt40sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt40s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134549,7 +134456,7 @@ - (void)readAttributeNullableInt48sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt48s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134588,7 +134495,7 @@ - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134600,7 +134507,7 @@ - (void)subscribeAttributeNullableInt48sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt48s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134634,7 +134541,7 @@ - (void)readAttributeNullableInt56sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt56s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134673,7 +134580,7 @@ - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134685,7 +134592,7 @@ - (void)subscribeAttributeNullableInt56sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt56s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134719,7 +134626,7 @@ - (void)readAttributeNullableInt64sWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableInt64s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134758,7 +134665,7 @@ - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134770,7 +134677,7 @@ - (void)subscribeAttributeNullableInt64sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt64s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134804,7 +134711,7 @@ - (void)readAttributeNullableEnum8WithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableEnum8::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134843,7 +134750,7 @@ - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134855,7 +134762,7 @@ - (void)subscribeAttributeNullableEnum8WithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UnitTesting::Attributes::NullableEnum8::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134889,7 +134796,7 @@ - (void)readAttributeNullableEnum16WithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableEnum16::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134928,7 +134835,7 @@ - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134940,7 +134847,7 @@ - (void)subscribeAttributeNullableEnum16WithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableEnum16::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134974,7 +134881,7 @@ - (void)readAttributeNullableFloatSingleWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableFloatSingle::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135013,7 +134920,7 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.floatValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135026,7 +134933,7 @@ - (void)subscribeAttributeNullableFloatSingleWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::NullableFloatSingle::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135061,7 +134968,7 @@ - (void)readAttributeNullableFloatDoubleWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableFloatDouble::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135100,7 +135007,7 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.doubleValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135113,7 +135020,7 @@ - (void)subscribeAttributeNullableFloatDoubleWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::NullableFloatDouble::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135148,7 +135055,7 @@ - (void)readAttributeNullableOctetStringWithCompletion:(void (^)(NSData * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableOctetString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135187,7 +135094,7 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value nonNullValue_0 = [self asByteSpan:value]; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135199,7 +135106,7 @@ - (void)subscribeAttributeNullableOctetStringWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::NullableOctetString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135234,7 +135141,7 @@ - (void)readAttributeNullableCharStringWithCompletion:(void (^)(NSString * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableCharString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135273,7 +135180,7 @@ - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value nonNullValue_0 = [self asCharSpan:value]; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135286,7 +135193,7 @@ - (void)subscribeAttributeNullableCharStringWithParams:(MTRSubscribeParams * _No { using TypeInfo = UnitTesting::Attributes::NullableCharString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135321,7 +135228,7 @@ - (void)readAttributeNullableEnumAttrWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableEnumAttr::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135360,7 +135267,7 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedCharValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135372,7 +135279,7 @@ - (void)subscribeAttributeNullableEnumAttrWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = UnitTesting::Attributes::NullableEnumAttr::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135409,7 +135316,7 @@ - (void)readAttributeNullableStructWithCompletion:(void (^)(MTRUnitTestingCluste using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value @@ -135458,7 +135365,7 @@ - (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct nonNullValue_0.h = value.h.doubleValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135471,7 +135378,7 @@ - (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135507,7 +135414,7 @@ - (void)readAttributeNullableRangeRestrictedInt8uWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135546,7 +135453,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullabl nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135560,7 +135467,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt8uWithParams:(MTRSubscribePa { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135596,7 +135503,7 @@ - (void)readAttributeNullableRangeRestrictedInt8sWithCompletion:(void (^)(NSNumb MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135635,7 +135542,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullabl nonNullValue_0 = value.charValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135649,7 +135556,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt8sWithParams:(MTRSubscribePa { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135685,7 +135592,7 @@ - (void)readAttributeNullableRangeRestrictedInt16uWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135724,7 +135631,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullab nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135738,7 +135645,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt16uWithParams:(MTRSubscribeP { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135774,7 +135681,7 @@ - (void)readAttributeNullableRangeRestrictedInt16sWithCompletion:(void (^)(NSNum MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135813,7 +135720,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullab nonNullValue_0 = value.shortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135827,7 +135734,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt16sWithParams:(MTRSubscribeP { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135862,7 +135769,7 @@ - (void)readAttributeWriteOnlyInt8uWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -135896,7 +135803,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135908,7 +135815,7 @@ - (void)subscribeAttributeWriteOnlyInt8uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135942,7 +135849,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -135952,7 +135859,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = UnitTesting::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135987,7 +135894,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -135997,7 +135904,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -136032,7 +135939,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -136041,7 +135948,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -136075,7 +135982,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -136084,7 +135991,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UnitTesting::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -136118,7 +136025,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -136127,7 +136034,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = UnitTesting::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -136161,7 +136068,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -136170,7 +136077,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitTesting::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h index 397bbfb5a97891..9d33718463d50f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h @@ -22,465 +22,372 @@ @interface MTRBaseClusterIdentify () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterGroups () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterScenes () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOnOff () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOnOffSwitchConfiguration () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterLevelControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBinaryInputBasic () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPulseWidthModulation () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterDescriptor () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBinding () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterAccessControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterActions () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBasicInformation () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOTASoftwareUpdateProvider () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOTASoftwareUpdateRequestor () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterLocalizationConfiguration () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTimeFormatLocalization () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterUnitLocalization () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPowerSourceConfiguration () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPowerSource () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterGeneralCommissioning () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterNetworkCommissioning () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterDiagnosticLogs () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterGeneralDiagnostics () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterSoftwareDiagnostics () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterThreadNetworkDiagnostics () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterWiFiNetworkDiagnostics () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterEthernetNetworkDiagnostics () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTimeSynchronization () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBridgedDeviceBasicInformation () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterSwitch () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterAdministratorCommissioning () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOperationalCredentials () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterGroupKeyManagement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterFixedLabel () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterUserLabel () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBooleanState () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterICDManagement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterModeSelect () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterLaundryWasherMode () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterLaundryWasherControls () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRVCRunMode () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRVCCleanMode () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTemperatureControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRefrigeratorAlarm () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterDishwasherMode () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterAirQuality () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterSmokeCOAlarm () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterDishwasherAlarm () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOperationalState () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRVCOperationalState () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterHEPAFilterMonitoring () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterActivatedCarbonFilterMonitoring () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterDoorLock () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterWindowCovering () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBarrierControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPumpConfigurationAndControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterThermostat () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterFanControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterThermostatUserInterfaceConfiguration () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterColorControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBallastConfiguration () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterIlluminanceMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTemperatureMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPressureMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterFlowMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRelativeHumidityMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOccupancySensing () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterCarbonMonoxideConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterCarbonDioxideConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterNitrogenDioxideConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOzoneConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPM25ConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterFormaldehydeConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPM1ConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPM10ConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRadonConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterWakeOnLAN () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterChannel () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTargetNavigator () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterMediaPlayback () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterMediaInput () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterLowPower () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterKeypadInput () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterContentLauncher () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterAudioOutput () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterApplicationLauncher () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterApplicationBasic () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterAccountLogin () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterElectricalMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterUnitTesting () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index f433d153adcafb..54316e5bba43da 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -16,6 +16,7 @@ */ #import +#import #import "MTRAsyncCallbackWorkQueue.h" #import "MTRBaseClusterUtils.h" @@ -65,12 +66,11 @@ @implementation MTRClusterIdentify - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -82,53 +82,25 @@ - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeIdentifyID, (unsigned int) MTRCommandIDTypeClusterIdentifyCommandIdentifyID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Identify::Commands::Identify::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.identifyTime = params.identifyTime.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster identifyWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -150,56 +122,25 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeIdentifyID, (unsigned int) MTRCommandIDTypeClusterIdentifyCommandTriggerEffectID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Identify::Commands::TriggerEffect::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.effectIdentifier = static_cast>( - params.effectIdentifier.unsignedCharValue); - request.effectVariant - = static_cast>(params.effectVariant.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster triggerEffectWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -217,7 +158,7 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params - (NSDictionary *)readAttributeIdentifyTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTimeID) params:params]; @@ -234,7 +175,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTimeID) value:dataValueDictionary @@ -244,7 +185,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeIdentifyTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTypeID) params:params]; @@ -252,7 +193,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeGeneratedCommandListID) params:params]; @@ -260,7 +201,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeAcceptedCommandListID) params:params]; @@ -268,7 +209,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeEventListID) params:params]; @@ -276,7 +217,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeAttributeListID) params:params]; @@ -284,7 +225,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeFeatureMapID) params:params]; @@ -292,7 +233,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeClusterRevisionID) params:params]; @@ -333,12 +274,11 @@ @implementation MTRClusterGroups - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -350,54 +290,25 @@ - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params completion:(void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandAddGroupID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupsClusterAddGroupResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, GroupsClusterAddGroupResponseCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::AddGroup::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.groupName = [self asCharSpan:params.groupName]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addGroupWithParams:params + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -420,53 +331,25 @@ - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandViewGroupID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupsClusterViewGroupResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupsClusterViewGroupResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::ViewGroup::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster viewGroupWithParams:params + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -489,75 +372,26 @@ - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams * NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandGetGroupMembershipID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupsClusterGetGroupMembershipResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::GetGroupMembership::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.groupList.count != 0) { - auto * listHolder_0 = new ListHolder(params.groupList.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.groupList.count; ++i_0) { - if (![params.groupList[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.groupList[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedShortValue; - } - request.groupList = ListType_0(listHolder_0->mList, params.groupList.count); - } else { - request.groupList = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getGroupMembershipWithParams:params + completion:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -580,54 +414,25 @@ - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandRemoveGroupID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupsClusterRemoveGroupResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupsClusterRemoveGroupResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::RemoveGroup::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeGroupWithParams:params + completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -658,52 +463,25 @@ - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Null completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandRemoveAllGroupsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::RemoveAllGroups::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeAllGroupsWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -725,54 +503,25 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGroupsID, + self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandAddGroupIfIdentifyingID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::AddGroupIfIdentifying::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.groupName = [self asCharSpan:params.groupName]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addGroupIfIdentifyingWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -790,7 +539,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeNameSupportID) params:params]; @@ -798,7 +547,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeGeneratedCommandListID) params:params]; @@ -806,7 +555,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeAcceptedCommandListID) params:params]; @@ -814,7 +563,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeEventListID) params:params]; @@ -822,7 +571,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeAttributeListID) params:params]; @@ -830,7 +579,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeFeatureMapID) params:params]; @@ -838,7 +587,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeClusterRevisionID) params:params]; @@ -945,12 +694,11 @@ @implementation MTRClusterScenes - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -962,103 +710,25 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandAddSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterAddSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterAddSceneResponseCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::AddScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.sceneName = [self asCharSpan:params.sceneName]; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.extensionFieldSets.count != 0) { - auto * listHolder_0 = new ListHolder(params.extensionFieldSets.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.extensionFieldSets.count; ++i_0) { - if (![params.extensionFieldSets[i_0] isKindOfClass:[MTRScenesClusterExtensionFieldSet class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRScenesClusterExtensionFieldSet *) params.extensionFieldSets[i_0]; - listHolder_0->mList[i_0].clusterID = element_0.clusterID.unsignedIntValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].attributeValueList)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.attributeValueList.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.attributeValueList.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.attributeValueList.count; ++i_2) { - if (![element_0.attributeValueList[i_2] - isKindOfClass:[MTRScenesClusterAttributeValuePair class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRScenesClusterAttributeValuePair *) element_0.attributeValueList[i_2]; - listHolder_2->mList[i_2].attributeID = element_2.attributeID.unsignedIntValue; - listHolder_2->mList[i_2].attributeValue = element_2.attributeValue.unsignedIntValue; - } - listHolder_0->mList[i_0].attributeValueList - = ListType_2(listHolder_2->mList, element_0.attributeValueList.count); - } else { - listHolder_0->mList[i_0].attributeValueList = ListType_2(); - } - } - } - request.extensionFieldSets = ListType_0(listHolder_0->mList, params.extensionFieldSets.count); - } else { - request.extensionFieldSets = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addSceneWithParams:params + completion:^(MTRScenesClusterAddSceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1081,54 +751,25 @@ - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandViewSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterViewSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterViewSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::ViewScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster viewSceneWithParams:params + completion:^(MTRScenesClusterViewSceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1151,55 +792,25 @@ - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandRemoveSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterRemoveSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterRemoveSceneResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::RemoveScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeSceneWithParams:params + completion:^(MTRScenesClusterRemoveSceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1222,54 +833,26 @@ - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)param NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandRemoveAllScenesID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterRemoveAllScenesResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterRemoveAllScenesResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::RemoveAllScenes::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeAllScenesWithParams:params + completion:^( + MTRScenesClusterRemoveAllScenesResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1292,54 +875,25 @@ - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandStoreSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterStoreSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterStoreSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::StoreScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster storeSceneWithParams:params + completion:^(MTRScenesClusterStoreSceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1361,63 +915,25 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandRecallSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::RecallScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - if (params.transitionTime != nil) { - auto & definedValue_0 = request.transitionTime.Emplace(); - if (params.transitionTime == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = params.transitionTime.unsignedShortValue; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster recallSceneWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1440,54 +956,26 @@ - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams * NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandGetSceneMembershipID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterGetSceneMembershipResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterGetSceneMembershipResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::GetSceneMembership::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getSceneMembershipWithParams:params + completion:^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1510,104 +998,26 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandEnhancedAddSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterEnhancedAddSceneResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::EnhancedAddScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.sceneName = [self asCharSpan:params.sceneName]; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.extensionFieldSets.count != 0) { - auto * listHolder_0 = new ListHolder(params.extensionFieldSets.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.extensionFieldSets.count; ++i_0) { - if (![params.extensionFieldSets[i_0] isKindOfClass:[MTRScenesClusterExtensionFieldSet class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRScenesClusterExtensionFieldSet *) params.extensionFieldSets[i_0]; - listHolder_0->mList[i_0].clusterID = element_0.clusterID.unsignedIntValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].attributeValueList)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.attributeValueList.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.attributeValueList.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.attributeValueList.count; ++i_2) { - if (![element_0.attributeValueList[i_2] - isKindOfClass:[MTRScenesClusterAttributeValuePair class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRScenesClusterAttributeValuePair *) element_0.attributeValueList[i_2]; - listHolder_2->mList[i_2].attributeID = element_2.attributeID.unsignedIntValue; - listHolder_2->mList[i_2].attributeValue = element_2.attributeValue.unsignedIntValue; - } - listHolder_0->mList[i_0].attributeValueList - = ListType_2(listHolder_2->mList, element_0.attributeValueList.count); - } else { - listHolder_0->mList[i_0].attributeValueList = ListType_2(); - } - } - } - request.extensionFieldSets = ListType_0(listHolder_0->mList, params.extensionFieldSets.count); - } else { - request.extensionFieldSets = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedAddSceneWithParams:params + completion:^( + MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1630,55 +1040,26 @@ - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)p NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandEnhancedViewSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterEnhancedViewSceneResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::EnhancedViewScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedViewSceneWithParams:params + completion:^(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1701,57 +1082,25 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandCopySceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterCopySceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterCopySceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::CopyScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.mode = static_cast>(params.mode.unsignedCharValue); - request.groupIdentifierFrom = params.groupIdentifierFrom.unsignedShortValue; - request.sceneIdentifierFrom = params.sceneIdentifierFrom.unsignedCharValue; - request.groupIdentifierTo = params.groupIdentifierTo.unsignedShortValue; - request.sceneIdentifierTo = params.sceneIdentifierTo.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster copySceneWithParams:params + completion:^(MTRScenesClusterCopySceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1769,7 +1118,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeSceneCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneCountID) params:params]; @@ -1777,7 +1126,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeCurrentSceneWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeCurrentSceneID) params:params]; @@ -1785,7 +1134,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeCurrentGroupWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeCurrentGroupID) params:params]; @@ -1793,7 +1142,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeSceneValidWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneValidID) params:params]; @@ -1801,7 +1150,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeNameSupportID) params:params]; @@ -1809,7 +1158,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeLastConfiguredByWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeLastConfiguredByID) params:params]; @@ -1817,7 +1166,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeSceneTableSizeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneTableSizeID) params:params]; @@ -1825,7 +1174,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeRemainingCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeRemainingCapacityID) params:params]; @@ -1833,7 +1182,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeGeneratedCommandListID) params:params]; @@ -1841,7 +1190,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeAcceptedCommandListID) params:params]; @@ -1849,7 +1198,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeEventListID) params:params]; @@ -1857,7 +1206,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeAttributeListID) params:params]; @@ -1865,7 +1214,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeFeatureMapID) params:params]; @@ -1873,7 +1222,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeClusterRevisionID) params:params]; @@ -2032,12 +1381,11 @@ @implementation MTRClusterOnOff - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -2055,52 +1403,25 @@ - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::Off::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster offWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2128,52 +1449,25 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOnID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::On::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster onWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2201,52 +1495,25 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandToggleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::Toggle::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster toggleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2268,55 +1535,25 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOffWithEffectID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::OffWithEffect::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.effectIdentifier = static_cast>( - params.effectIdentifier.unsignedCharValue); - request.effectVariant = params.effectVariant.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster offWithEffectWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2347,52 +1584,25 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOnOffID, + self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOnWithRecallGlobalSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::OnWithRecallGlobalScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster onWithRecallGlobalSceneWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2414,56 +1624,25 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOnWithTimedOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::OnWithTimedOff::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.onOffControl - = static_cast>(params.onOffControl.unsignedCharValue); - request.onTime = params.onTime.unsignedShortValue; - request.offWaitTime = params.offWaitTime.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster onWithTimedOffWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2481,7 +1660,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params - (NSDictionary *)readAttributeOnOffWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnOffID) params:params]; @@ -2489,7 +1668,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params - (NSDictionary *)readAttributeGlobalSceneControlWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGlobalSceneControlID) params:params]; @@ -2497,7 +1676,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params - (NSDictionary *)readAttributeOnTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) params:params]; @@ -2514,7 +1693,7 @@ - (void)writeAttributeOnTimeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) value:dataValueDictionary @@ -2524,7 +1703,7 @@ - (void)writeAttributeOnTimeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeOffWaitTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) params:params]; @@ -2541,7 +1720,7 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) value:dataValueDictionary @@ -2551,7 +1730,7 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeStartUpOnOffWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) params:params]; @@ -2568,7 +1747,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) value:dataValueDictionary @@ -2578,7 +1757,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGeneratedCommandListID) params:params]; @@ -2586,7 +1765,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAcceptedCommandListID) params:params]; @@ -2594,7 +1773,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeEventListID) params:params]; @@ -2602,7 +1781,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAttributeListID) params:params]; @@ -2610,7 +1789,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeFeatureMapID) params:params]; @@ -2618,7 +1797,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeClusterRevisionID) params:params]; @@ -2735,12 +1914,11 @@ @implementation MTRClusterOnOffSwitchConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -2748,7 +1926,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSwitchTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID) params:params]; @@ -2756,7 +1934,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSwitchActionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) params:params]; @@ -2773,7 +1951,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) value:dataValueDictionary @@ -2784,7 +1962,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID) params:params]; @@ -2793,7 +1971,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID) params:params]; @@ -2801,7 +1979,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeEventListID) params:params]; @@ -2809,7 +1987,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID) params:params]; @@ -2817,7 +1995,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID) params:params]; @@ -2825,7 +2003,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID) params:params]; @@ -2846,12 +2024,11 @@ @implementation MTRClusterLevelControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -2863,63 +2040,25 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveToLevelID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::MoveToLevel::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.level = params.level.unsignedCharValue; - if (params.transitionTime == nil) { - request.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = request.transitionTime.SetNonNull(); - nonNullValue_0 = params.transitionTime.unsignedShortValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2941,64 +2080,25 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::Move::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - if (params.rate == nil) { - request.rate.SetNull(); - } else { - auto & nonNullValue_0 = request.rate.SetNonNull(); - nonNullValue_0 = params.rate.unsignedCharValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3020,65 +2120,25 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStepID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::Step::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - if (params.transitionTime == nil) { - request.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = request.transitionTime.SetNonNull(); - nonNullValue_0 = params.transitionTime.unsignedShortValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3100,56 +2160,25 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::Stop::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3171,63 +2200,25 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveToLevelWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::MoveToLevelWithOnOff::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.level = params.level.unsignedCharValue; - if (params.transitionTime == nil) { - request.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = request.transitionTime.SetNonNull(); - nonNullValue_0 = params.transitionTime.unsignedShortValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToLevelWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3249,64 +2240,25 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::MoveWithOnOff::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - if (params.rate == nil) { - request.rate.SetNull(); - } else { - auto & nonNullValue_0 = request.rate.SetNonNull(); - nonNullValue_0 = params.rate.unsignedCharValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3328,65 +2280,25 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStepWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::StepWithOnOff::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - if (params.transitionTime == nil) { - request.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = request.transitionTime.SetNonNull(); - nonNullValue_0 = params.transitionTime.unsignedShortValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3408,56 +2320,25 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStopWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::StopWithOnOff::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3479,53 +2360,25 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveToClosestFrequencyID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::MoveToClosestFrequency::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.frequency = params.frequency.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToClosestFrequencyWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3543,7 +2396,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeCurrentLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentLevelID) params:params]; @@ -3551,7 +2404,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeRemainingTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeRemainingTimeID) params:params]; @@ -3559,7 +2412,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeMinLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinLevelID) params:params]; @@ -3567,7 +2420,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeMaxLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxLevelID) params:params]; @@ -3575,7 +2428,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeCurrentFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentFrequencyID) params:params]; @@ -3583,7 +2436,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeMinFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinFrequencyID) params:params]; @@ -3591,7 +2444,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeMaxFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxFrequencyID) params:params]; @@ -3599,7 +2452,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeOptionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) params:params]; @@ -3616,7 +2469,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) value:dataValueDictionary @@ -3626,7 +2479,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeOnOffTransitionTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) params:params]; @@ -3643,7 +2496,7 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) value:dataValueDictionary @@ -3653,7 +2506,7 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSDictionary - (NSDictionary *)readAttributeOnLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnLevelID) params:params]; @@ -3670,7 +2523,7 @@ - (void)writeAttributeOnLevelWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnLevelID) value:dataValueDictionary @@ -3680,7 +2533,7 @@ - (void)writeAttributeOnLevelWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeOnTransitionTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnTransitionTimeID) params:params]; @@ -3697,7 +2550,7 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnTransitionTimeID) value:dataValueDictionary @@ -3707,7 +2560,7 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSDictionary *) - (NSDictionary *)readAttributeOffTransitionTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOffTransitionTimeID) params:params]; @@ -3724,7 +2577,7 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOffTransitionTimeID) value:dataValueDictionary @@ -3734,7 +2587,7 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSDictionary * - (NSDictionary *)readAttributeDefaultMoveRateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeDefaultMoveRateID) params:params]; @@ -3751,7 +2604,7 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeDefaultMoveRateID) value:dataValueDictionary @@ -3761,7 +2614,7 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeStartUpCurrentLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeStartUpCurrentLevelID) params:params]; @@ -3778,7 +2631,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeStartUpCurrentLevelID) value:dataValueDictionary @@ -3788,7 +2641,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeGeneratedCommandListID) params:params]; @@ -3796,7 +2649,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeAcceptedCommandListID) params:params]; @@ -3804,7 +2657,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeEventListID) params:params]; @@ -3812,7 +2665,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeAttributeListID) params:params]; @@ -3820,7 +2673,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeFeatureMapID) params:params]; @@ -3828,7 +2681,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeClusterRevisionID) params:params]; @@ -3939,12 +2792,11 @@ @implementation MTRClusterBinaryInputBasic - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -3952,7 +2804,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeActiveTextWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) params:params]; @@ -3969,7 +2821,7 @@ - (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) value:dataValueDictionary @@ -3979,7 +2831,7 @@ - (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) params:params]; @@ -3996,7 +2848,7 @@ - (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) value:dataValueDictionary @@ -4006,7 +2858,7 @@ - (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeInactiveTextWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) params:params]; @@ -4023,7 +2875,7 @@ - (void)writeAttributeInactiveTextWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) value:dataValueDictionary @@ -4033,7 +2885,7 @@ - (void)writeAttributeInactiveTextWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeOutOfServiceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) params:params]; @@ -4050,7 +2902,7 @@ - (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) value:dataValueDictionary @@ -4060,7 +2912,7 @@ - (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)data - (NSDictionary *)readAttributePolarityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID) params:params]; @@ -4068,7 +2920,7 @@ - (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)data - (NSDictionary *)readAttributePresentValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) params:params]; @@ -4085,7 +2937,7 @@ - (void)writeAttributePresentValueWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) value:dataValueDictionary @@ -4095,7 +2947,7 @@ - (void)writeAttributePresentValueWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeReliabilityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) params:params]; @@ -4112,7 +2964,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) value:dataValueDictionary @@ -4122,7 +2974,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeStatusFlagsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID) params:params]; @@ -4130,7 +2982,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeApplicationTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID) params:params]; @@ -4138,7 +2990,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID) params:params]; @@ -4146,7 +2998,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID) params:params]; @@ -4154,7 +3006,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeEventListID) params:params]; @@ -4162,7 +3014,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID) params:params]; @@ -4170,7 +3022,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID) params:params]; @@ -4178,7 +3030,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID) params:params]; @@ -4199,12 +3051,11 @@ @implementation MTRClusterPulseWidthModulation - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -4212,7 +3063,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeGeneratedCommandListID) params:params]; @@ -4220,7 +3071,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeAcceptedCommandListID) params:params]; @@ -4228,7 +3079,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeEventListID) params:params]; @@ -4236,7 +3087,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeAttributeListID) params:params]; @@ -4244,7 +3095,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeFeatureMapID) params:params]; @@ -4252,7 +3103,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeClusterRevisionID) params:params]; @@ -4264,12 +3115,11 @@ @implementation MTRClusterDescriptor - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -4277,7 +3127,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeDeviceTypeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeDeviceTypeListID) params:params]; @@ -4285,7 +3135,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeServerListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeServerListID) params:params]; @@ -4293,7 +3143,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClientListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeClientListID) params:params]; @@ -4301,7 +3151,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePartsListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributePartsListID) params:params]; @@ -4309,7 +3159,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeTagListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeTagListID) params:params]; @@ -4317,7 +3167,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeGeneratedCommandListID) params:params]; @@ -4325,7 +3175,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeAcceptedCommandListID) params:params]; @@ -4333,7 +3183,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeEventListID) params:params]; @@ -4341,7 +3191,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeAttributeListID) params:params]; @@ -4349,7 +3199,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeFeatureMapID) params:params]; @@ -4357,7 +3207,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeClusterRevisionID) params:params]; @@ -4382,12 +3232,11 @@ @implementation MTRClusterBinding - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -4395,7 +3244,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeBindingID) params:params]; @@ -4412,7 +3261,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeBindingID) value:dataValueDictionary @@ -4422,7 +3271,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeGeneratedCommandListID) params:params]; @@ -4430,7 +3279,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeAcceptedCommandListID) params:params]; @@ -4438,7 +3287,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeEventListID) params:params]; @@ -4446,7 +3295,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeAttributeListID) params:params]; @@ -4454,7 +3303,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeFeatureMapID) params:params]; @@ -4462,7 +3311,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeClusterRevisionID) params:params]; @@ -4483,12 +3332,11 @@ @implementation MTRClusterAccessControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -4496,7 +3344,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeACLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeACLID) params:params]; @@ -4513,7 +3361,7 @@ - (void)writeAttributeACLWithValue:(NSDictionary *)dataValueDict { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeACLID) value:dataValueDictionary @@ -4523,7 +3371,7 @@ - (void)writeAttributeACLWithValue:(NSDictionary *)dataValueDict - (NSDictionary *)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeExtensionID) params:params]; @@ -4540,7 +3388,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeExtensionID) value:dataValueDictionary @@ -4551,7 +3399,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeSubjectsPerAccessControlEntryWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeSubjectsPerAccessControlEntryID) params:params]; @@ -4559,7 +3407,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeTargetsPerAccessControlEntryWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeTargetsPerAccessControlEntryID) params:params]; @@ -4568,7 +3416,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAccessControlEntriesPerFabricWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAccessControlEntriesPerFabricID) params:params]; @@ -4576,7 +3424,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeGeneratedCommandListID) params:params]; @@ -4584,7 +3432,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAcceptedCommandListID) params:params]; @@ -4592,7 +3440,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeEventListID) params:params]; @@ -4600,7 +3448,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAttributeListID) params:params]; @@ -4608,7 +3456,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeFeatureMapID) params:params]; @@ -4616,7 +3464,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeClusterRevisionID) params:params]; @@ -4652,12 +3500,11 @@ @implementation MTRClusterActions - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -4669,57 +3516,25 @@ - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandInstantActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::InstantAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster instantActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -4741,58 +3556,25 @@ - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWit completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActionsID, + self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandInstantActionWithTransitionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::InstantActionWithTransition::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.transitionTime = params.transitionTime.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster instantActionWithTransitionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -4814,57 +3596,25 @@ - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandStartActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::StartAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster startActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -4886,58 +3636,25 @@ - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurat completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActionsID, + self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandStartActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::StartActionWithDuration::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster startActionWithDurationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -4959,57 +3676,25 @@ - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandStopActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::StopAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5031,57 +3716,25 @@ - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandPauseActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::PauseAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster pauseActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5103,58 +3756,25 @@ - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurat completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActionsID, + self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandPauseActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::PauseActionWithDuration::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster pauseActionWithDurationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5176,57 +3796,25 @@ - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandResumeActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::ResumeAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resumeActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5248,57 +3836,25 @@ - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandEnableActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::EnableAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enableActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5320,58 +3876,25 @@ - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDur completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActionsID, + self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandEnableActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::EnableActionWithDuration::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enableActionWithDurationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5393,57 +3916,25 @@ - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandDisableActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::DisableAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster disableActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5465,58 +3956,25 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActionsID, + self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandDisableActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::DisableActionWithDuration::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster disableActionWithDurationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5534,7 +3992,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeActionListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeActionListID) params:params]; @@ -5542,7 +4000,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeEndpointListsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeEndpointListsID) params:params]; @@ -5550,7 +4008,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeSetupURLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeSetupURLID) params:params]; @@ -5558,7 +4016,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeGeneratedCommandListID) params:params]; @@ -5566,7 +4024,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeAcceptedCommandListID) params:params]; @@ -5574,7 +4032,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeEventListID) params:params]; @@ -5582,7 +4040,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeAttributeListID) params:params]; @@ -5590,7 +4048,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeFeatureMapID) params:params]; @@ -5598,7 +4056,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeClusterRevisionID) params:params]; @@ -5739,12 +4197,11 @@ @implementation MTRClusterBasicInformation - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -5765,51 +4222,24 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) 0x00000028, (unsigned int) 0x10020000]; + self.endpoint, (unsigned int) 0x00000028, (unsigned int) 0x10020000]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - BasicInformation::Commands::MfgSpecificPing::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster mfgSpecificPingWithParams:params + completionHandler:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5827,7 +4257,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeDataModelRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeDataModelRevisionID) params:params]; @@ -5835,7 +4265,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeVendorNameID) params:params]; @@ -5843,7 +4273,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeVendorIDID) params:params]; @@ -5851,7 +4281,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeProductNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductNameID) params:params]; @@ -5859,7 +4289,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeProductIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductIDID) params:params]; @@ -5867,7 +4297,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeNodeLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeNodeLabelID) params:params]; @@ -5884,7 +4314,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeNodeLabelID) value:dataValueDictionary @@ -5894,7 +4324,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeLocationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocationID) params:params]; @@ -5911,7 +4341,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocationID) value:dataValueDictionary @@ -5921,7 +4351,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeHardwareVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeHardwareVersionID) params:params]; @@ -5929,7 +4359,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeHardwareVersionStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeHardwareVersionStringID) params:params]; @@ -5937,7 +4367,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeSoftwareVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSoftwareVersionID) params:params]; @@ -5945,7 +4375,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeSoftwareVersionStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSoftwareVersionStringID) params:params]; @@ -5953,7 +4383,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeManufacturingDateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeManufacturingDateID) params:params]; @@ -5961,7 +4391,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributePartNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributePartNumberID) params:params]; @@ -5969,7 +4399,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeProductURLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductURLID) params:params]; @@ -5977,7 +4407,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeProductLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductLabelID) params:params]; @@ -5985,7 +4415,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeSerialNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSerialNumberID) params:params]; @@ -5993,7 +4423,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeLocalConfigDisabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocalConfigDisabledID) params:params]; @@ -6010,7 +4440,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocalConfigDisabledID) value:dataValueDictionary @@ -6020,7 +4450,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeReachableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeReachableID) params:params]; @@ -6028,7 +4458,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeUniqueIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeUniqueIDID) params:params]; @@ -6036,7 +4466,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeCapabilityMinimaWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeCapabilityMinimaID) params:params]; @@ -6044,7 +4474,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductAppearanceID) params:params]; @@ -6052,7 +4482,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeGeneratedCommandListID) params:params]; @@ -6060,7 +4490,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeAcceptedCommandListID) params:params]; @@ -6068,7 +4498,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeEventListID) params:params]; @@ -6076,7 +4506,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeAttributeListID) params:params]; @@ -6084,7 +4514,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeFeatureMapID) params:params]; @@ -6092,7 +4522,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeClusterRevisionID) params:params]; @@ -6134,12 +4564,11 @@ @implementation MTRClusterOTASoftwareUpdateProvider - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -6152,96 +4581,26 @@ - (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParam NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, + self.endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandQueryImageID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OTASoftwareUpdateProviderClusterQueryImageResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OtaSoftwareUpdateProvider::Commands::QueryImage::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.vendorID - = static_cast>(params.vendorID.unsignedShortValue); - request.productID = params.productID.unsignedShortValue; - request.softwareVersion = params.softwareVersion.unsignedIntValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.protocolsSupported.count != 0) { - auto * listHolder_0 = new ListHolder(params.protocolsSupported.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.protocolsSupported.count; ++i_0) { - if (![params.protocolsSupported[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.protocolsSupported[i_0]; - listHolder_0->mList[i_0] = static_castmList[i_0])>>( - element_0.unsignedCharValue); - } - request.protocolsSupported = ListType_0(listHolder_0->mList, params.protocolsSupported.count); - } else { - request.protocolsSupported = ListType_0(); - } - } - if (params.hardwareVersion != nil) { - auto & definedValue_0 = request.hardwareVersion.Emplace(); - definedValue_0 = params.hardwareVersion.unsignedShortValue; - } - if (params.location != nil) { - auto & definedValue_0 = request.location.Emplace(); - definedValue_0 = [self asCharSpan:params.location]; - } - if (params.requestorCanConsent != nil) { - auto & definedValue_0 = request.requestorCanConsent.Emplace(); - definedValue_0 = params.requestorCanConsent.boolValue; - } - if (params.metadataForProvider != nil) { - auto & definedValue_0 = request.metadataForProvider.Emplace(); - definedValue_0 = [self asByteSpan:params.metadataForProvider]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster queryImageWithParams:params + completion:^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -6264,55 +4623,26 @@ - (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUp NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, + self.endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandApplyUpdateRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.updateToken = [self asByteSpan:params.updateToken]; - request.newVersion = params.newVersion.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster applyUpdateRequestWithParams:params + completion:^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -6334,54 +4664,25 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, + self.endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandNotifyUpdateAppliedID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.updateToken = [self asByteSpan:params.updateToken]; - request.softwareVersion = params.softwareVersion.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster notifyUpdateAppliedWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -6400,7 +4701,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeGeneratedCommandListID) params:params]; @@ -6409,7 +4710,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAcceptedCommandListID) params:params]; @@ -6417,7 +4718,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeEventListID) params:params]; @@ -6425,7 +4726,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAttributeListID) params:params]; @@ -6433,7 +4734,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeFeatureMapID) params:params]; @@ -6441,7 +4742,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeClusterRevisionID) params:params]; @@ -6505,12 +4806,11 @@ @implementation MTRClusterOTASoftwareUpdateRequestor - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -6522,62 +4822,25 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateRequestorID, + self.endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateRequestorID, (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateRequestorCommandAnnounceOTAProviderID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.providerNodeID = params.providerNodeID.unsignedLongLongValue; - request.vendorID - = static_cast>(params.vendorID.unsignedShortValue); - request.announcementReason = static_cast>( - params.announcementReason.unsignedCharValue); - if (params.metadataForNode != nil) { - auto & definedValue_0 = request.metadataForNode.Emplace(); - definedValue_0 = [self asByteSpan:params.metadataForNode]; - } - request.endpoint = params.endpoint.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster announceOTAProviderWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -6596,7 +4859,7 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou - (NSDictionary *)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID) params:params]; @@ -6613,7 +4876,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID) value:dataValueDictionary @@ -6623,7 +4886,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeUpdatePossibleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdatePossibleID) params:params]; @@ -6631,7 +4894,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeUpdateStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateID) params:params]; @@ -6640,7 +4903,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeUpdateStateProgressWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateProgressID) params:params]; @@ -6649,7 +4912,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeGeneratedCommandListID) params:params]; @@ -6658,7 +4921,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAcceptedCommandListID) params:params]; @@ -6666,7 +4929,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeEventListID) params:params]; @@ -6674,7 +4937,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAttributeListID) params:params]; @@ -6682,7 +4945,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeFeatureMapID) params:params]; @@ -6690,7 +4953,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeClusterRevisionID) params:params]; @@ -6740,12 +5003,11 @@ @implementation MTRClusterLocalizationConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -6753,7 +5015,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeActiveLocaleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeActiveLocaleID) params:params]; @@ -6770,7 +5032,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeActiveLocaleID) value:dataValueDictionary @@ -6780,7 +5042,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeSupportedLocalesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeSupportedLocalesID) params:params]; @@ -6789,7 +5051,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeGeneratedCommandListID) params:params]; @@ -6798,7 +5060,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAcceptedCommandListID) params:params]; @@ -6806,7 +5068,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeEventListID) params:params]; @@ -6814,7 +5076,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAttributeListID) params:params]; @@ -6822,7 +5084,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeFeatureMapID) params:params]; @@ -6830,7 +5092,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeClusterRevisionID) params:params]; @@ -6851,12 +5113,11 @@ @implementation MTRClusterTimeFormatLocalization - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -6864,7 +5125,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeHourFormatWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeHourFormatID) params:params]; @@ -6881,7 +5142,7 @@ - (void)writeAttributeHourFormatWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeHourFormatID) value:dataValueDictionary @@ -6891,7 +5152,7 @@ - (void)writeAttributeHourFormatWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeActiveCalendarTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeActiveCalendarTypeID) params:params]; @@ -6908,7 +5169,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeActiveCalendarTypeID) value:dataValueDictionary @@ -6919,7 +5180,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeSupportedCalendarTypesWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeSupportedCalendarTypesID) params:params]; @@ -6928,7 +5189,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeGeneratedCommandListID) params:params]; @@ -6936,7 +5197,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAcceptedCommandListID) params:params]; @@ -6944,7 +5205,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeEventListID) params:params]; @@ -6952,7 +5213,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAttributeListID) params:params]; @@ -6960,7 +5221,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeFeatureMapID) params:params]; @@ -6968,7 +5229,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeClusterRevisionID) params:params]; @@ -6989,12 +5250,11 @@ @implementation MTRClusterUnitLocalization - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -7002,7 +5262,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeTemperatureUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeTemperatureUnitID) params:params]; @@ -7019,7 +5279,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeTemperatureUnitID) value:dataValueDictionary @@ -7029,7 +5289,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeGeneratedCommandListID) params:params]; @@ -7037,7 +5297,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeAcceptedCommandListID) params:params]; @@ -7045,7 +5305,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeEventListID) params:params]; @@ -7053,7 +5313,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeAttributeListID) params:params]; @@ -7061,7 +5321,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeFeatureMapID) params:params]; @@ -7069,7 +5329,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeClusterRevisionID) params:params]; @@ -7090,12 +5350,11 @@ @implementation MTRClusterPowerSourceConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -7103,7 +5362,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSourcesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeSourcesID) params:params]; @@ -7112,7 +5371,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeGeneratedCommandListID) params:params]; @@ -7121,7 +5380,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAcceptedCommandListID) params:params]; @@ -7129,7 +5388,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeEventListID) params:params]; @@ -7137,7 +5396,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAttributeListID) params:params]; @@ -7145,7 +5404,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeFeatureMapID) params:params]; @@ -7153,7 +5412,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeClusterRevisionID) params:params]; @@ -7174,12 +5433,11 @@ @implementation MTRClusterPowerSource - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -7187,7 +5445,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeStatusID) params:params]; @@ -7195,7 +5453,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeOrderWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeOrderID) params:params]; @@ -7203,7 +5461,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeDescriptionID) params:params]; @@ -7211,7 +5469,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredAssessedInputVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedInputVoltageID) params:params]; @@ -7219,7 +5477,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredAssessedInputFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedInputFrequencyID) params:params]; @@ -7227,7 +5485,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredCurrentTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredCurrentTypeID) params:params]; @@ -7235,7 +5493,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredAssessedCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedCurrentID) params:params]; @@ -7243,7 +5501,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredNominalVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredNominalVoltageID) params:params]; @@ -7251,7 +5509,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredMaximumCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredMaximumCurrentID) params:params]; @@ -7259,7 +5517,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredPresentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredPresentID) params:params]; @@ -7267,7 +5525,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeActiveWiredFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveWiredFaultsID) params:params]; @@ -7275,7 +5533,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatVoltageID) params:params]; @@ -7283,7 +5541,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatPercentRemainingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatPercentRemainingID) params:params]; @@ -7291,7 +5549,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatTimeRemainingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatTimeRemainingID) params:params]; @@ -7299,7 +5557,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatChargeLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargeLevelID) params:params]; @@ -7307,7 +5565,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatReplacementNeededWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplacementNeededID) params:params]; @@ -7315,7 +5573,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatReplaceabilityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplaceabilityID) params:params]; @@ -7323,7 +5581,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatPresentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatPresentID) params:params]; @@ -7331,7 +5589,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeActiveBatFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatFaultsID) params:params]; @@ -7339,7 +5597,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatReplacementDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplacementDescriptionID) params:params]; @@ -7347,7 +5605,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatCommonDesignationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatCommonDesignationID) params:params]; @@ -7355,7 +5613,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatANSIDesignationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatANSIDesignationID) params:params]; @@ -7363,7 +5621,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatIECDesignationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatIECDesignationID) params:params]; @@ -7371,7 +5629,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatApprovedChemistryWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatApprovedChemistryID) params:params]; @@ -7379,7 +5637,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatCapacityID) params:params]; @@ -7387,7 +5645,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatQuantityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatQuantityID) params:params]; @@ -7395,7 +5653,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatChargeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargeStateID) params:params]; @@ -7403,7 +5661,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatTimeToFullChargeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatTimeToFullChargeID) params:params]; @@ -7411,7 +5669,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatFunctionalWhileChargingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatFunctionalWhileChargingID) params:params]; @@ -7419,7 +5677,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatChargingCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargingCurrentID) params:params]; @@ -7427,7 +5685,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeActiveBatChargeFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatChargeFaultsID) params:params]; @@ -7435,7 +5693,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEndpointListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeEndpointListID) params:params]; @@ -7443,7 +5701,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeGeneratedCommandListID) params:params]; @@ -7451,7 +5709,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeAcceptedCommandListID) params:params]; @@ -7459,7 +5717,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeEventListID) params:params]; @@ -7467,7 +5725,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeAttributeListID) params:params]; @@ -7475,7 +5733,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeFeatureMapID) params:params]; @@ -7483,7 +5741,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeClusterRevisionID) params:params]; @@ -7504,12 +5762,11 @@ @implementation MTRClusterGeneralCommissioning - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -7522,55 +5779,26 @@ - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams * NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, (unsigned int) MTRCommandIDTypeClusterGeneralCommissioningCommandArmFailSafeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningClusterArmFailSafeResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GeneralCommissioning::Commands::ArmFailSafe::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.expiryLengthSeconds = params.expiryLengthSeconds.unsignedShortValue; - request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster armFailSafeWithParams:params + completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -7593,57 +5821,26 @@ - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulato NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, (unsigned int) MTRCommandIDTypeClusterGeneralCommissioningCommandSetRegulatoryConfigID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningClusterSetRegulatoryConfigResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GeneralCommissioning::Commands::SetRegulatoryConfig::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newRegulatoryConfig = static_cast>( - params.newRegulatoryConfig.unsignedCharValue); - request.countryCode = [self asCharSpan:params.countryCode]; - request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setRegulatoryConfigWithParams:params + completion:^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -7679,54 +5876,27 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, (unsigned int) MTRCommandIDTypeClusterGeneralCommissioningCommandCommissioningCompleteID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningClusterCommissioningCompleteResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GeneralCommissioning::Commands::CommissioningComplete::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + commissioningCompleteWithParams:params + completion:^(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -7744,7 +5914,7 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio - (NSDictionary *)readAttributeBreadcrumbWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBreadcrumbID) params:params]; @@ -7761,7 +5931,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBreadcrumbID) value:dataValueDictionary @@ -7772,7 +5942,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeBasicCommissioningInfoWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBasicCommissioningInfoID) params:params]; @@ -7780,7 +5950,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeRegulatoryConfigWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeRegulatoryConfigID) params:params]; @@ -7788,7 +5958,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeLocationCapabilityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeLocationCapabilityID) params:params]; @@ -7797,7 +5967,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeSupportsConcurrentConnectionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeSupportsConcurrentConnectionID) params:params]; @@ -7805,7 +5975,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeGeneratedCommandListID) params:params]; @@ -7813,7 +5983,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeAcceptedCommandListID) params:params]; @@ -7821,7 +5991,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeEventListID) params:params]; @@ -7829,7 +5999,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeAttributeListID) params:params]; @@ -7837,7 +6007,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeFeatureMapID) params:params]; @@ -7845,7 +6015,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeClusterRevisionID) params:params]; @@ -7926,12 +6096,11 @@ @implementation MTRClusterNetworkCommissioning - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -7944,68 +6113,26 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandScanNetworksID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterScanNetworksResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::ScanNetworks::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.ssid != nil) { - auto & definedValue_0 = request.ssid.Emplace(); - if (params.ssid == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.ssid]; - } - } - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster scanNetworksWithParams:params + completion:^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8028,59 +6155,26 @@ - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpd NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandAddOrUpdateWiFiNetworkID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.ssid = [self asByteSpan:params.ssid]; - request.credentials = [self asByteSpan:params.credentials]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addOrUpdateWiFiNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8103,58 +6197,26 @@ - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrU NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandAddOrUpdateThreadNetworkID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.operationalDataset = [self asByteSpan:params.operationalDataset]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addOrUpdateThreadNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8177,58 +6239,26 @@ - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkPara NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandRemoveNetworkID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::RemoveNetwork::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.networkID = [self asByteSpan:params.networkID]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8251,58 +6281,26 @@ - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkPa NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandConnectNetworkID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterConnectNetworkResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::ConnectNetwork::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.networkID = [self asByteSpan:params.networkID]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster connectNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8325,59 +6323,26 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandReorderNetworkID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::ReorderNetwork::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.networkID = [self asByteSpan:params.networkID]; - request.networkIndex = params.networkIndex.unsignedCharValue; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster reorderNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8395,7 +6360,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (NSDictionary *)readAttributeMaxNetworksWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeMaxNetworksID) params:params]; @@ -8403,7 +6368,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (NSDictionary *)readAttributeNetworksWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeNetworksID) params:params]; @@ -8411,7 +6376,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (NSDictionary *)readAttributeScanMaxTimeSecondsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeScanMaxTimeSecondsID) params:params]; @@ -8419,7 +6384,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (NSDictionary *)readAttributeConnectMaxTimeSecondsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeConnectMaxTimeSecondsID) params:params]; @@ -8427,7 +6392,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (NSDictionary *)readAttributeInterfaceEnabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeInterfaceEnabledID) params:params]; @@ -8444,7 +6409,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeInterfaceEnabledID) value:dataValueDictionary @@ -8454,7 +6419,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeLastNetworkingStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastNetworkingStatusID) params:params]; @@ -8462,7 +6427,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeLastNetworkIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastNetworkIDID) params:params]; @@ -8470,7 +6435,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeLastConnectErrorValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastConnectErrorValueID) params:params]; @@ -8478,7 +6443,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeGeneratedCommandListID) params:params]; @@ -8486,7 +6451,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeAcceptedCommandListID) params:params]; @@ -8494,7 +6459,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeEventListID) params:params]; @@ -8502,7 +6467,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeAttributeListID) params:params]; @@ -8510,7 +6475,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeFeatureMapID) params:params]; @@ -8518,7 +6483,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeClusterRevisionID) params:params]; @@ -8633,12 +6598,11 @@ @implementation MTRClusterDiagnosticLogs - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -8651,60 +6615,26 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDiagnosticLogsID, + self.endpoint, (unsigned int) MTRClusterIDTypeDiagnosticLogsID, (unsigned int) MTRCommandIDTypeClusterDiagnosticLogsCommandRetrieveLogsRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DiagnosticLogsClusterRetrieveLogsResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DiagnosticLogs::Commands::RetrieveLogsRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.intent = static_cast>(params.intent.unsignedCharValue); - request.requestedProtocol = static_cast>( - params.requestedProtocol.unsignedCharValue); - if (params.transferFileDesignator != nil) { - auto & definedValue_0 = request.transferFileDesignator.Emplace(); - definedValue_0 = [self asCharSpan:params.transferFileDesignator]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster retrieveLogsRequestWithParams:params + completion:^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8722,7 +6652,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeGeneratedCommandListID) params:params]; @@ -8730,7 +6660,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeAcceptedCommandListID) params:params]; @@ -8738,7 +6668,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeEventListID) params:params]; @@ -8746,7 +6676,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeAttributeListID) params:params]; @@ -8754,7 +6684,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeFeatureMapID) params:params]; @@ -8762,7 +6692,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeClusterRevisionID) params:params]; @@ -8798,12 +6728,11 @@ @implementation MTRClusterGeneralDiagnostics - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -8815,54 +6744,25 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGeneralDiagnosticsID, + self.endpoint, (unsigned int) MTRClusterIDTypeGeneralDiagnosticsID, (unsigned int) MTRCommandIDTypeClusterGeneralDiagnosticsCommandTestEventTriggerID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GeneralDiagnostics::Commands::TestEventTrigger::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.enableKey = [self asByteSpan:params.enableKey]; - request.eventTrigger = params.eventTrigger.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testEventTriggerWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8880,7 +6780,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeNetworkInterfacesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeNetworkInterfacesID) params:params]; @@ -8888,7 +6788,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeRebootCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeRebootCountID) params:params]; @@ -8896,7 +6796,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeUpTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeUpTimeID) params:params]; @@ -8904,7 +6804,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeTotalOperationalHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTotalOperationalHoursID) params:params]; @@ -8912,7 +6812,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeBootReasonWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeBootReasonID) params:params]; @@ -8920,7 +6820,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeActiveHardwareFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveHardwareFaultsID) params:params]; @@ -8928,7 +6828,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeActiveRadioFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveRadioFaultsID) params:params]; @@ -8936,7 +6836,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeActiveNetworkFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveNetworkFaultsID) params:params]; @@ -8945,7 +6845,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeTestEventTriggersEnabledWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTestEventTriggersEnabledID) params:params]; @@ -8953,7 +6853,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeGeneratedCommandListID) params:params]; @@ -8961,7 +6861,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAcceptedCommandListID) params:params]; @@ -8969,7 +6869,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeEventListID) params:params]; @@ -8977,7 +6877,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAttributeListID) params:params]; @@ -8985,7 +6885,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeFeatureMapID) params:params]; @@ -8993,7 +6893,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeClusterRevisionID) params:params]; @@ -9028,12 +6928,11 @@ @implementation MTRClusterSoftwareDiagnostics - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -9054,52 +6953,25 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeSoftwareDiagnosticsID, + self.endpoint, (unsigned int) MTRClusterIDTypeSoftwareDiagnosticsID, (unsigned int) MTRCommandIDTypeClusterSoftwareDiagnosticsCommandResetWatermarksID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - SoftwareDiagnostics::Commands::ResetWatermarks::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetWatermarksWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -9117,7 +6989,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeThreadMetricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeThreadMetricsID) params:params]; @@ -9125,7 +6997,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeCurrentHeapFreeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapFreeID) params:params]; @@ -9133,7 +7005,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeCurrentHeapUsedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapUsedID) params:params]; @@ -9142,7 +7014,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeCurrentHeapHighWatermarkWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapHighWatermarkID) params:params]; @@ -9150,7 +7022,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeGeneratedCommandListID) params:params]; @@ -9158,7 +7030,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAcceptedCommandListID) params:params]; @@ -9166,7 +7038,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeEventListID) params:params]; @@ -9174,7 +7046,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAttributeListID) params:params]; @@ -9182,7 +7054,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeFeatureMapID) params:params]; @@ -9190,7 +7062,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeClusterRevisionID) params:params]; @@ -9230,12 +7102,11 @@ @implementation MTRClusterThreadNetworkDiagnostics - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -9256,52 +7127,25 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeThreadNetworkDiagnosticsID, + self.endpoint, (unsigned int) MTRClusterIDTypeThreadNetworkDiagnosticsID, (unsigned int) MTRCommandIDTypeClusterThreadNetworkDiagnosticsCommandResetCountsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ThreadNetworkDiagnostics::Commands::ResetCounts::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetCountsWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -9319,7 +7163,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeChannelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChannelID) params:params]; @@ -9327,7 +7171,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRoutingRoleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRoutingRoleID) params:params]; @@ -9335,7 +7179,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeNetworkNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeNetworkNameID) params:params]; @@ -9343,7 +7187,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributePanIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePanIdID) params:params]; @@ -9351,7 +7195,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeExtendedPanIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeExtendedPanIdID) params:params]; @@ -9359,7 +7203,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeMeshLocalPrefixWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeMeshLocalPrefixID) params:params]; @@ -9367,7 +7211,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeOverrunCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeOverrunCountID) params:params]; @@ -9375,7 +7219,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeNeighborTableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeNeighborTableID) params:params]; @@ -9383,7 +7227,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRouteTableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRouteTableID) params:params]; @@ -9391,7 +7235,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributePartitionIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePartitionIdID) params:params]; @@ -9399,7 +7243,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeWeightingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeWeightingID) params:params]; @@ -9407,7 +7251,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeDataVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDataVersionID) params:params]; @@ -9415,7 +7259,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeStableDataVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeStableDataVersionID) params:params]; @@ -9423,7 +7267,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeLeaderRouterIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeLeaderRouterIdID) params:params]; @@ -9431,7 +7275,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeDetachedRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDetachedRoleCountID) params:params]; @@ -9439,7 +7283,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeChildRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChildRoleCountID) params:params]; @@ -9447,7 +7291,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRouterRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRouterRoleCountID) params:params]; @@ -9455,7 +7299,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeLeaderRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeLeaderRoleCountID) params:params]; @@ -9464,7 +7308,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeAttachAttemptCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttachAttemptCountID) params:params]; @@ -9473,7 +7317,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributePartitionIdChangeCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePartitionIdChangeCountID) params:params]; @@ -9482,7 +7326,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeBetterPartitionAttachAttemptCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeBetterPartitionAttachAttemptCountID) params:params]; @@ -9490,7 +7334,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeParentChangeCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeParentChangeCountID) params:params]; @@ -9498,7 +7342,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxTotalCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxTotalCountID) params:params]; @@ -9506,7 +7350,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxUnicastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxUnicastCountID) params:params]; @@ -9514,7 +7358,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxBroadcastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBroadcastCountID) params:params]; @@ -9523,7 +7367,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxAckRequestedCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxAckRequestedCountID) params:params]; @@ -9531,7 +7375,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxAckedCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxAckedCountID) params:params]; @@ -9540,7 +7384,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxNoAckRequestedCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxNoAckRequestedCountID) params:params]; @@ -9548,7 +7392,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxDataCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDataCountID) params:params]; @@ -9556,7 +7400,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxDataPollCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDataPollCountID) params:params]; @@ -9564,7 +7408,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxBeaconCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBeaconCountID) params:params]; @@ -9573,7 +7417,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxBeaconRequestCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBeaconRequestCountID) params:params]; @@ -9581,7 +7425,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxOtherCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxOtherCountID) params:params]; @@ -9589,7 +7433,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxRetryCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxRetryCountID) params:params]; @@ -9598,7 +7442,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDirectMaxRetryExpiryCountID) params:params]; @@ -9607,7 +7451,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxIndirectMaxRetryExpiryCountID) params:params]; @@ -9615,7 +7459,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxErrCcaCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrCcaCountID) params:params]; @@ -9623,7 +7467,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxErrAbortCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrAbortCountID) params:params]; @@ -9632,7 +7476,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxErrBusyChannelCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrBusyChannelCountID) params:params]; @@ -9640,7 +7484,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxTotalCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxTotalCountID) params:params]; @@ -9648,7 +7492,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxUnicastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxUnicastCountID) params:params]; @@ -9656,7 +7500,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxBroadcastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBroadcastCountID) params:params]; @@ -9664,7 +7508,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxDataCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDataCountID) params:params]; @@ -9672,7 +7516,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxDataPollCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDataPollCountID) params:params]; @@ -9680,7 +7524,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxBeaconCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBeaconCountID) params:params]; @@ -9689,7 +7533,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxBeaconRequestCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBeaconRequestCountID) params:params]; @@ -9697,7 +7541,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxOtherCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxOtherCountID) params:params]; @@ -9706,7 +7550,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxAddressFilteredCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxAddressFilteredCountID) params:params]; @@ -9715,7 +7559,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxDestAddrFilteredCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDestAddrFilteredCountID) params:params]; @@ -9723,7 +7567,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxDuplicatedCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDuplicatedCountID) params:params]; @@ -9731,7 +7575,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrNoFrameCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrNoFrameCountID) params:params]; @@ -9740,7 +7584,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrUnknownNeighborCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrUnknownNeighborCountID) params:params]; @@ -9749,7 +7593,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrInvalidSrcAddrCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrInvalidSrcAddrCountID) params:params]; @@ -9757,7 +7601,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrSecCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrSecCountID) params:params]; @@ -9765,7 +7609,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrFcsCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrFcsCountID) params:params]; @@ -9773,7 +7617,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrOtherCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrOtherCountID) params:params]; @@ -9781,7 +7625,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeActiveTimestampWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeActiveTimestampID) params:params]; @@ -9789,7 +7633,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributePendingTimestampWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePendingTimestampID) params:params]; @@ -9797,7 +7641,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDelayID) params:params]; @@ -9805,7 +7649,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeSecurityPolicyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeSecurityPolicyID) params:params]; @@ -9813,7 +7657,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeChannelPage0MaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChannelPage0MaskID) params:params]; @@ -9822,7 +7666,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeOperationalDatasetComponentsWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeOperationalDatasetComponentsID) params:params]; @@ -9831,7 +7675,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeActiveNetworkFaultsListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeActiveNetworkFaultsListID) params:params]; @@ -9840,7 +7684,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeGeneratedCommandListID) params:params]; @@ -9849,7 +7693,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; @@ -9857,7 +7701,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeEventListID) params:params]; @@ -9865,7 +7709,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttributeListID) params:params]; @@ -9873,7 +7717,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeFeatureMapID) params:params]; @@ -9881,7 +7725,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeClusterRevisionID) params:params]; @@ -9929,12 +7773,11 @@ @implementation MTRClusterWiFiNetworkDiagnostics - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -9955,52 +7798,25 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWiFiNetworkDiagnosticsID, + self.endpoint, (unsigned int) MTRClusterIDTypeWiFiNetworkDiagnosticsID, (unsigned int) MTRCommandIDTypeClusterWiFiNetworkDiagnosticsCommandResetCountsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WiFiNetworkDiagnostics::Commands::ResetCounts::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetCountsWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10018,7 +7834,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeBSSIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBSSIDID) params:params]; @@ -10026,7 +7842,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeSecurityTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeSecurityTypeID) params:params]; @@ -10034,7 +7850,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeWiFiVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeWiFiVersionID) params:params]; @@ -10042,7 +7858,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeChannelNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeChannelNumberID) params:params]; @@ -10050,7 +7866,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeRSSIWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeRSSIID) params:params]; @@ -10058,7 +7874,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeBeaconLostCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBeaconLostCountID) params:params]; @@ -10066,7 +7882,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeBeaconRxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBeaconRxCountID) params:params]; @@ -10075,7 +7891,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributePacketMulticastRxCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketMulticastRxCountID) params:params]; @@ -10084,7 +7900,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributePacketMulticastTxCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketMulticastTxCountID) params:params]; @@ -10093,7 +7909,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributePacketUnicastRxCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketUnicastRxCountID) params:params]; @@ -10102,7 +7918,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributePacketUnicastTxCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketUnicastTxCountID) params:params]; @@ -10110,7 +7926,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeCurrentMaxRateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeCurrentMaxRateID) params:params]; @@ -10118,7 +7934,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeOverrunCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeOverrunCountID) params:params]; @@ -10127,7 +7943,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeGeneratedCommandListID) params:params]; @@ -10135,7 +7951,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; @@ -10143,7 +7959,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeEventListID) params:params]; @@ -10151,7 +7967,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAttributeListID) params:params]; @@ -10159,7 +7975,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeFeatureMapID) params:params]; @@ -10167,7 +7983,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeClusterRevisionID) params:params]; @@ -10215,12 +8031,11 @@ @implementation MTRClusterEthernetNetworkDiagnostics - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -10241,52 +8056,25 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeEthernetNetworkDiagnosticsID, + self.endpoint, (unsigned int) MTRClusterIDTypeEthernetNetworkDiagnosticsID, (unsigned int) MTRCommandIDTypeClusterEthernetNetworkDiagnosticsCommandResetCountsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - EthernetNetworkDiagnostics::Commands::ResetCounts::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetCountsWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10304,7 +8092,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributePHYRateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePHYRateID) params:params]; @@ -10312,7 +8100,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeFullDuplexWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeFullDuplexID) params:params]; @@ -10320,7 +8108,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributePacketRxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePacketRxCountID) params:params]; @@ -10328,7 +8116,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributePacketTxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePacketTxCountID) params:params]; @@ -10336,7 +8124,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeTxErrCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeTxErrCountID) params:params]; @@ -10344,7 +8132,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeCollisionCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeCollisionCountID) params:params]; @@ -10352,7 +8140,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeOverrunCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeOverrunCountID) params:params]; @@ -10360,7 +8148,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeCarrierDetectWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeCarrierDetectID) params:params]; @@ -10368,7 +8156,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeTimeSinceResetWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeTimeSinceResetID) params:params]; @@ -10377,7 +8165,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeGeneratedCommandListID) params:params]; @@ -10386,7 +8174,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; @@ -10394,7 +8182,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeEventListID) params:params]; @@ -10402,7 +8190,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAttributeListID) params:params]; @@ -10410,7 +8198,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeFeatureMapID) params:params]; @@ -10418,7 +8206,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeClusterRevisionID) params:params]; @@ -10458,12 +8246,11 @@ @implementation MTRClusterTimeSynchronization - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -10475,60 +8262,25 @@ - (void)setUTCTimeWithParams:(MTRTimeSynchronizationClusterSetUTCTimeParams *)pa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + self.endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetUTCTimeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TimeSynchronization::Commands::SetUTCTime::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.UTCTime = params.utcTime.unsignedLongLongValue; - request.granularity - = static_cast>(params.granularity.unsignedCharValue); - if (params.timeSource != nil) { - auto & definedValue_0 = request.timeSource.Emplace(); - definedValue_0 - = static_cast>(params.timeSource.unsignedCharValue); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setUTCTimeWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10550,59 +8302,25 @@ - (void)setTrustedTimeSourceWithParams:(MTRTimeSynchronizationClusterSetTrustedT completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + self.endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetTrustedTimeSourceID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TimeSynchronization::Commands::SetTrustedTimeSource::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params.trustedTimeSource == nil) { - request.trustedTimeSource.SetNull(); - } else { - auto & nonNullValue_0 = request.trustedTimeSource.SetNonNull(); - nonNullValue_0.nodeID = params.trustedTimeSource.nodeID.unsignedLongLongValue; - nonNullValue_0.endpoint = params.trustedTimeSource.endpoint.unsignedShortValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setTrustedTimeSourceWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10625,80 +8343,26 @@ - (void)setTimeZoneWithParams:(MTRTimeSynchronizationClusterSetTimeZoneParams *) NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + self.endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetTimeZoneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRTimeSynchronizationClusterSetTimeZoneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TimeSynchronizationClusterSetTimeZoneResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TimeSynchronization::Commands::SetTimeZone::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.timeZone.count != 0) { - auto * listHolder_0 = new ListHolder(params.timeZone.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.timeZone.count; ++i_0) { - if (![params.timeZone[i_0] isKindOfClass:[MTRTimeSynchronizationClusterTimeZoneStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTimeSynchronizationClusterTimeZoneStruct *) params.timeZone[i_0]; - listHolder_0->mList[i_0].offset = element_0.offset.intValue; - listHolder_0->mList[i_0].validAt = element_0.validAt.unsignedLongLongValue; - if (element_0.name != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); - definedValue_2 = [self asCharSpan:element_0.name]; - } - } - request.timeZone = ListType_0(listHolder_0->mList, params.timeZone.count); - } else { - request.timeZone = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setTimeZoneWithParams:params + completion:^(MTRTimeSynchronizationClusterSetTimeZoneResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10720,81 +8384,25 @@ - (void)setDSTOffsetWithParams:(MTRTimeSynchronizationClusterSetDSTOffsetParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + self.endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetDSTOffsetID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TimeSynchronization::Commands::SetDSTOffset::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.dstOffset.count != 0) { - auto * listHolder_0 = new ListHolder(params.dstOffset.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.dstOffset.count; ++i_0) { - if (![params.dstOffset[i_0] isKindOfClass:[MTRTimeSynchronizationClusterDSTOffsetStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTimeSynchronizationClusterDSTOffsetStruct *) params.dstOffset[i_0]; - listHolder_0->mList[i_0].offset = element_0.offset.intValue; - listHolder_0->mList[i_0].validStarting = element_0.validStarting.unsignedLongLongValue; - if (element_0.validUntil == nil) { - listHolder_0->mList[i_0].validUntil.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].validUntil.SetNonNull(); - nonNullValue_2 = element_0.validUntil.unsignedLongLongValue; - } - } - request.DSTOffset = ListType_0(listHolder_0->mList, params.dstOffset.count); - } else { - request.DSTOffset = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setDSTOffsetWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10816,58 +8424,25 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + self.endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetDefaultNTPID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TimeSynchronization::Commands::SetDefaultNTP::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params.defaultNTP == nil) { - request.defaultNTP.SetNull(); - } else { - auto & nonNullValue_0 = request.defaultNTP.SetNonNull(); - nonNullValue_0 = [self asCharSpan:params.defaultNTP]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setDefaultNTPWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10885,7 +8460,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeUTCTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeUTCTimeID) params:params]; @@ -10893,7 +8468,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeGranularityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeGranularityID) params:params]; @@ -10901,7 +8476,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeTimeSourceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeSourceID) params:params]; @@ -10909,7 +8484,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeTrustedTimeSourceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTrustedTimeSourceID) params:params]; @@ -10917,7 +8492,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeDefaultNTPWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDefaultNTPID) params:params]; @@ -10925,7 +8500,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeTimeZoneWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneID) params:params]; @@ -10933,7 +8508,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeDSTOffsetWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDSTOffsetID) params:params]; @@ -10941,7 +8516,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeLocalTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeLocalTimeID) params:params]; @@ -10949,7 +8524,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeTimeZoneDatabaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneDatabaseID) params:params]; @@ -10957,7 +8532,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeNTPServerAvailableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeNTPServerAvailableID) params:params]; @@ -10965,7 +8540,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeTimeZoneListMaxSizeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneListMaxSizeID) params:params]; @@ -10973,7 +8548,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeDSTOffsetListMaxSizeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDSTOffsetListMaxSizeID) params:params]; @@ -10981,7 +8556,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeSupportsDNSResolveWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeSupportsDNSResolveID) params:params]; @@ -10989,7 +8564,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeGeneratedCommandListID) params:params]; @@ -10997,7 +8572,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeAcceptedCommandListID) params:params]; @@ -11005,7 +8580,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeEventListID) params:params]; @@ -11013,7 +8588,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeAttributeListID) params:params]; @@ -11021,7 +8596,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeFeatureMapID) params:params]; @@ -11029,7 +8604,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeClusterRevisionID) params:params]; @@ -11041,12 +8616,11 @@ @implementation MTRClusterBridgedDeviceBasicInformation - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -11054,7 +8628,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeVendorNameID) params:params]; @@ -11062,7 +8636,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeVendorIDID) params:params]; @@ -11070,7 +8644,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeProductNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductNameID) params:params]; @@ -11078,7 +8652,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeNodeLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeNodeLabelID) params:params]; @@ -11095,7 +8669,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeNodeLabelID) value:dataValueDictionary @@ -11106,7 +8680,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeHardwareVersionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeHardwareVersionID) params:params]; @@ -11115,7 +8689,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeHardwareVersionStringWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeHardwareVersionStringID) params:params]; @@ -11124,7 +8698,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeSoftwareVersionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSoftwareVersionID) params:params]; @@ -11133,7 +8707,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeSoftwareVersionStringWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSoftwareVersionStringID) params:params]; @@ -11142,7 +8716,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeManufacturingDateWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeManufacturingDateID) params:params]; @@ -11150,7 +8724,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributePartNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributePartNumberID) params:params]; @@ -11158,7 +8732,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeProductURLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductURLID) params:params]; @@ -11166,7 +8740,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeProductLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductLabelID) params:params]; @@ -11174,7 +8748,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeSerialNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSerialNumberID) params:params]; @@ -11182,7 +8756,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeReachableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeReachableID) params:params]; @@ -11190,7 +8764,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeUniqueIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeUniqueIDID) params:params]; @@ -11199,7 +8773,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductAppearanceID) params:params]; @@ -11208,7 +8782,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeGeneratedCommandListID) params:params]; @@ -11217,7 +8791,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAcceptedCommandListID) params:params]; @@ -11225,7 +8799,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeEventListID) params:params]; @@ -11234,7 +8808,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAttributeListID) params:params]; @@ -11242,7 +8816,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeFeatureMapID) params:params]; @@ -11251,7 +8825,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeClusterRevisionID) params:params]; @@ -11274,12 +8848,11 @@ @implementation MTRClusterSwitch - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -11287,7 +8860,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeNumberOfPositionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeNumberOfPositionsID) params:params]; @@ -11295,7 +8868,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeCurrentPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeCurrentPositionID) params:params]; @@ -11303,7 +8876,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMultiPressMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeMultiPressMaxID) params:params]; @@ -11311,7 +8884,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeGeneratedCommandListID) params:params]; @@ -11319,7 +8892,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAcceptedCommandListID) params:params]; @@ -11327,7 +8900,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeEventListID) params:params]; @@ -11335,7 +8908,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAttributeListID) params:params]; @@ -11343,7 +8916,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeFeatureMapID) params:params]; @@ -11351,7 +8924,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeClusterRevisionID) params:params]; @@ -11372,12 +8945,11 @@ @implementation MTRClusterAdministratorCommissioning - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -11389,61 +8961,26 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeAdministratorCommissioningID, (unsigned int) MTRCommandIDTypeClusterAdministratorCommissioningCommandOpenCommissioningWindowID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AdministratorCommissioning::Commands::OpenCommissioningWindow::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - request.PAKEPasscodeVerifier = [self asByteSpan:params.pakePasscodeVerifier]; - request.discriminator = params.discriminator.unsignedShortValue; - request.iterations = params.iterations.unsignedIntValue; - request.salt = [self asByteSpan:params.salt]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster openCommissioningWindowWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11465,57 +9002,26 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeAdministratorCommissioningID, (unsigned int) MTRCommandIDTypeClusterAdministratorCommissioningCommandOpenBasicCommissioningWindowID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster openBasicCommissioningWindowWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11546,55 +9052,25 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeAdministratorCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeAdministratorCommissioningID, (unsigned int) MTRCommandIDTypeClusterAdministratorCommissioningCommandRevokeCommissioningID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AdministratorCommissioning::Commands::RevokeCommissioning::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster revokeCommissioningWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11612,7 +9088,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeWindowStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeWindowStatusID) params:params]; @@ -11621,7 +9097,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeAdminFabricIndexWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminFabricIndexID) params:params]; @@ -11629,7 +9105,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeAdminVendorIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminVendorIdID) params:params]; @@ -11638,7 +9114,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeGeneratedCommandListID) params:params]; @@ -11647,7 +9123,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAcceptedCommandListID) params:params]; @@ -11655,7 +9131,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeEventListID) params:params]; @@ -11663,7 +9139,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAttributeListID) params:params]; @@ -11671,7 +9147,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeFeatureMapID) params:params]; @@ -11679,7 +9155,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeClusterRevisionID) params:params]; @@ -11739,12 +9215,11 @@ @implementation MTRClusterOperationalCredentials - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -11757,54 +9232,26 @@ - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestatio NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandAttestationRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterAttestationResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterAttestationResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::AttestationRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.attestationNonce = [self asByteSpan:params.attestationNonce]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster attestationRequestWithParams:params + completion:^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11827,55 +9274,27 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandCertificateChainRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterCertificateChainResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::CertificateChainRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.certificateType = static_cast>( - params.certificateType.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + certificateChainRequestWithParams:params + completion:^(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11898,58 +9317,26 @@ - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams * NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandCSRRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterCSRResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterCSRResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::CSRRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.CSRNonce = [self asByteSpan:params.csrNonce]; - if (params.isForUpdateNOC != nil) { - auto & definedValue_0 = request.isForUpdateNOC.Emplace(); - definedValue_0 = params.isForUpdateNOC.boolValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + CSRRequestWithParams:params + completion:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11972,62 +9359,26 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandAddNOCID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::AddNOC::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.NOCValue = [self asByteSpan:params.nocValue]; - if (params.icacValue != nil) { - auto & definedValue_0 = request.ICACValue.Emplace(); - definedValue_0 = [self asByteSpan:params.icacValue]; - } - request.IPKValue = [self asByteSpan:params.ipkValue]; - request.caseAdminSubject = params.caseAdminSubject.unsignedLongLongValue; - request.adminVendorId = static_cast>( - params.adminVendorId.unsignedShortValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + addNOCWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12050,58 +9401,26 @@ - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)p NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandUpdateNOCID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::UpdateNOC::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.NOCValue = [self asByteSpan:params.nocValue]; - if (params.icacValue != nil) { - auto & definedValue_0 = request.ICACValue.Emplace(); - definedValue_0 = [self asByteSpan:params.icacValue]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + updateNOCWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12124,54 +9443,26 @@ - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabri NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandUpdateFabricLabelID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::UpdateFabricLabel::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.label = [self asCharSpan:params.label]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster updateFabricLabelWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12194,54 +9485,26 @@ - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricPara NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandRemoveFabricID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::RemoveFabric::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.fabricIndex = params.fabricIndex.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeFabricWithParams:params + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12263,54 +9526,26 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandAddTrustedRootCertificateID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::AddTrustedRootCertificate::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.rootCACertificate = [self asByteSpan:params.rootCACertificate]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addTrustedRootCertificateWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12328,7 +9563,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeNOCsID) params:params]; @@ -12336,7 +9571,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFabricsID) params:params]; @@ -12344,7 +9579,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeSupportedFabricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeSupportedFabricsID) params:params]; @@ -12352,7 +9587,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeCommissionedFabricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCommissionedFabricsID) params:params]; @@ -12361,7 +9596,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeTrustedRootCertificatesWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeTrustedRootCertificatesID) params:params]; @@ -12369,7 +9604,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeCurrentFabricIndexWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCurrentFabricIndexID) params:params]; @@ -12378,7 +9613,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeGeneratedCommandListID) params:params]; @@ -12386,7 +9621,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAcceptedCommandListID) params:params]; @@ -12394,7 +9629,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeEventListID) params:params]; @@ -12402,7 +9637,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAttributeListID) params:params]; @@ -12410,7 +9645,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFeatureMapID) params:params]; @@ -12418,7 +9653,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeClusterRevisionID) params:params]; @@ -12553,12 +9788,11 @@ @implementation MTRClusterGroupKeyManagement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -12570,92 +9804,25 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetWriteID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetWrite::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupKeySet.groupKeySetID = params.groupKeySet.groupKeySetID.unsignedShortValue; - request.groupKeySet.groupKeySecurityPolicy - = static_cast>( - params.groupKeySet.groupKeySecurityPolicy.unsignedCharValue); - if (params.groupKeySet.epochKey0 == nil) { - request.groupKeySet.epochKey0.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochKey0.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey0]; - } - if (params.groupKeySet.epochStartTime0 == nil) { - request.groupKeySet.epochStartTime0.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochStartTime0.SetNonNull(); - nonNullValue_1 = params.groupKeySet.epochStartTime0.unsignedLongLongValue; - } - if (params.groupKeySet.epochKey1 == nil) { - request.groupKeySet.epochKey1.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochKey1.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey1]; - } - if (params.groupKeySet.epochStartTime1 == nil) { - request.groupKeySet.epochStartTime1.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochStartTime1.SetNonNull(); - nonNullValue_1 = params.groupKeySet.epochStartTime1.unsignedLongLongValue; - } - if (params.groupKeySet.epochKey2 == nil) { - request.groupKeySet.epochKey2.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochKey2.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey2]; - } - if (params.groupKeySet.epochStartTime2 == nil) { - request.groupKeySet.epochStartTime2.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochStartTime2.SetNonNull(); - nonNullValue_1 = params.groupKeySet.epochStartTime2.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12678,54 +9845,26 @@ - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)par NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementClusterKeySetReadResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetRead::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster keySetReadWithParams:params + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12747,53 +9886,25 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetRemoveID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetRemove::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster keySetRemoveWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12827,53 +9938,26 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadAllIndicesID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetReadAllIndices::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster keySetReadAllIndicesWithParams:params + completion:^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12891,7 +9975,7 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl - (NSDictionary *)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) params:params]; @@ -12908,7 +9992,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) value:dataValueDictionary @@ -12918,7 +10002,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupTableID) params:params]; @@ -12926,7 +10010,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeMaxGroupsPerFabricWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupsPerFabricID) params:params]; @@ -12934,7 +10018,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeMaxGroupKeysPerFabricWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupKeysPerFabricID) params:params]; @@ -12942,7 +10026,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGeneratedCommandListID) params:params]; @@ -12950,7 +10034,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAcceptedCommandListID) params:params]; @@ -12958,7 +10042,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeEventListID) params:params]; @@ -12966,7 +10050,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAttributeListID) params:params]; @@ -12974,7 +10058,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeFeatureMapID) params:params]; @@ -12982,7 +10066,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeClusterRevisionID) params:params]; @@ -13053,12 +10137,11 @@ @implementation MTRClusterFixedLabel - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13066,7 +10149,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeLabelListID) params:params]; @@ -13074,7 +10157,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeGeneratedCommandListID) params:params]; @@ -13082,7 +10165,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAcceptedCommandListID) params:params]; @@ -13090,7 +10173,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeEventListID) params:params]; @@ -13098,7 +10181,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAttributeListID) params:params]; @@ -13106,7 +10189,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeFeatureMapID) params:params]; @@ -13114,7 +10197,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeClusterRevisionID) params:params]; @@ -13135,12 +10218,11 @@ @implementation MTRClusterUserLabel - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13148,7 +10230,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) params:params]; @@ -13165,7 +10247,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) value:dataValueDictionary @@ -13175,7 +10257,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeGeneratedCommandListID) params:params]; @@ -13183,7 +10265,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAcceptedCommandListID) params:params]; @@ -13191,7 +10273,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeEventListID) params:params]; @@ -13199,7 +10281,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAttributeListID) params:params]; @@ -13207,7 +10289,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeFeatureMapID) params:params]; @@ -13215,7 +10297,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeClusterRevisionID) params:params]; @@ -13236,12 +10318,11 @@ @implementation MTRClusterBooleanState - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13249,7 +10330,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeStateValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeStateValueID) params:params]; @@ -13257,7 +10338,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeGeneratedCommandListID) params:params]; @@ -13265,7 +10346,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAcceptedCommandListID) params:params]; @@ -13273,7 +10354,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeEventListID) params:params]; @@ -13281,7 +10362,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAttributeListID) params:params]; @@ -13289,7 +10370,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeFeatureMapID) params:params]; @@ -13297,7 +10378,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeClusterRevisionID) params:params]; @@ -13318,12 +10399,11 @@ @implementation MTRClusterICDManagement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13336,60 +10416,26 @@ - (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *) NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, (unsigned int) MTRCommandIDTypeClusterICDManagementCommandRegisterClientID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRICDManagementClusterRegisterClientResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ICDManagementClusterRegisterClientResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - IcdManagement::Commands::RegisterClient::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.checkInNodeID = params.checkInNodeID.unsignedLongLongValue; - request.monitoredSubject = params.monitoredSubject.unsignedLongLongValue; - request.key = [self asByteSpan:params.key]; - if (params.verificationKey != nil) { - auto & definedValue_0 = request.verificationKey.Emplace(); - definedValue_0 = [self asByteSpan:params.verificationKey]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster registerClientWithParams:params + completion:^(MTRICDManagementClusterRegisterClientResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -13411,57 +10457,25 @@ - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParam completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, (unsigned int) MTRCommandIDTypeClusterICDManagementCommandUnregisterClientID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - IcdManagement::Commands::UnregisterClient::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.checkInNodeID = params.checkInNodeID.unsignedLongLongValue; - if (params.verificationKey != nil) { - auto & definedValue_0 = request.verificationKey.Emplace(); - definedValue_0 = [self asByteSpan:params.verificationKey]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster unregisterClientWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -13492,52 +10506,25 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, (unsigned int) MTRCommandIDTypeClusterICDManagementCommandStayActiveRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - IcdManagement::Commands::StayActiveRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stayActiveRequestWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -13555,7 +10542,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeIdleModeIntervalWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeIdleModeIntervalID) params:params]; @@ -13563,7 +10550,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeActiveModeIntervalWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeActiveModeIntervalID) params:params]; @@ -13571,7 +10558,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeActiveModeThresholdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeActiveModeThresholdID) params:params]; @@ -13579,7 +10566,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeRegisteredClientsID) params:params]; @@ -13587,7 +10574,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeICDCounterWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeICDCounterID) params:params]; @@ -13595,7 +10582,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeClientsSupportedPerFabricWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeClientsSupportedPerFabricID) params:params]; @@ -13603,7 +10590,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeGeneratedCommandListID) params:params]; @@ -13611,7 +10598,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAcceptedCommandListID) params:params]; @@ -13619,7 +10606,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeEventListID) params:params]; @@ -13627,7 +10614,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAttributeListID) params:params]; @@ -13635,7 +10622,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeFeatureMapID) params:params]; @@ -13643,7 +10630,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeClusterRevisionID) params:params]; @@ -13655,12 +10642,11 @@ @implementation MTRClusterModeSelect - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13672,53 +10658,25 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeModeSelectID, + self.endpoint, (unsigned int) MTRClusterIDTypeModeSelectID, (unsigned int) MTRCommandIDTypeClusterModeSelectCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ModeSelect::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster changeToModeWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -13736,7 +10694,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary *)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeDescriptionID) params:params]; @@ -13744,7 +10702,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary *)readAttributeStandardNamespaceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStandardNamespaceID) params:params]; @@ -13752,7 +10710,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeSupportedModesID) params:params]; @@ -13760,7 +10718,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeCurrentModeID) params:params]; @@ -13768,7 +10726,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) params:params]; @@ -13785,7 +10743,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) value:dataValueDictionary @@ -13795,7 +10753,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) params:params]; @@ -13812,7 +10770,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) value:dataValueDictionary @@ -13822,7 +10780,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeGeneratedCommandListID) params:params]; @@ -13830,7 +10788,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAcceptedCommandListID) params:params]; @@ -13838,7 +10796,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeEventListID) params:params]; @@ -13846,7 +10804,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID) params:params]; @@ -13854,7 +10812,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeFeatureMapID) params:params]; @@ -13862,7 +10820,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID) params:params]; @@ -13893,12 +10851,11 @@ @implementation MTRClusterLaundryWasherMode - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13911,54 +10868,26 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLaundryWasherModeID, + self.endpoint, (unsigned int) MTRClusterIDTypeLaundryWasherModeID, (unsigned int) MTRCommandIDTypeClusterLaundryWasherModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRLaundryWasherModeClusterChangeToModeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LaundryWasherModeClusterChangeToModeResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LaundryWasherMode::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster changeToModeWithParams:params + completion:^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -13976,7 +10905,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeSupportedModesID) params:params]; @@ -13984,7 +10913,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID) params:params]; @@ -13992,7 +10921,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) params:params]; @@ -14009,7 +10938,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) value:dataValueDictionary @@ -14019,7 +10948,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) params:params]; @@ -14036,7 +10965,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) value:dataValueDictionary @@ -14046,7 +10975,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID) params:params]; @@ -14054,7 +10983,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID) params:params]; @@ -14062,7 +10991,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeEventListID) params:params]; @@ -14070,7 +10999,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID) params:params]; @@ -14078,7 +11007,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID) params:params]; @@ -14086,7 +11015,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID) params:params]; @@ -14098,12 +11027,11 @@ @implementation MTRClusterRefrigeratorAndTemperatureControlledCabinetMode - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -14118,57 +11046,29 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID, (unsigned int) MTRCommandIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast( - bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + changeToModeWithParams:params + completion:^( + MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -14187,7 +11087,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeSupportedModesID) @@ -14197,7 +11097,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID) @@ -14207,7 +11107,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) @@ -14226,7 +11126,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) @@ -14238,7 +11138,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) params:params]; @@ -14256,7 +11156,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) value:dataValueDictionary @@ -14267,7 +11167,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID) @@ -14277,7 +11177,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID) @@ -14287,7 +11187,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeEventListID) params:params]; @@ -14296,7 +11196,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID) @@ -14306,7 +11206,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID) params:params]; @@ -14315,7 +11215,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID) @@ -14328,12 +11228,11 @@ @implementation MTRClusterLaundryWasherControls - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -14341,7 +11240,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID) params:params]; @@ -14349,7 +11248,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) params:params]; @@ -14366,7 +11265,7 @@ - (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) value:dataValueDictionary @@ -14376,7 +11275,7 @@ - (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *) - (NSDictionary *)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) params:params]; @@ -14393,7 +11292,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) value:dataValueDictionary @@ -14403,7 +11302,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeSupportedRinsesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID) params:params]; @@ -14411,7 +11310,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID) params:params]; @@ -14419,7 +11318,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID) params:params]; @@ -14427,7 +11326,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeEventListID) params:params]; @@ -14435,7 +11334,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID) params:params]; @@ -14443,7 +11342,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID) params:params]; @@ -14451,7 +11350,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID) params:params]; @@ -14463,12 +11362,11 @@ @implementation MTRClusterRVCRunMode - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -14481,54 +11379,26 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCRunModeID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCRunModeID, (unsigned int) MTRCommandIDTypeClusterRVCRunModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCRunModeClusterChangeToModeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCRunModeClusterChangeToModeResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcRunMode::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + changeToModeWithParams:params + completion:^(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -14546,7 +11416,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeSupportedModesID) params:params]; @@ -14554,7 +11424,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeCurrentModeID) params:params]; @@ -14562,7 +11432,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeStartUpModeID) params:params]; @@ -14579,7 +11449,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeStartUpModeID) value:dataValueDictionary @@ -14589,7 +11459,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) params:params]; @@ -14606,7 +11476,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) value:dataValueDictionary @@ -14616,7 +11486,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeGeneratedCommandListID) params:params]; @@ -14624,7 +11494,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAcceptedCommandListID) params:params]; @@ -14632,7 +11502,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeEventListID) params:params]; @@ -14640,7 +11510,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAttributeListID) params:params]; @@ -14648,7 +11518,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeFeatureMapID) params:params]; @@ -14656,7 +11526,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeClusterRevisionID) params:params]; @@ -14668,12 +11538,11 @@ @implementation MTRClusterRVCCleanMode - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -14686,54 +11555,26 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCCleanModeID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCCleanModeID, (unsigned int) MTRCommandIDTypeClusterRVCCleanModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCCleanModeClusterChangeToModeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCCleanModeClusterChangeToModeResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcCleanMode::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster changeToModeWithParams:params + completion:^( + MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -14751,7 +11592,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeSupportedModesID) params:params]; @@ -14759,7 +11600,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeCurrentModeID) params:params]; @@ -14767,7 +11608,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeStartUpModeID) params:params]; @@ -14784,7 +11625,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeStartUpModeID) value:dataValueDictionary @@ -14794,7 +11635,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) params:params]; @@ -14811,7 +11652,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) value:dataValueDictionary @@ -14821,7 +11662,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeGeneratedCommandListID) params:params]; @@ -14829,7 +11670,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAcceptedCommandListID) params:params]; @@ -14837,7 +11678,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeEventListID) params:params]; @@ -14845,7 +11686,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAttributeListID) params:params]; @@ -14853,7 +11694,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeFeatureMapID) params:params]; @@ -14861,7 +11702,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeClusterRevisionID) params:params]; @@ -14873,12 +11714,11 @@ @implementation MTRClusterTemperatureControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -14890,62 +11730,25 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTemperatureControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeTemperatureControlID, (unsigned int) MTRCommandIDTypeClusterTemperatureControlCommandSetTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TemperatureControl::Commands::SetTemperature::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.targetTemperature != nil) { - auto & definedValue_0 = request.targetTemperature.Emplace(); - definedValue_0 = params.targetTemperature.shortValue; - } - if (params.targetTemperatureLevel != nil) { - auto & definedValue_0 = request.targetTemperatureLevel.Emplace(); - definedValue_0 = params.targetTemperatureLevel.unsignedCharValue; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -14963,7 +11766,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeTemperatureSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID) params:params]; @@ -14971,7 +11774,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeMinTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID) params:params]; @@ -14979,7 +11782,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeMaxTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID) params:params]; @@ -14987,7 +11790,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeStepWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeStepID) params:params]; @@ -14996,7 +11799,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID) params:params]; @@ -15005,7 +11808,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID) params:params]; @@ -15013,7 +11816,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID) params:params]; @@ -15021,7 +11824,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID) params:params]; @@ -15029,7 +11832,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeEventListID) params:params]; @@ -15037,7 +11840,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID) params:params]; @@ -15045,7 +11848,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID) params:params]; @@ -15053,7 +11856,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID) params:params]; @@ -15065,12 +11868,11 @@ @implementation MTRClusterRefrigeratorAlarm - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15078,7 +11880,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID) params:params]; @@ -15086,7 +11888,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID) params:params]; @@ -15094,7 +11896,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID) params:params]; @@ -15102,7 +11904,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID) params:params]; @@ -15110,7 +11912,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID) params:params]; @@ -15118,7 +11920,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeEventListID) params:params]; @@ -15126,7 +11928,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID) params:params]; @@ -15134,7 +11936,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID) params:params]; @@ -15142,7 +11944,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID) params:params]; @@ -15154,12 +11956,11 @@ @implementation MTRClusterDishwasherMode - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15172,54 +11973,26 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDishwasherModeID, + self.endpoint, (unsigned int) MTRClusterIDTypeDishwasherModeID, (unsigned int) MTRCommandIDTypeClusterDishwasherModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDishwasherModeClusterChangeToModeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DishwasherModeClusterChangeToModeResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DishwasherMode::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster changeToModeWithParams:params + completion:^( + MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -15237,7 +12010,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeSupportedModesID) params:params]; @@ -15245,7 +12018,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID) params:params]; @@ -15253,7 +12026,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) params:params]; @@ -15270,7 +12043,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) value:dataValueDictionary @@ -15280,7 +12053,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) params:params]; @@ -15297,7 +12070,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) value:dataValueDictionary @@ -15307,7 +12080,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID) params:params]; @@ -15315,7 +12088,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID) params:params]; @@ -15323,7 +12096,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeEventListID) params:params]; @@ -15331,7 +12104,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID) params:params]; @@ -15339,7 +12112,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID) params:params]; @@ -15347,7 +12120,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID) params:params]; @@ -15359,12 +12132,11 @@ @implementation MTRClusterAirQuality - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15372,7 +12144,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAirQualityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAirQualityID) params:params]; @@ -15380,7 +12152,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeGeneratedCommandListID) params:params]; @@ -15388,7 +12160,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAcceptedCommandListID) params:params]; @@ -15396,7 +12168,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeEventListID) params:params]; @@ -15404,7 +12176,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAttributeListID) params:params]; @@ -15412,7 +12184,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeFeatureMapID) params:params]; @@ -15420,7 +12192,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeClusterRevisionID) params:params]; @@ -15432,12 +12204,11 @@ @implementation MTRClusterSmokeCOAlarm - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15458,52 +12229,25 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeSmokeCOAlarmID, + self.endpoint, (unsigned int) MTRClusterIDTypeSmokeCOAlarmID, (unsigned int) MTRCommandIDTypeClusterSmokeCOAlarmCommandSelfTestRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - SmokeCoAlarm::Commands::SelfTestRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster selfTestRequestWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -15521,7 +12265,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeExpressedStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpressedStateID) params:params]; @@ -15529,7 +12273,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeSmokeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeStateID) params:params]; @@ -15537,7 +12281,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeCOStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeCOStateID) params:params]; @@ -15545,7 +12289,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeBatteryAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeBatteryAlertID) params:params]; @@ -15553,7 +12297,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeDeviceMutedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeDeviceMutedID) params:params]; @@ -15561,7 +12305,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeTestInProgressWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeTestInProgressID) params:params]; @@ -15569,7 +12313,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeHardwareFaultAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeHardwareFaultAlertID) params:params]; @@ -15577,7 +12321,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeEndOfServiceAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEndOfServiceAlertID) params:params]; @@ -15585,7 +12329,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeInterconnectSmokeAlarmWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectSmokeAlarmID) params:params]; @@ -15593,7 +12337,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeInterconnectCOAlarmWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectCOAlarmID) params:params]; @@ -15601,7 +12345,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeContaminationStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeContaminationStateID) params:params]; @@ -15609,7 +12353,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeSmokeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeSensitivityLevelID) params:params]; @@ -15628,7 +12372,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeExpiryDateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpiryDateID) params:params]; @@ -15646,7 +12390,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeGeneratedCommandListID) params:params]; @@ -15654,7 +12398,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAcceptedCommandListID) params:params]; @@ -15662,7 +12406,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEventListID) params:params]; @@ -15670,7 +12414,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAttributeListID) params:params]; @@ -15678,7 +12422,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeFeatureMapID) params:params]; @@ -15686,7 +12430,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeClusterRevisionID) params:params]; @@ -15698,12 +12442,11 @@ @implementation MTRClusterDishwasherAlarm - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15715,53 +12458,25 @@ - (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDishwasherAlarmID, + self.endpoint, (unsigned int) MTRClusterIDTypeDishwasherAlarmID, (unsigned int) MTRCommandIDTypeClusterDishwasherAlarmCommandResetID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DishwasherAlarm::Commands::Reset::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.alarms = static_cast>(params.alarms.unsignedIntValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -15783,53 +12498,25 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDishwasherAlarmID, + self.endpoint, (unsigned int) MTRClusterIDTypeDishwasherAlarmID, (unsigned int) MTRCommandIDTypeClusterDishwasherAlarmCommandModifyEnabledAlarmsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DishwasherAlarm::Commands::ModifyEnabledAlarms::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.mask = static_cast>(params.mask.unsignedIntValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster modifyEnabledAlarmsWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -15847,7 +12534,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeMaskID) params:params]; @@ -15855,7 +12542,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeLatchID) params:params]; @@ -15863,7 +12550,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeStateID) params:params]; @@ -15871,7 +12558,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeSupportedID) params:params]; @@ -15879,7 +12566,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeGeneratedCommandListID) params:params]; @@ -15887,7 +12574,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAcceptedCommandListID) params:params]; @@ -15895,7 +12582,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeEventListID) params:params]; @@ -15903,7 +12590,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID) params:params]; @@ -15911,7 +12598,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeFeatureMapID) params:params]; @@ -15919,7 +12606,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeClusterRevisionID) params:params]; @@ -15931,12 +12618,11 @@ @implementation MTRClusterOperationalState - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15956,53 +12642,26 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandPauseID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Pause::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster pauseWithParams:params + completion:^( + MTROperationalStateClusterOperationalCommandResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16032,53 +12691,26 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Stop::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopWithParams:params + completion:^( + MTROperationalStateClusterOperationalCommandResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16108,53 +12740,26 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandStartID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Start::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster startWithParams:params + completion:^( + MTROperationalStateClusterOperationalCommandResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16184,53 +12789,26 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandResumeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Resume::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resumeWithParams:params + completion:^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16248,7 +12826,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID) params:params]; @@ -16256,7 +12834,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCurrentPhaseID) params:params]; @@ -16264,7 +12842,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCountdownTimeID) params:params]; @@ -16272,7 +12850,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateListID) params:params]; @@ -16280,7 +12858,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateID) params:params]; @@ -16288,7 +12866,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalErrorID) params:params]; @@ -16296,7 +12874,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeGeneratedCommandListID) params:params]; @@ -16304,7 +12882,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID) params:params]; @@ -16312,7 +12890,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeEventListID) params:params]; @@ -16320,7 +12898,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID) params:params]; @@ -16328,7 +12906,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeFeatureMapID) params:params]; @@ -16336,7 +12914,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID) params:params]; @@ -16348,12 +12926,11 @@ @implementation MTRClusterRVCOperationalState - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -16373,53 +12950,26 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandPauseID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCOperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCOperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcOperationalState::Commands::Pause::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster pauseWithParams:params + completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16449,53 +12999,26 @@ - (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)para NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCOperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCOperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcOperationalState::Commands::Stop::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopWithParams:params + completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16525,53 +13048,26 @@ - (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)pa NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandStartID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCOperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCOperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcOperationalState::Commands::Start::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster startWithParams:params + completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16601,53 +13097,26 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandResumeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCOperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCOperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcOperationalState::Commands::Resume::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resumeWithParams:params + completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16665,7 +13134,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributePhaseListID) params:params]; @@ -16673,7 +13142,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCurrentPhaseID) params:params]; @@ -16681,7 +13150,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCountdownTimeID) params:params]; @@ -16689,7 +13158,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateListID) params:params]; @@ -16697,7 +13166,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateID) params:params]; @@ -16705,7 +13174,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalErrorID) params:params]; @@ -16713,7 +13182,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeGeneratedCommandListID) params:params]; @@ -16721,7 +13190,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAcceptedCommandListID) params:params]; @@ -16729,7 +13198,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeEventListID) params:params]; @@ -16737,7 +13206,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAttributeListID) params:params]; @@ -16745,7 +13214,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeFeatureMapID) params:params]; @@ -16753,7 +13222,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeClusterRevisionID) params:params]; @@ -16765,12 +13234,11 @@ @implementation MTRClusterHEPAFilterMonitoring - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -16791,52 +13259,25 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeHEPAFilterMonitoringID, + self.endpoint, (unsigned int) MTRClusterIDTypeHEPAFilterMonitoringID, (unsigned int) MTRCommandIDTypeClusterHEPAFilterMonitoringCommandResetConditionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - HepaFilterMonitoring::Commands::ResetCondition::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetConditionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16854,7 +13295,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary *)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeConditionID) params:params]; @@ -16862,7 +13303,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary *)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeDegradationDirectionID) params:params]; @@ -16870,7 +13311,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary *)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeChangeIndicationID) params:params]; @@ -16878,7 +13319,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary *)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeInPlaceIndicatorID) params:params]; @@ -16886,7 +13327,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary *)readAttributeLastChangedTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeLastChangedTimeID) params:params]; @@ -16903,7 +13344,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeLastChangedTimeID) value:dataValueDictionary @@ -16914,7 +13355,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeReplacementProductListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeReplacementProductListID) params:params]; @@ -16922,7 +13363,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeGeneratedCommandListID) params:params]; @@ -16930,7 +13371,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAcceptedCommandListID) params:params]; @@ -16938,7 +13379,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeEventListID) params:params]; @@ -16946,7 +13387,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAttributeListID) params:params]; @@ -16954,7 +13395,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeFeatureMapID) params:params]; @@ -16962,7 +13403,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeClusterRevisionID) params:params]; @@ -16974,12 +13415,11 @@ @implementation MTRClusterActivatedCarbonFilterMonitoring - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -17000,52 +13440,25 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActivatedCarbonFilterMonitoringID, + self.endpoint, (unsigned int) MTRClusterIDTypeActivatedCarbonFilterMonitoringID, (unsigned int) MTRCommandIDTypeClusterActivatedCarbonFilterMonitoringCommandResetConditionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetConditionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17063,7 +13476,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary *)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeConditionID) params:params]; @@ -17072,7 +13485,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary *)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeDegradationDirectionID) params:params]; @@ -17081,7 +13494,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary *)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeChangeIndicationID) params:params]; @@ -17090,7 +13503,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary *)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeInPlaceIndicatorID) params:params]; @@ -17099,7 +13512,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary *)readAttributeLastChangedTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeLastChangedTimeID) params:params]; @@ -17116,7 +13529,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeLastChangedTimeID) value:dataValueDictionary @@ -17127,7 +13540,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeReplacementProductListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeReplacementProductListID) params:params]; @@ -17136,7 +13549,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeGeneratedCommandListID) params:params]; @@ -17145,7 +13558,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAcceptedCommandListID) params:params]; @@ -17153,7 +13566,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeEventListID) params:params]; @@ -17162,7 +13575,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAttributeListID) params:params]; @@ -17170,7 +13583,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeFeatureMapID) params:params]; @@ -17179,7 +13592,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeClusterRevisionID) params:params]; @@ -17191,12 +13604,11 @@ @implementation MTRClusterDoorLock - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -17208,61 +13620,25 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandLockDoorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::LockDoor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster lockDoorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17284,61 +13660,25 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnlockDoorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::UnlockDoor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster unlockDoorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17360,60 +13700,25 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnlockWithTimeoutID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::UnlockWithTimeout::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.timeout = params.timeout.unsignedShortValue; - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster unlockWithTimeoutWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17435,60 +13740,25 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetWeekDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetWeekDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - request.daysMask - = static_cast>(params.daysMask.unsignedCharValue); - request.startHour = params.startHour.unsignedCharValue; - request.startMinute = params.startMinute.unsignedCharValue; - request.endHour = params.endHour.unsignedCharValue; - request.endMinute = params.endMinute.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17511,55 +13781,26 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetWeekDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetWeekDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetWeekDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getWeekDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17581,54 +13822,25 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearWeekDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearWeekDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17650,56 +13862,25 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetYearDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetYearDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - request.localStartTime = params.localStartTime.unsignedIntValue; - request.localEndTime = params.localEndTime.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setYearDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17722,55 +13903,26 @@ - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetYearDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetYearDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetYearDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getYearDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17792,54 +13944,25 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearYearDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearYearDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearYearDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17861,57 +13984,25 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetHolidayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetHolidaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - request.localStartTime = params.localStartTime.unsignedIntValue; - request.localEndTime = params.localEndTime.unsignedIntValue; - request.operatingMode - = static_cast>(params.operatingMode.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setHolidayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17934,54 +14025,26 @@ - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetHolidayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetHolidayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetHolidaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getHolidayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18003,53 +14066,25 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearHolidayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearHolidaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearHolidayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18071,91 +14106,25 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetUserID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetUser::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.operationType - = static_cast>(params.operationType.unsignedCharValue); - request.userIndex = params.userIndex.unsignedShortValue; - if (params.userName == nil) { - request.userName.SetNull(); - } else { - auto & nonNullValue_0 = request.userName.SetNonNull(); - nonNullValue_0 = [self asCharSpan:params.userName]; - } - if (params.userUniqueID == nil) { - request.userUniqueID.SetNull(); - } else { - auto & nonNullValue_0 = request.userUniqueID.SetNonNull(); - nonNullValue_0 = params.userUniqueID.unsignedIntValue; - } - if (params.userStatus == nil) { - request.userStatus.SetNull(); - } else { - auto & nonNullValue_0 = request.userStatus.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userStatus.unsignedCharValue); - } - if (params.userType == nil) { - request.userType.SetNull(); - } else { - auto & nonNullValue_0 = request.userType.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userType.unsignedCharValue); - } - if (params.credentialRule == nil) { - request.credentialRule.SetNull(); - } else { - auto & nonNullValue_0 = request.credentialRule.SetNonNull(); - nonNullValue_0 - = static_cast>(params.credentialRule.unsignedCharValue); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setUserWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18177,53 +14146,25 @@ - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetUserID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetUserResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetUserResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetUser::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18245,56 +14186,25 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearUserID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearUser::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearUserWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18317,83 +14227,26 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetCredentialID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterSetCredentialResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterSetCredentialResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetCredential::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.operationType - = static_cast>(params.operationType.unsignedCharValue); - request.credential.credentialType - = static_cast>( - params.credential.credentialType.unsignedCharValue); - request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - request.credentialData = [self asByteSpan:params.credentialData]; - if (params.userIndex == nil) { - request.userIndex.SetNull(); - } else { - auto & nonNullValue_0 = request.userIndex.SetNonNull(); - nonNullValue_0 = params.userIndex.unsignedShortValue; - } - if (params.userStatus == nil) { - request.userStatus.SetNull(); - } else { - auto & nonNullValue_0 = request.userStatus.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userStatus.unsignedCharValue); - } - if (params.userType == nil) { - request.userType.SetNull(); - } else { - auto & nonNullValue_0 = request.userType.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userType.unsignedCharValue); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + setCredentialWithParams:params + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18416,57 +14269,26 @@ - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusPara NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetCredentialStatusID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetCredentialStatusResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetCredentialStatus::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.credential.credentialType - = static_cast>( - params.credential.credentialType.unsignedCharValue); - request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18488,63 +14310,25 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearCredentialID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearCredential::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params.credential == nil) { - request.credential.SetNull(); - } else { - auto & nonNullValue_0 = request.credential.SetNonNull(); - nonNullValue_0.credentialType = static_cast>( - params.credential.credentialType.unsignedCharValue); - nonNullValue_0.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearCredentialWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18566,61 +14350,25 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnboltDoorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::UnboltDoor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster unboltDoorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18638,7 +14386,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par - (NSDictionary *)readAttributeLockStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockStateID) params:params]; @@ -18646,7 +14394,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par - (NSDictionary *)readAttributeLockTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockTypeID) params:params]; @@ -18654,7 +14402,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par - (NSDictionary *)readAttributeActuatorEnabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeActuatorEnabledID) params:params]; @@ -18662,7 +14410,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par - (NSDictionary *)readAttributeDoorStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorStateID) params:params]; @@ -18670,7 +14418,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par - (NSDictionary *)readAttributeDoorOpenEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) params:params]; @@ -18687,7 +14435,7 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) value:dataValueDictionary @@ -18697,7 +14445,7 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeDoorClosedEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) params:params]; @@ -18714,7 +14462,7 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) value:dataValueDictionary @@ -18724,7 +14472,7 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *) - (NSDictionary *)readAttributeOpenPeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) params:params]; @@ -18741,7 +14489,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) value:dataValueDictionary @@ -18751,7 +14499,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfTotalUsersSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfTotalUsersSupportedID) params:params]; @@ -18759,7 +14507,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfPINUsersSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfPINUsersSupportedID) params:params]; @@ -18767,7 +14515,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfRFIDUsersSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfRFIDUsersSupportedID) params:params]; @@ -18776,7 +14524,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfWeekDaySchedulesSupportedPerUserID) params:params]; @@ -18785,7 +14533,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfYearDaySchedulesSupportedPerUserID) params:params]; @@ -18793,7 +14541,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfHolidaySchedulesSupportedID) params:params]; @@ -18801,7 +14549,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeMaxPINCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxPINCodeLengthID) params:params]; @@ -18809,7 +14557,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeMinPINCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinPINCodeLengthID) params:params]; @@ -18817,7 +14565,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeMaxRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxRFIDCodeLengthID) params:params]; @@ -18825,7 +14573,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeMinRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinRFIDCodeLengthID) params:params]; @@ -18833,7 +14581,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeCredentialRulesSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeCredentialRulesSupportID) params:params]; @@ -18842,7 +14590,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfCredentialsSupportedPerUserID) params:params]; @@ -18850,7 +14598,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeLanguageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) params:params]; @@ -18867,7 +14615,7 @@ - (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) value:dataValueDictionary @@ -18877,7 +14625,7 @@ - (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeLEDSettingsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) params:params]; @@ -18894,7 +14642,7 @@ - (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) value:dataValueDictionary @@ -18904,7 +14652,7 @@ - (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAutoRelockTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) params:params]; @@ -18921,7 +14669,7 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) value:dataValueDictionary @@ -18931,7 +14679,7 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeSoundVolumeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSoundVolumeID) params:params]; @@ -18948,7 +14696,7 @@ - (void)writeAttributeSoundVolumeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSoundVolumeID) value:dataValueDictionary @@ -18958,7 +14706,7 @@ - (void)writeAttributeSoundVolumeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOperatingModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOperatingModeID) params:params]; @@ -18975,7 +14723,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOperatingModeID) value:dataValueDictionary @@ -18985,7 +14733,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeSupportedOperatingModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSupportedOperatingModesID) params:params]; @@ -18993,7 +14741,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeDefaultConfigurationRegisterWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDefaultConfigurationRegisterID) params:params]; @@ -19001,7 +14749,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeEnableLocalProgrammingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableLocalProgrammingID) params:params]; @@ -19020,7 +14768,7 @@ - (void)writeAttributeEnableLocalProgrammingWithValue:(NSDictionary *)readAttributeEnableOneTouchLockingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableOneTouchLockingID) params:params]; @@ -19049,7 +14797,7 @@ - (void)writeAttributeEnableOneTouchLockingWithValue:(NSDictionary *)readAttributeEnableInsideStatusLEDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableInsideStatusLEDID) params:params]; @@ -19078,7 +14826,7 @@ - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSDictionary *)readAttributeEnablePrivacyModeButtonWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnablePrivacyModeButtonID) params:params]; @@ -19107,7 +14855,7 @@ - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSDictionary *)readAttributeLocalProgrammingFeaturesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLocalProgrammingFeaturesID) params:params]; @@ -19136,7 +14884,7 @@ - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSDictionary *)readAttributeWrongCodeEntryLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeWrongCodeEntryLimitID) params:params]; @@ -19163,7 +14911,7 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeWrongCodeEntryLimitID) value:dataValueDictionary @@ -19173,7 +14921,7 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSDictionary - (NSDictionary *)readAttributeUserCodeTemporaryDisableTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeUserCodeTemporaryDisableTimeID) params:params]; @@ -19192,7 +14940,7 @@ - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSDictionary *)readAttributeSendPINOverTheAirWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSendPINOverTheAirID) params:params]; @@ -19219,7 +14967,7 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSendPINOverTheAirID) value:dataValueDictionary @@ -19229,7 +14977,7 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSDictionary * - (NSDictionary *)readAttributeRequirePINforRemoteOperationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeRequirePINforRemoteOperationID) params:params]; @@ -19248,7 +14996,7 @@ - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSDictionary *)readAttributeExpiringUserTimeoutWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeExpiringUserTimeoutID) params:params]; @@ -19275,7 +15023,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeExpiringUserTimeoutID) value:dataValueDictionary @@ -19285,7 +15033,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeGeneratedCommandListID) params:params]; @@ -19293,7 +15041,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAcceptedCommandListID) params:params]; @@ -19301,7 +15049,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEventListID) params:params]; @@ -19309,7 +15057,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAttributeListID) params:params]; @@ -19317,7 +15065,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeFeatureMapID) params:params]; @@ -19325,7 +15073,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeClusterRevisionID) params:params]; @@ -19554,12 +15302,11 @@ @implementation MTRClusterWindowCovering - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -19577,52 +15324,25 @@ - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandUpOrOpenID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::UpOrOpen::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster upOrOpenWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -19653,52 +15373,25 @@ - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Null completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandDownOrCloseID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::DownOrClose::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster downOrCloseWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -19729,52 +15422,25 @@ - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullab completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandStopMotionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::StopMotion::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopMotionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -19796,53 +15462,25 @@ - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToLiftValueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToLiftValue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.liftValue = params.liftValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster goToLiftValueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -19864,53 +15502,25 @@ - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentage completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToLiftPercentageID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToLiftPercentage::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.liftPercent100thsValue = params.liftPercent100thsValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster goToLiftPercentageWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -19932,53 +15542,25 @@ - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToTiltValueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToTiltValue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.tiltValue = params.tiltValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster goToTiltValueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -20000,53 +15582,25 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToTiltPercentageID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToTiltPercentage::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.tiltPercent100thsValue = params.tiltPercent100thsValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster goToTiltPercentageWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -20064,7 +15618,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTypeID) params:params]; @@ -20072,7 +15626,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributePhysicalClosedLimitLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributePhysicalClosedLimitLiftID) params:params]; @@ -20080,7 +15634,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributePhysicalClosedLimitTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributePhysicalClosedLimitTiltID) params:params]; @@ -20088,7 +15642,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftID) params:params]; @@ -20096,7 +15650,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltID) params:params]; @@ -20104,7 +15658,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeNumberOfActuationsLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeNumberOfActuationsLiftID) params:params]; @@ -20112,7 +15666,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeNumberOfActuationsTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeNumberOfActuationsTiltID) params:params]; @@ -20120,7 +15674,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeConfigStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeConfigStatusID) params:params]; @@ -20129,7 +15683,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionLiftPercentageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftPercentageID) params:params]; @@ -20138,7 +15692,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionTiltPercentageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltPercentageID) params:params]; @@ -20146,7 +15700,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeOperationalStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeOperationalStatusID) params:params]; @@ -20155,7 +15709,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeTargetPositionLiftPercent100thsWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTargetPositionLiftPercent100thsID) params:params]; @@ -20164,7 +15718,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeTargetPositionTiltPercent100thsWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTargetPositionTiltPercent100thsID) params:params]; @@ -20172,7 +15726,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeEndProductTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeEndProductTypeID) params:params]; @@ -20181,7 +15735,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionLiftPercent100thsWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftPercent100thsID) params:params]; @@ -20190,7 +15744,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionTiltPercent100thsWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltPercent100thsID) params:params]; @@ -20198,7 +15752,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeInstalledOpenLimitLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledOpenLimitLiftID) params:params]; @@ -20206,7 +15760,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeInstalledClosedLimitLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledClosedLimitLiftID) params:params]; @@ -20214,7 +15768,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeInstalledOpenLimitTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledOpenLimitTiltID) params:params]; @@ -20222,7 +15776,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeInstalledClosedLimitTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledClosedLimitTiltID) params:params]; @@ -20230,7 +15784,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeModeID) params:params]; @@ -20247,7 +15801,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeModeID) value:dataValueDictionary @@ -20257,7 +15811,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeSafetyStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeSafetyStatusID) params:params]; @@ -20265,7 +15819,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeGeneratedCommandListID) params:params]; @@ -20273,7 +15827,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeAcceptedCommandListID) params:params]; @@ -20281,7 +15835,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeEventListID) params:params]; @@ -20289,7 +15843,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeAttributeListID) params:params]; @@ -20297,7 +15851,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeFeatureMapID) params:params]; @@ -20305,7 +15859,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeClusterRevisionID) params:params]; @@ -20423,12 +15977,11 @@ @implementation MTRClusterBarrierControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -20440,53 +15993,25 @@ - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierCont completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeBarrierControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeBarrierControlID, (unsigned int) MTRCommandIDTypeClusterBarrierControlCommandBarrierControlGoToPercentID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - BarrierControl::Commands::BarrierControlGoToPercent::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.percentOpen = params.percentOpen.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster barrierControlGoToPercentWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -20517,52 +16042,25 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeBarrierControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeBarrierControlID, (unsigned int) MTRCommandIDTypeClusterBarrierControlCommandBarrierControlStopID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - BarrierControl::Commands::BarrierControlStop::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster barrierControlStopWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -20580,7 +16078,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop - (NSDictionary *)readAttributeBarrierMovingStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID) params:params]; @@ -20588,7 +16086,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop - (NSDictionary *)readAttributeBarrierSafetyStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID) params:params]; @@ -20596,7 +16094,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop - (NSDictionary *)readAttributeBarrierCapabilitiesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID) params:params]; @@ -20604,7 +16102,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop - (NSDictionary *)readAttributeBarrierOpenEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) params:params]; @@ -20621,7 +16119,7 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) value:dataValueDictionary @@ -20631,7 +16129,7 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary * - (NSDictionary *)readAttributeBarrierCloseEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) params:params]; @@ -20648,7 +16146,7 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) value:dataValueDictionary @@ -20658,7 +16156,7 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary - (NSDictionary *)readAttributeBarrierCommandOpenEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID) params:params]; @@ -20677,7 +16175,7 @@ - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSDictionary *)readAttributeBarrierCommandCloseEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID) params:params]; @@ -20706,7 +16204,7 @@ - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSDictionary *)readAttributeBarrierOpenPeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) params:params]; @@ -20733,7 +16231,7 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) value:dataValueDictionary @@ -20743,7 +16241,7 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary * - (NSDictionary *)readAttributeBarrierClosePeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) params:params]; @@ -20760,7 +16258,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) value:dataValueDictionary @@ -20770,7 +16268,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeBarrierPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID) params:params]; @@ -20778,7 +16276,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID) params:params]; @@ -20786,7 +16284,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID) params:params]; @@ -20794,7 +16292,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeEventListID) params:params]; @@ -20802,7 +16300,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID) params:params]; @@ -20810,7 +16308,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID) params:params]; @@ -20818,7 +16316,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID) params:params]; @@ -20868,12 +16366,11 @@ @implementation MTRClusterPumpConfigurationAndControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -20881,7 +16378,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxPressureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxPressureID) params:params]; @@ -20889,7 +16386,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxSpeedID) params:params]; @@ -20897,7 +16394,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxFlowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxFlowID) params:params]; @@ -20906,7 +16403,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinConstPressureWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstPressureID) params:params]; @@ -20915,7 +16412,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxConstPressureWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstPressureID) params:params]; @@ -20924,7 +16421,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinCompPressureWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinCompPressureID) params:params]; @@ -20933,7 +16430,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxCompPressureWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxCompPressureID) params:params]; @@ -20941,7 +16438,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinConstSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstSpeedID) params:params]; @@ -20949,7 +16446,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxConstSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstSpeedID) params:params]; @@ -20957,7 +16454,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinConstFlowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstFlowID) params:params]; @@ -20965,7 +16462,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxConstFlowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstFlowID) params:params]; @@ -20973,7 +16470,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinConstTempWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstTempID) params:params]; @@ -20981,7 +16478,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxConstTempWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstTempID) params:params]; @@ -20989,7 +16486,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePumpStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePumpStatusID) params:params]; @@ -20998,7 +16495,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEffectiveOperationModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveOperationModeID) params:params]; @@ -21007,7 +16504,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEffectiveControlModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveControlModeID) params:params]; @@ -21015,7 +16512,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeCapacityID) params:params]; @@ -21023,7 +16520,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeSpeedID) params:params]; @@ -21032,7 +16529,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLifetimeRunningHoursWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeLifetimeRunningHoursID) params:params]; @@ -21049,7 +16546,7 @@ - (void)writeAttributeLifetimeRunningHoursWithValue:(NSDictionary *)readAttributePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePowerID) params:params]; @@ -21068,7 +16565,7 @@ - (void)writeAttributeLifetimeRunningHoursWithValue:(NSDictionary *)readAttributeLifetimeEnergyConsumedWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeLifetimeEnergyConsumedID) params:params]; @@ -21088,7 +16585,7 @@ - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSDictionary *)readAttributeOperationModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeOperationModeID) params:params]; @@ -21115,7 +16612,7 @@ - (void)writeAttributeOperationModeWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeOperationModeID) value:dataValueDictionary @@ -21125,7 +16622,7 @@ - (void)writeAttributeOperationModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeControlModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeControlModeID) params:params]; @@ -21142,7 +16639,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeControlModeID) value:dataValueDictionary @@ -21153,7 +16650,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeGeneratedCommandListID) params:params]; @@ -21162,7 +16659,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAcceptedCommandListID) params:params]; @@ -21170,7 +16667,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEventListID) params:params]; @@ -21178,7 +16675,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAttributeListID) params:params]; @@ -21186,7 +16683,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeFeatureMapID) params:params]; @@ -21195,7 +16692,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeClusterRevisionID) params:params]; @@ -21216,12 +16713,11 @@ @implementation MTRClusterThermostat - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -21233,54 +16729,25 @@ - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerPara completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeThermostatID, + self.endpoint, (unsigned int) MTRClusterIDTypeThermostatID, (unsigned int) MTRCommandIDTypeClusterThermostatCommandSetpointRaiseLowerID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::SetpointRaiseLower::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.mode = static_cast>(params.mode.unsignedCharValue); - request.amount = params.amount.charValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setpointRaiseLowerWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -21302,91 +16769,25 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeThermostatID, + self.endpoint, (unsigned int) MTRClusterIDTypeThermostatID, (unsigned int) MTRCommandIDTypeClusterThermostatCommandSetWeeklyScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::SetWeeklySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.numberOfTransitionsForSequence = params.numberOfTransitionsForSequence.unsignedCharValue; - request.dayOfWeekForSequence = static_cast>( - params.dayOfWeekForSequence.unsignedCharValue); - request.modeForSequence = static_cast>( - params.modeForSequence.unsignedCharValue); - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.transitions.count != 0) { - auto * listHolder_0 = new ListHolder(params.transitions.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.transitions.count; ++i_0) { - if (![params.transitions[i_0] isKindOfClass:[MTRThermostatClusterThermostatScheduleTransition class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRThermostatClusterThermostatScheduleTransition *) params.transitions[i_0]; - listHolder_0->mList[i_0].transitionTime = element_0.transitionTime.unsignedShortValue; - if (element_0.heatSetpoint == nil) { - listHolder_0->mList[i_0].heatSetpoint.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].heatSetpoint.SetNonNull(); - nonNullValue_2 = element_0.heatSetpoint.shortValue; - } - if (element_0.coolSetpoint == nil) { - listHolder_0->mList[i_0].coolSetpoint.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].coolSetpoint.SetNonNull(); - nonNullValue_2 = element_0.coolSetpoint.shortValue; - } - } - request.transitions = ListType_0(listHolder_0->mList, params.transitions.count); - } else { - request.transitions = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setWeeklyScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -21409,57 +16810,26 @@ - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeThermostatID, + self.endpoint, (unsigned int) MTRClusterIDTypeThermostatID, (unsigned int) MTRCommandIDTypeClusterThermostatCommandGetWeeklyScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatClusterGetWeeklyScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::GetWeeklySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.daysToReturn - = static_cast>(params.daysToReturn.unsignedCharValue); - request.modeToReturn - = static_cast>(params.modeToReturn.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getWeeklyScheduleWithParams:params + completion:^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -21490,52 +16860,25 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeThermostatID, + self.endpoint, (unsigned int) MTRClusterIDTypeThermostatID, (unsigned int) MTRCommandIDTypeClusterThermostatCommandClearWeeklyScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::ClearWeeklySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearWeeklyScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -21553,7 +16896,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeLocalTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureID) params:params]; @@ -21561,7 +16904,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeOutdoorTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOutdoorTemperatureID) params:params]; @@ -21569,7 +16912,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupancyID) params:params]; @@ -21577,7 +16920,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeAbsMinHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMinHeatSetpointLimitID) params:params]; @@ -21585,7 +16928,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeAbsMaxHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMaxHeatSetpointLimitID) params:params]; @@ -21593,7 +16936,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeAbsMinCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMinCoolSetpointLimitID) params:params]; @@ -21601,7 +16944,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeAbsMaxCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMaxCoolSetpointLimitID) params:params]; @@ -21609,7 +16952,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributePICoolingDemandWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePICoolingDemandID) params:params]; @@ -21617,7 +16960,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributePIHeatingDemandWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePIHeatingDemandID) params:params]; @@ -21625,7 +16968,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeHVACSystemTypeConfigurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeHVACSystemTypeConfigurationID) params:params]; @@ -21644,7 +16987,7 @@ - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSDictionary *)readAttributeLocalTemperatureCalibrationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureCalibrationID) params:params]; @@ -21673,7 +17016,7 @@ - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSDictionary *)readAttributeOccupiedCoolingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedCoolingSetpointID) params:params]; @@ -21702,7 +17045,7 @@ - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSDictionary *)readAttributeOccupiedHeatingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedHeatingSetpointID) params:params]; @@ -21731,7 +17074,7 @@ - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSDictionary *)readAttributeUnoccupiedCoolingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedCoolingSetpointID) params:params]; @@ -21760,7 +17103,7 @@ - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSDictionary *)readAttributeUnoccupiedHeatingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedHeatingSetpointID) params:params]; @@ -21789,7 +17132,7 @@ - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSDictionary *)readAttributeMinHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinHeatSetpointLimitID) params:params]; @@ -21816,7 +17159,7 @@ - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSDictionary *)readAttributeMaxHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMaxHeatSetpointLimitID) params:params]; @@ -21843,7 +17186,7 @@ - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSDictionary *)readAttributeMinCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinCoolSetpointLimitID) params:params]; @@ -21870,7 +17213,7 @@ - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSDictionary *)readAttributeMaxCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMaxCoolSetpointLimitID) params:params]; @@ -21897,7 +17240,7 @@ - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSDictionary *)readAttributeMinSetpointDeadBandWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinSetpointDeadBandID) params:params]; @@ -21924,7 +17267,7 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinSetpointDeadBandID) value:dataValueDictionary @@ -21934,7 +17277,7 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSDictionary - (NSDictionary *)readAttributeRemoteSensingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeRemoteSensingID) params:params]; @@ -21951,7 +17294,7 @@ - (void)writeAttributeRemoteSensingWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeRemoteSensingID) value:dataValueDictionary @@ -21961,7 +17304,7 @@ - (void)writeAttributeRemoteSensingWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeControlSequenceOfOperationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeControlSequenceOfOperationID) params:params]; @@ -21980,7 +17323,7 @@ - (void)writeAttributeControlSequenceOfOperationWithValue:(NSDictionary *)readAttributeSystemModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSystemModeID) params:params]; @@ -22007,7 +17350,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSystemModeID) value:dataValueDictionary @@ -22017,7 +17360,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeThermostatRunningModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatRunningModeID) params:params]; @@ -22025,7 +17368,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeStartOfWeekWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeStartOfWeekID) params:params]; @@ -22033,7 +17376,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfWeeklyTransitionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfWeeklyTransitionsID) params:params]; @@ -22041,7 +17384,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfDailyTransitionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfDailyTransitionsID) params:params]; @@ -22049,7 +17392,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeTemperatureSetpointHoldWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldID) params:params]; @@ -22068,7 +17411,7 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSDictionary *)readAttributeTemperatureSetpointHoldDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldDurationID) params:params]; @@ -22097,7 +17440,7 @@ - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSDictionary *)readAttributeThermostatProgrammingOperationModeWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatProgrammingOperationModeID) params:params]; @@ -22127,7 +17470,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatProgrammingOperationModeID) value:dataValueDictionary @@ -22137,7 +17480,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeThermostatRunningStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatRunningStateID) params:params]; @@ -22145,7 +17488,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeSetpointChangeSourceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeSourceID) params:params]; @@ -22153,7 +17496,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeSetpointChangeAmountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeAmountID) params:params]; @@ -22161,7 +17504,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeSetpointChangeSourceTimestampWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeSourceTimestampID) params:params]; @@ -22169,7 +17512,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeOccupiedSetbackWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackID) params:params]; @@ -22186,7 +17529,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackID) value:dataValueDictionary @@ -22196,7 +17539,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeOccupiedSetbackMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackMinID) params:params]; @@ -22204,7 +17547,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeOccupiedSetbackMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackMaxID) params:params]; @@ -22212,7 +17555,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeUnoccupiedSetbackWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackID) params:params]; @@ -22229,7 +17572,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackID) value:dataValueDictionary @@ -22239,7 +17582,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary * - (NSDictionary *)readAttributeUnoccupiedSetbackMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackMinID) params:params]; @@ -22247,7 +17590,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary * - (NSDictionary *)readAttributeUnoccupiedSetbackMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackMaxID) params:params]; @@ -22255,7 +17598,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary * - (NSDictionary *)readAttributeEmergencyHeatDeltaWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEmergencyHeatDeltaID) params:params]; @@ -22272,7 +17615,7 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEmergencyHeatDeltaID) value:dataValueDictionary @@ -22282,7 +17625,7 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSDictionary - (NSDictionary *)readAttributeACTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACTypeID) params:params]; @@ -22299,7 +17642,7 @@ - (void)writeAttributeACTypeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACTypeID) value:dataValueDictionary @@ -22309,7 +17652,7 @@ - (void)writeAttributeACTypeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeACCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityID) params:params]; @@ -22326,7 +17669,7 @@ - (void)writeAttributeACCapacityWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityID) value:dataValueDictionary @@ -22336,7 +17679,7 @@ - (void)writeAttributeACCapacityWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeACRefrigerantTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACRefrigerantTypeID) params:params]; @@ -22353,7 +17696,7 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACRefrigerantTypeID) value:dataValueDictionary @@ -22363,7 +17706,7 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSDictionary * - (NSDictionary *)readAttributeACCompressorTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCompressorTypeID) params:params]; @@ -22380,7 +17723,7 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCompressorTypeID) value:dataValueDictionary @@ -22390,7 +17733,7 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSDictionary *) - (NSDictionary *)readAttributeACErrorCodeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACErrorCodeID) params:params]; @@ -22407,7 +17750,7 @@ - (void)writeAttributeACErrorCodeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACErrorCodeID) value:dataValueDictionary @@ -22417,7 +17760,7 @@ - (void)writeAttributeACErrorCodeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeACLouverPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACLouverPositionID) params:params]; @@ -22434,7 +17777,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACLouverPositionID) value:dataValueDictionary @@ -22444,7 +17787,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeACCoilTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCoilTemperatureID) params:params]; @@ -22452,7 +17795,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeACCapacityformatWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityformatID) params:params]; @@ -22469,7 +17812,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityformatID) value:dataValueDictionary @@ -22479,7 +17822,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeGeneratedCommandListID) params:params]; @@ -22487,7 +17830,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAcceptedCommandListID) params:params]; @@ -22495,7 +17838,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEventListID) params:params]; @@ -22503,7 +17846,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAttributeListID) params:params]; @@ -22511,7 +17854,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeFeatureMapID) params:params]; @@ -22519,7 +17862,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeClusterRevisionID) params:params]; @@ -22594,12 +17937,11 @@ @implementation MTRClusterFanControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -22611,62 +17953,25 @@ - (void)stepWithParams:(MTRFanControlClusterStepParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeFanControlID, (unsigned int) MTRCommandIDTypeClusterFanControlCommandStepID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - FanControl::Commands::Step::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.direction - = static_cast>(params.direction.unsignedCharValue); - if (params.wrap != nil) { - auto & definedValue_0 = request.wrap.Emplace(); - definedValue_0 = params.wrap.boolValue; - } - if (params.lowestOff != nil) { - auto & definedValue_0 = request.lowestOff.Emplace(); - definedValue_0 = params.lowestOff.boolValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -22684,7 +17989,7 @@ - (void)stepWithParams:(MTRFanControlClusterStepParams *)params - (NSDictionary *)readAttributeFanModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeID) params:params]; @@ -22701,7 +18006,7 @@ - (void)writeAttributeFanModeWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeID) value:dataValueDictionary @@ -22711,7 +18016,7 @@ - (void)writeAttributeFanModeWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeFanModeSequenceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeSequenceID) params:params]; @@ -22728,7 +18033,7 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeSequenceID) value:dataValueDictionary @@ -22738,7 +18043,7 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSDictionary *)d - (NSDictionary *)readAttributePercentSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentSettingID) params:params]; @@ -22755,7 +18060,7 @@ - (void)writeAttributePercentSettingWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentSettingID) value:dataValueDictionary @@ -22765,7 +18070,7 @@ - (void)writeAttributePercentSettingWithValue:(NSDictionary *)da - (NSDictionary *)readAttributePercentCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentCurrentID) params:params]; @@ -22773,7 +18078,7 @@ - (void)writeAttributePercentSettingWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeSpeedMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedMaxID) params:params]; @@ -22781,7 +18086,7 @@ - (void)writeAttributePercentSettingWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeSpeedSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedSettingID) params:params]; @@ -22798,7 +18103,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedSettingID) value:dataValueDictionary @@ -22808,7 +18113,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeSpeedCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedCurrentID) params:params]; @@ -22816,7 +18121,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeRockSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSupportID) params:params]; @@ -22824,7 +18129,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeRockSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSettingID) params:params]; @@ -22841,7 +18146,7 @@ - (void)writeAttributeRockSettingWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSettingID) value:dataValueDictionary @@ -22851,7 +18156,7 @@ - (void)writeAttributeRockSettingWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeWindSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSupportID) params:params]; @@ -22859,7 +18164,7 @@ - (void)writeAttributeRockSettingWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeWindSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSettingID) params:params]; @@ -22876,7 +18181,7 @@ - (void)writeAttributeWindSettingWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSettingID) value:dataValueDictionary @@ -22886,7 +18191,7 @@ - (void)writeAttributeWindSettingWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAirflowDirectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAirflowDirectionID) params:params]; @@ -22903,7 +18208,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAirflowDirectionID) value:dataValueDictionary @@ -22913,7 +18218,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeGeneratedCommandListID) params:params]; @@ -22921,7 +18226,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAcceptedCommandListID) params:params]; @@ -22929,7 +18234,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeEventListID) params:params]; @@ -22937,7 +18242,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAttributeListID) params:params]; @@ -22945,7 +18250,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFeatureMapID) params:params]; @@ -22953,7 +18258,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeClusterRevisionID) params:params]; @@ -22974,12 +18279,11 @@ @implementation MTRClusterThermostatUserInterfaceConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -22988,7 +18292,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeTemperatureDisplayModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID: @(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeTemperatureDisplayModeID) @@ -23009,7 +18313,7 @@ - (void)writeAttributeTemperatureDisplayModeWithValue:(NSDictionary *)readAttributeKeypadLockoutWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID) params:params]; @@ -23039,7 +18343,7 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSDictionary *)dat NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID) value:dataValueDictionary @@ -23050,7 +18354,7 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeScheduleProgrammingVisibilityWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID: @(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeScheduleProgrammingVisibilityID) @@ -23071,7 +18375,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeGeneratedCommandListID) params:params]; @@ -23092,7 +18396,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAcceptedCommandListID) params:params]; @@ -23101,7 +18405,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeEventListID) params:params]; @@ -23110,7 +18414,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAttributeListID) params:params]; @@ -23119,7 +18423,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeFeatureMapID) params:params]; @@ -23128,7 +18432,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeClusterRevisionID) params:params]; @@ -23149,12 +18453,11 @@ @implementation MTRClusterColorControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -23166,58 +18469,25 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.hue = params.hue.unsignedCharValue; - request.direction - = static_cast>(params.direction.unsignedCharValue); - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23239,57 +18509,25 @@ - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23311,58 +18549,25 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23384,56 +18589,25 @@ - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToSaturationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToSaturationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23455,57 +18629,25 @@ - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveSaturationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveSaturationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23527,58 +18669,25 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepSaturationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepSaturationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23600,57 +18709,25 @@ - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSatu completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToHueAndSaturationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToHueAndSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.hue = params.hue.unsignedCharValue; - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToHueAndSaturationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23672,57 +18749,25 @@ - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToColorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToColor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.colorX = params.colorX.unsignedShortValue; - request.colorY = params.colorY.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToColorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23744,56 +18789,25 @@ - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveColorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveColor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.rateX = params.rateX.shortValue; - request.rateY = params.rateY.shortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveColorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23815,57 +18829,25 @@ - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepColorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepColor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepX = params.stepX.shortValue; - request.stepY = params.stepY.shortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepColorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23887,56 +18869,25 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToColorTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToColorTemperature::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.colorTemperatureMireds = params.colorTemperatureMireds.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToColorTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23958,58 +18909,25 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedMoveToHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveToHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.enhancedHue = params.enhancedHue.unsignedShortValue; - request.direction - = static_cast>(params.direction.unsignedCharValue); - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedMoveToHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24031,57 +18949,25 @@ - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams * completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedMoveHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedMoveHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24103,58 +18989,25 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedStepHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedStepHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedStepHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24176,57 +19029,25 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedMoveToHueAndSaturationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.enhancedHue = params.enhancedHue.unsignedShortValue; - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedMoveToHueAndSaturationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24248,61 +19069,25 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandColorLoopSetID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::ColorLoopSet::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.updateFlags - = static_cast>(params.updateFlags.unsignedCharValue); - request.action = static_cast>(params.action.unsignedCharValue); - request.direction - = static_cast>(params.direction.unsignedCharValue); - request.time = params.time.unsignedShortValue; - request.startHue = params.startHue.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster colorLoopSetWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24324,54 +19109,25 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandStopMoveStepID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StopMoveStep::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopMoveStepWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24393,59 +19149,25 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveColorTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveColorTemperature::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedShortValue; - request.colorTemperatureMinimumMireds = params.colorTemperatureMinimumMireds.unsignedShortValue; - request.colorTemperatureMaximumMireds = params.colorTemperatureMaximumMireds.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveColorTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24467,60 +19189,25 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepColorTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepColorTemperature::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.colorTemperatureMinimumMireds = params.colorTemperatureMinimumMireds.unsignedShortValue; - request.colorTemperatureMaximumMireds = params.colorTemperatureMaximumMireds.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepColorTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24538,7 +19225,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeCurrentHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentHueID) params:params]; @@ -24546,7 +19233,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeCurrentSaturationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentSaturationID) params:params]; @@ -24554,7 +19241,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeRemainingTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeRemainingTimeID) params:params]; @@ -24562,7 +19249,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeCurrentXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentXID) params:params]; @@ -24570,7 +19257,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeCurrentYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentYID) params:params]; @@ -24578,7 +19265,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeDriftCompensationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeDriftCompensationID) params:params]; @@ -24586,7 +19273,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeCompensationTextWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCompensationTextID) params:params]; @@ -24594,7 +19281,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeColorTemperatureMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTemperatureMiredsID) params:params]; @@ -24602,7 +19289,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeColorModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorModeID) params:params]; @@ -24610,7 +19297,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeOptionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) params:params]; @@ -24627,7 +19314,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) value:dataValueDictionary @@ -24637,7 +19324,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeNumberOfPrimariesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeNumberOfPrimariesID) params:params]; @@ -24645,7 +19332,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary1XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1XID) params:params]; @@ -24653,7 +19340,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary1YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1YID) params:params]; @@ -24661,7 +19348,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary1IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1IntensityID) params:params]; @@ -24669,7 +19356,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary2XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2XID) params:params]; @@ -24677,7 +19364,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary2YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2YID) params:params]; @@ -24685,7 +19372,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary2IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2IntensityID) params:params]; @@ -24693,7 +19380,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary3XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3XID) params:params]; @@ -24701,7 +19388,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary3YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3YID) params:params]; @@ -24709,7 +19396,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary3IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3IntensityID) params:params]; @@ -24717,7 +19404,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary4XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4XID) params:params]; @@ -24725,7 +19412,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary4YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4YID) params:params]; @@ -24733,7 +19420,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary4IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4IntensityID) params:params]; @@ -24741,7 +19428,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary5XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5XID) params:params]; @@ -24749,7 +19436,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary5YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5YID) params:params]; @@ -24757,7 +19444,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary5IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5IntensityID) params:params]; @@ -24765,7 +19452,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary6XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6XID) params:params]; @@ -24773,7 +19460,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary6YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6YID) params:params]; @@ -24781,7 +19468,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary6IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6IntensityID) params:params]; @@ -24789,7 +19476,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeWhitePointXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) params:params]; @@ -24806,7 +19493,7 @@ - (void)writeAttributeWhitePointXWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) value:dataValueDictionary @@ -24816,7 +19503,7 @@ - (void)writeAttributeWhitePointXWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeWhitePointYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) params:params]; @@ -24833,7 +19520,7 @@ - (void)writeAttributeWhitePointYWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) value:dataValueDictionary @@ -24843,7 +19530,7 @@ - (void)writeAttributeWhitePointYWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeColorPointRXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) params:params]; @@ -24860,7 +19547,7 @@ - (void)writeAttributeColorPointRXWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) value:dataValueDictionary @@ -24870,7 +19557,7 @@ - (void)writeAttributeColorPointRXWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointRYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) params:params]; @@ -24887,7 +19574,7 @@ - (void)writeAttributeColorPointRYWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) value:dataValueDictionary @@ -24897,7 +19584,7 @@ - (void)writeAttributeColorPointRYWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointRIntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRIntensityID) params:params]; @@ -24914,7 +19601,7 @@ - (void)writeAttributeColorPointRIntensityWithValue:(NSDictionary *)readAttributeColorPointGXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) params:params]; @@ -24941,7 +19628,7 @@ - (void)writeAttributeColorPointGXWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) value:dataValueDictionary @@ -24951,7 +19638,7 @@ - (void)writeAttributeColorPointGXWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointGYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) params:params]; @@ -24968,7 +19655,7 @@ - (void)writeAttributeColorPointGYWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) value:dataValueDictionary @@ -24978,7 +19665,7 @@ - (void)writeAttributeColorPointGYWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointGIntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGIntensityID) params:params]; @@ -24995,7 +19682,7 @@ - (void)writeAttributeColorPointGIntensityWithValue:(NSDictionary *)readAttributeColorPointBXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) params:params]; @@ -25022,7 +19709,7 @@ - (void)writeAttributeColorPointBXWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) value:dataValueDictionary @@ -25032,7 +19719,7 @@ - (void)writeAttributeColorPointBXWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointBYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) params:params]; @@ -25049,7 +19736,7 @@ - (void)writeAttributeColorPointBYWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) value:dataValueDictionary @@ -25059,7 +19746,7 @@ - (void)writeAttributeColorPointBYWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointBIntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBIntensityID) params:params]; @@ -25076,7 +19763,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeEnhancedCurrentHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedCurrentHueID) params:params]; @@ -25094,7 +19781,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeEnhancedColorModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedColorModeID) params:params]; @@ -25102,7 +19789,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorLoopActiveWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopActiveID) params:params]; @@ -25110,7 +19797,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorLoopDirectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopDirectionID) params:params]; @@ -25118,7 +19805,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorLoopTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopTimeID) params:params]; @@ -25126,7 +19813,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorLoopStartEnhancedHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStartEnhancedHueID) params:params]; @@ -25134,7 +19821,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorLoopStoredEnhancedHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStoredEnhancedHueID) params:params]; @@ -25142,7 +19829,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorCapabilitiesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorCapabilitiesID) params:params]; @@ -25150,7 +19837,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorTempPhysicalMinMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMinMiredsID) params:params]; @@ -25158,7 +19845,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorTempPhysicalMaxMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMaxMiredsID) params:params]; @@ -25167,7 +19854,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCoupleColorTempToLevelMinMiredsID) params:params]; @@ -25175,7 +19862,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeStartUpColorTemperatureMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeStartUpColorTemperatureMiredsID) params:params]; @@ -25194,7 +19881,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeGeneratedCommandListID) params:params]; @@ -25212,7 +19899,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAcceptedCommandListID) params:params]; @@ -25220,7 +19907,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEventListID) params:params]; @@ -25228,7 +19915,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAttributeListID) params:params]; @@ -25236,7 +19923,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeFeatureMapID) params:params]; @@ -25244,7 +19931,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeClusterRevisionID) params:params]; @@ -25455,12 +20142,11 @@ @implementation MTRClusterBallastConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -25468,7 +20154,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePhysicalMinLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMinLevelID) params:params]; @@ -25476,7 +20162,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePhysicalMaxLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMaxLevelID) params:params]; @@ -25484,7 +20170,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBallastStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastStatusID) params:params]; @@ -25492,7 +20178,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) params:params]; @@ -25509,7 +20195,7 @@ - (void)writeAttributeMinLevelWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) value:dataValueDictionary @@ -25519,7 +20205,7 @@ - (void)writeAttributeMinLevelWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeMaxLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) params:params]; @@ -25536,7 +20222,7 @@ - (void)writeAttributeMaxLevelWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) value:dataValueDictionary @@ -25547,7 +20233,7 @@ - (void)writeAttributeMaxLevelWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeIntrinsicBallastFactorWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeIntrinsicBallastFactorID) params:params]; @@ -25566,7 +20252,7 @@ - (void)writeAttributeIntrinsicBallastFactorWithValue:(NSDictionary *)readAttributeBallastFactorAdjustmentWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastFactorAdjustmentID) params:params]; @@ -25596,7 +20282,7 @@ - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSDictionary *)readAttributeLampQuantityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampQuantityID) params:params]; @@ -25614,7 +20300,7 @@ - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSDictionary *)readAttributeLampTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) params:params]; @@ -25631,7 +20317,7 @@ - (void)writeAttributeLampTypeWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) value:dataValueDictionary @@ -25641,7 +20327,7 @@ - (void)writeAttributeLampTypeWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeLampManufacturerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) params:params]; @@ -25658,7 +20344,7 @@ - (void)writeAttributeLampManufacturerWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) value:dataValueDictionary @@ -25668,7 +20354,7 @@ - (void)writeAttributeLampManufacturerWithValue:(NSDictionary *) - (NSDictionary *)readAttributeLampRatedHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) params:params]; @@ -25685,7 +20371,7 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) value:dataValueDictionary @@ -25695,7 +20381,7 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeLampBurnHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) params:params]; @@ -25712,7 +20398,7 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) value:dataValueDictionary @@ -25722,7 +20408,7 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeLampAlarmModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) params:params]; @@ -25739,7 +20425,7 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) value:dataValueDictionary @@ -25750,7 +20436,7 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeLampBurnHoursTripPointWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursTripPointID) params:params]; @@ -25769,7 +20455,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeGeneratedCommandListID) params:params]; @@ -25787,7 +20473,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAcceptedCommandListID) params:params]; @@ -25795,7 +20481,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeEventListID) params:params]; @@ -25803,7 +20489,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAttributeListID) params:params]; @@ -25811,7 +20497,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeFeatureMapID) params:params]; @@ -25819,7 +20505,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeClusterRevisionID) params:params]; @@ -25857,12 +20543,11 @@ @implementation MTRClusterIlluminanceMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -25870,7 +20555,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMeasuredValueID) params:params]; @@ -25878,7 +20563,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMinMeasuredValueID) params:params]; @@ -25886,7 +20571,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -25894,7 +20579,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeToleranceID) params:params]; @@ -25902,7 +20587,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLightSensorTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeLightSensorTypeID) params:params]; @@ -25911,7 +20596,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeGeneratedCommandListID) params:params]; @@ -25919,7 +20604,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAcceptedCommandListID) params:params]; @@ -25927,7 +20612,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeEventListID) params:params]; @@ -25935,7 +20620,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAttributeListID) params:params]; @@ -25943,7 +20628,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeFeatureMapID) params:params]; @@ -25951,7 +20636,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeClusterRevisionID) params:params]; @@ -25972,12 +20657,11 @@ @implementation MTRClusterTemperatureMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -25985,7 +20669,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMeasuredValueID) params:params]; @@ -25993,7 +20677,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMinMeasuredValueID) params:params]; @@ -26001,7 +20685,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -26009,7 +20693,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeToleranceID) params:params]; @@ -26018,7 +20702,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeGeneratedCommandListID) params:params]; @@ -26026,7 +20710,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAcceptedCommandListID) params:params]; @@ -26034,7 +20718,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeEventListID) params:params]; @@ -26042,7 +20726,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAttributeListID) params:params]; @@ -26050,7 +20734,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeFeatureMapID) params:params]; @@ -26058,7 +20742,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeClusterRevisionID) params:params]; @@ -26079,12 +20763,11 @@ @implementation MTRClusterPressureMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -26092,7 +20775,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMeasuredValueID) params:params]; @@ -26100,7 +20783,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinMeasuredValueID) params:params]; @@ -26108,7 +20791,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -26116,7 +20799,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeToleranceID) params:params]; @@ -26124,7 +20807,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeScaledValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledValueID) params:params]; @@ -26132,7 +20815,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinScaledValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinScaledValueID) params:params]; @@ -26140,7 +20823,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxScaledValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxScaledValueID) params:params]; @@ -26148,7 +20831,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeScaledToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledToleranceID) params:params]; @@ -26156,7 +20839,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeScaleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaleID) params:params]; @@ -26164,7 +20847,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeGeneratedCommandListID) params:params]; @@ -26172,7 +20855,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAcceptedCommandListID) params:params]; @@ -26180,7 +20863,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeEventListID) params:params]; @@ -26188,7 +20871,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAttributeListID) params:params]; @@ -26196,7 +20879,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeFeatureMapID) params:params]; @@ -26204,7 +20887,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeClusterRevisionID) params:params]; @@ -26225,12 +20908,11 @@ @implementation MTRClusterFlowMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -26238,7 +20920,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMeasuredValueID) params:params]; @@ -26246,7 +20928,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMinMeasuredValueID) params:params]; @@ -26254,7 +20936,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -26262,7 +20944,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeToleranceID) params:params]; @@ -26270,7 +20952,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeGeneratedCommandListID) params:params]; @@ -26278,7 +20960,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAcceptedCommandListID) params:params]; @@ -26286,7 +20968,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeEventListID) params:params]; @@ -26294,7 +20976,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAttributeListID) params:params]; @@ -26302,7 +20984,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeFeatureMapID) params:params]; @@ -26310,7 +20992,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeClusterRevisionID) params:params]; @@ -26331,12 +21013,11 @@ @implementation MTRClusterRelativeHumidityMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -26344,7 +21025,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMeasuredValueID) params:params]; @@ -26353,7 +21034,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMinMeasuredValueID) params:params]; @@ -26362,7 +21043,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -26370,7 +21051,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeToleranceID) params:params]; @@ -26379,7 +21060,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeGeneratedCommandListID) params:params]; @@ -26388,7 +21069,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID) params:params]; @@ -26396,7 +21077,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeEventListID) params:params]; @@ -26404,7 +21085,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID) params:params]; @@ -26412,7 +21093,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeFeatureMapID) params:params]; @@ -26421,7 +21102,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeClusterRevisionID) params:params]; @@ -26442,12 +21123,11 @@ @implementation MTRClusterOccupancySensing - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -26455,7 +21135,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancyID) params:params]; @@ -26463,7 +21143,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeOccupancySensorTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeID) params:params]; @@ -26471,7 +21151,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeOccupancySensorTypeBitmapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeBitmapID) params:params]; @@ -26480,7 +21160,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) params:params]; @@ -26499,7 +21179,7 @@ - (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)readAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID) params:params]; @@ -26529,7 +21209,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)readAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID) params:params]; @@ -26560,7 +21240,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) params:params]; @@ -26591,7 +21271,7 @@ - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) value:dataValueDictionary @@ -26602,7 +21282,7 @@ - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary - (NSDictionary *)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) params:params]; @@ -26622,7 +21302,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) value:dataValueDictionary @@ -26633,7 +21313,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary - (NSDictionary *)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) params:params]; @@ -26653,7 +21333,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictio NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) value:dataValueDictionary @@ -26664,7 +21344,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictio - (NSDictionary *)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) params:params]; @@ -26684,7 +21364,7 @@ - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDicti NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) value:dataValueDictionary @@ -26695,7 +21375,7 @@ - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDicti - (NSDictionary *)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) params:params]; @@ -26715,7 +21395,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDicti NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) value:dataValueDictionary @@ -26727,7 +21407,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDicti (MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID: @(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) @@ -26748,7 +21428,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID: @(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) @@ -26759,7 +21439,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeGeneratedCommandListID) params:params]; @@ -26767,7 +21447,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAcceptedCommandListID) params:params]; @@ -26775,7 +21455,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeEventListID) params:params]; @@ -26783,7 +21463,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID) params:params]; @@ -26791,7 +21471,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeFeatureMapID) params:params]; @@ -26799,7 +21479,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeClusterRevisionID) params:params]; @@ -26872,12 +21552,11 @@ @implementation MTRClusterCarbonMonoxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -26886,7 +21565,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -26895,7 +21574,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -26904,7 +21583,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -26913,7 +21592,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -26922,7 +21601,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) @@ -26932,7 +21611,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueID) @@ -26942,7 +21621,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) @@ -26952,7 +21631,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -26961,7 +21640,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -26970,7 +21649,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -26979,7 +21658,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -26988,7 +21667,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeGeneratedCommandListID) @@ -26998,7 +21677,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -27007,7 +21686,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeEventListID) params:params]; @@ -27016,7 +21695,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27025,7 +21704,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27034,7 +21713,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27046,12 +21725,11 @@ @implementation MTRClusterCarbonDioxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27060,7 +21738,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27069,7 +21747,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27078,7 +21756,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27087,7 +21765,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27096,7 +21774,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) @@ -27106,7 +21784,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -27115,7 +21793,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) @@ -27125,7 +21803,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27134,7 +21812,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27143,7 +21821,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27152,7 +21830,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -27161,7 +21839,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -27170,7 +21848,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -27179,7 +21857,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeEventListID) params:params]; @@ -27188,7 +21866,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27197,7 +21875,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27206,7 +21884,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27218,12 +21896,11 @@ @implementation MTRClusterNitrogenDioxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27232,7 +21909,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27241,7 +21918,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27250,7 +21927,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27259,7 +21936,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27268,7 +21945,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) @@ -27278,7 +21955,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) @@ -27288,7 +21965,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) @@ -27298,7 +21975,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27307,7 +21984,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27316,7 +21993,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27325,7 +22002,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -27334,7 +22011,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeGeneratedCommandListID) @@ -27344,7 +22021,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAcceptedCommandListID) @@ -27354,7 +22031,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeEventListID) params:params]; @@ -27363,7 +22040,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27372,7 +22049,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27381,7 +22058,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27393,12 +22070,11 @@ @implementation MTRClusterOzoneConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27407,7 +22083,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27416,7 +22092,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27425,7 +22101,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27434,7 +22110,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27443,7 +22119,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; @@ -27452,7 +22128,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -27461,7 +22137,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; @@ -27469,7 +22145,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27478,7 +22154,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27487,7 +22163,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27495,7 +22171,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -27504,7 +22180,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -27513,7 +22189,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -27521,7 +22197,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeEventListID) params:params]; @@ -27530,7 +22206,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27538,7 +22214,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27547,7 +22223,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27559,12 +22235,11 @@ @implementation MTRClusterPM25ConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27572,7 +22247,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27581,7 +22256,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27590,7 +22265,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27599,7 +22274,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27608,7 +22283,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; @@ -27617,7 +22292,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -27626,7 +22301,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; @@ -27634,7 +22309,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27643,7 +22318,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27652,7 +22327,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27660,7 +22335,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -27669,7 +22344,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -27678,7 +22353,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -27686,7 +22361,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeEventListID) params:params]; @@ -27694,7 +22369,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27702,7 +22377,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27711,7 +22386,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27723,12 +22398,11 @@ @implementation MTRClusterFormaldehydeConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27737,7 +22411,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27746,7 +22420,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27755,7 +22429,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27764,7 +22438,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27773,7 +22447,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueWindowID) @@ -27783,7 +22457,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -27792,7 +22466,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueWindowID) @@ -27802,7 +22476,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27811,7 +22485,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27820,7 +22494,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27829,7 +22503,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -27838,7 +22512,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -27847,7 +22521,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -27856,7 +22530,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeEventListID) params:params]; @@ -27865,7 +22539,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27874,7 +22548,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27883,7 +22557,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27895,12 +22569,11 @@ @implementation MTRClusterPM1ConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27908,7 +22581,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27917,7 +22590,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27926,7 +22599,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27935,7 +22608,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27944,7 +22617,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; @@ -27953,7 +22626,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -27962,7 +22635,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; @@ -27970,7 +22643,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27979,7 +22652,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27988,7 +22661,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27996,7 +22669,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -28005,7 +22678,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -28014,7 +22687,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -28022,7 +22695,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeEventListID) params:params]; @@ -28030,7 +22703,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -28038,7 +22711,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -28047,7 +22720,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -28059,12 +22732,11 @@ @implementation MTRClusterPM10ConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -28072,7 +22744,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -28081,7 +22753,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -28090,7 +22762,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -28099,7 +22771,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -28108,7 +22780,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; @@ -28117,7 +22789,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -28126,7 +22798,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; @@ -28134,7 +22806,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -28143,7 +22815,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -28152,7 +22824,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -28160,7 +22832,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -28169,7 +22841,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -28178,7 +22850,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -28186,7 +22858,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeEventListID) params:params]; @@ -28194,7 +22866,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -28202,7 +22874,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -28211,7 +22883,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -28223,12 +22895,11 @@ @implementation MTRClusterTotalVolatileOrganicCompoundsConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -28237,7 +22908,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasuredValueID) @@ -28247,7 +22918,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMinMeasuredValueID) @@ -28257,7 +22928,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMaxMeasuredValueID) @@ -28267,7 +22938,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueID) @@ -28277,7 +22948,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueWindowID) @@ -28287,7 +22958,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueID) @@ -28297,7 +22968,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueWindowID) @@ -28307,7 +22978,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeUncertaintyID) @@ -28317,7 +22988,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementUnitID) @@ -28327,7 +22998,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementMediumID) @@ -28337,7 +23008,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeLevelValueID) @@ -28347,7 +23018,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeGeneratedCommandListID) @@ -28357,7 +23028,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAcceptedCommandListID) @@ -28367,7 +23038,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeEventListID) @@ -28377,7 +23048,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAttributeListID) @@ -28387,7 +23058,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeFeatureMapID) @@ -28397,7 +23068,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeClusterRevisionID) @@ -28410,12 +23081,11 @@ @implementation MTRClusterRadonConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -28424,7 +23094,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -28433,7 +23103,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -28442,7 +23112,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -28451,7 +23121,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -28460,7 +23130,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; @@ -28469,7 +23139,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -28478,7 +23148,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; @@ -28486,7 +23156,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -28495,7 +23165,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -28504,7 +23174,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -28512,7 +23182,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -28521,7 +23191,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -28530,7 +23200,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -28538,7 +23208,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeEventListID) params:params]; @@ -28547,7 +23217,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -28555,7 +23225,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -28564,7 +23234,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -28576,12 +23246,11 @@ @implementation MTRClusterWakeOnLAN - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -28589,7 +23258,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMACAddressWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeMACAddressID) params:params]; @@ -28597,7 +23266,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeGeneratedCommandListID) params:params]; @@ -28605,7 +23274,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAcceptedCommandListID) params:params]; @@ -28613,7 +23282,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeEventListID) params:params]; @@ -28621,7 +23290,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAttributeListID) params:params]; @@ -28629,7 +23298,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeFeatureMapID) params:params]; @@ -28637,7 +23306,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeClusterRevisionID) params:params]; @@ -28660,12 +23329,11 @@ @implementation MTRClusterChannel - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -28678,54 +23346,26 @@ - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeChannelID, (unsigned int) MTRCommandIDTypeClusterChannelCommandChangeChannelID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRChannelClusterChangeChannelResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ChannelClusterChangeChannelResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Channel::Commands::ChangeChannel::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.match = [self asCharSpan:params.match]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + changeChannelWithParams:params + completion:^(MTRChannelClusterChangeChannelResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -28747,54 +23387,25 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeChannelID, + self.endpoint, (unsigned int) MTRClusterIDTypeChannelID, (unsigned int) MTRCommandIDTypeClusterChannelCommandChangeChannelByNumberID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Channel::Commands::ChangeChannelByNumber::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.majorNumber = params.majorNumber.unsignedShortValue; - request.minorNumber = params.minorNumber.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster changeChannelByNumberWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -28816,53 +23427,25 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeChannelID, (unsigned int) MTRCommandIDTypeClusterChannelCommandSkipChannelID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Channel::Commands::SkipChannel::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.count = params.count.shortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster skipChannelWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -28880,7 +23463,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeChannelListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeChannelListID) params:params]; @@ -28888,7 +23471,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeLineupWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeLineupID) params:params]; @@ -28896,7 +23479,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeCurrentChannelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeCurrentChannelID) params:params]; @@ -28904,7 +23487,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeGeneratedCommandListID) params:params]; @@ -28912,7 +23495,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAcceptedCommandListID) params:params]; @@ -28920,7 +23503,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeEventListID) params:params]; @@ -28928,7 +23511,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAttributeListID) params:params]; @@ -28936,7 +23519,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeFeatureMapID) params:params]; @@ -28944,7 +23527,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeClusterRevisionID) params:params]; @@ -28999,12 +23582,11 @@ @implementation MTRClusterTargetNavigator - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -29017,58 +23599,26 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTargetNavigatorID, + self.endpoint, (unsigned int) MTRClusterIDTypeTargetNavigatorID, (unsigned int) MTRCommandIDTypeClusterTargetNavigatorCommandNavigateTargetID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TargetNavigatorClusterNavigateTargetResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TargetNavigator::Commands::NavigateTarget::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.target = params.target.unsignedCharValue; - if (params.data != nil) { - auto & definedValue_0 = request.data.Emplace(); - definedValue_0 = [self asCharSpan:params.data]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster navigateTargetWithParams:params + completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29086,7 +23636,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeTargetListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeTargetListID) params:params]; @@ -29094,7 +23644,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeCurrentTargetWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeCurrentTargetID) params:params]; @@ -29102,7 +23652,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeGeneratedCommandListID) params:params]; @@ -29110,7 +23660,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAcceptedCommandListID) params:params]; @@ -29118,7 +23668,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeEventListID) params:params]; @@ -29126,7 +23676,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAttributeListID) params:params]; @@ -29134,7 +23684,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeFeatureMapID) params:params]; @@ -29142,7 +23692,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeClusterRevisionID) params:params]; @@ -29178,12 +23728,11 @@ @implementation MTRClusterMediaPlayback - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -29203,53 +23752,25 @@ - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandPlayID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Play::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster playWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29279,53 +23800,25 @@ - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandPauseID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Pause::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster pauseWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29355,53 +23848,25 @@ - (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Stop::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29434,53 +23899,25 @@ - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable) (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandStartOverID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::StartOver::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster startOverWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29510,53 +23947,25 @@ - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)pa (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandPreviousID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Previous::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster previousWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29586,53 +23995,25 @@ - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandNextID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Next::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster nextWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29662,53 +24043,25 @@ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandRewindID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Rewind::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster rewindWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29741,53 +24094,26 @@ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nulla NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandFastForwardID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::FastForward::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + fastForwardWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29810,54 +24136,26 @@ - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandSkipForwardID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::SkipForward::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + skipForwardWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29880,54 +24178,26 @@ - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)para NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandSkipBackwardID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::SkipBackward::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + skipBackwardWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29950,54 +24220,25 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandSeekID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Seek::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.position = params.position.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster seekWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30015,7 +24256,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeCurrentStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeCurrentStateID) params:params]; @@ -30023,7 +24264,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeStartTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeStartTimeID) params:params]; @@ -30031,7 +24272,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeDurationID) params:params]; @@ -30039,7 +24280,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeSampledPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSampledPositionID) params:params]; @@ -30047,7 +24288,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributePlaybackSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributePlaybackSpeedID) params:params]; @@ -30055,7 +24296,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeSeekRangeEndWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeEndID) params:params]; @@ -30063,7 +24304,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeSeekRangeStartWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeStartID) params:params]; @@ -30071,7 +24312,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeGeneratedCommandListID) params:params]; @@ -30079,7 +24320,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAcceptedCommandListID) params:params]; @@ -30087,7 +24328,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeEventListID) params:params]; @@ -30095,7 +24336,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAttributeListID) params:params]; @@ -30103,7 +24344,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeFeatureMapID) params:params]; @@ -30111,7 +24352,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeClusterRevisionID) params:params]; @@ -30366,12 +24607,11 @@ @implementation MTRClusterMediaInput - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -30383,53 +24623,25 @@ - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, (unsigned int) MTRCommandIDTypeClusterMediaInputCommandSelectInputID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaInput::Commands::SelectInput::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.index = params.index.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster selectInputWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30460,52 +24672,25 @@ - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _ completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, (unsigned int) MTRCommandIDTypeClusterMediaInputCommandShowInputStatusID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaInput::Commands::ShowInputStatus::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster showInputStatusWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30536,52 +24721,25 @@ - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _ completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, (unsigned int) MTRCommandIDTypeClusterMediaInputCommandHideInputStatusID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaInput::Commands::HideInputStatus::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster hideInputStatusWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30603,54 +24761,25 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, (unsigned int) MTRCommandIDTypeClusterMediaInputCommandRenameInputID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaInput::Commands::RenameInput::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.index = params.index.unsignedCharValue; - request.name = [self asCharSpan:params.name]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster renameInputWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30668,7 +24797,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeInputListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeInputListID) params:params]; @@ -30676,7 +24805,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeCurrentInputWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeCurrentInputID) params:params]; @@ -30684,7 +24813,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeGeneratedCommandListID) params:params]; @@ -30692,7 +24821,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAcceptedCommandListID) params:params]; @@ -30700,7 +24829,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeEventListID) params:params]; @@ -30708,7 +24837,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID) params:params]; @@ -30716,7 +24845,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeFeatureMapID) params:params]; @@ -30724,7 +24853,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeClusterRevisionID) params:params]; @@ -30803,12 +24932,11 @@ @implementation MTRClusterLowPower - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -30826,52 +24954,25 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeLowPowerID, (unsigned int) MTRCommandIDTypeClusterLowPowerCommandSleepID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LowPower::Commands::Sleep::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster sleepWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30889,7 +24990,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeGeneratedCommandListID) params:params]; @@ -30897,7 +24998,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAcceptedCommandListID) params:params]; @@ -30905,7 +25006,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeEventListID) params:params]; @@ -30913,7 +25014,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAttributeListID) params:params]; @@ -30921,7 +25022,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeFeatureMapID) params:params]; @@ -30929,7 +25030,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeClusterRevisionID) params:params]; @@ -30969,12 +25070,11 @@ @implementation MTRClusterKeypadInput - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -30987,54 +25087,25 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeKeypadInputID, (unsigned int) MTRCommandIDTypeClusterKeypadInputCommandSendKeyID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRKeypadInputClusterSendKeyResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - KeypadInputClusterSendKeyResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - KeypadInput::Commands::SendKey::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.keyCode = static_cast>(params.keyCode.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31052,7 +25123,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeGeneratedCommandListID) params:params]; @@ -31060,7 +25131,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAcceptedCommandListID) params:params]; @@ -31068,7 +25139,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeEventListID) params:params]; @@ -31076,7 +25147,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAttributeListID) params:params]; @@ -31084,7 +25155,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeFeatureMapID) params:params]; @@ -31092,7 +25163,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeClusterRevisionID) params:params]; @@ -31127,12 +25198,11 @@ @implementation MTRClusterContentLauncher - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -31145,112 +25215,26 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeContentLauncherID, + self.endpoint, (unsigned int) MTRClusterIDTypeContentLauncherID, (unsigned int) MTRCommandIDTypeClusterContentLauncherCommandLaunchContentID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRContentLauncherClusterLauncherResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ContentLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ContentLauncher::Commands::LaunchContent::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.search.parameterList.count != 0) { - auto * listHolder_1 = new ListHolder(params.search.parameterList.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.search.parameterList.count; ++i_1) { - if (![params.search.parameterList[i_1] - isKindOfClass:[MTRContentLauncherClusterParameterStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (MTRContentLauncherClusterParameterStruct *) params.search.parameterList[i_1]; - listHolder_1->mList[i_1].type - = static_castmList[i_1].type)>>( - element_1.type.unsignedCharValue); - listHolder_1->mList[i_1].value = [self asCharSpan:element_1.value]; - if (element_1.externalIDList != nil) { - auto & definedValue_3 = listHolder_1->mList[i_1].externalIDList.Emplace(); - { - using ListType_4 = std::remove_reference_t; - using ListMemberType_4 = ListMemberTypeGetter::Type; - if (element_1.externalIDList.count != 0) { - auto * listHolder_4 = new ListHolder(element_1.externalIDList.count); - if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_4); - for (size_t i_4 = 0; i_4 < element_1.externalIDList.count; ++i_4) { - if (![element_1.externalIDList[i_4] - isKindOfClass:[MTRContentLauncherClusterAdditionalInfoStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_4 - = (MTRContentLauncherClusterAdditionalInfoStruct *) element_1.externalIDList[i_4]; - listHolder_4->mList[i_4].name = [self asCharSpan:element_4.name]; - listHolder_4->mList[i_4].value = [self asCharSpan:element_4.value]; - } - definedValue_3 = ListType_4(listHolder_4->mList, element_1.externalIDList.count); - } else { - definedValue_3 = ListType_4(); - } - } - } - } - request.search.parameterList = ListType_1(listHolder_1->mList, params.search.parameterList.count); - } else { - request.search.parameterList = ListType_1(); - } - } - request.autoPlay = params.autoPlay.boolValue; - if (params.data != nil) { - auto & definedValue_0 = request.data.Emplace(); - definedValue_0 = [self asCharSpan:params.data]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster launchContentWithParams:params + completion:^( + MTRContentLauncherClusterLauncherResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31273,152 +25257,26 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeContentLauncherID, + self.endpoint, (unsigned int) MTRClusterIDTypeContentLauncherID, (unsigned int) MTRCommandIDTypeClusterContentLauncherCommandLaunchURLID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRContentLauncherClusterLauncherResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ContentLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ContentLauncher::Commands::LaunchURL::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.contentURL = [self asCharSpan:params.contentURL]; - if (params.displayString != nil) { - auto & definedValue_0 = request.displayString.Emplace(); - definedValue_0 = [self asCharSpan:params.displayString]; - } - if (params.brandingInformation != nil) { - auto & definedValue_0 = request.brandingInformation.Emplace(); - definedValue_0.providerName = [self asCharSpan:params.brandingInformation.providerName]; - if (params.brandingInformation.background != nil) { - auto & definedValue_2 = definedValue_0.background.Emplace(); - if (params.brandingInformation.background.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.background.imageURL]; - } - if (params.brandingInformation.background.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.background.color]; - } - if (params.brandingInformation.background.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.background.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.background.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.background.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.logo != nil) { - auto & definedValue_2 = definedValue_0.logo.Emplace(); - if (params.brandingInformation.logo.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.logo.imageURL]; - } - if (params.brandingInformation.logo.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.logo.color]; - } - if (params.brandingInformation.logo.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.logo.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.logo.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.logo.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.progressBar != nil) { - auto & definedValue_2 = definedValue_0.progressBar.Emplace(); - if (params.brandingInformation.progressBar.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.progressBar.imageURL]; - } - if (params.brandingInformation.progressBar.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.progressBar.color]; - } - if (params.brandingInformation.progressBar.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.progressBar.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.progressBar.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.progressBar.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.splash != nil) { - auto & definedValue_2 = definedValue_0.splash.Emplace(); - if (params.brandingInformation.splash.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.splash.imageURL]; - } - if (params.brandingInformation.splash.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.splash.color]; - } - if (params.brandingInformation.splash.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.splash.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.splash.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.splash.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.waterMark != nil) { - auto & definedValue_2 = definedValue_0.waterMark.Emplace(); - if (params.brandingInformation.waterMark.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.waterMark.imageURL]; - } - if (params.brandingInformation.waterMark.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.waterMark.color]; - } - if (params.brandingInformation.waterMark.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.waterMark.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.waterMark.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.waterMark.size.metric.unsignedCharValue); - } - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + launchURLWithParams:params + completion:^(MTRContentLauncherClusterLauncherResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31436,7 +25294,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params - (NSDictionary *)readAttributeAcceptHeaderWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptHeaderID) params:params]; @@ -31445,7 +25303,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params - (NSDictionary *)readAttributeSupportedStreamingProtocolsWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeSupportedStreamingProtocolsID) params:params]; @@ -31464,7 +25322,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeGeneratedCommandListID) params:params]; @@ -31482,7 +25340,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptedCommandListID) params:params]; @@ -31490,7 +25348,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeEventListID) params:params]; @@ -31498,7 +25356,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAttributeListID) params:params]; @@ -31506,7 +25364,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeFeatureMapID) params:params]; @@ -31514,7 +25372,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeClusterRevisionID) params:params]; @@ -31563,12 +25421,11 @@ @implementation MTRClusterAudioOutput - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -31580,53 +25437,25 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeAudioOutputID, + self.endpoint, (unsigned int) MTRClusterIDTypeAudioOutputID, (unsigned int) MTRCommandIDTypeClusterAudioOutputCommandSelectOutputID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AudioOutput::Commands::SelectOutput::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.index = params.index.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster selectOutputWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31648,54 +25477,25 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeAudioOutputID, + self.endpoint, (unsigned int) MTRClusterIDTypeAudioOutputID, (unsigned int) MTRCommandIDTypeClusterAudioOutputCommandRenameOutputID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AudioOutput::Commands::RenameOutput::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.index = params.index.unsignedCharValue; - request.name = [self asCharSpan:params.name]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster renameOutputWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31713,7 +25513,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeOutputListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeOutputListID) params:params]; @@ -31721,7 +25521,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeCurrentOutputWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeCurrentOutputID) params:params]; @@ -31729,7 +25529,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeGeneratedCommandListID) params:params]; @@ -31737,7 +25537,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAcceptedCommandListID) params:params]; @@ -31745,7 +25545,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeEventListID) params:params]; @@ -31753,7 +25553,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAttributeListID) params:params]; @@ -31761,7 +25561,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeFeatureMapID) params:params]; @@ -31769,7 +25569,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeClusterRevisionID) params:params]; @@ -31810,12 +25610,11 @@ @implementation MTRClusterApplicationLauncher - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -31828,64 +25627,26 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nul NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, + self.endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, (unsigned int) MTRCommandIDTypeClusterApplicationLauncherCommandLaunchAppID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRApplicationLauncherClusterLauncherResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ApplicationLauncher::Commands::LaunchApp::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.application != nil) { - auto & definedValue_0 = request.application.Emplace(); - definedValue_0.catalogVendorID = params.application.catalogVendorID.unsignedShortValue; - definedValue_0.applicationID = [self asCharSpan:params.application.applicationID]; - } - if (params.data != nil) { - auto & definedValue_0 = request.data.Emplace(); - definedValue_0 = [self asByteSpan:params.data]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster launchAppWithParams:params + completion:^( + MTRApplicationLauncherClusterLauncherResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31908,60 +25669,26 @@ - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullabl NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, + self.endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, (unsigned int) MTRCommandIDTypeClusterApplicationLauncherCommandStopAppID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRApplicationLauncherClusterLauncherResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ApplicationLauncher::Commands::StopApp::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.application != nil) { - auto & definedValue_0 = request.application.Emplace(); - definedValue_0.catalogVendorID = params.application.catalogVendorID.unsignedShortValue; - definedValue_0.applicationID = [self asCharSpan:params.application.applicationID]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + stopAppWithParams:params + completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31984,60 +25711,26 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, + self.endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, (unsigned int) MTRCommandIDTypeClusterApplicationLauncherCommandHideAppID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRApplicationLauncherClusterLauncherResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ApplicationLauncher::Commands::HideApp::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.application != nil) { - auto & definedValue_0 = request.application.Emplace(); - definedValue_0.catalogVendorID = params.application.catalogVendorID.unsignedShortValue; - definedValue_0.applicationID = [self asCharSpan:params.application.applicationID]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + hideAppWithParams:params + completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32055,7 +25748,7 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl - (NSDictionary *)readAttributeCatalogListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCatalogListID) params:params]; @@ -32063,7 +25756,7 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl - (NSDictionary *)readAttributeCurrentAppWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) params:params]; @@ -32080,7 +25773,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) value:dataValueDictionary @@ -32090,7 +25783,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeGeneratedCommandListID) params:params]; @@ -32098,7 +25791,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAcceptedCommandListID) params:params]; @@ -32106,7 +25799,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeEventListID) params:params]; @@ -32114,7 +25807,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAttributeListID) params:params]; @@ -32122,7 +25815,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeFeatureMapID) params:params]; @@ -32130,7 +25823,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeClusterRevisionID) params:params]; @@ -32193,12 +25886,11 @@ @implementation MTRClusterApplicationBasic - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -32206,7 +25898,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorNameID) params:params]; @@ -32214,7 +25906,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorIDID) params:params]; @@ -32222,7 +25914,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeApplicationNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationNameID) params:params]; @@ -32230,7 +25922,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeProductIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeProductIDID) params:params]; @@ -32238,7 +25930,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeApplicationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationID) params:params]; @@ -32246,7 +25938,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeStatusID) params:params]; @@ -32254,7 +25946,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeApplicationVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationVersionID) params:params]; @@ -32262,7 +25954,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAllowedVendorListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAllowedVendorListID) params:params]; @@ -32270,7 +25962,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeGeneratedCommandListID) params:params]; @@ -32278,7 +25970,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAcceptedCommandListID) params:params]; @@ -32286,7 +25978,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeEventListID) params:params]; @@ -32294,7 +25986,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAttributeListID) params:params]; @@ -32302,7 +25994,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeFeatureMapID) params:params]; @@ -32310,7 +26002,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeClusterRevisionID) params:params]; @@ -32331,12 +26023,11 @@ @implementation MTRClusterAccountLogin - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -32349,57 +26040,26 @@ - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeAccountLoginID, + self.endpoint, (unsigned int) MTRClusterIDTypeAccountLoginID, (unsigned int) MTRCommandIDTypeClusterAccountLoginCommandGetSetupPINID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AccountLoginClusterGetSetupPINResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AccountLogin::Commands::GetSetupPIN::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + getSetupPINWithParams:params + completion:^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32421,57 +26081,25 @@ - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeAccountLoginID, (unsigned int) MTRCommandIDTypeClusterAccountLoginCommandLoginID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AccountLogin::Commands::Login::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; - request.setupPIN = [self asCharSpan:params.setupPIN]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster loginWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32499,55 +26127,25 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeAccountLoginID, (unsigned int) MTRCommandIDTypeClusterAccountLoginCommandLogoutID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AccountLogin::Commands::Logout::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster logoutWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32565,7 +26163,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeGeneratedCommandListID) params:params]; @@ -32573,7 +26171,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAcceptedCommandListID) params:params]; @@ -32581,7 +26179,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeEventListID) params:params]; @@ -32589,7 +26187,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAttributeListID) params:params]; @@ -32597,7 +26195,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeFeatureMapID) params:params]; @@ -32605,7 +26203,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeClusterRevisionID) params:params]; @@ -32669,12 +26267,11 @@ @implementation MTRClusterElectricalMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -32695,52 +26292,25 @@ - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfi completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeElectricalMeasurementID, + self.endpoint, (unsigned int) MTRClusterIDTypeElectricalMeasurementID, (unsigned int) MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoCommandID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ElectricalMeasurement::Commands::GetProfileInfoCommand::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getProfileInfoCommandWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32762,56 +26332,26 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeElectricalMeasurementID, (unsigned int) MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileCommandID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.attributeId = params.attributeId.unsignedShortValue; - request.startTime = params.startTime.unsignedIntValue; - request.numberOfIntervals = params.numberOfIntervals.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getMeasurementProfileCommandWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32829,7 +26369,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasurementTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID) params:params]; @@ -32837,7 +26377,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID) params:params]; @@ -32845,7 +26385,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcVoltageMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID) params:params]; @@ -32853,7 +26393,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcVoltageMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID) params:params]; @@ -32861,7 +26401,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID) params:params]; @@ -32869,7 +26409,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcCurrentMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID) params:params]; @@ -32877,7 +26417,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcCurrentMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID) params:params]; @@ -32885,7 +26425,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID) params:params]; @@ -32893,7 +26433,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcPowerMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID) params:params]; @@ -32901,7 +26441,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcPowerMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID) params:params]; @@ -32909,7 +26449,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID) params:params]; @@ -32917,7 +26457,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID) params:params]; @@ -32925,7 +26465,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID) params:params]; @@ -32933,7 +26473,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID) params:params]; @@ -32941,7 +26481,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID) params:params]; @@ -32949,7 +26489,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcPowerDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID) params:params]; @@ -32957,7 +26497,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAcFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID) params:params]; @@ -32965,7 +26505,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAcFrequencyMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID) params:params]; @@ -32973,7 +26513,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAcFrequencyMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID) params:params]; @@ -32981,7 +26521,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeNeutralCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID) params:params]; @@ -32989,7 +26529,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeTotalActivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID) params:params]; @@ -32997,7 +26537,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeTotalReactivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID) params:params]; @@ -33005,7 +26545,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeTotalApparentPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID) params:params]; @@ -33014,7 +26554,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID) params:params]; @@ -33023,7 +26563,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID) params:params]; @@ -33032,7 +26572,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID) params:params]; @@ -33041,7 +26581,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID) params:params]; @@ -33050,7 +26590,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID) params:params]; @@ -33059,7 +26599,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID) params:params]; @@ -33068,7 +26608,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID) params:params]; @@ -33077,7 +26617,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID) params:params]; @@ -33086,7 +26626,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID) params:params]; @@ -33095,7 +26635,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID) params:params]; @@ -33104,7 +26644,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID) params:params]; @@ -33113,7 +26653,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID) params:params]; @@ -33122,7 +26662,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAcFrequencyMultiplierWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID) params:params]; @@ -33130,7 +26670,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAcFrequencyDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID) params:params]; @@ -33138,7 +26678,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributePowerMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID) params:params]; @@ -33146,7 +26686,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributePowerDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID) params:params]; @@ -33155,7 +26695,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID) params:params]; @@ -33164,7 +26704,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID) params:params]; @@ -33172,7 +26712,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeInstantaneousVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID) params:params]; @@ -33181,7 +26721,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeInstantaneousLineCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID) params:params]; @@ -33190,7 +26730,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeInstantaneousActiveCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID) params:params]; @@ -33199,7 +26739,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeInstantaneousReactiveCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID) params:params]; @@ -33207,7 +26747,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeInstantaneousPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID) params:params]; @@ -33215,7 +26755,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID) params:params]; @@ -33223,7 +26763,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsVoltageMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID) params:params]; @@ -33231,7 +26771,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsVoltageMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID) params:params]; @@ -33239,7 +26779,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID) params:params]; @@ -33247,7 +26787,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsCurrentMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID) params:params]; @@ -33255,7 +26795,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsCurrentMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID) params:params]; @@ -33263,7 +26803,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeActivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID) params:params]; @@ -33271,7 +26811,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeActivePowerMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID) params:params]; @@ -33279,7 +26819,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeActivePowerMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID) params:params]; @@ -33287,7 +26827,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeReactivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID) params:params]; @@ -33295,7 +26835,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeApparentPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID) params:params]; @@ -33303,7 +26843,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributePowerFactorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID) params:params]; @@ -33312,7 +26852,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) params:params]; @@ -33332,7 +26872,7 @@ - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary< NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) value:dataValueDictionary @@ -33343,7 +26883,7 @@ - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary< - (NSDictionary *)readAttributeAverageRmsUnderVoltageCounterWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID) params:params]; @@ -33363,7 +26903,7 @@ - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSDictionary *)readAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID) params:params]; @@ -33394,7 +26934,7 @@ - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSDictionary *)readAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID) params:params]; @@ -33425,7 +26965,7 @@ - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSDictionary *)readAttributeRmsVoltageSagPeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) params:params]; @@ -33452,7 +26992,7 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) value:dataValueDictionary @@ -33463,7 +27003,7 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeRmsVoltageSwellPeriodWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID) params:params]; @@ -33482,7 +27022,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID) params:params]; @@ -33500,7 +27040,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID) params:params]; @@ -33508,7 +27048,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID) params:params]; @@ -33516,7 +27056,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID) params:params]; @@ -33524,7 +27064,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID) params:params]; @@ -33532,7 +27072,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcPowerDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID) params:params]; @@ -33540,7 +27080,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) params:params]; @@ -33557,7 +27097,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) value:dataValueDictionary @@ -33567,7 +27107,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary - (NSDictionary *)readAttributeVoltageOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID) params:params]; @@ -33575,7 +27115,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary - (NSDictionary *)readAttributeCurrentOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID) params:params]; @@ -33583,7 +27123,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary - (NSDictionary *)readAttributeAcOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID) params:params]; @@ -33600,7 +27140,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcVoltageOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID) params:params]; @@ -33618,7 +27158,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcCurrentOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID) params:params]; @@ -33627,7 +27167,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcActivePowerOverloadWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID) params:params]; @@ -33636,7 +27176,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcReactivePowerOverloadWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID) params:params]; @@ -33645,7 +27185,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsOverVoltageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID) params:params]; @@ -33654,7 +27194,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsUnderVoltageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID) params:params]; @@ -33663,7 +27203,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeOverVoltageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID) params:params]; @@ -33672,7 +27212,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeUnderVoltageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID) params:params]; @@ -33680,7 +27220,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSagWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID) params:params]; @@ -33688,7 +27228,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSwellWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID) params:params]; @@ -33696,7 +27236,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeLineCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID) params:params]; @@ -33704,7 +27244,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID) params:params]; @@ -33713,7 +27253,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeReactiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID) params:params]; @@ -33721,7 +27261,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltagePhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID) params:params]; @@ -33729,7 +27269,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageMinPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID) params:params]; @@ -33737,7 +27277,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageMaxPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID) params:params]; @@ -33745,7 +27285,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID) params:params]; @@ -33753,7 +27293,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentMinPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID) params:params]; @@ -33761,7 +27301,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentMaxPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID) params:params]; @@ -33769,7 +27309,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID) params:params]; @@ -33777,7 +27317,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerMinPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID) params:params]; @@ -33785,7 +27325,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerMaxPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID) params:params]; @@ -33793,7 +27333,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeReactivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID) params:params]; @@ -33801,7 +27341,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeApparentPowerPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID) params:params]; @@ -33809,7 +27349,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributePowerFactorPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID) params:params]; @@ -33818,7 +27358,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID: @(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID) @@ -33828,7 +27368,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID) params:params]; @@ -33837,7 +27377,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID) params:params]; @@ -33846,7 +27386,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID) params:params]; @@ -33855,7 +27395,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID) params:params]; @@ -33864,7 +27404,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID) params:params]; @@ -33873,7 +27413,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID) params:params]; @@ -33881,7 +27421,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeLineCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID) params:params]; @@ -33889,7 +27429,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID) params:params]; @@ -33898,7 +27438,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeReactiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID) params:params]; @@ -33906,7 +27446,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltagePhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID) params:params]; @@ -33914,7 +27454,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageMinPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID) params:params]; @@ -33922,7 +27462,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageMaxPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID) params:params]; @@ -33930,7 +27470,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID) params:params]; @@ -33938,7 +27478,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentMinPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID) params:params]; @@ -33946,7 +27486,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentMaxPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID) params:params]; @@ -33954,7 +27494,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID) params:params]; @@ -33962,7 +27502,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerMinPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID) params:params]; @@ -33970,7 +27510,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerMaxPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID) params:params]; @@ -33978,7 +27518,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeReactivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID) params:params]; @@ -33986,7 +27526,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeApparentPowerPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID) params:params]; @@ -33994,7 +27534,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributePowerFactorPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID) params:params]; @@ -34003,7 +27543,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID: @(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID) @@ -34013,7 +27553,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID) params:params]; @@ -34022,7 +27562,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID) params:params]; @@ -34031,7 +27571,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID) params:params]; @@ -34040,7 +27580,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID) params:params]; @@ -34049,7 +27589,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID) params:params]; @@ -34058,7 +27598,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID) params:params]; @@ -34066,7 +27606,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID) params:params]; @@ -34074,7 +27614,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID) params:params]; @@ -34082,7 +27622,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeEventListID) params:params]; @@ -34090,7 +27630,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID) params:params]; @@ -34098,7 +27638,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID) params:params]; @@ -34106,7 +27646,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID) params:params]; @@ -34156,12 +27696,11 @@ @implementation MTRClusterUnitTesting - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -34179,52 +27718,25 @@ - (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::Test::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34255,52 +27767,25 @@ - (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _N completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNotHandledID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestNotHandled::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testNotHandledWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34333,53 +27818,26 @@ - (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nulla NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestSpecificID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestSpecificResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestSpecificResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestSpecific::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + testSpecificWithParams:params + completion:^(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34410,52 +27868,25 @@ - (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandPar completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestUnknownCommandID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestUnknownCommand::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testUnknownCommandWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34478,55 +27909,26 @@ - (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestAddArgumentsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestAddArgumentsResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestAddArguments::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1 = params.arg1.unsignedCharValue; - request.arg2 = params.arg2.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testAddArgumentsWithParams:params + completion:^(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34549,54 +27951,26 @@ - (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgu NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestSimpleArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestSimpleArgumentResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestSimpleArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1 = params.arg1.boolValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testSimpleArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34620,265 +27994,27 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStruc NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestStructArrayArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestStructArrayArgumentResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestStructArrayArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[MTRUnitTestingClusterNestedStructList class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUnitTestingClusterNestedStructList *) params.arg1[i_0]; - listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; - listHolder_0->mList[i_0].b = element_0.b.boolValue; - listHolder_0->mList[i_0].c.a = element_0.c.a.unsignedCharValue; - listHolder_0->mList[i_0].c.b = element_0.c.b.boolValue; - listHolder_0->mList[i_0].c.c - = static_castmList[i_0].c.c)>>( - element_0.c.c.unsignedCharValue); - listHolder_0->mList[i_0].c.d = [self asByteSpan:element_0.c.d]; - listHolder_0->mList[i_0].c.e = [self asCharSpan:element_0.c.e]; - listHolder_0->mList[i_0].c.f - = static_castmList[i_0].c.f)>>( - element_0.c.f.unsignedCharValue); - listHolder_0->mList[i_0].c.g = element_0.c.g.floatValue; - listHolder_0->mList[i_0].c.h = element_0.c.h.doubleValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].d)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.d.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.d.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.d.count; ++i_2) { - if (![element_0.d[i_2] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRUnitTestingClusterSimpleStruct *) element_0.d[i_2]; - listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue; - listHolder_2->mList[i_2].b = element_2.b.boolValue; - listHolder_2->mList[i_2].c - = static_castmList[i_2].c)>>( - element_2.c.unsignedCharValue); - listHolder_2->mList[i_2].d = [self asByteSpan:element_2.d]; - listHolder_2->mList[i_2].e = [self asCharSpan:element_2.e]; - listHolder_2->mList[i_2].f - = static_castmList[i_2].f)>>( - element_2.f.unsignedCharValue); - listHolder_2->mList[i_2].g = element_2.g.floatValue; - listHolder_2->mList[i_2].h = element_2.h.doubleValue; - } - listHolder_0->mList[i_0].d = ListType_2(listHolder_2->mList, element_0.d.count); - } else { - listHolder_0->mList[i_0].d = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].e)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.e.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.e.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.e.count; ++i_2) { - if (![element_0.e[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.e[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedIntValue; - } - listHolder_0->mList[i_0].e = ListType_2(listHolder_2->mList, element_0.e.count); - } else { - listHolder_0->mList[i_0].e = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].f)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.f.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.f.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.f.count; ++i_2) { - if (![element_0.f[i_2] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSData *) element_0.f[i_2]; - listHolder_2->mList[i_2] = [self asByteSpan:element_2]; - } - listHolder_0->mList[i_0].f = ListType_2(listHolder_2->mList, element_0.f.count); - } else { - listHolder_0->mList[i_0].f = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].g)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.g.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.g.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.g.count; ++i_2) { - if (![element_0.g[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.g[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedCharValue; - } - listHolder_0->mList[i_0].g = ListType_2(listHolder_2->mList, element_0.g.count); - } else { - listHolder_0->mList[i_0].g = ListType_2(); - } - } - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg2.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg2.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg2.count; ++i_0) { - if (![params.arg2[i_0] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUnitTestingClusterSimpleStruct *) params.arg2[i_0]; - listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; - listHolder_0->mList[i_0].b = element_0.b.boolValue; - listHolder_0->mList[i_0].c = static_castmList[i_0].c)>>( - element_0.c.unsignedCharValue); - listHolder_0->mList[i_0].d = [self asByteSpan:element_0.d]; - listHolder_0->mList[i_0].e = [self asCharSpan:element_0.e]; - listHolder_0->mList[i_0].f = static_castmList[i_0].f)>>( - element_0.f.unsignedCharValue); - listHolder_0->mList[i_0].g = element_0.g.floatValue; - listHolder_0->mList[i_0].h = element_0.h.doubleValue; - } - request.arg2 = ListType_0(listHolder_0->mList, params.arg2.count); - } else { - request.arg2 = ListType_0(); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg3.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg3.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg3.count; ++i_0) { - if (![params.arg3[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.arg3[i_0]; - listHolder_0->mList[i_0] = static_castmList[i_0])>>( - element_0.unsignedCharValue); - } - request.arg3 = ListType_0(listHolder_0->mList, params.arg3.count); - } else { - request.arg3 = ListType_0(); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg4.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg4.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg4.count; ++i_0) { - if (![params.arg4[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.arg4[i_0]; - listHolder_0->mList[i_0] = element_0.boolValue; - } - request.arg4 = ListType_0(listHolder_0->mList, params.arg4.count); - } else { - request.arg4 = ListType_0(); - } - } - request.arg5 = static_cast>(params.arg5.unsignedCharValue); - request.arg6 = params.arg6.boolValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + testStructArrayArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34901,61 +28037,26 @@ - (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgu NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestStructArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestStructArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c = static_cast>(params.arg1.c.unsignedCharValue); - request.arg1.d = [self asByteSpan:params.arg1.d]; - request.arg1.e = [self asCharSpan:params.arg1.e]; - request.arg1.f = static_cast>(params.arg1.f.unsignedCharValue); - request.arg1.g = params.arg1.g.floatValue; - request.arg1.h = params.arg1.h.doubleValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testStructArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34978,65 +28079,26 @@ - (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNest NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNestedStructArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestNestedStructArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c.a = params.arg1.c.a.unsignedCharValue; - request.arg1.c.b = params.arg1.c.b.boolValue; - request.arg1.c.c - = static_cast>(params.arg1.c.c.unsignedCharValue); - request.arg1.c.d = [self asByteSpan:params.arg1.c.d]; - request.arg1.c.e = [self asCharSpan:params.arg1.c.e]; - request.arg1.c.f - = static_cast>(params.arg1.c.f.unsignedCharValue); - request.arg1.c.g = params.arg1.c.g.floatValue; - request.arg1.c.h = params.arg1.c.h.doubleValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testNestedStructArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35059,84 +28121,26 @@ - (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListSt NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListStructArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestListStructArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUnitTestingClusterSimpleStruct *) params.arg1[i_0]; - listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; - listHolder_0->mList[i_0].b = element_0.b.boolValue; - listHolder_0->mList[i_0].c = static_castmList[i_0].c)>>( - element_0.c.unsignedCharValue); - listHolder_0->mList[i_0].d = [self asByteSpan:element_0.d]; - listHolder_0->mList[i_0].e = [self asCharSpan:element_0.e]; - listHolder_0->mList[i_0].f = static_castmList[i_0].f)>>( - element_0.f.unsignedCharValue); - listHolder_0->mList[i_0].g = element_0.g.floatValue; - listHolder_0->mList[i_0].h = element_0.h.doubleValue; - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testListStructArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35159,75 +28163,26 @@ - (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListInt8UArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestListInt8UArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.arg1[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testListInt8UArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35250,162 +28205,26 @@ - (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTest NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNestedStructListArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestNestedStructListArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c.a = params.arg1.c.a.unsignedCharValue; - request.arg1.c.b = params.arg1.c.b.boolValue; - request.arg1.c.c - = static_cast>(params.arg1.c.c.unsignedCharValue); - request.arg1.c.d = [self asByteSpan:params.arg1.c.d]; - request.arg1.c.e = [self asCharSpan:params.arg1.c.e]; - request.arg1.c.f - = static_cast>(params.arg1.c.f.unsignedCharValue); - request.arg1.c.g = params.arg1.c.g.floatValue; - request.arg1.c.h = params.arg1.c.h.doubleValue; - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.d.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.d.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.d.count; ++i_1) { - if (![params.arg1.d[i_1] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (MTRUnitTestingClusterSimpleStruct *) params.arg1.d[i_1]; - listHolder_1->mList[i_1].a = element_1.a.unsignedCharValue; - listHolder_1->mList[i_1].b = element_1.b.boolValue; - listHolder_1->mList[i_1].c = static_castmList[i_1].c)>>( - element_1.c.unsignedCharValue); - listHolder_1->mList[i_1].d = [self asByteSpan:element_1.d]; - listHolder_1->mList[i_1].e = [self asCharSpan:element_1.e]; - listHolder_1->mList[i_1].f = static_castmList[i_1].f)>>( - element_1.f.unsignedCharValue); - listHolder_1->mList[i_1].g = element_1.g.floatValue; - listHolder_1->mList[i_1].h = element_1.h.doubleValue; - } - request.arg1.d = ListType_1(listHolder_1->mList, params.arg1.d.count); - } else { - request.arg1.d = ListType_1(); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.e.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.e.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.e.count; ++i_1) { - if (![params.arg1.e[i_1] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (NSNumber *) params.arg1.e[i_1]; - listHolder_1->mList[i_1] = element_1.unsignedIntValue; - } - request.arg1.e = ListType_1(listHolder_1->mList, params.arg1.e.count); - } else { - request.arg1.e = ListType_1(); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.f.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.f.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.f.count; ++i_1) { - if (![params.arg1.f[i_1] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (NSData *) params.arg1.f[i_1]; - listHolder_1->mList[i_1] = [self asByteSpan:element_1]; - } - request.arg1.f = ListType_1(listHolder_1->mList, params.arg1.f.count); - } else { - request.arg1.f = ListType_1(); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.g.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.g.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.g.count; ++i_1) { - if (![params.arg1.g[i_1] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (NSNumber *) params.arg1.g[i_1]; - listHolder_1->mList[i_1] = element_1.unsignedCharValue; - } - request.arg1.g = ListType_1(listHolder_1->mList, params.arg1.g.count); - } else { - request.arg1.g = ListType_1(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testNestedStructListArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35429,188 +28248,27 @@ - (void)testListNestedStructListArgumentRequestWithParams: NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListNestedStructListArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestListNestedStructListArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[MTRUnitTestingClusterNestedStructList class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUnitTestingClusterNestedStructList *) params.arg1[i_0]; - listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; - listHolder_0->mList[i_0].b = element_0.b.boolValue; - listHolder_0->mList[i_0].c.a = element_0.c.a.unsignedCharValue; - listHolder_0->mList[i_0].c.b = element_0.c.b.boolValue; - listHolder_0->mList[i_0].c.c - = static_castmList[i_0].c.c)>>( - element_0.c.c.unsignedCharValue); - listHolder_0->mList[i_0].c.d = [self asByteSpan:element_0.c.d]; - listHolder_0->mList[i_0].c.e = [self asCharSpan:element_0.c.e]; - listHolder_0->mList[i_0].c.f - = static_castmList[i_0].c.f)>>( - element_0.c.f.unsignedCharValue); - listHolder_0->mList[i_0].c.g = element_0.c.g.floatValue; - listHolder_0->mList[i_0].c.h = element_0.c.h.doubleValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].d)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.d.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.d.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.d.count; ++i_2) { - if (![element_0.d[i_2] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRUnitTestingClusterSimpleStruct *) element_0.d[i_2]; - listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue; - listHolder_2->mList[i_2].b = element_2.b.boolValue; - listHolder_2->mList[i_2].c - = static_castmList[i_2].c)>>( - element_2.c.unsignedCharValue); - listHolder_2->mList[i_2].d = [self asByteSpan:element_2.d]; - listHolder_2->mList[i_2].e = [self asCharSpan:element_2.e]; - listHolder_2->mList[i_2].f - = static_castmList[i_2].f)>>( - element_2.f.unsignedCharValue); - listHolder_2->mList[i_2].g = element_2.g.floatValue; - listHolder_2->mList[i_2].h = element_2.h.doubleValue; - } - listHolder_0->mList[i_0].d = ListType_2(listHolder_2->mList, element_0.d.count); - } else { - listHolder_0->mList[i_0].d = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].e)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.e.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.e.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.e.count; ++i_2) { - if (![element_0.e[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.e[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedIntValue; - } - listHolder_0->mList[i_0].e = ListType_2(listHolder_2->mList, element_0.e.count); - } else { - listHolder_0->mList[i_0].e = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].f)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.f.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.f.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.f.count; ++i_2) { - if (![element_0.f[i_2] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSData *) element_0.f[i_2]; - listHolder_2->mList[i_2] = [self asByteSpan:element_2]; - } - listHolder_0->mList[i_0].f = ListType_2(listHolder_2->mList, element_0.f.count); - } else { - listHolder_0->mList[i_0].f = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].g)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.g.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.g.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.g.count; ++i_2) { - if (![element_0.g[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.g[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedCharValue; - } - listHolder_0->mList[i_0].g = ListType_2(listHolder_2->mList, element_0.g.count); - } else { - listHolder_0->mList[i_0].g = ListType_2(); - } - } - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testListNestedStructListArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35633,75 +28291,26 @@ - (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8 NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListInt8UReverseRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestListInt8UReverseResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestListInt8UReverseRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.arg1[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testListInt8UReverseRequestWithParams:params + completion:^(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35724,55 +28333,26 @@ - (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestEnumsRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestEnumsResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestEnumsResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestEnumsRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1 = static_cast>(params.arg1.unsignedShortValue); - request.arg2 = static_cast>(params.arg2.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testEnumsRequestWithParams:params + completion:^( + MTRUnitTestingClusterTestEnumsResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35795,64 +28375,26 @@ - (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullable NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNullableOptionalRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestNullableOptionalRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.arg1 != nil) { - auto & definedValue_0 = request.arg1.Emplace(); - if (params.arg1 == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = params.arg1.unsignedCharValue; - } - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testNullableOptionalRequestWithParams:params + completion:^(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35877,223 +28419,28 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestC NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestComplexNullableOptionalRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestComplexNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestComplexNullableOptionalRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params.nullableInt == nil) { - request.nullableInt.SetNull(); - } else { - auto & nonNullValue_0 = request.nullableInt.SetNonNull(); - nonNullValue_0 = params.nullableInt.unsignedShortValue; - } - if (params.optionalInt != nil) { - auto & definedValue_0 = request.optionalInt.Emplace(); - definedValue_0 = params.optionalInt.unsignedShortValue; - } - if (params.nullableOptionalInt != nil) { - auto & definedValue_0 = request.nullableOptionalInt.Emplace(); - if (params.nullableOptionalInt == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = params.nullableOptionalInt.unsignedShortValue; - } - } - if (params.nullableString == nil) { - request.nullableString.SetNull(); - } else { - auto & nonNullValue_0 = request.nullableString.SetNonNull(); - nonNullValue_0 = [self asCharSpan:params.nullableString]; - } - if (params.optionalString != nil) { - auto & definedValue_0 = request.optionalString.Emplace(); - definedValue_0 = [self asCharSpan:params.optionalString]; - } - if (params.nullableOptionalString != nil) { - auto & definedValue_0 = request.nullableOptionalString.Emplace(); - if (params.nullableOptionalString == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = [self asCharSpan:params.nullableOptionalString]; - } - } - if (params.nullableStruct == nil) { - request.nullableStruct.SetNull(); - } else { - auto & nonNullValue_0 = request.nullableStruct.SetNonNull(); - nonNullValue_0.a = params.nullableStruct.a.unsignedCharValue; - nonNullValue_0.b = params.nullableStruct.b.boolValue; - nonNullValue_0.c = static_cast>( - params.nullableStruct.c.unsignedCharValue); - nonNullValue_0.d = [self asByteSpan:params.nullableStruct.d]; - nonNullValue_0.e = [self asCharSpan:params.nullableStruct.e]; - nonNullValue_0.f = static_cast>( - params.nullableStruct.f.unsignedCharValue); - nonNullValue_0.g = params.nullableStruct.g.floatValue; - nonNullValue_0.h = params.nullableStruct.h.doubleValue; - } - if (params.optionalStruct != nil) { - auto & definedValue_0 = request.optionalStruct.Emplace(); - definedValue_0.a = params.optionalStruct.a.unsignedCharValue; - definedValue_0.b = params.optionalStruct.b.boolValue; - definedValue_0.c = static_cast>( - params.optionalStruct.c.unsignedCharValue); - definedValue_0.d = [self asByteSpan:params.optionalStruct.d]; - definedValue_0.e = [self asCharSpan:params.optionalStruct.e]; - definedValue_0.f = static_cast>( - params.optionalStruct.f.unsignedCharValue); - definedValue_0.g = params.optionalStruct.g.floatValue; - definedValue_0.h = params.optionalStruct.h.doubleValue; - } - if (params.nullableOptionalStruct != nil) { - auto & definedValue_0 = request.nullableOptionalStruct.Emplace(); - if (params.nullableOptionalStruct == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1.a = params.nullableOptionalStruct.a.unsignedCharValue; - nonNullValue_1.b = params.nullableOptionalStruct.b.boolValue; - nonNullValue_1.c = static_cast>( - params.nullableOptionalStruct.c.unsignedCharValue); - nonNullValue_1.d = [self asByteSpan:params.nullableOptionalStruct.d]; - nonNullValue_1.e = [self asCharSpan:params.nullableOptionalStruct.e]; - nonNullValue_1.f = static_cast>( - params.nullableOptionalStruct.f.unsignedCharValue); - nonNullValue_1.g = params.nullableOptionalStruct.g.floatValue; - nonNullValue_1.h = params.nullableOptionalStruct.h.doubleValue; - } - } - if (params.nullableList == nil) { - request.nullableList.SetNull(); - } else { - auto & nonNullValue_0 = request.nullableList.SetNonNull(); - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.nullableList.count != 0) { - auto * listHolder_1 = new ListHolder(params.nullableList.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.nullableList.count; ++i_1) { - if (![params.nullableList[i_1] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (NSNumber *) params.nullableList[i_1]; - listHolder_1->mList[i_1] = static_castmList[i_1])>>( - element_1.unsignedCharValue); - } - nonNullValue_0 = ListType_1(listHolder_1->mList, params.nullableList.count); - } else { - nonNullValue_0 = ListType_1(); - } - } - } - if (params.optionalList != nil) { - auto & definedValue_0 = request.optionalList.Emplace(); - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.optionalList.count != 0) { - auto * listHolder_1 = new ListHolder(params.optionalList.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.optionalList.count; ++i_1) { - if (![params.optionalList[i_1] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (NSNumber *) params.optionalList[i_1]; - listHolder_1->mList[i_1] = static_castmList[i_1])>>( - element_1.unsignedCharValue); - } - definedValue_0 = ListType_1(listHolder_1->mList, params.optionalList.count); - } else { - definedValue_0 = ListType_1(); - } - } - } - if (params.nullableOptionalList != nil) { - auto & definedValue_0 = request.nullableOptionalList.Emplace(); - if (params.nullableOptionalList == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - { - using ListType_2 = std::remove_reference_t; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (params.nullableOptionalList.count != 0) { - auto * listHolder_2 = new ListHolder(params.nullableOptionalList.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < params.nullableOptionalList.count; ++i_2) { - if (![params.nullableOptionalList[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) params.nullableOptionalList[i_2]; - listHolder_2->mList[i_2] - = static_castmList[i_2])>>( - element_2.unsignedCharValue); - } - nonNullValue_1 = ListType_2(listHolder_2->mList, params.nullableOptionalList.count); - } else { - nonNullValue_1 = ListType_2(); - } - } - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + testComplexNullableOptionalRequestWithParams:params + completion:^( + MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36116,61 +28463,26 @@ - (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEcho NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandSimpleStructEchoRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterSimpleStructResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterSimpleStructResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::SimpleStructEchoRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c = static_cast>(params.arg1.c.unsignedCharValue); - request.arg1.d = [self asByteSpan:params.arg1.d]; - request.arg1.e = [self asCharSpan:params.arg1.e]; - request.arg1.f = static_cast>(params.arg1.f.unsignedCharValue); - request.arg1.g = params.arg1.g.floatValue; - request.arg1.h = params.arg1.h.doubleValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster simpleStructEchoRequestWithParams:params + completion:^(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36201,55 +28513,25 @@ - (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestPar completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTimedInvokeRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TimedInvokeRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster timedInvokeRequestWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36271,58 +28553,25 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSi completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestSimpleOptionalArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.arg1 != nil) { - auto & definedValue_0 = request.arg1.Emplace(); - definedValue_0 = params.arg1.boolValue; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testSimpleOptionalArgumentRequestWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36345,56 +28594,26 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestEmitTestEventRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestEmitTestEventResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestEmitTestEventRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1 = params.arg1.unsignedCharValue; - request.arg2 = static_cast>(params.arg2.unsignedCharValue); - request.arg3 = params.arg3.boolValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testEmitTestEventRequestWithParams:params + completion:^(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36420,56 +28639,29 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestEmitTestFabricScopedEventRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1 = params.arg1.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + testEmitTestFabricScopedEventRequestWithParams:params + completion:^( + MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36487,7 +28679,7 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve - (NSDictionary *)readAttributeBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID) params:params]; @@ -36504,7 +28696,7 @@ - (void)writeAttributeBooleanWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID) value:dataValueDictionary @@ -36514,7 +28706,7 @@ - (void)writeAttributeBooleanWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeBitmap8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap8ID) params:params]; @@ -36531,7 +28723,7 @@ - (void)writeAttributeBitmap8WithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap8ID) value:dataValueDictionary @@ -36541,7 +28733,7 @@ - (void)writeAttributeBitmap8WithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeBitmap16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap16ID) params:params]; @@ -36558,7 +28750,7 @@ - (void)writeAttributeBitmap16WithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap16ID) value:dataValueDictionary @@ -36568,7 +28760,7 @@ - (void)writeAttributeBitmap16WithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeBitmap32WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap32ID) params:params]; @@ -36585,7 +28777,7 @@ - (void)writeAttributeBitmap32WithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap32ID) value:dataValueDictionary @@ -36595,7 +28787,7 @@ - (void)writeAttributeBitmap32WithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeBitmap64WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap64ID) params:params]; @@ -36612,7 +28804,7 @@ - (void)writeAttributeBitmap64WithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap64ID) value:dataValueDictionary @@ -36622,7 +28814,7 @@ - (void)writeAttributeBitmap64WithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8uID) params:params]; @@ -36639,7 +28831,7 @@ - (void)writeAttributeInt8uWithValue:(NSDictionary *)dataValueDi { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8uID) value:dataValueDictionary @@ -36649,7 +28841,7 @@ - (void)writeAttributeInt8uWithValue:(NSDictionary *)dataValueDi - (NSDictionary *)readAttributeInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16uID) params:params]; @@ -36666,7 +28858,7 @@ - (void)writeAttributeInt16uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16uID) value:dataValueDictionary @@ -36676,7 +28868,7 @@ - (void)writeAttributeInt16uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt24uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24uID) params:params]; @@ -36693,7 +28885,7 @@ - (void)writeAttributeInt24uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24uID) value:dataValueDictionary @@ -36703,7 +28895,7 @@ - (void)writeAttributeInt24uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt32uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32uID) params:params]; @@ -36720,7 +28912,7 @@ - (void)writeAttributeInt32uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32uID) value:dataValueDictionary @@ -36730,7 +28922,7 @@ - (void)writeAttributeInt32uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt40uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40uID) params:params]; @@ -36747,7 +28939,7 @@ - (void)writeAttributeInt40uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40uID) value:dataValueDictionary @@ -36757,7 +28949,7 @@ - (void)writeAttributeInt40uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt48uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48uID) params:params]; @@ -36774,7 +28966,7 @@ - (void)writeAttributeInt48uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48uID) value:dataValueDictionary @@ -36784,7 +28976,7 @@ - (void)writeAttributeInt48uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt56uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56uID) params:params]; @@ -36801,7 +28993,7 @@ - (void)writeAttributeInt56uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56uID) value:dataValueDictionary @@ -36811,7 +29003,7 @@ - (void)writeAttributeInt56uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt64uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64uID) params:params]; @@ -36828,7 +29020,7 @@ - (void)writeAttributeInt64uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64uID) value:dataValueDictionary @@ -36838,7 +29030,7 @@ - (void)writeAttributeInt64uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8sID) params:params]; @@ -36855,7 +29047,7 @@ - (void)writeAttributeInt8sWithValue:(NSDictionary *)dataValueDi { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8sID) value:dataValueDictionary @@ -36865,7 +29057,7 @@ - (void)writeAttributeInt8sWithValue:(NSDictionary *)dataValueDi - (NSDictionary *)readAttributeInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16sID) params:params]; @@ -36882,7 +29074,7 @@ - (void)writeAttributeInt16sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16sID) value:dataValueDictionary @@ -36892,7 +29084,7 @@ - (void)writeAttributeInt16sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt24sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24sID) params:params]; @@ -36909,7 +29101,7 @@ - (void)writeAttributeInt24sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24sID) value:dataValueDictionary @@ -36919,7 +29111,7 @@ - (void)writeAttributeInt24sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt32sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32sID) params:params]; @@ -36936,7 +29128,7 @@ - (void)writeAttributeInt32sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32sID) value:dataValueDictionary @@ -36946,7 +29138,7 @@ - (void)writeAttributeInt32sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt40sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40sID) params:params]; @@ -36963,7 +29155,7 @@ - (void)writeAttributeInt40sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40sID) value:dataValueDictionary @@ -36973,7 +29165,7 @@ - (void)writeAttributeInt40sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt48sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48sID) params:params]; @@ -36990,7 +29182,7 @@ - (void)writeAttributeInt48sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48sID) value:dataValueDictionary @@ -37000,7 +29192,7 @@ - (void)writeAttributeInt48sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt56sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56sID) params:params]; @@ -37017,7 +29209,7 @@ - (void)writeAttributeInt56sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56sID) value:dataValueDictionary @@ -37027,7 +29219,7 @@ - (void)writeAttributeInt56sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt64sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64sID) params:params]; @@ -37044,7 +29236,7 @@ - (void)writeAttributeInt64sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64sID) value:dataValueDictionary @@ -37054,7 +29246,7 @@ - (void)writeAttributeInt64sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEnum8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum8ID) params:params]; @@ -37071,7 +29263,7 @@ - (void)writeAttributeEnum8WithValue:(NSDictionary *)dataValueDi { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum8ID) value:dataValueDictionary @@ -37081,7 +29273,7 @@ - (void)writeAttributeEnum8WithValue:(NSDictionary *)dataValueDi - (NSDictionary *)readAttributeEnum16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum16ID) params:params]; @@ -37098,7 +29290,7 @@ - (void)writeAttributeEnum16WithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum16ID) value:dataValueDictionary @@ -37108,7 +29300,7 @@ - (void)writeAttributeEnum16WithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFloatSingleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatSingleID) params:params]; @@ -37125,7 +29317,7 @@ - (void)writeAttributeFloatSingleWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatSingleID) value:dataValueDictionary @@ -37135,7 +29327,7 @@ - (void)writeAttributeFloatSingleWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeFloatDoubleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatDoubleID) params:params]; @@ -37152,7 +29344,7 @@ - (void)writeAttributeFloatDoubleWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatDoubleID) value:dataValueDictionary @@ -37162,7 +29354,7 @@ - (void)writeAttributeFloatDoubleWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeOctetStringID) params:params]; @@ -37179,7 +29371,7 @@ - (void)writeAttributeOctetStringWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeOctetStringID) value:dataValueDictionary @@ -37189,7 +29381,7 @@ - (void)writeAttributeOctetStringWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeListInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListInt8uID) params:params]; @@ -37206,7 +29398,7 @@ - (void)writeAttributeListInt8uWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListInt8uID) value:dataValueDictionary @@ -37216,7 +29408,7 @@ - (void)writeAttributeListInt8uWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeListOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListOctetStringID) params:params]; @@ -37233,7 +29425,7 @@ - (void)writeAttributeListOctetStringWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListOctetStringID) value:dataValueDictionary @@ -37243,7 +29435,7 @@ - (void)writeAttributeListOctetStringWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeListStructOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListStructOctetStringID) params:params]; @@ -37262,7 +29454,7 @@ - (void)writeAttributeListStructOctetStringWithValue:(NSDictionary *)readAttributeLongOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongOctetStringID) params:params]; @@ -37289,7 +29481,7 @@ - (void)writeAttributeLongOctetStringWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongOctetStringID) value:dataValueDictionary @@ -37299,7 +29491,7 @@ - (void)writeAttributeLongOctetStringWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeCharStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeCharStringID) params:params]; @@ -37316,7 +29508,7 @@ - (void)writeAttributeCharStringWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeCharStringID) value:dataValueDictionary @@ -37326,7 +29518,7 @@ - (void)writeAttributeCharStringWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeLongCharStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongCharStringID) params:params]; @@ -37343,7 +29535,7 @@ - (void)writeAttributeLongCharStringWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongCharStringID) value:dataValueDictionary @@ -37353,7 +29545,7 @@ - (void)writeAttributeLongCharStringWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeEpochUsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochUsID) params:params]; @@ -37370,7 +29562,7 @@ - (void)writeAttributeEpochUsWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochUsID) value:dataValueDictionary @@ -37380,7 +29572,7 @@ - (void)writeAttributeEpochUsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeEpochSWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochSID) params:params]; @@ -37397,7 +29589,7 @@ - (void)writeAttributeEpochSWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochSID) value:dataValueDictionary @@ -37407,7 +29599,7 @@ - (void)writeAttributeEpochSWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeVendorIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeVendorIdID) params:params]; @@ -37424,7 +29616,7 @@ - (void)writeAttributeVendorIdWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeVendorIdID) value:dataValueDictionary @@ -37435,7 +29627,7 @@ - (void)writeAttributeVendorIdWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeListNullablesAndOptionalsStructWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListNullablesAndOptionalsStructID) params:params]; @@ -37454,7 +29646,7 @@ - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSDictionary *)readAttributeEnumAttrWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnumAttrID) params:params]; @@ -37481,7 +29673,7 @@ - (void)writeAttributeEnumAttrWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnumAttrID) value:dataValueDictionary @@ -37491,7 +29683,7 @@ - (void)writeAttributeEnumAttrWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeStructAttrWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeStructAttrID) params:params]; @@ -37508,7 +29700,7 @@ - (void)writeAttributeStructAttrWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeStructAttrID) value:dataValueDictionary @@ -37518,7 +29710,7 @@ - (void)writeAttributeStructAttrWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeRangeRestrictedInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt8uID) params:params]; @@ -37535,7 +29727,7 @@ - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSDictionary *)readAttributeRangeRestrictedInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt8sID) params:params]; @@ -37562,7 +29754,7 @@ - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSDictionary *)readAttributeRangeRestrictedInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt16uID) params:params]; @@ -37591,7 +29783,7 @@ - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSDictionary *)readAttributeRangeRestrictedInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt16sID) params:params]; @@ -37620,7 +29812,7 @@ - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSDictionary *)readAttributeListLongOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListLongOctetStringID) params:params]; @@ -37647,7 +29839,7 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListLongOctetStringID) value:dataValueDictionary @@ -37657,7 +29849,7 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSDictionary - (NSDictionary *)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListFabricScopedID) params:params]; @@ -37674,7 +29866,7 @@ - (void)writeAttributeListFabricScopedWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListFabricScopedID) value:dataValueDictionary @@ -37684,7 +29876,7 @@ - (void)writeAttributeListFabricScopedWithValue:(NSDictionary *) - (NSDictionary *)readAttributeTimedWriteBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeTimedWriteBooleanID) params:params]; @@ -37701,7 +29893,7 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeTimedWriteBooleanID) value:dataValueDictionary @@ -37711,7 +29903,7 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSDictionary * - (NSDictionary *)readAttributeGeneralErrorBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeGeneralErrorBooleanID) params:params]; @@ -37728,7 +29920,7 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeGeneralErrorBooleanID) value:dataValueDictionary @@ -37738,7 +29930,7 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterErrorBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterErrorBooleanID) params:params]; @@ -37755,7 +29947,7 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterErrorBooleanID) value:dataValueDictionary @@ -37765,7 +29957,7 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSDictionary - (NSDictionary *)readAttributeUnsupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeUnsupportedID) params:params]; @@ -37782,7 +29974,7 @@ - (void)writeAttributeUnsupportedWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeUnsupportedID) value:dataValueDictionary @@ -37792,7 +29984,7 @@ - (void)writeAttributeUnsupportedWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeNullableBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID) params:params]; @@ -37809,7 +30001,7 @@ - (void)writeAttributeNullableBooleanWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID) value:dataValueDictionary @@ -37819,7 +30011,7 @@ - (void)writeAttributeNullableBooleanWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeNullableBitmap8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap8ID) params:params]; @@ -37836,7 +30028,7 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap8ID) value:dataValueDictionary @@ -37846,7 +30038,7 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSDictionary *)d - (NSDictionary *)readAttributeNullableBitmap16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap16ID) params:params]; @@ -37863,7 +30055,7 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap16ID) value:dataValueDictionary @@ -37873,7 +30065,7 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableBitmap32WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap32ID) params:params]; @@ -37890,7 +30082,7 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap32ID) value:dataValueDictionary @@ -37900,7 +30092,7 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableBitmap64WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap64ID) params:params]; @@ -37917,7 +30109,7 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap64ID) value:dataValueDictionary @@ -37927,7 +30119,7 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8uID) params:params]; @@ -37944,7 +30136,7 @@ - (void)writeAttributeNullableInt8uWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8uID) value:dataValueDictionary @@ -37954,7 +30146,7 @@ - (void)writeAttributeNullableInt8uWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeNullableInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16uID) params:params]; @@ -37971,7 +30163,7 @@ - (void)writeAttributeNullableInt16uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16uID) value:dataValueDictionary @@ -37981,7 +30173,7 @@ - (void)writeAttributeNullableInt16uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt24uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24uID) params:params]; @@ -37998,7 +30190,7 @@ - (void)writeAttributeNullableInt24uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24uID) value:dataValueDictionary @@ -38008,7 +30200,7 @@ - (void)writeAttributeNullableInt24uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt32uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32uID) params:params]; @@ -38025,7 +30217,7 @@ - (void)writeAttributeNullableInt32uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32uID) value:dataValueDictionary @@ -38035,7 +30227,7 @@ - (void)writeAttributeNullableInt32uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt40uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40uID) params:params]; @@ -38052,7 +30244,7 @@ - (void)writeAttributeNullableInt40uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40uID) value:dataValueDictionary @@ -38062,7 +30254,7 @@ - (void)writeAttributeNullableInt40uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt48uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48uID) params:params]; @@ -38079,7 +30271,7 @@ - (void)writeAttributeNullableInt48uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48uID) value:dataValueDictionary @@ -38089,7 +30281,7 @@ - (void)writeAttributeNullableInt48uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt56uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56uID) params:params]; @@ -38106,7 +30298,7 @@ - (void)writeAttributeNullableInt56uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56uID) value:dataValueDictionary @@ -38116,7 +30308,7 @@ - (void)writeAttributeNullableInt56uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt64uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64uID) params:params]; @@ -38133,7 +30325,7 @@ - (void)writeAttributeNullableInt64uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64uID) value:dataValueDictionary @@ -38143,7 +30335,7 @@ - (void)writeAttributeNullableInt64uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8sID) params:params]; @@ -38160,7 +30352,7 @@ - (void)writeAttributeNullableInt8sWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8sID) value:dataValueDictionary @@ -38170,7 +30362,7 @@ - (void)writeAttributeNullableInt8sWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeNullableInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16sID) params:params]; @@ -38187,7 +30379,7 @@ - (void)writeAttributeNullableInt16sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16sID) value:dataValueDictionary @@ -38197,7 +30389,7 @@ - (void)writeAttributeNullableInt16sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt24sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24sID) params:params]; @@ -38214,7 +30406,7 @@ - (void)writeAttributeNullableInt24sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24sID) value:dataValueDictionary @@ -38224,7 +30416,7 @@ - (void)writeAttributeNullableInt24sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt32sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32sID) params:params]; @@ -38241,7 +30433,7 @@ - (void)writeAttributeNullableInt32sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32sID) value:dataValueDictionary @@ -38251,7 +30443,7 @@ - (void)writeAttributeNullableInt32sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt40sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40sID) params:params]; @@ -38268,7 +30460,7 @@ - (void)writeAttributeNullableInt40sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40sID) value:dataValueDictionary @@ -38278,7 +30470,7 @@ - (void)writeAttributeNullableInt40sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt48sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48sID) params:params]; @@ -38295,7 +30487,7 @@ - (void)writeAttributeNullableInt48sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48sID) value:dataValueDictionary @@ -38305,7 +30497,7 @@ - (void)writeAttributeNullableInt48sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt56sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56sID) params:params]; @@ -38322,7 +30514,7 @@ - (void)writeAttributeNullableInt56sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56sID) value:dataValueDictionary @@ -38332,7 +30524,7 @@ - (void)writeAttributeNullableInt56sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt64sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64sID) params:params]; @@ -38349,7 +30541,7 @@ - (void)writeAttributeNullableInt64sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64sID) value:dataValueDictionary @@ -38359,7 +30551,7 @@ - (void)writeAttributeNullableInt64sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableEnum8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum8ID) params:params]; @@ -38376,7 +30568,7 @@ - (void)writeAttributeNullableEnum8WithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum8ID) value:dataValueDictionary @@ -38386,7 +30578,7 @@ - (void)writeAttributeNullableEnum8WithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeNullableEnum16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum16ID) params:params]; @@ -38403,7 +30595,7 @@ - (void)writeAttributeNullableEnum16WithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum16ID) value:dataValueDictionary @@ -38413,7 +30605,7 @@ - (void)writeAttributeNullableEnum16WithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableFloatSingleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatSingleID) params:params]; @@ -38430,7 +30622,7 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatSingleID) value:dataValueDictionary @@ -38440,7 +30632,7 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableFloatDoubleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatDoubleID) params:params]; @@ -38457,7 +30649,7 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatDoubleID) value:dataValueDictionary @@ -38467,7 +30659,7 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableOctetStringID) params:params]; @@ -38484,7 +30676,7 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableOctetStringID) value:dataValueDictionary @@ -38494,7 +30686,7 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableCharStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableCharStringID) params:params]; @@ -38511,7 +30703,7 @@ - (void)writeAttributeNullableCharStringWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableCharStringID) value:dataValueDictionary @@ -38521,7 +30713,7 @@ - (void)writeAttributeNullableCharStringWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableEnumAttrWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnumAttrID) params:params]; @@ -38538,7 +30730,7 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnumAttrID) value:dataValueDictionary @@ -38548,7 +30740,7 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableStructWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableStructID) params:params]; @@ -38565,7 +30757,7 @@ - (void)writeAttributeNullableStructWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableStructID) value:dataValueDictionary @@ -38575,7 +30767,7 @@ - (void)writeAttributeNullableStructWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableRangeRestrictedInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt8uID) params:params]; @@ -38594,7 +30786,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSDictionary *)readAttributeNullableRangeRestrictedInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt8sID) params:params]; @@ -38623,7 +30815,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSDictionary *)readAttributeNullableRangeRestrictedInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt16uID) params:params]; @@ -38652,7 +30844,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSDictionary *)readAttributeNullableRangeRestrictedInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt16sID) params:params]; @@ -38681,7 +30873,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSDictionary *)readAttributeWriteOnlyInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeWriteOnlyInt8uID) params:params]; @@ -38708,7 +30900,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeWriteOnlyInt8uID) value:dataValueDictionary @@ -38718,7 +30910,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeGeneratedCommandListID) params:params]; @@ -38726,7 +30918,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeAcceptedCommandListID) params:params]; @@ -38734,7 +30926,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEventListID) params:params]; @@ -38742,7 +30934,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeAttributeListID) params:params]; @@ -38750,7 +30942,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFeatureMapID) params:params]; @@ -38758,7 +30950,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterRevisionID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h index d26b14c35e3001..db2545a83c9ade 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h @@ -22,466 +22,373 @@ #import "MTRDevice_Internal.h" @interface MTRClusterIdentify () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterGroups () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterScenes () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOnOff () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOnOffSwitchConfiguration () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterLevelControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBinaryInputBasic () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPulseWidthModulation () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterDescriptor () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBinding () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterAccessControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterActions () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBasicInformation () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOTASoftwareUpdateProvider () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOTASoftwareUpdateRequestor () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterLocalizationConfiguration () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTimeFormatLocalization () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterUnitLocalization () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPowerSourceConfiguration () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPowerSource () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterGeneralCommissioning () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterNetworkCommissioning () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterDiagnosticLogs () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterGeneralDiagnostics () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterSoftwareDiagnostics () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterThreadNetworkDiagnostics () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterWiFiNetworkDiagnostics () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterEthernetNetworkDiagnostics () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTimeSynchronization () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBridgedDeviceBasicInformation () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterSwitch () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterAdministratorCommissioning () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOperationalCredentials () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterGroupKeyManagement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterFixedLabel () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterUserLabel () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBooleanState () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterICDManagement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterModeSelect () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterLaundryWasherMode () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRefrigeratorAndTemperatureControlledCabinetMode () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterLaundryWasherControls () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRVCRunMode () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRVCCleanMode () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTemperatureControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRefrigeratorAlarm () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterDishwasherMode () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterAirQuality () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterSmokeCOAlarm () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterDishwasherAlarm () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOperationalState () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRVCOperationalState () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterHEPAFilterMonitoring () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterActivatedCarbonFilterMonitoring () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterDoorLock () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterWindowCovering () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBarrierControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPumpConfigurationAndControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterThermostat () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterFanControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterThermostatUserInterfaceConfiguration () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterColorControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBallastConfiguration () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterIlluminanceMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTemperatureMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPressureMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterFlowMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRelativeHumidityMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOccupancySensing () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterCarbonMonoxideConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterCarbonDioxideConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterNitrogenDioxideConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOzoneConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPM25ConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterFormaldehydeConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPM1ConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPM10ConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTotalVolatileOrganicCompoundsConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRadonConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterWakeOnLAN () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterChannel () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTargetNavigator () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterMediaPlayback () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterMediaInput () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterLowPower () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterKeypadInput () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterContentLauncher () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterAudioOutput () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterApplicationLauncher () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterApplicationBasic () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterAccountLogin () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterElectricalMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterUnitTesting () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end From afd843d4315870f5575767f1523bfd9fae57fe22 Mon Sep 17 00:00:00 2001 From: tcave-bb <90306563+tcave-bb@users.noreply.github.com> Date: Wed, 9 Aug 2023 13:22:32 +0100 Subject: [PATCH 55/74] Add airquality example (#28447) * initial implementation of air-quality-sensor-app * added AirQuality device endpoint * corrected device type * rename AirQualitySensorAppCommandHandler to avoid confusion with CommandHandlerInterface * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Restyled by prettier-markdown * fixed toc issue in readme * fixed zap generate issue * delete AirQualitySensorAttrUpdateHandler and code tidy up * added air-quality-sensor-app to examples/index.md toctree * changed concentrator to concentration * removed unused Ui::Windows * fixed spelling * fixed doc build error * fixed doc build error * fixed spelling in README * removed unused clusters and fixed cluter revisions * removed DiagnosticLogs * regenerate air-quality-sensor-app.matter after merging master * readme spelling and restyle * fixed cluster revisions * code tidy up * Restyled by clang-format * regenerated matter file * fixed min/max value updates * removed min max function maps --------- Co-authored-by: Restyled.io --- docs/examples/index.md | 9 + .../air-quality-sensor-common/BUILD.gn | 24 + .../air-quality-sensor-app.matter | 2199 ++++ .../air-quality-sensor-app.zap | 9559 +++++++++++++++++ examples/air-quality-sensor-app/linux/.gn | 25 + .../AirQualitySensorAppAttrUpdateDelegate.cpp | 190 + .../AirQualitySensorAppAttrUpdateDelegate.h | 63 + .../air-quality-sensor-app/linux/BUILD.gn | 66 + .../air-quality-sensor-app/linux/README.md | 154 + .../air-quality-sensor-app/linux/args.gni | 28 + .../linux/build_overrides | 1 + .../linux/include/CHIPProjectAppConfig.h | 39 + .../air-quality-sensor-app/linux/main.cpp | 65 + .../linux/third_party/connectedhomeip | 1 + 14 files changed, 12423 insertions(+) create mode 100755 examples/air-quality-sensor-app/air-quality-sensor-common/BUILD.gn create mode 100644 examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter create mode 100644 examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap create mode 100644 examples/air-quality-sensor-app/linux/.gn create mode 100644 examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp create mode 100644 examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.h create mode 100644 examples/air-quality-sensor-app/linux/BUILD.gn create mode 100644 examples/air-quality-sensor-app/linux/README.md create mode 100644 examples/air-quality-sensor-app/linux/args.gni create mode 120000 examples/air-quality-sensor-app/linux/build_overrides create mode 100644 examples/air-quality-sensor-app/linux/include/CHIPProjectAppConfig.h create mode 100644 examples/air-quality-sensor-app/linux/main.cpp create mode 120000 examples/air-quality-sensor-app/linux/third_party/connectedhomeip diff --git a/docs/examples/index.md b/docs/examples/index.md index e7b6224bdda1a1..3f16f71f69d024 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -3,6 +3,15 @@ The Matter SDK provides examples of Matter devices for different development platforms. +## Air Quality Sensor example + +```{toctree} +:glob: +:maxdepth: 1 + +air-quality-sensor-app/**/README +``` + ## All clusters example ```{toctree} diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/BUILD.gn b/examples/air-quality-sensor-app/air-quality-sensor-common/BUILD.gn new file mode 100755 index 00000000000000..6ca5be5ba634db --- /dev/null +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/BUILD.gn @@ -0,0 +1,24 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("${chip_root}/src/app/chip_data_model.gni") + +chip_data_model("air-quality-sensor-common") { + zap_file = "air-quality-sensor-app.zap" + + zap_pregenerated_dir = + "${chip_root}/zzz_generated/air-quality-sensor-app/zap-generated" + is_server = true +} diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter new file mode 100644 index 00000000000000..795a76f7eed3ec --- /dev/null +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter @@ -0,0 +1,2199 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + +struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; +} + +struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; +} + +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + +struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +server cluster Identify = 3 { + enum EffectIdentifierEnum : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : ENUM8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : ENUM8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +server cluster Descriptor = 29 { + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +server cluster AccessControl = 31 { + enum AccessControlEntryAuthModeEnum : ENUM8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : ENUM8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; + attribute access(write: manage) boolean localConfigDisabled = 16; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Provides an interface for providing OTA software updates */ +client cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHTTPS = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct QueryImageRequest { + vendor_id vendorID = 0; + INT16U productID = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING<2> location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING<512> metadataForProvider = 7; + } + + response struct QueryImageResponse = 1 { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING<256> imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING<64> softwareVersionString = 4; + optional OCTET_STRING<32> updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING<512> metadataForRequestor = 7; + } + + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + + response struct ApplyUpdateResponse = 3 { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ + command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; +} + +/** Provides an interface for downloading and applying OTA software updates */ +server cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : ENUM8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + fabric_scoped struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum reason = 2; + nullable INT32U targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + INT32U softwareVersion = 0; + INT16U productID = 1; + } + + info event DownloadError = 2 { + INT32U softwareVersion = 0; + INT64U bytesDownloaded = 1; + nullable INT8U progressPercent = 2; + nullable INT64S platformCode = 3; + } + + attribute ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute OTAUpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AnnounceOTAProviderRequest { + node_id providerNodeID = 0; + vendor_id vendorID = 1; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +server cluster GeneralCommissioning = 48 { + enum CommissioningErrorEnum : ENUM8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + } + + enum RegulatoryLocationTypeEnum : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatusEnum : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBandEnum : ENUM8 { + k2G4 = 0; + k3G65 = 1; + k5G = 2; + k6G = 3; + k60G = 4; + k1G = 5; + } + + bitmap Feature : BITMAP32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + } + + bitmap WiFiSecurityBitmap : BITMAP8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ScanNetworksRequest { + optional nullable OCTET_STRING<32> ssid = 0; + optional INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING<32> ssid = 0; + OCTET_STRING<64> credentials = 1; + optional INT64U breadcrumb = 2; + } + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING<254> operationalDataset = 0; + optional INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ConnectNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING<32> networkID = 0; + INT8U networkIndex = 1; + optional INT64U breadcrumb = 2; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING<512> debugText = 1; + optional INT8U networkIndex = 2; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + nullable INT32S errorValue = 2; + } + + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +server cluster GeneralDiagnostics = 51 { + enum BootReasonEnum : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + OCTET_STRING<16> enableKey = 0; + INT64U eventTrigger = 1; + } + + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; +} + +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +server cluster SoftwareDiagnostics = 52 { + bitmap Feature : BITMAP32 { + kWaterMarks = 0x1; + } + + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + + info event SoftwareFault = 0 { + INT64U id = 0; + optional CHAR_STRING name = 1; + optional OCTET_STRING faultRecording = 2; + } + + readonly attribute ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command ResetWatermarks(): DefaultSuccess = 0; +} + +/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ +server cluster ThreadNetworkDiagnostics = 53 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum NetworkFaultEnum : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRoleEnum : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kREED = 4; + kRouter = 5; + kLeader = 6; + } + + bitmap Feature : BITMAP32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + kMLECounts = 0x4; + kMACCounts = 0x8; + } + + struct NeighborTableStruct { + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + nullable int8s averageRssi = 6; + nullable int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; + } + + struct OperationalDatasetComponents { + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; + } + + struct RouteTableStruct { + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; + } + + struct SecurityPolicy { + int16u rotationTime = 0; + int16u flags = 1; + } + + info event ConnectionStatus = 0 { + ConnectionStatusEnum connectionStatus = 0; + } + + info event NetworkFaultChange = 1 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + readonly attribute nullable int16u channel = 0; + readonly attribute nullable RoutingRoleEnum routingRole = 1; + readonly attribute nullable char_string<16> networkName = 2; + readonly attribute nullable int16u panId = 3; + readonly attribute nullable int64u extendedPanId = 4; + readonly attribute nullable octet_string<17> meshLocalPrefix = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute NeighborTableStruct neighborTable[] = 7; + readonly attribute RouteTableStruct routeTable[] = 8; + readonly attribute nullable int32u partitionId = 9; + readonly attribute nullable int8u weighting = 10; + readonly attribute nullable int8u dataVersion = 11; + readonly attribute nullable int8u stableDataVersion = 12; + readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute int16u detachedRoleCount = 14; + readonly attribute int16u childRoleCount = 15; + readonly attribute int16u routerRoleCount = 16; + readonly attribute int16u leaderRoleCount = 17; + readonly attribute int16u attachAttemptCount = 18; + readonly attribute int16u partitionIdChangeCount = 19; + readonly attribute int16u betterPartitionAttachAttemptCount = 20; + readonly attribute int16u parentChangeCount = 21; + readonly attribute int32u txTotalCount = 22; + readonly attribute int32u txUnicastCount = 23; + readonly attribute int32u txBroadcastCount = 24; + readonly attribute int32u txAckRequestedCount = 25; + readonly attribute int32u txAckedCount = 26; + readonly attribute int32u txNoAckRequestedCount = 27; + readonly attribute int32u txDataCount = 28; + readonly attribute int32u txDataPollCount = 29; + readonly attribute int32u txBeaconCount = 30; + readonly attribute int32u txBeaconRequestCount = 31; + readonly attribute int32u txOtherCount = 32; + readonly attribute int32u txRetryCount = 33; + readonly attribute int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute int32u txErrCcaCount = 36; + readonly attribute int32u txErrAbortCount = 37; + readonly attribute int32u txErrBusyChannelCount = 38; + readonly attribute int32u rxTotalCount = 39; + readonly attribute int32u rxUnicastCount = 40; + readonly attribute int32u rxBroadcastCount = 41; + readonly attribute int32u rxDataCount = 42; + readonly attribute int32u rxDataPollCount = 43; + readonly attribute int32u rxBeaconCount = 44; + readonly attribute int32u rxBeaconRequestCount = 45; + readonly attribute int32u rxOtherCount = 46; + readonly attribute int32u rxAddressFilteredCount = 47; + readonly attribute int32u rxDestAddrFilteredCount = 48; + readonly attribute int32u rxDuplicatedCount = 49; + readonly attribute int32u rxErrNoFrameCount = 50; + readonly attribute int32u rxErrUnknownNeighborCount = 51; + readonly attribute int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute int32u rxErrSecCount = 53; + readonly attribute int32u rxErrFcsCount = 54; + readonly attribute int32u rxErrOtherCount = 55; + readonly attribute nullable int64u activeTimestamp = 56; + readonly attribute nullable int64u pendingTimestamp = 57; + readonly attribute nullable int32u delay = 58; + readonly attribute nullable SecurityPolicy securityPolicy = 59; + readonly attribute nullable octet_string<4> channelPage0Mask = 60; + readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; + readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +/** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCauseEnum : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWEP = 2; + kWPA = 3; + kWPA2 = 4; + kWPA3 = 5; + } + + enum WiFiVersionEnum : ENUM8 { + kA = 0; + kB = 1; + kG = 2; + kN = 3; + kAc = 4; + kAx = 5; + kAh = 6; + } + + bitmap Feature : BITMAP32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCauseEnum associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + ConnectionStatusEnum connectionStatus = 0; + } + + readonly attribute nullable octet_string<6> bssid = 0; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; + readonly attribute nullable int16u channelNumber = 3; + readonly attribute nullable int8s rssi = 4; + readonly attribute nullable int32u beaconLostCount = 5; + readonly attribute nullable int32u beaconRxCount = 6; + readonly attribute nullable int32u packetMulticastRxCount = 7; + readonly attribute nullable int32u packetMulticastTxCount = 8; + readonly attribute nullable int32u packetUnicastRxCount = 9; + readonly attribute nullable int32u packetUnicastTxCount = 10; + readonly attribute nullable int64u currentMaxRate = 11; + readonly attribute nullable int64u overrunCount = 12; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +/** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateEnum : ENUM8 { + kRate10M = 0; + kRate100M = 1; + kRate1G = 2; + kRate25G = 3; + kRate5G = 4; + kRate10G = 5; + kRate40G = 6; + kRate100G = 7; + kRate200G = 8; + kRate400G = 9; + } + + bitmap Feature : BITMAP32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + readonly attribute nullable PHYRateEnum PHYRate = 0; + readonly attribute nullable boolean fullDuplex = 1; + readonly attribute int64u packetRxCount = 2; + readonly attribute int64u packetTxCount = 3; + readonly attribute int64u txErrCount = 4; + readonly attribute int64u collisionCount = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute nullable boolean carrierDetect = 7; + readonly attribute int64u timeSinceReset = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatusEnum : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable int16u adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEPasscodeVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +server cluster OperationalCredentials = 62 { + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOK = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + request struct CSRRequestRequest { + OCTET_STRING CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + Int64u caseAdminSubject = 3; + VENDOR_ID adminVendorId = 4; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCACertificate = 0; + } + + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicyEnum : ENUM8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + INT16U groupKeySetIDs[] = 0; + } + + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** Attributes for reporting air quality classification */ +server cluster AirQuality = 91 { + enum AirQualityEnum : ENUM8 { + kUnknown = 0; + kGood = 1; + kFair = 2; + kModerate = 3; + kPoor = 4; + kVeryPoor = 5; + kExtremelyPoor = 6; + } + + bitmap Feature : BITMAP32 { + kFair = 0x1; + kModerate = 0x2; + kVeryPoor = 0x4; + kExtremelyPoor = 0x8; + } + + readonly attribute AirQualityEnum airQuality = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ +server cluster TemperatureMeasurement = 1026 { + readonly attribute nullable int16s measuredValue = 0; + readonly attribute nullable int16s minMeasuredValue = 1; + readonly attribute nullable int16s maxMeasuredValue = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ +server cluster RelativeHumidityMeasurement = 1029 { + readonly attribute nullable int16u measuredValue = 0; + readonly attribute nullable int16u minMeasuredValue = 1; + readonly attribute nullable int16u maxMeasuredValue = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Attributes for reporting carbon monoxide concentration measurements */ +server cluster CarbonMonoxideConcentrationMeasurement = 1036 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Attributes for reporting carbon dioxide concentration measurements */ +server cluster CarbonDioxideConcentrationMeasurement = 1037 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Attributes for reporting nitrogen dioxide concentration measurements */ +server cluster NitrogenDioxideConcentrationMeasurement = 1043 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Attributes for reporting ozone concentration measurements */ +server cluster OzoneConcentrationMeasurement = 1045 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Attributes for reporting PM2.5 concentration measurements */ +server cluster Pm25ConcentrationMeasurement = 1066 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Attributes for reporting formaldehyde concentration measurements */ +server cluster FormaldehydeConcentrationMeasurement = 1067 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Attributes for reporting PM1 concentration measurements */ +server cluster Pm1ConcentrationMeasurement = 1068 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Attributes for reporting PM10 concentration measurements */ +server cluster Pm10ConcentrationMeasurement = 1069 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Attributes for reporting total volatile organic compounds concentration measurements */ +server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement = 1070 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Attributes for reporting radon concentration measurements */ +server cluster RadonConcentrationMeasurement = 1071 { + enum LevelValueEnum : ENUM8 { + kUnknown = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kCritical = 4; + } + + enum MeasurementMediumEnum : ENUM8 { + kAir = 0; + kWater = 1; + kSoil = 2; + } + + enum MeasurementUnitEnum : ENUM8 { + kPPM = 0; + kPPB = 1; + kPPT = 2; + kMGM3 = 3; + kUGM3 = 4; + kNGM3 = 5; + kPM3 = 6; + kBQM3 = 7; + } + + bitmap Feature : BITMAP32 { + kNumericMeasurement = 0x1; + kLevelIndication = 0x2; + kMediumLevel = 0x4; + kCriticalLevel = 0x8; + kPeakMeasurement = 0x10; + kAverageMeasurement = 0x20; + } + + readonly attribute nullable single measuredValue = 0; + readonly attribute nullable single minMeasuredValue = 1; + readonly attribute nullable single maxMeasuredValue = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + binding cluster OtaSoftwareUpdateProvider; + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry default = 4; + callback attribute targetsPerAccessControlEntry default = 3; + callback attribute accessControlEntriesPerFabric default = 4; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision default = 10; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location default = "XX"; + callback attribute hardwareVersion default = 0; + callback attribute hardwareVersionString; + callback attribute softwareVersion default = 0; + callback attribute softwareVersionString; + callback attribute manufacturingDate default = "20210614123456ZZ"; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster OtaSoftwareUpdateRequestor { + emits event StateTransition; + emits event VersionApplied; + emits event DownloadError; + callback attribute defaultOTAProviders default = 0; + ram attribute updatePossible default = 1; + ram attribute updateState default = 0; + ram attribute updateStateProgress default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig default = 0; + callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; + ram attribute featureMap default = 6; + ram attribute clusterRevision default = 1; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount default = 0x0000; + callback attribute upTime default = 0x0000000000000000; + callback attribute totalOperationalHours default = 0x00000000; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree default = 0x0000000000000000; + callback attribute currentHeapUsed default = 0x0000000000000000; + callback attribute currentHeapHighWatermark default = 0x0000000000000000; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 1; + } + + server cluster ThreadNetworkDiagnostics { + callback attribute channel; + callback attribute routingRole; + callback attribute networkName default = "0"; + callback attribute panId default = 0x0000; + callback attribute extendedPanId default = 0x0000000000000000; + callback attribute meshLocalPrefix; + callback attribute overrunCount default = 0x0000000000000000; + callback attribute neighborTable; + callback attribute routeTable; + callback attribute partitionId; + callback attribute weighting; + callback attribute dataVersion; + callback attribute stableDataVersion; + callback attribute leaderRouterId; + callback attribute detachedRoleCount default = 0x0000; + callback attribute childRoleCount default = 0x0000; + callback attribute routerRoleCount default = 0x0000; + callback attribute leaderRoleCount default = 0x0000; + callback attribute attachAttemptCount default = 0x0000; + callback attribute partitionIdChangeCount default = 0x0000; + callback attribute betterPartitionAttachAttemptCount default = 0x0000; + callback attribute parentChangeCount default = 0x0000; + callback attribute txTotalCount default = 0x0000; + callback attribute txUnicastCount default = 0x0000; + callback attribute txBroadcastCount default = 0x0000; + callback attribute txAckRequestedCount default = 0x0000; + callback attribute txAckedCount default = 0x0000; + callback attribute txNoAckRequestedCount default = 0x0000; + callback attribute txDataCount default = 0x0000; + callback attribute txDataPollCount default = 0x0000; + callback attribute txBeaconCount default = 0x0000; + callback attribute txBeaconRequestCount default = 0x0000; + callback attribute txOtherCount default = 0x0000; + callback attribute txRetryCount default = 0x0000; + callback attribute txDirectMaxRetryExpiryCount default = 0x0000; + callback attribute txIndirectMaxRetryExpiryCount default = 0x0000; + callback attribute txErrCcaCount default = 0x0000; + callback attribute txErrAbortCount default = 0x0000; + callback attribute txErrBusyChannelCount default = 0x0000; + callback attribute rxTotalCount default = 0x0000; + callback attribute rxUnicastCount default = 0x0000; + callback attribute rxBroadcastCount default = 0x0000; + callback attribute rxDataCount default = 0x0000; + callback attribute rxDataPollCount default = 0x0000; + callback attribute rxBeaconCount default = 0x0000; + callback attribute rxBeaconRequestCount default = 0x0000; + callback attribute rxOtherCount default = 0x0000; + callback attribute rxAddressFilteredCount default = 0x0000; + callback attribute rxDestAddrFilteredCount default = 0x0000; + callback attribute rxDuplicatedCount default = 0x0000; + callback attribute rxErrNoFrameCount default = 0x0000; + callback attribute rxErrUnknownNeighborCount default = 0x0000; + callback attribute rxErrInvalidSrcAddrCount default = 0x0000; + callback attribute rxErrSecCount default = 0x0000; + callback attribute rxErrFcsCount default = 0x0000; + callback attribute rxErrOtherCount default = 0x0000; + callback attribute activeTimestamp default = 0x0000000000000000; + callback attribute pendingTimestamp default = 0x0000000000000000; + callback attribute delay default = 0x0000; + callback attribute securityPolicy; + callback attribute channelPage0Mask default = "0x0000"; + callback attribute operationalDatasetComponents; + callback attribute activeNetworkFaultsList; + ram attribute featureMap default = 0x000F; + ram attribute clusterRevision default = 1; + } + + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; + callback attribute bssid; + callback attribute securityType; + callback attribute wiFiVersion; + callback attribute channelNumber default = 0x0000; + callback attribute rssi default = 0x00; + callback attribute beaconLostCount default = 0x00000000; + callback attribute beaconRxCount default = 0x00000000; + callback attribute packetMulticastRxCount default = 0x00000000; + callback attribute packetMulticastTxCount default = 0x00000000; + callback attribute packetUnicastRxCount default = 0x00000000; + callback attribute packetUnicastTxCount default = 0x00000000; + callback attribute currentMaxRate default = 0x0000000000000000; + callback attribute overrunCount default = 0x0000000000000000; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + } + + server cluster EthernetNetworkDiagnostics { + callback attribute PHYRate; + callback attribute fullDuplex default = 0x00; + callback attribute packetRxCount default = 0x0000000000000000; + callback attribute packetTxCount default = 0x0000000000000000; + callback attribute txErrCount default = 0x0000000000000000; + callback attribute collisionCount default = 0x0000000000000000; + callback attribute overrunCount default = 0x0000000000000000; + callback attribute carrierDetect default = 0x00; + callback attribute timeSinceReset default = 0x0000000000000000; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type ma_air_quality_sensor = 44, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster AirQuality { + ram attribute airQuality default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster TemperatureMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster RelativeHumidityMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster CarbonMonoxideConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster CarbonDioxideConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster NitrogenDioxideConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster OzoneConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster Pm25ConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster FormaldehydeConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster Pm1ConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster Pm10ConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster RadonConcentrationMeasurement { + ram attribute measuredValue; + ram attribute minMeasuredValue; + ram attribute maxMeasuredValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } +} + + diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap new file mode 100644 index 00000000000000..8a03eb47e2540f --- /dev/null +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap @@ -0,0 +1,9559 @@ +{ + "featureLevel": 96, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "name": "MA-rootdevice", + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "switch type", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "switch actions", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "XX", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OTAUpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StateTransition", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "VersionApplied", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DownloadError", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "en-US", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 0, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000F", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-air-quality-sensor", + "deviceTypeCode": 44, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Air Quality", + "code": 91, + "mfgCode": null, + "define": "AIR_QUALITY_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Air Quality", + "code": 91, + "mfgCode": null, + "define": "AIR_QUALITY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "AirQuality", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "AirQualityEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Relative Humidity Measurement", + "code": 1029, + "mfgCode": null, + "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Relative Humidity Measurement", + "code": 1029, + "mfgCode": null, + "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Carbon Monoxide Concentration Measurement", + "code": 1036, + "mfgCode": null, + "define": "CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Carbon Monoxide Concentration Measurement", + "code": 1036, + "mfgCode": null, + "define": "CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Carbon Dioxide Concentration Measurement", + "code": 1037, + "mfgCode": null, + "define": "CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Carbon Dioxide Concentration Measurement", + "code": 1037, + "mfgCode": null, + "define": "CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Nitrogen Dioxide Concentration Measurement", + "code": 1043, + "mfgCode": null, + "define": "NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Nitrogen Dioxide Concentration Measurement", + "code": 1043, + "mfgCode": null, + "define": "NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Ozone Concentration Measurement", + "code": 1045, + "mfgCode": null, + "define": "OZONE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Ozone Concentration Measurement", + "code": 1045, + "mfgCode": null, + "define": "OZONE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "PM2.5 Concentration Measurement", + "code": 1066, + "mfgCode": null, + "define": "PM2_5_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "PM2.5 Concentration Measurement", + "code": 1066, + "mfgCode": null, + "define": "PM2_5_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Formaldehyde Concentration Measurement", + "code": 1067, + "mfgCode": null, + "define": "FORMALDEHYDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Formaldehyde Concentration Measurement", + "code": 1067, + "mfgCode": null, + "define": "FORMALDEHYDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "PM1 Concentration Measurement", + "code": 1068, + "mfgCode": null, + "define": "PM1_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "PM1 Concentration Measurement", + "code": 1068, + "mfgCode": null, + "define": "PM1_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "PM10 Concentration Measurement", + "code": 1069, + "mfgCode": null, + "define": "PM10_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "PM10 Concentration Measurement", + "code": 1069, + "mfgCode": null, + "define": "PM10_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Total Volatile Organic Compounds Concentration Measurement", + "code": 1070, + "mfgCode": null, + "define": "TVOC_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Total Volatile Organic Compounds Concentration Measurement", + "code": 1070, + "mfgCode": null, + "define": "TVOC_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Radon Concentration Measurement", + "code": 1071, + "mfgCode": null, + "define": "RADON_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Radon Concentration Measurement", + "code": 1071, + "mfgCode": null, + "define": "RADON_CONCENTRATION_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValue", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PeakMeasuredValueWindow", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValue", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AverageMeasuredValueWindow", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Uncertainty", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "single", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementUnit", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "MeasurementUnitEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeasurementMedium", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "MeasurementMediumEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LevelValue", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "LevelValueEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 22 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 44 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/air-quality-sensor-app/linux/.gn b/examples/air-quality-sensor-app/linux/.gn new file mode 100644 index 00000000000000..5d1ce757507582 --- /dev/null +++ b/examples/air-quality-sensor-app/linux/.gn @@ -0,0 +1,25 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + import("//args.gni") +} diff --git a/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp b/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp new file mode 100644 index 00000000000000..aea583d910bf12 --- /dev/null +++ b/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp @@ -0,0 +1,190 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "AirQualitySensorAppAttrUpdateDelegate.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::DeviceLayer; + +struct ConcentrationFuncPointers +{ + EmberAfStatus (*setMeasuredValue)(chip::EndpointId, float); + /* Add required function maps */ +}; + +// Define a map of string keys to function pointers +std::map ConcentrationFuncMap = { + { "CarbonMonoxideConcentrationMeasurement", + { &CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Set + /* Add required function maps */ } }, + { "CarbonDioxideConcentrationMeasurement", + { &CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::Set + /* Add required function maps */ } }, + { "NitrogenDioxideConcentrationMeasurement", + { &NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::Set + /* Add required function maps */ } }, + { "OzoneConcentrationMeasurement", + { &OzoneConcentrationMeasurement::Attributes::MeasuredValue::Set + /* Add required function maps */ } }, + { "Pm25ConcentrationMeasurement", + { &Pm25ConcentrationMeasurement::Attributes::MeasuredValue::Set + /* Add required function maps */ } }, + { "FormaldehydeConcentration", + { &FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::Set + /* Add required function maps */ } }, + { "Pm1ConcentrationMeasurement", + { &Pm1ConcentrationMeasurement::Attributes::MeasuredValue::Set + /* Add required function maps */ } }, + { "Pm10ConcentrationMeasurement", + { &Pm10ConcentrationMeasurement::Attributes::MeasuredValue::Set + /* Add required function maps */ } }, + { "TotalVolatileOrganicCompoundsConcentrationMeasurement", + { &TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::Set + /* Add required function maps */ } }, + { "RadonConcentrationMeasurement", + { &RadonConcentrationMeasurement::Attributes::MeasuredValue::Set + /* Add required function maps */ } } +}; + +AirQualitySensorAttrUpdateHandler * AirQualitySensorAttrUpdateHandler::FromJSON(const char * json) +{ + Json::Reader reader; + Json::Value value; + + if (!reader.parse(json, value)) + { + ChipLogError(NotSpecified, + "AllClusters App: Error parsing JSON with error %s:", reader.getFormattedErrorMessages().c_str()); + return nullptr; + } + + if (value.empty() || !value.isObject()) + { + ChipLogError(NotSpecified, "AllClusters App: Invalid JSON command received"); + return nullptr; + } + + if (!value.isMember("Name") || !value["Name"].isString()) + { + ChipLogError(NotSpecified, "AllClusters App: Invalid JSON command received: command name is missing"); + return nullptr; + } + + return Platform::New(std::move(value)); +} + +void AirQualitySensorAttrUpdateHandler::HandleCommand(intptr_t context) +{ + auto * self = reinterpret_cast(context); + std::string clusterName = self->mJsonValue["Name"].asString(); + + VerifyOrReturn(!self->mJsonValue.empty(), ChipLogError(NotSpecified, "Invalid JSON event command received")); + + if (clusterName == "AirQuality") + { + uint8_t newValue = static_cast(self->mJsonValue["NewValue"].asUInt()); + self->OnAirQualityChangeHandler(newValue); + } + else if (clusterName == "TemperatureMeasurement") + { + int16_t newValue = static_cast(self->mJsonValue["NewValue"].asUInt()); + self->OnTemperatureChangeHandler(newValue); + } + else if (clusterName == "RelativeHumidityMeasurement") + { + uint16_t newValue = static_cast(self->mJsonValue["NewValue"].asUInt()); + self->OnHumidityChangeHandler(newValue); + } + else if (clusterName.find("Concentration") != std::string::npos) + { + float newValue = static_cast(self->mJsonValue["NewValue"].asFloat()); + self->OnConcetratorChangeHandler(clusterName, newValue); + } + else + { + ChipLogError(NotSpecified, "Invalid cluster name %s", clusterName.c_str()); + } + + // Delete AirQualitySensorAttrUpdateHandler + Platform::Delete(self); +} + +void AirQualitySensorAttrUpdateHandler::OnAirQualityChangeHandler(uint8_t newValue) +{ + EndpointId endpoint = 1; + EmberAfStatus status = AirQuality::Attributes::AirQuality::Set(endpoint, static_cast(newValue)); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set AirQuality attribute")); + ChipLogDetail(NotSpecified, "The new AirQuality value: %d", newValue); +} + +void AirQualitySensorAttrUpdateHandler::OnTemperatureChangeHandler(int16_t newValue) +{ + EndpointId endpoint = 1; + EmberAfStatus status = TemperatureMeasurement::Attributes::MeasuredValue::Set(endpoint, newValue); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + ChipLogError(NotSpecified, "Failed to TemperatureMeasurement MeasuredValue attribute")); + ChipLogDetail(NotSpecified, "The new TemperatureMeasurement value: %d", newValue); +} + +void AirQualitySensorAttrUpdateHandler::OnHumidityChangeHandler(uint16_t newValue) +{ + EndpointId endpoint = 1; + EmberAfStatus status = RelativeHumidityMeasurement::Attributes::MeasuredValue::Set(endpoint, newValue); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + ChipLogError(NotSpecified, "Failed to RelativeHumidityMeasurement MeasuredValue attribute")); + ChipLogDetail(NotSpecified, "The new RelativeHumidityMeasurement value: %d", newValue); +} + +void AirQualitySensorAttrUpdateHandler::OnConcetratorChangeHandler(std::string ConcentrationName, float newValue) +{ + auto [setMeasuredValue] = ConcentrationFuncMap[ConcentrationName]; + + VerifyOrReturn(setMeasuredValue != NULL, ChipLogError(NotSpecified, "Invalid Concentration %s", ConcentrationName.c_str())); + + EndpointId endpoint = 1; + EmberAfStatus status = setMeasuredValue(endpoint, newValue); + VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + ChipLogError(NotSpecified, "Failed to %s set MeasuredValue attribute", ConcentrationName.c_str())); + ChipLogDetail(NotSpecified, "The new %s value: %f", ConcentrationName.c_str(), newValue); +} + +void AirQualitySensorAppAttrUpdateDelegate::OnEventCommandReceived(const char * json) +{ + auto handler = AirQualitySensorAttrUpdateHandler::FromJSON(json); + if (nullptr == handler) + { + ChipLogError(NotSpecified, "AllClusters App: Unable to instantiate a command handler"); + return; + } + + chip::DeviceLayer::PlatformMgr().ScheduleWork(AirQualitySensorAttrUpdateHandler::HandleCommand, + reinterpret_cast(handler)); +} diff --git a/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.h b/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.h new file mode 100644 index 00000000000000..e608b7a671457d --- /dev/null +++ b/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.h @@ -0,0 +1,63 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "NamedPipeCommands.h" + +#include +#include + +class AirQualitySensorAttrUpdateHandler +{ +public: + static AirQualitySensorAttrUpdateHandler * FromJSON(const char * json); + + static void HandleCommand(intptr_t context); + + AirQualitySensorAttrUpdateHandler(Json::Value && jasonValue) : mJsonValue(std::move(jasonValue)) {} + +private: + Json::Value mJsonValue; + + /** + * Should be called to set new value of AirQuality. + */ + void OnAirQualityChangeHandler(uint8_t newValue); + + /** + * Should be called to set new value of Temperature. + */ + void OnTemperatureChangeHandler(int16_t newValue); + + /** + * Should be called to set new value of Humidity. + */ + void OnHumidityChangeHandler(uint16_t newValue); + + /** + * Should be called to set new value for a Concentration. + */ + void OnConcetratorChangeHandler(std::string ConcentrationName, float newValue); +}; + +class AirQualitySensorAppAttrUpdateDelegate : public NamedPipeCommandDelegate +{ +public: + void OnEventCommandReceived(const char * json) override; +}; diff --git a/examples/air-quality-sensor-app/linux/BUILD.gn b/examples/air-quality-sensor-app/linux/BUILD.gn new file mode 100644 index 00000000000000..4f0fb98810d3f9 --- /dev/null +++ b/examples/air-quality-sensor-app/linux/BUILD.gn @@ -0,0 +1,66 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") + +import("${chip_root}/build/chip/tools.gni") +import("${chip_root}/src/app/common_flags.gni") +import("${chip_root}/third_party/imgui/imgui.gni") + +assert(chip_build_tools) + +config("includes") { + include_dirs = [ + ".", + "include", + ] +} + +executable("air-quality-sensor-app") { + sources = [ + "AirQualitySensorAppAttrUpdateDelegate.cpp", + "include/CHIPProjectAppConfig.h", + "main.cpp", + ] + + deps = [ + "${chip_root}/examples/air-quality-sensor-app/air-quality-sensor-common", + "${chip_root}/examples/platform/linux:app-main", + "${chip_root}/src/lib", + "${chip_root}/third_party/jsoncpp", + ] + + if (chip_examples_enable_imgui_ui) { + deps += [ + "${chip_root}/examples/common/imgui_ui", + "${chip_root}/examples/common/imgui_ui/windows:boolean_state", + "${chip_root}/examples/common/imgui_ui/windows:occupancy_sensing", + "${chip_root}/examples/common/imgui_ui/windows:qrcode", + ] + } + + include_dirs = [ "include" ] + + cflags = [ "-Wconversion" ] + + output_dir = root_out_dir +} + +group("linux") { + deps = [ ":air-quality-sensor-app" ] +} + +group("default") { + deps = [ ":linux" ] +} diff --git a/examples/air-quality-sensor-app/linux/README.md b/examples/air-quality-sensor-app/linux/README.md new file mode 100644 index 00000000000000..a8710d62f0e3c5 --- /dev/null +++ b/examples/air-quality-sensor-app/linux/README.md @@ -0,0 +1,154 @@ +# CHIP Linux Air Quality Example + +An example showing the use of CHIP on the Linux. The document will describe how +to build and run CHIP Linux Air Quality Example on Raspberry Pi. This doc is +tested on **Ubuntu for Raspberry Pi Server 20.04 LTS (aarch64)** and **Ubuntu +for Raspberry Pi Desktop 20.10 (aarch64)** + +To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** +**EVK**, see the associated +[README document](../../../docs/guides/nxp_imx8m_linux_examples.md) for details. + +
+ +- [CHIP Linux Air Quality Example](#chip-linux-air-quality-example) + - [Building](#building) + - [Commandline Arguments](#commandline-arguments) + - [Running the Complete Example on Raspberry Pi 4](#running-the-complete-example-on-raspberry-pi-4) + - [Trigger event using air-quality-sensor-app event named pipe](#trigger-event-using-air-quality-sensor-app-event-named-pipe) + +
+ +## Building + +- Install tool chain + + $ sudo apt-get install git gcc g++ python pkg-config libssl-dev libdbus-1-dev libglib2.0-dev ninja-build python3-venv python3-dev unzip + +- Build the example application: + + $ cd ~/connectedhomeip/examples/air-quality-sensor-app/linux + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ gn gen out/debug + $ ninja -C out/debug + +- To delete generated executable, libraries and object files use: + + $ cd ~/connectedhomeip/examples/air-quality-sensor-app/linux + $ rm -rf out/ + +- Build the example with pigweed RPC + + $ cd ~/connectedhomeip/examples/air-quality-sensor-app/linux + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ gn gen out/debug --args='import("//with_pw_rpc.gni")' + $ ninja -C out/debug + +## Commandline arguments + +- `--wifi` + + Enables WiFi management feature. Required for WiFi commissioning. + +- `--thread` + + Enables Thread management feature, requires ot-br-posix dbus daemon running. + Required for Thread commissioning. + +- `--ble-device ` + + Use specific bluetooth interface for BLE advertisement and connections. + + `interface id`: the number after `hci` when listing BLE interfaces by + `hciconfig` command, for example, `--ble-device 1` means using `hci1` + interface. Default: `0`. + +## Running the Complete Example on Raspberry Pi 4 + +> gn gen out/debug +> ninja -C out/debug + +- Prerequisites + + 1. A Raspberry Pi 4 board + 2. A USB Bluetooth Dongle, Ubuntu desktop will send Bluetooth advertisement, + which will block CHIP from connecting via BLE. On Ubuntu server, you need + to install `pi-bluetooth` via APT. + 3. Ubuntu 20.04 or newer image for ARM64 platform. + +- Building + + Follow [Building](#building) section of this document. + +- Running + + - [Optional] Plug USB Bluetooth dongle + + - Plug USB Bluetooth dongle and find its bluetooth device number. The + number after `hci` is the bluetooth device number, `1` in this + example. + + $ hciconfig + hci1: Type: Primary Bus: USB + BD Address: 00:1A:7D:AA:BB:CC ACL MTU: 310:10 SCO MTU: 64:8 + UP RUNNING PSCAN ISCAN + RX bytes:20942 acl:1023 sco:0 events:1140 errors:0 + TX bytes:16559 acl:1011 sco:0 commands:121 errors:0 + + hci0: Type: Primary Bus: UART + BD Address: B8:27:EB:AA:BB:CC ACL MTU: 1021:8 SCO MTU: 64:1 + UP RUNNING PSCAN ISCAN + RX bytes:8609495 acl:14 sco:0 events:217484 errors:0 + TX bytes:92185 acl:20 sco:0 commands:5259 errors:0 + + - Run Linux Air Quality Example App + + $ cd ~/connectedhomeip/examples/air-quality-sensor-app/linux + $ sudo out/debug/chip-air-quality-sensor-app --ble-device [bluetooth device number] + # In this example, the device we want to use is hci1 + $ sudo out/debug/chip-air-quality-sensor-app --ble-device 1 + + - Test the device using ChipDeviceController on your laptop / + workstation etc. + +## Trigger event using air-quality-sensor-app event named pipe + +You can send a command to air-quality-sensor-app to trigger specific event via +air-quality-sensor-app event named pipe /tmp/chip_air_quality_fifo-. + +### Trigger air quality change event + +Generate event `AirQuality`, to change the air quality value. + +``` +$ echo '{"Name":"AirQuality","NewValue":3}' > /tmp/chip_air_quality_fifo- +``` + +### Trigger Temperature change event + +Generate event `TemperatureMeasurement`, to change the temperate value. + +``` +$ echo '{"Name":"TemperatureMeasurement","NewValue":18}' > /tmp/chip_air_quality_fifo- +``` + +### Trigger Humidity change event + +Generate event `RelativeHumidityMeasurement`, to change the temperate value. + +``` +$ echo '{"Name":"RelativeHumidityMeasurement","NewValue":60}' > /tmp/chip_air_quality_fifo- +``` + +### Trigger concentration change event + +Concentration change events can be trigger on the concentration measurement +clusters. + +Generate event `CarbonDioxideConcentrationMeasurement`, to change the CO2 value. + +``` +$ echo '{"Name":"CarbonDioxideConcentrationMeasurement","NewValue":400}' > /tmp/chip_air_quality_fifo- +``` diff --git a/examples/air-quality-sensor-app/linux/args.gni b/examples/air-quality-sensor-app/linux/args.gni new file mode 100644 index 00000000000000..bb31d7a8dbb17d --- /dev/null +++ b/examples/air-quality-sensor-app/linux/args.gni @@ -0,0 +1,28 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# CHIPProjectConfig.h + +import("//build_overrides/chip.gni") + +import("${chip_root}/config/standalone/args.gni") + +chip_device_project_config_include = "" +chip_project_config_include = "" +chip_system_project_config_include = "" + +chip_project_config_include_dirs = + [ "${chip_root}/examples/air-quality-sensor-app/linux/include" ] +chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] +matter_enable_tracing_support = true diff --git a/examples/air-quality-sensor-app/linux/build_overrides b/examples/air-quality-sensor-app/linux/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/air-quality-sensor-app/linux/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/air-quality-sensor-app/linux/include/CHIPProjectAppConfig.h b/examples/air-quality-sensor-app/linux/include/CHIPProjectAppConfig.h new file mode 100644 index 00000000000000..513c7648249110 --- /dev/null +++ b/examples/air-quality-sensor-app/linux/include/CHIPProjectAppConfig.h @@ -0,0 +1,39 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +// include the CHIPProjectConfig from config/standalone +#include + +#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY 0 + +// Bulbs do not typically use this - enabled so we can use shell to discover commissioners +#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT 1 + +#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 + +#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_TYPE 1 + +#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 0x002C // Air Quality Sensor + +#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_NAME 1 + +#define CHIP_DEVICE_ENABLE_PORT_PARAMS 1 + +#define CHIP_DEVICE_CONFIG_DEVICE_NAME "Air Quality Sensor" diff --git a/examples/air-quality-sensor-app/linux/main.cpp b/examples/air-quality-sensor-app/linux/main.cpp new file mode 100644 index 00000000000000..9c20fb3c2259c3 --- /dev/null +++ b/examples/air-quality-sensor-app/linux/main.cpp @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "AirQualitySensorAppAttrUpdateDelegate.h" +#include + +#include +#include + +#if defined(CHIP_IMGUI_ENABLED) && CHIP_IMGUI_ENABLED +#include +#include +#endif + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; + +namespace { +constexpr const char kChipEventFifoPathPrefix[] = "/tmp/chip_air_quality_fifo_"; +NamedPipeCommands sChipNamedPipeCommands; +AirQualitySensorAppAttrUpdateDelegate sAirQualitySensorAppCommandDelegate; +} // namespace + +void ApplicationInit() {} + +void ApplicationShutdown() {} + +int main(int argc, char * argv[]) +{ + VerifyOrDie(ChipLinuxAppInit(argc, argv) == 0); + + std::string path = kChipEventFifoPathPrefix + std::to_string(getpid()); + + if (sChipNamedPipeCommands.Start(path, &sAirQualitySensorAppCommandDelegate) != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to start CHIP NamedPipeCommands"); + sChipNamedPipeCommands.Stop(); + } + +#if defined(CHIP_IMGUI_ENABLED) && CHIP_IMGUI_ENABLED + example::Ui::ImguiUi ui; + ui.AddWindow(std::make_unique()); + ChipLinuxAppMainLoop(&ui); +#else + ChipLinuxAppMainLoop(); +#endif + + return 0; +} diff --git a/examples/air-quality-sensor-app/linux/third_party/connectedhomeip b/examples/air-quality-sensor-app/linux/third_party/connectedhomeip new file mode 120000 index 00000000000000..c866b86874994d --- /dev/null +++ b/examples/air-quality-sensor-app/linux/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file From 0ecb4e163e16325868fbbbe8a4122968fcecab59 Mon Sep 17 00:00:00 2001 From: Marius Tache <102153746+marius-alex-tache@users.noreply.github.com> Date: Wed, 9 Aug 2023 16:31:26 +0300 Subject: [PATCH 56/74] [K32W0] SDK 2.6.12 changes (#28489) * k32w0: Re-use Thread task for BLE processing Signed-off-by: Doru Gucea * k32w0: Use generic FreeRTOS functions Avoid using messaging/allocation functions specific to K32W0-SDK and use instead generic FreeRTOS functions. This opens the path for a common BLE Manager between K32W0/K32W1. Signed-off-by: Doru Gucea * k32w0: event queues: use generic FreeRTOS functions Signed-off-by: Doru Gucea * k32w0: avoid useless advertising restarting There is no need to restart advertising after a connect event. Signed-off-by: Doru Gucea * [K32W0] Place BLE common code in a single file Only specific BLE initialization code is placed under k32w0 folder. Signed-off-by: Doru Gucea * [K32W0] Place specific initialization code in an abstract method Signed-off-by: Doru Gucea * [K32W0] Avoid useless stop of ble advertising Signed-off-by: Doru Gucea * [K32W0] Remove unused function Signed-off-by: Doru Gucea * k32w0: remove useless controller code NVIC Priority set is done inside the controller library. Signed-off-by: Doru Gucea * [K32W0] Small fixes - return codes; - comments. Signed-off-by: Doru Gucea * [K32W0] Add LP API header The LP API was not included in BleManagerImpl when building in low power mode. Signed-off-by: Marius Tache * [K32W0] Clear unsupported thread metrics Thread metrics optional fields should call ClearValue explicitly, to make sure no garbage is returned in the response message. Signed-off-by: Marius Tache * [K32W0] Disable CHIP_DEVICE_CONFIG_BLE_SET_PHY_2M_REQ for lock/contact sensor This define enables/disables the Gap_LeSetPhy request to switch to 2M. It is disabled here for interoperability reasons just to be extra cautious. Both devices may send a Link Layer control procedure in parallel resulting in a LPM Error Transaction Collision. If the peer device doesn't accept our reject command, this can result in a BLE connection timeout. Signed-off-by: Marius Tache * [K32W0] FRO 32K mode should be used with 32Mhz cpu clock Signed-off-by: Marius Tache * [K32W0] Remove OTA API dependency in factory data provider If factory data is used, then it is expected that the internal flash section is written, so the factory data provider can memcpy directly, without additional checks that were previously done in OtaUtils. Using the OTA API for reading internal flash data just seems unnatural. In the absence of another API, just memcpy directly assuming the section was written. Signed-off-by: Marius Tache * [K32W0] Rename factory data flag CONFIG_CHIP_K32W0_REAL_FACTORY_DATA renamed to CONFIG_CHIP_LOAD_REAL_FACTORY_DATA. Also replaced format string in factory data provider logs. Signed-off-by: Marius Tache * [K32W0] Rename K32W0FactoryDataProvider to FactoryDataProvider Signed-off-by: Marius Tache * [K32W0] Move FactoryDataProvider to K32W common area Update #include statements to use an absolute path. Signed-off-by: Marius Tache * [K32W0] Add FactoryDataProviderImpl FactoryDataProviderImpl has two main features: - CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER - enables application factory data provider - CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR - enables factory data OTA Enclose the corresponding functions in their respective flags. Applications should instantiate a FactoryDataProviderImpl instance, which can be default or custom. Signed-off-by: Marius Tache * [K32W0] Add support for kSoftwareUpdateCompleted boot reason A new K32WConfig key is introduced: kConfigKey_SoftwareUpdateCompleted This key is stored in OTA HandleApply, before the device is reset. Upon initialization, if the reset is caused by a system reset (ResetMCU), then if this key exists, the boot reason is kSoftwareUpdateCompleted. Signed-off-by: Marius Tache * [K32W0] POWER_GetResetCause() should be called once for each startup, and its return value should be processed bit by bit * [K32W0] the priority is watchdog reset, when software reset and watchdog reset are set at the same time in POWER_GetResetCause() * [K32W0] Remove ble connections state Other changes: * Set fast advertising flag when advertising is stopped * Add device connected state Signed-off-by: Marius Tache * [K32W0] Remove unused members Signed-off-by: Marius Tache * [K32W0] Move global variables to class members Add HandleForceDisconnect method. Signed-off-by: Marius Tache * [K32W0] Event queue should be emptied in DoBleProcessing Signed-off-by: Marius Tache * [K32W0] Cancel BLE advertising timer upon connection close event Signed-off-by: Marius Tache * [K32W0] Schedule stop advertising from Matter task Stop advertising was wrongly scheduled from the timer service daemon task, which has the highest priority. This caused BLE controller task to be preempted when doing the switch from fast to slow advertising mode, which caused some events to not be captured on time, resulting in a failed advertising stop. Stop advertising is now scheduled to run from Matter task. Signed-off-by: Marius Tache * [K32W0] Add instructions to overwrite board configuration files The example uses template/reference board configuration files. To overwrite the board configuration files, set `override_is_DK6=false` in the `k32w0_sdk` target from the app `BUILD.gn`: ``` k32w0_sdk("sdk") { override_is_DK6 = false ... } ``` This variable will be used by `k32w0_sdk.gni` to overwrite `chip_with_DK6` option, thus the reference board configuration files will no longer be used. Signed-off-by: Marius Tache * [K32W0] Restructure RAM storage RAM storage class was moved to k32w0 folder. RamStorageKey files were removed and implementation was moved inside RamStorage. Signed-off-by: Marius Tache * [K32W0] Add extendedSearch option Increase number of KVS keys to 200. Signed-off-by: Marius Tache * [K32W0] Remove unused ksdk_mbedtls file Not in the scope of the ticket. Signed-off-by: Marius Tache * [K32W0] Extended search should be taken into account when factory resetting If extended search was enabled for a RAM storage instance, then factory reset should remove all PDM ids used, starting with the base one. Signed-off-by: Marius Tache * [K32W0] Update SDK version in README files Signed-off-by: Marius Tache * [K32W0] Set rotating device id unique id length to max by default Signed-off-by: Marius Tache * [K32W0] Use west to get K32W0 SDK * [K32W0] Remove deprecated function pointer Signed-off-by: Marius Tache * [NXP] Bump ot-nxp to latest Signed-off-by: Marius Tache * Restyled by whitespace Restyled by clang-format Restyled by gn Restyled by prettier-markdown Restyled by prettier-yaml * [K32W0] update cPWR_UsePowerDownMode to chip_with_low_power update cPWR_UsePowerDownMode usage to a more generic chip_with_low_power in order to be able to be used by multiple platforms Signed-off-by: Marius Vilvoi * [K32W0] Remove unused flag in README files Signed-off-by: Marius Tache * [K32W0] Remove redundant header file Signed-off-by: Marius Tache * [K32W0] Update path for building K32W041 as this missing files are only under the K32W061 board * [K32W0] Update docker image version in examples job Signed-off-by: Marius Tache * Restyled by whitespace Restyled by gn Restyled by prettier-markdown * [K32W0] Update documentation for reference apps The user can specify a custom SDK by setting NXP_K32W0_SDK_ROOT. If such an env variabile is not defined, then the gn env will implicitly set it to the SDK found in the repo: third_party/nxp/k32w0_sdk/repo/core Signed-off-by: Marius Tache * Restyled by gn * Restyled by prettier-markdown * [K32W0] BLE processing should be done under the corresponding flag Signed-off-by: Marius Tache --------- Signed-off-by: Doru Gucea Signed-off-by: Marius Tache Signed-off-by: Marius Vilvoi Co-authored-by: Doru Gucea Co-authored-by: tanyue518 Co-authored-by: Gabriel Couturier Co-authored-by: Restyled.io Co-authored-by: Marius Vilvoi --- .github/workflows/examples-k32w.yaml | 2 +- .../nxp/k32w/k32w0/README.md | 63 +- .../k32w/k32w0/include/CHIPProjectConfig.h | 18 +- .../nxp/k32w/k32w0/include/FreeRTOSConfig.h | 4 +- .../nxp/k32w/k32w0/main/AppTask.cpp | 50 +- .../nxp/k32w/k32w0/main/include/AppEvent.h | 4 +- .../nxp/k32w/k32w0/main/include/AppTask.h | 8 +- .../nxp/k32w/k32w0/main/main.cpp | 10 +- .../lighting-app/nxp/k32w/k32w0/README.md | 69 +- .../k32w/k32w0/include/CHIPProjectConfig.h | 6 +- .../nxp/k32w/k32w0/main/AppTask.cpp | 24 +- .../nxp/k32w/k32w0/main/include/AppTask.h | 8 +- examples/lock-app/nxp/k32w/k32w0/README.md | 62 +- .../k32w/k32w0/include/CHIPProjectConfig.h | 18 +- .../nxp/k32w/k32w0/include/FreeRTOSConfig.h | 4 +- .../lock-app/nxp/k32w/k32w0/main/AppTask.cpp | 35 +- .../nxp/k32w/k32w0/main/include/AppEvent.h | 4 +- .../nxp/k32w/k32w0/main/include/AppTask.h | 8 +- .../lock-app/nxp/k32w/k32w0/main/main.cpp | 12 +- .../k32w/k32w0/app/support/FreeRtosHooks.c | 4 +- .../common/CustomFactoryDataProvider.cpp | 4 +- .../k32w0/common/CustomFactoryDataProvider.h | 4 +- .../platform/nxp/k32w/k32w0/common/README.md | 24 +- .../nxp/k32w/k32w0/scripts/sign-outdir.py | 5 +- .../nxp/k32w/common/BLEManagerCommon.cpp | 1418 ++++++ .../nxp/k32w/common/BLEManagerCommon.h | 238 + .../CHIPDevicePlatformRamStorageConfig.h | 9 +- .../FactoryDataProvider.cpp} | 267 +- .../FactoryDataProvider.h} | 40 +- .../nxp/k32w/common/K32W_OTA_README.md | 14 +- .../nxp/k32w/common/OTAImageProcessorImpl.cpp | 4 + .../nxp/k32w/common/RamStorageKey.cpp | 45 - src/platform/nxp/k32w/common/RamStorageKey.h | 42 - .../nxp/k32w/k32w0/BLEManagerImpl.cpp | 1614 +----- src/platform/nxp/k32w/k32w0/BLEManagerImpl.h | 235 +- src/platform/nxp/k32w/k32w0/BUILD.gn | 11 +- .../nxp/k32w/k32w0/CHIPDevicePlatformConfig.h | 10 + .../k32w/k32w0/ConfigurationManagerImpl.cpp | 95 +- .../nxp/k32w/k32w0/ConfigurationManagerImpl.h | 7 +- .../k32w/k32w0/DiagnosticDataProviderImpl.cpp | 4 +- .../k32w/k32w0/FactoryDataProviderImpl.cpp | 183 + .../nxp/k32w/k32w0/FactoryDataProviderImpl.h | 59 + src/platform/nxp/k32w/k32w0/K32W0Config.cpp | 1 + src/platform/nxp/k32w/k32w0/K32W0Config.h | 4 +- .../k32w/k32w0/KeyValueStoreManagerImpl.cpp | 20 +- .../nxp/k32w/k32w0/KeyValueStoreManagerImpl.h | 2 +- src/platform/nxp/k32w/k32w0/LowPowerHooks.cpp | 2 +- .../k32w/k32w0/OTAFactoryDataProcessor.cpp | 18 +- .../nxp/k32w/k32w0/OTAFactoryDataProcessor.h | 8 +- .../nxp/k32w/k32w0/PlatformManagerImpl.cpp | 4 +- .../nxp/k32w/{common => k32w0}/RamStorage.cpp | 53 +- .../nxp/k32w/{common => k32w0}/RamStorage.h | 27 +- .../nxp/k32w/k32w0/ThreadStackManagerImpl.cpp | 12 +- src/platform/nxp/k32w/k32w0/args.gni | 6 + .../nxp/k32w/k32w0/crypto/ksdk_mbedtls.c | 4324 ----------------- third_party/nxp/k32w0_sdk/k32w0_sdk.gni | 83 +- third_party/nxp/k32w0_sdk/repo/.gitignore | 2 + .../nxp/k32w0_sdk/repo/manifest/west.yml | 43 + third_party/openthread/ot-nxp | 2 +- 59 files changed, 2632 insertions(+), 6724 deletions(-) create mode 100644 src/platform/nxp/k32w/common/BLEManagerCommon.cpp create mode 100644 src/platform/nxp/k32w/common/BLEManagerCommon.h rename src/platform/nxp/k32w/{k32w0/K32W0FactoryDataProvider.cpp => common/FactoryDataProvider.cpp} (51%) rename src/platform/nxp/k32w/{k32w0/K32W0FactoryDataProvider.h => common/FactoryDataProvider.h} (85%) delete mode 100644 src/platform/nxp/k32w/common/RamStorageKey.cpp delete mode 100644 src/platform/nxp/k32w/common/RamStorageKey.h create mode 100644 src/platform/nxp/k32w/k32w0/FactoryDataProviderImpl.cpp create mode 100644 src/platform/nxp/k32w/k32w0/FactoryDataProviderImpl.h rename src/platform/nxp/k32w/{common => k32w0}/RamStorage.cpp (74%) rename src/platform/nxp/k32w/{common => k32w0}/RamStorage.h (68%) delete mode 100644 src/platform/nxp/k32w/k32w0/crypto/ksdk_mbedtls.c create mode 100644 third_party/nxp/k32w0_sdk/repo/.gitignore create mode 100644 third_party/nxp/k32w0_sdk/repo/manifest/west.yml diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index 19b772bd52ab6c..1c82c8bfb0dde0 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-k32w:1 + image: ghcr.io/project-chip/chip-build-k32w:5 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/README.md b/examples/contact-sensor-app/nxp/k32w/k32w0/README.md index af98333cb8b99f..9f92bc0d795142 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/README.md +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/README.md @@ -20,7 +20,8 @@ network. - [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous) - [Device UI](#device-ui) - [Building](#building) - - [Known issues buiulding](#known-issues-building) + - [Overwrite board config files](#overwrite-board-config-files) + - [Known issues building](#known-issues-building) - [Manufacturing data](#manufacturing-data) - [Flashing and debugging](#flashing-and-debugging) - [Pigweed Tokenizer](#pigweed-tokenizer) @@ -176,19 +177,43 @@ contact status. In order to build the Project CHIP example, we recommend using a Linux distribution (the demo-application was compiled on Ubuntu 20.04). -- Download - [K32W061DK6 SDK 2.6.11](https://cache.nxp.com/lgfiles/bsps/SDK_2_6_11_K32W061DK6.zip). - -- Start building the application either with Secure Element or without +- Start building the application either with Secure Element or without, SDK is + downloaded with west tool. - without Secure Element ``` - user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W0_SDK_ROOT=/home/user/Desktop/SDK_2_6_11_K32W061DK6/ - user@ubuntu:~/Desktop/git/connectedhomeip$ ./third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh user@ubuntu:~/Desktop/git/connectedhomeip$ source ./scripts/activate.sh + user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo + user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west init -l manifest --mf west.yml + user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west update + ``` + + In case there are local modification to the already installed git NXP SDK: + Use the below west `forall` command instead of the west init command to + reset the west workspace. Warning: all local changes will be lost after + running this command. + + ```bash + user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo + user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$west forall -c "git reset --hard && git clean -xdf" -a + ``` + + Build the application + + Prior to building, the user can specify a custom `SDK` path by setting + `NXP_K32W0_SDK_ROOT`: + + ``` + user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W0_SDK_ROOT=$(pwd)/third_party/nxp/k32w0_sdk/repo/core + ``` + + If the environment variable `NXP_K32W0_SDK_ROOT` is not set, it will default + to the `SDK` found in `third_party/nxp/k32w0_sdk/repo/core`. + + ``` user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/contact-sensor-app/nxp/k32w/k32w0 - user@ubuntu:~/Desktop/git/connectedhomeip/examples/contact-sensor-app/nxp/k32w/k32w0$ gn gen out/debug --args="k32w0_sdk_root=\"${NXP_K32W0_SDK_ROOT}\" chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"platform\" chip_with_se05x=0 chip_pw_tokenizer_logging=true" + user@ubuntu:~/Desktop/git/connectedhomeip/examples/contact-sensor-app/nxp/k32w/k32w0$ gn gen out/debug --args="chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"platform\" chip_with_se05x=0 chip_pw_tokenizer_logging=true" user@ubuntu:~/Desktop/git/connectedhomeip/examples/contact-sensor-app/nxp/k32w/k32w0$ ninja -C out/debug ``` @@ -202,8 +227,7 @@ Secure Element. These can be changed if building without Secure Element - K32W041AM flavor Exactly the same steps as above but set argument build_for_k32w041am=1 in - the gn command and use - [K32W041AMDK6 SDK 2.6.11](https://cache.nxp.com/lgfiles/bsps/SDK_2_6_11_K32W041AMDK6.zip). + the gn command. Also, in case the OM15082 Expansion Board is not attached to the DK6 board, the build argument (chip_with_OM15082) inside the gn build instruction should be set @@ -232,6 +256,23 @@ pycryptodome 3.9.8 The resulting output file can be found in out/debug/chip-k32w0x-contact-example. +### Overwrite board config files + +The example uses template/reference board configuration files. + +To overwrite the board configuration files, set `override_is_DK6=false` in the +`k32w0_sdk` target from the app `BUILD.gn`: + +``` +k32w0_sdk("sdk") { + override_is_DK6 = false + ... +} +``` + +This variable will be used by `k32w0_sdk.gni` to overwrite `chip_with_DK6` +option, thus the reference board configuration files will no longer be used. + ### Known issues building - When using Secure element and cross-compiling on Linux, log messages from @@ -274,7 +315,7 @@ CHIPProjectConfig.h. Regarding factory data provider, there are two options: -- use the default factory data provider: `K32W0FactoryDataProvider` by setting +- use the default factory data provider: `FactoryDataProviderImpl` by setting `chip_with_factory_data=1` in the gn build command. - use a custom factory data provider: please see [Guide for implementing a custom factory data provider](../../../../platform/nxp/k32w/k32w0/common/README.md). diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h b/examples/contact-sensor-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h index 71960deda7e3a5..03e638f54cbf13 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h @@ -37,11 +37,11 @@ // Use hard-coded test certificates already embedded in generic chip code => set it to 0 // Use real/development certificates => set it to 1 + file the provisioning section from // the internal flash -#ifndef CONFIG_CHIP_K32W0_REAL_FACTORY_DATA -#define CONFIG_CHIP_K32W0_REAL_FACTORY_DATA 0 +#ifndef CONFIG_CHIP_LOAD_REAL_FACTORY_DATA +#define CONFIG_CHIP_LOAD_REAL_FACTORY_DATA 0 #endif -#if CONFIG_CHIP_K32W0_REAL_FACTORY_DATA +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA // Enable usage of custom factory data provider #ifndef CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER @@ -222,6 +222,18 @@ #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 +/** + * CHIP_DEVICE_CONFIG_BLE_SET_PHY_2M_REQ + * + * This define enables/disables the Gap_LeSetPhy request to switch to 2M. + * It is disabled here for interoperability reasons just to be extra cautious. + * Both devices may send a Link Layer control procedure in parallel resulting in a + * LPM Error Transaction Collision. + * If the peer device doesn't accept our reject command, this can result in a BLE + * connection timeout. + */ +#define CHIP_DEVICE_CONFIG_BLE_SET_PHY_2M_REQ 0 + /** * CHIP_DEVICE_CONFIG_INIT_OTA_DELAY * diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/include/FreeRTOSConfig.h b/examples/contact-sensor-app/nxp/k32w/k32w0/include/FreeRTOSConfig.h index aaf62544a61edb..ea5259b3af043c 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/include/FreeRTOSConfig.h +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/include/FreeRTOSConfig.h @@ -41,7 +41,7 @@ #define configUSE_PREEMPTION 1 -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) #define configUSE_TICKLESS_IDLE 1 #else #define configUSE_TICKLESS_IDLE 0 @@ -51,7 +51,7 @@ #define configTICK_RATE_HZ ((TickType_t) 100) #define configMAX_PRIORITIES (8) -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(configUSE_TICKLESS_IDLE) && (configUSE_TICKLESS_IDLE == 1) #define configMINIMAL_STACK_SIZE ((unsigned short) 610) #else #define configMINIMAL_STACK_SIZE ((unsigned short) 450) diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp index ecd120d9020f17..fbd0a6877e3a45 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -65,7 +65,7 @@ TimerHandle_t sFunctionTimer; // FreeRTOS app sw timer. static QueueHandle_t sAppEventQueue; -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) static LEDWidget sStatusLED; static LEDWidget sContactSensorLED; #endif @@ -85,6 +85,9 @@ using namespace chip; using namespace chip::app; AppTask AppTask::sAppTask; +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA +static AppTask::FactoryDataProvider sFactoryDataProvider; +#endif static Identify gIdentify = { chip::EndpointId{ 1 }, AppTask::OnIdentifyStart, AppTask::OnIdentifyStop, Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator }; @@ -99,7 +102,7 @@ static BDXDownloader gDownloader; constexpr uint16_t requestedOtaBlockSize = 1024; #endif -#if CONFIG_CHIP_K32W0_REAL_FACTORY_DATA +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA && CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR CHIP_ERROR CustomFactoryDataRestoreMechanism(void) { K32W_LOG("This is a custom factory data restore mechanism."); @@ -134,7 +137,7 @@ static void CheckOtaEntry() if (ota_entries.ota_state == otaApplied) { K32W_LOG("OTA successfully applied"); -#if CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA && CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR // If this point is reached, it means OTA_CommitCustomEntries was successfully called. // Delete the factory data backup to stop doing a restore when the factory data provider // is initialized. This ensures that both the factory data and app were updated, otherwise @@ -177,26 +180,27 @@ CHIP_ERROR AppTask::Init() #endif // Initialize device attestation config -#if CONFIG_CHIP_K32W0_REAL_FACTORY_DATA - // Initialize factory data provider - ReturnErrorOnFailure(AppTask::FactoryDataProvider::GetDefaultInstance().Init()); - AppTask::FactoryDataProvider::GetDefaultInstance().RegisterRestoreMechanism(CustomFactoryDataRestoreMechanism); - SetDeviceInstanceInfoProvider(&AppTask::FactoryDataProvider::GetDefaultInstance()); - SetDeviceAttestationCredentialsProvider(&AppTask::FactoryDataProvider::GetDefaultInstance()); - SetCommissionableDataProvider(&AppTask::FactoryDataProvider::GetDefaultInstance()); +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA +#if CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR + sFactoryDataProvider.RegisterRestoreMechanism(CustomFactoryDataRestoreMechanism); +#endif + ReturnErrorOnFailure(sFactoryDataProvider.Init()); + SetDeviceInstanceInfoProvider(&sFactoryDataProvider); + SetDeviceAttestationCredentialsProvider(&sFactoryDataProvider); + SetCommissionableDataProvider(&sFactoryDataProvider); #else #ifdef ENABLE_HSM_DEVICE_ATTESTATION SetDeviceAttestationCredentialsProvider(Examples::GetExampleSe05xDACProvider()); #else SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); #endif -#endif // CONFIG_CHIP_K32W0_REAL_FACTORY_DATA +#endif // CONFIG_CHIP_LOAD_REAL_FACTORY_DATA // QR code will be used with CHIP Tool AppTask::PrintOnboardingInfo(); /* HW init leds */ -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) LED_Init(); /* start with all LEDS turnedd off */ @@ -323,7 +327,7 @@ void AppTask::AppTaskMain(void * pvParameter) { TickType_t xTicksToWait = pdMS_TO_TICKS(10); -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) xTicksToWait = portMAX_DELAY; #endif @@ -361,7 +365,7 @@ void AppTask::AppTaskMain(void * pvParameter) // // Otherwise, blink the LED ON for a very short time. -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) if (sAppTask.mFunction != Function::kFactoryReset && sAppTask.mFunction != Function::kIdentify) { if (sIsThreadProvisioned) @@ -513,7 +517,7 @@ void AppTask::ResetActionEventHandler(void * aGenericEvent) sAppTask.CancelTimer(); sAppTask.mFunction = Function::kNoneSelected; -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) /* restore initial state for the LED indicating contact state */ if (!ContactSensorMgr().IsContactClosed()) { @@ -541,7 +545,7 @@ void AppTask::ResetActionEventHandler(void * aGenericEvent) sAppTask.mFunction = Function::kFactoryReset; /* LEDs will start blinking to signal that a Factory Reset was scheduled */ -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) sStatusLED.Set(false); sContactSensorLED.Set(false); @@ -639,7 +643,7 @@ void AppTask::BleStartAdvertising(intptr_t arg) if (ConnectivityMgr().IsBLEAdvertisingEnabled()) { ConnectivityMgr().SetBLEAdvertisingEnabled(false); -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) sStatusLED.Set(false); #endif K32W_LOG("Stopped BLE Advertising!"); @@ -650,7 +654,7 @@ void AppTask::BleStartAdvertising(intptr_t arg) if (chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow() == CHIP_NO_ERROR) { -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) sStatusLED.Set(true); #endif K32W_LOG("Started BLE Advertising!"); @@ -750,14 +754,14 @@ void AppTask::OnStateChanged(ContactSensorManager::State aState) if (ContactSensorManager::State::kContactClosed == aState) { K32W_LOG("Contact state changed to closed.") -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) sContactSensorLED.Set(true); #endif } else if (ContactSensorManager::State::kContactOpened == aState) { K32W_LOG("Contact state changed to opened.") -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) sContactSensorLED.Set(false); #endif } @@ -781,7 +785,7 @@ void AppTask::OnIdentifyStart(Identify * identify) } K32W_LOG("Identify process has started. Status LED should blink every 0.5 seconds."); sAppTask.mFunction = Function::kIdentify; -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) sStatusLED.Set(false); sStatusLED.Blink(500); #endif @@ -831,7 +835,7 @@ void AppTask::PostEvent(const AppEvent * aEvent) void AppTask::DispatchEvent(AppEvent * aEvent) { -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) /* specific processing for events sent from App_PostCallbackMessage (see main.cpp) */ if (aEvent->Type == AppEvent::kEventType_Lp) { @@ -879,7 +883,7 @@ void AppTask::UpdateDeviceStateInternal(intptr_t arg) /* get onoff attribute value */ (void) app::Clusters::BooleanState::Attributes::StateValue::Get(1, &stateValueAttrValue); -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) /* set the device state */ sContactSensorLED.Set(stateValueAttrValue); #endif diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/include/AppEvent.h b/examples/contact-sensor-app/nxp/k32w/k32w0/main/include/AppEvent.h index 3d7f4367ccaeb8..b8ae7e72540ef8 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/main/include/AppEvent.h +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/main/include/AppEvent.h @@ -29,7 +29,7 @@ struct AppEvent kTimer, kContact, kInstall, -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) kEventType_Lp, #endif kOTAResume, @@ -56,7 +56,7 @@ struct AppEvent EventHandler Handler; -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) void * param; #endif }; diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/include/AppTask.h b/examples/contact-sensor-app/nxp/k32w/k32w0/main/include/AppTask.h index d8845b61ae45db..58effbdba14162 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/main/include/AppTask.h +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/main/include/AppTask.h @@ -26,8 +26,8 @@ #include "CHIPProjectConfig.h" -#if CONFIG_CHIP_K32W0_REAL_FACTORY_DATA -#include "K32W0FactoryDataProvider.h" +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA +#include #if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER #include "CustomFactoryDataProvider.h" #endif @@ -50,11 +50,11 @@ class AppTask { public: -#if CONFIG_CHIP_K32W0_REAL_FACTORY_DATA +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA #if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER using FactoryDataProvider = chip::DeviceLayer::CustomFactoryDataProvider; #else - using FactoryDataProvider = chip::DeviceLayer::K32W0FactoryDataProvider; + using FactoryDataProvider = chip::DeviceLayer::FactoryDataProviderImpl; #endif #endif diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/main.cpp b/examples/contact-sensor-app/nxp/k32w/k32w0/main/main.cpp index b00f65d0d5578d..56288842a3f5de 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/main/main.cpp +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/main/main.cpp @@ -35,7 +35,7 @@ #include #endif -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) #include "fsl_gpio.h" #include "fsl_iocon.h" #include "gpio_pins.h" @@ -86,7 +86,7 @@ void APP_SetMaxTxPower() #endif /* low power requirements */ -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) extern "C" void setThreadInitialized(bool isInitialized); extern "C" bool isThreadInitialized(); #endif @@ -160,7 +160,7 @@ extern "C" void main_task(void const * argument) goto exit; } -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) setThreadInitialized(TRUE); #endif @@ -206,7 +206,7 @@ extern "C" void main_task(void const * argument) extern "C" void otSysEventSignalPending(void) { -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) /* make sure that 15.4 radio is initialized before waking up the Thread task */ if (isThreadInitialized()) #endif @@ -216,7 +216,7 @@ extern "C" void otSysEventSignalPending(void) } } -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) extern "C" void vOptimizeConsumption(void) { /* BUTTON2 change contact, BUTTON4 start adv/factoryreset */ diff --git a/examples/lighting-app/nxp/k32w/k32w0/README.md b/examples/lighting-app/nxp/k32w/k32w0/README.md index 674960ee0d560c..829d4bd1e70223 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/README.md +++ b/examples/lighting-app/nxp/k32w/k32w0/README.md @@ -22,13 +22,14 @@ network. - [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous) - [Device UI](#device-ui) - [Building](#building) - - [Known issues](#known-issues-building) + - [Overwrite board config files](#overwrite-board-config-files) + - [Known issues building](#known-issues-building) - [Manufacturing data](#manufacturing-data) - [Flashing and debugging](#flashing-and-debugging) - [Pigweed Tokenizer](#pigweed-tokenizer) - [Detokenizer script](#detokenizer-script) - [Notes](#notes) - - [Known issues](#known-issues-tokenizer) + - [Known issues tokenizer](#known-issues-tokenizer) - [NXP Ultrafast P256 ECC Library](#nxp-ultrafast-p256-ecc-library) - [Building steps](#building-steps) - [Tinycrypt ECC library](#tinycrypt-ecc-library) @@ -38,7 +39,7 @@ network. - [Writing the PSECT](#writing-the-psect) - [Writing the application](#writing-the-application) - [OTA Testing](#ota-testing) - - [Known issues](#known-issues-ota) + - [Known issues OTA](#known-issues-ota) ## Introduction @@ -191,23 +192,51 @@ effects: In order to build the Project CHIP example, we recommend using a Linux distribution (the demo-application was compiled on Ubuntu 20.04). -- Download - [K32W061DK6 SDK 2.6.11](https://cache.nxp.com/lgfiles/bsps/SDK_2_6_11_K32W061DK6.zip). - -- Start building the application either with Secure Element or without +- Start building the application either with Secure Element or without, SDK is + downloaded with west tool. - without Secure Element ``` -user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W0_SDK_ROOT=/home/user/Desktop/SDK_2_6_11_K32W061DK6/ user@ubuntu:~/Desktop/git/connectedhomeip$ source ./scripts/activate.sh +user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo +user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west init -l manifest --mf west.yml +user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west update +``` + +In case there are local modification to the already installed git NXP SDK: Use +the below west `forall` command instead of the west init command to reset the +west workspace. Warning: all local changes will be lost after running this +command. + +```bash +user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo +user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$west forall -c "git reset --hard && git clean -xdf" -a +``` + +Build the application + +Prior to building, the user can specify a custom `SDK` path by setting +`NXP_K32W0_SDK_ROOT`: + +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W0_SDK_ROOT=$(pwd)/third_party/nxp/k32w0_sdk/repo/core +``` + +If the environment variable `NXP_K32W0_SDK_ROOT` is not set, it will default to +the `SDK` found in `third_party/nxp/k32w0_sdk/repo/core`. + +``` user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/lighting-app/nxp/k32w/k32w0 -user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ gn gen out/debug --args="k32w0_sdk_root=\"${NXP_K32W0_SDK_ROOT}\" chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"platform\" chip_with_se05x=0 chip_pw_tokenizer_logging=true" +user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ gn gen out/debug --args="chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"platform\" chip_with_se05x=0 chip_pw_tokenizer_logging=true" user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ ninja -C out/debug ``` - with Secure element + +``` Exactly the same steps as above but set chip_with_se05x=1 in the gn command and add argument chip_enable_ota_requestor=false +``` Note that option chip_enable_ota_requestor=false are required for building with Secure Element. These can be changed if building without Secure Element @@ -215,8 +244,7 @@ Secure Element. These can be changed if building without Secure Element - K32W041AM flavor Exactly the same steps as above but set argument build_for_k32w041am=1 in - the gn command and use - [K32W041AMDK6 SDK 2.6.11](https://cache.nxp.com/lgfiles/bsps/SDK_2_6_11_K32W041AMDK6.zip). + the gn command. Also, in case the OM15082 Expansion Board is not attached to the DK6 board, the build argument (chip_with_OM15082) inside the gn build instruction should be set @@ -245,6 +273,23 @@ pycryptodome 3.9.8 The resulting output file can be found in out/debug/chip-k32w0x-light-example. +### Overwrite board config files + +The example uses template/reference board configuration files. + +To overwrite the board configuration files, set `override_is_DK6=false` in the +`k32w0_sdk` target from the app `BUILD.gn`: + +``` +k32w0_sdk("sdk") { + override_is_DK6 = false + ... +} +``` + +This variable will be used by `k32w0_sdk.gni` to overwrite `chip_with_DK6` +option, thus the reference board configuration files will no longer be used. + ## Known issues building - When using Secure element and cross-compiling on Linux, log messages from @@ -287,7 +332,7 @@ CHIPProjectConfig.h. Regarding factory data provider, there are two options: -- use the default factory data provider: `K32W0FactoryDataProvider` by setting +- use the default factory data provider: `FactoryDataProviderImpl` by setting `chip_with_factory_data=1` in the gn build command. - use a custom factory data provider: please see [Guide for implementing a custom factory data provider](../../../../platform/nxp/k32w/k32w0/common/README.md). diff --git a/examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h b/examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h index c994886a68215a..f56764b2cb731b 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h +++ b/examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h @@ -37,11 +37,11 @@ // Use hard-coded test certificates already embedded in generic chip code => set it to 0 // Use real/development certificates => set it to 1 + file the provisioning section from // the internal flash -#ifndef CONFIG_CHIP_K32W0_REAL_FACTORY_DATA -#define CONFIG_CHIP_K32W0_REAL_FACTORY_DATA 0 +#ifndef CONFIG_CHIP_LOAD_REAL_FACTORY_DATA +#define CONFIG_CHIP_LOAD_REAL_FACTORY_DATA 0 #endif -#if CONFIG_CHIP_K32W0_REAL_FACTORY_DATA +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA // Enable usage of custom factory data provider #ifndef CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp index d2bdbe55c0d2cc..5f67ac9f58b91c 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -87,6 +87,9 @@ using namespace chip; using namespace chip::app; AppTask AppTask::sAppTask; +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA +static AppTask::FactoryDataProvider sFactoryDataProvider; +#endif // This key is for testing/certification only and should not be used in production devices. // For production devices this key must be provided from factory data. @@ -110,7 +113,7 @@ static BDXDownloader gDownloader; constexpr uint16_t requestedOtaBlockSize = 1024; #endif -#if CONFIG_CHIP_K32W0_REAL_FACTORY_DATA +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA && CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR CHIP_ERROR CustomFactoryDataRestoreMechanism(void) { K32W_LOG("This is a custom factory data restore mechanism."); @@ -145,7 +148,7 @@ static void CheckOtaEntry() if (ota_entries.ota_state == otaApplied) { K32W_LOG("OTA successfully applied"); -#if CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA && CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR // If this point is reached, it means OTA_CommitCustomEntries was successfully called. // Delete the factory data backup to stop doing a restore when the factory data provider // is initialized. This ensures that both the factory data and app were updated, otherwise @@ -182,20 +185,21 @@ CHIP_ERROR AppTask::Init() #endif // Initialize device attestation config -#if CONFIG_CHIP_K32W0_REAL_FACTORY_DATA - // Initialize factory data provider - ReturnErrorOnFailure(AppTask::FactoryDataProvider::GetDefaultInstance().Init()); - AppTask::FactoryDataProvider::GetDefaultInstance().RegisterRestoreMechanism(CustomFactoryDataRestoreMechanism); - SetDeviceInstanceInfoProvider(&AppTask::FactoryDataProvider::GetDefaultInstance()); - SetDeviceAttestationCredentialsProvider(&AppTask::FactoryDataProvider::GetDefaultInstance()); - SetCommissionableDataProvider(&AppTask::FactoryDataProvider::GetDefaultInstance()); +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA +#if CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR + sFactoryDataProvider.RegisterRestoreMechanism(CustomFactoryDataRestoreMechanism); +#endif + ReturnErrorOnFailure(sFactoryDataProvider.Init()); + SetDeviceInstanceInfoProvider(&sFactoryDataProvider); + SetDeviceAttestationCredentialsProvider(&sFactoryDataProvider); + SetCommissionableDataProvider(&sFactoryDataProvider); #else #ifdef ENABLE_HSM_DEVICE_ATTESTATION SetDeviceAttestationCredentialsProvider(Examples::GetExampleSe05xDACProvider()); #else SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); #endif -#endif // CONFIG_CHIP_K32W0_REAL_FACTORY_DATA +#endif // CONFIG_CHIP_LOAD_REAL_FACTORY_DATA // QR code will be used with CHIP Tool AppTask::PrintOnboardingInfo(); diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/include/AppTask.h b/examples/lighting-app/nxp/k32w/k32w0/main/include/AppTask.h index e91e3c5a303167..83dfd33da2abd9 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/main/include/AppTask.h +++ b/examples/lighting-app/nxp/k32w/k32w0/main/include/AppTask.h @@ -26,8 +26,8 @@ #include "CHIPProjectConfig.h" -#if CONFIG_CHIP_K32W0_REAL_FACTORY_DATA -#include "K32W0FactoryDataProvider.h" +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA +#include #if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER #include "CustomFactoryDataProvider.h" #endif @@ -50,11 +50,11 @@ class AppTask { public: -#if CONFIG_CHIP_K32W0_REAL_FACTORY_DATA +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA #if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER using FactoryDataProvider = chip::DeviceLayer::CustomFactoryDataProvider; #else - using FactoryDataProvider = chip::DeviceLayer::K32W0FactoryDataProvider; + using FactoryDataProvider = chip::DeviceLayer::FactoryDataProviderImpl; #endif #endif diff --git a/examples/lock-app/nxp/k32w/k32w0/README.md b/examples/lock-app/nxp/k32w/k32w0/README.md index 26ccf8fe663a11..b5fec55268371c 100644 --- a/examples/lock-app/nxp/k32w/k32w0/README.md +++ b/examples/lock-app/nxp/k32w/k32w0/README.md @@ -22,7 +22,8 @@ network. - [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous) - [Device UI](#device-ui) - [Building](#building) - - [Known issues](#known-issues-building) + - [Overwrite board config files](#overwrite-board-config-files) + - [Known issues building](#known-issues-building) - [Manufacturing data](#manufacturing-data) - [Flashing and debugging](#flashing-and-debugging) - [Pigweed Tokenizer](#pigweed-tokenizer) @@ -35,7 +36,7 @@ network. - [Building steps](#building-steps-1) - [Low power](#low-power) - - [Known issues](#known-issues-low-power) + - [Known issues low power](#known-issues-low-power) @@ -172,19 +173,43 @@ will be initiated. In order to build the Project CHIP example, we recommend using a Linux distribution (the demo-application was compiled on Ubuntu 20.04). -- Download - [K32W061DK6 SDK 2.6.11](https://cache.nxp.com/lgfiles/bsps/SDK_2_6_11_K32W061DK6.zip). - -- Start building the application either with Secure Element or without +- Start building the application either with Secure Element or without, SDK is + downloaded with west tool. - without Secure Element ``` -user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W0_SDK_ROOT=/home/user/Desktop/SDK_2_6_11_K32W061DK6/ -user@ubuntu:~/Desktop/git/connectedhomeip$ ./third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh user@ubuntu:~/Desktop/git/connectedhomeip$ source ./scripts/activate.sh +user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo +user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west init -l manifest --mf west.yml +user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west update +``` + +In case there are local modification to the already installed git NXP SDK: Use +the below west `forall` command instead of the west init command to reset the +west workspace. Warning: all local changes will be lost after running this +command. + +```bash +user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo +user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$west forall -c "git reset --hard && git clean -xdf" -a +``` + +Build the application + +Prior to building, the user can specify a custom `SDK` path by setting +`NXP_K32W0_SDK_ROOT`: + +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W0_SDK_ROOT=$(pwd)/third_party/nxp/k32w0_sdk/repo/core +``` + +If the environment variable `NXP_K32W0_SDK_ROOT` is not set, it will default to +the `SDK` found in `third_party/nxp/k32w0_sdk/repo/core`. + +``` user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/lock-app/nxp/k32w/k32w0 -user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w/k32w0$ gn gen out/debug --args="k32w0_sdk_root=\"${NXP_K32W0_SDK_ROOT}\" chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"platform\" chip_with_se05x=0 chip_pw_tokenizer_logging=true" +user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w/k32w0$ gn gen out/debug --args="chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"platform\" chip_with_se05x=0 chip_pw_tokenizer_logging=true" user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w/k32w0$ ninja -C out/debug ``` @@ -218,6 +243,23 @@ pycryptodome 3.9.8 The resulting output file can be found in out/debug/chip-k32w0x-lock-example. +### Overwrite board config files + +The example uses template/reference board configuration files. + +To overwrite the board configuration files, set `override_is_DK6=false` in the +`k32w0_sdk` target from the app `BUILD.gn`: + +``` +k32w0_sdk("sdk") { + override_is_DK6 = false + ... +} +``` + +This variable will be used by `k32w0_sdk.gni` to overwrite `chip_with_DK6` +option, thus the reference board configuration files will no longer be used. + ## Known issues building - When using Secure element and cross-compiling on Linux, log messages from @@ -260,7 +302,7 @@ CHIPProjectConfig.h. Regarding factory data provider, there are two options: -- use the default factory data provider: `K32W0FactoryDataProvider` by setting +- use the default factory data provider: `FactoryDataProviderImpl` by setting `chip_with_factory_data=1` in the gn build command. - use a custom factory data provider: please see [Guide for implementing a custom factory data provider](../../../../platform/nxp/k32w/k32w0/common/README.md). diff --git a/examples/lock-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h b/examples/lock-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h index a25fa7e12f1498..0e087ffa3f3a1b 100644 --- a/examples/lock-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h +++ b/examples/lock-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h @@ -37,11 +37,11 @@ // Use hard-coded test certificates already embedded in generic chip code => set it to 0 // Use real/development certificates => set it to 1 + file the provisioning section from // the internal flash -#ifndef CONFIG_CHIP_K32W0_REAL_FACTORY_DATA -#define CONFIG_CHIP_K32W0_REAL_FACTORY_DATA 0 +#ifndef CONFIG_CHIP_LOAD_REAL_FACTORY_DATA +#define CONFIG_CHIP_LOAD_REAL_FACTORY_DATA 0 #endif -#if CONFIG_CHIP_K32W0_REAL_FACTORY_DATA +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA // Enable usage of custom factory data provider #ifndef CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER @@ -200,6 +200,18 @@ #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 +/** + * CHIP_DEVICE_CONFIG_BLE_SET_PHY_2M_REQ + * + * This define enables/disables the Gap_LeSetPhy request to switch to 2M. + * It is disabled here for interoperability reasons just to be extra cautious. + * Both devices may send a Link Layer control procedure in parallel resulting in a + * LPM Error Transaction Collision. + * If the peer device doesn't accept our reject command, this can result in a BLE + * connection timeout. + */ +#define CHIP_DEVICE_CONFIG_BLE_SET_PHY_2M_REQ 0 + /** * @def CHIP_IM_MAX_NUM_COMMAND_HANDLER * diff --git a/examples/lock-app/nxp/k32w/k32w0/include/FreeRTOSConfig.h b/examples/lock-app/nxp/k32w/k32w0/include/FreeRTOSConfig.h index 2b82b290a9b2cb..24779514ef875f 100644 --- a/examples/lock-app/nxp/k32w/k32w0/include/FreeRTOSConfig.h +++ b/examples/lock-app/nxp/k32w/k32w0/include/FreeRTOSConfig.h @@ -41,7 +41,7 @@ #define configUSE_PREEMPTION 1 -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) #define configUSE_TICKLESS_IDLE 1 #else #define configUSE_TICKLESS_IDLE 0 @@ -51,7 +51,7 @@ #define configTICK_RATE_HZ ((TickType_t) 100) #define configMAX_PRIORITIES (8) -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(configUSE_TICKLESS_IDLE) && (configUSE_TICKLESS_IDLE == 1) #define configMINIMAL_STACK_SIZE ((unsigned short) 250) #else #define configMINIMAL_STACK_SIZE ((unsigned short) 450) diff --git a/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp index b4e793a525d8d4..9e6afc3e77b6f1 100644 --- a/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -55,7 +55,7 @@ TimerHandle_t sFunctionTimer; // FreeRTOS app sw timer. static QueueHandle_t sAppEventQueue; -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) static LEDWidget sStatusLED; static LEDWidget sLockLED; #endif @@ -73,6 +73,9 @@ using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; AppTask AppTask::sAppTask; +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA +static AppTask::FactoryDataProvider sFactoryDataProvider; +#endif CHIP_ERROR AppTask::StartAppTask() { @@ -96,25 +99,25 @@ CHIP_ERROR AppTask::Init() PlatformMgr().ScheduleWork(InitServer, 0); // Initialize device attestation config -#if CONFIG_CHIP_K32W0_REAL_FACTORY_DATA +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA // Initialize factory data provider - ReturnErrorOnFailure(AppTask::FactoryDataProvider::GetDefaultInstance().Init()); - SetDeviceInstanceInfoProvider(&AppTask::FactoryDataProvider::GetDefaultInstance()); - SetDeviceAttestationCredentialsProvider(&AppTask::FactoryDataProvider::GetDefaultInstance()); - SetCommissionableDataProvider(&AppTask::FactoryDataProvider::GetDefaultInstance()); + ReturnErrorOnFailure(sFactoryDataProvider.Init()); + SetDeviceInstanceInfoProvider(&sFactoryDataProvider); + SetDeviceAttestationCredentialsProvider(&sFactoryDataProvider); + SetCommissionableDataProvider(&sFactoryDataProvider); #else #ifdef ENABLE_HSM_DEVICE_ATTESTATION SetDeviceAttestationCredentialsProvider(Examples::GetExampleSe05xDACProvider()); #else SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); #endif -#endif // CONFIG_CHIP_K32W0_REAL_FACTORY_DATA +#endif // CONFIG_CHIP_LOAD_REAL_FACTORY_DATA // QR code will be used with CHIP Tool AppTask::PrintOnboardingInfo(); /* HW init leds */ -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) LED_Init(); /* start with all LEDS turnedd off */ @@ -222,7 +225,7 @@ void AppTask::AppTaskMain(void * pvParameter) { TickType_t xTicksToWait = pdMS_TO_TICKS(10); -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) xTicksToWait = portMAX_DELAY; #endif @@ -260,7 +263,7 @@ void AppTask::AppTaskMain(void * pvParameter) // // Otherwise, blink the LED ON for a very short time. -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) if (sAppTask.mFunction != kFunction_FactoryReset) { if (sIsThreadProvisioned) @@ -419,7 +422,7 @@ void AppTask::ResetActionEventHandler(void * aGenericEvent) sAppTask.CancelTimer(); sAppTask.mFunction = kFunction_NoneSelected; -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) /* restore initial state for the LED indicating Lock state */ if (BoltLockMgr().IsUnlocked()) { @@ -447,7 +450,7 @@ void AppTask::ResetActionEventHandler(void * aGenericEvent) sAppTask.mFunction = kFunction_FactoryReset; /* LEDs will start blinking to signal that a Factory Reset was scheduled */ -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) sStatusLED.Set(false); sLockLED.Set(false); @@ -676,7 +679,7 @@ void AppTask::ActionInitiated(BoltLockManager::Action_t aAction, int32_t aActor) sAppTask.mFunction = kFunctionLockUnlock; -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) sLockLED.Blink(50, 50); #endif } @@ -689,14 +692,14 @@ void AppTask::ActionCompleted(BoltLockManager::Action_t aAction) if (aAction == BoltLockManager::LOCK_ACTION) { K32W_LOG("Lock Action has been completed") -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) sLockLED.Set(true); #endif } else if (aAction == BoltLockManager::UNLOCK_ACTION) { K32W_LOG("Unlock Action has been completed") -#if !cPWR_UsePowerDownMode +#if !defined(chip_with_low_power) || (chip_with_low_power == 0) sLockLED.Set(false); #endif } @@ -733,7 +736,7 @@ void AppTask::PostEvent(const AppEvent * aEvent) void AppTask::DispatchEvent(AppEvent * aEvent) { -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) /* specific processing for events sent from App_PostCallbackMessage (see main.cpp) */ if (aEvent->Type == AppEvent::kEventType_Lp) { diff --git a/examples/lock-app/nxp/k32w/k32w0/main/include/AppEvent.h b/examples/lock-app/nxp/k32w/k32w0/main/include/AppEvent.h index 051eb627991917..864628869959f6 100644 --- a/examples/lock-app/nxp/k32w/k32w0/main/include/AppEvent.h +++ b/examples/lock-app/nxp/k32w/k32w0/main/include/AppEvent.h @@ -29,7 +29,7 @@ struct AppEvent kEventType_Timer, kEventType_Lock, kEventType_Install, -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) kEventType_Lp, #endif }; @@ -56,7 +56,7 @@ struct AppEvent EventHandler Handler; -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) void * param; #endif }; diff --git a/examples/lock-app/nxp/k32w/k32w0/main/include/AppTask.h b/examples/lock-app/nxp/k32w/k32w0/main/include/AppTask.h index 2e1194ed36c721..cbaa5757374497 100644 --- a/examples/lock-app/nxp/k32w/k32w0/main/include/AppTask.h +++ b/examples/lock-app/nxp/k32w/k32w0/main/include/AppTask.h @@ -26,8 +26,8 @@ #include "CHIPProjectConfig.h" -#if CONFIG_CHIP_K32W0_REAL_FACTORY_DATA -#include "K32W0FactoryDataProvider.h" +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA +#include #if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER #include "CustomFactoryDataProvider.h" #endif @@ -41,11 +41,11 @@ class AppTask { public: -#if CONFIG_CHIP_K32W0_REAL_FACTORY_DATA +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA #if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER using FactoryDataProvider = chip::DeviceLayer::CustomFactoryDataProvider; #else - using FactoryDataProvider = chip::DeviceLayer::K32W0FactoryDataProvider; + using FactoryDataProvider = chip::DeviceLayer::FactoryDataProviderImpl; #endif #endif diff --git a/examples/lock-app/nxp/k32w/k32w0/main/main.cpp b/examples/lock-app/nxp/k32w/k32w0/main/main.cpp index 795cd3b9fcb09b..7cb5057175b37b 100644 --- a/examples/lock-app/nxp/k32w/k32w0/main/main.cpp +++ b/examples/lock-app/nxp/k32w/k32w0/main/main.cpp @@ -35,7 +35,7 @@ #include #endif -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) #include "fsl_gpio.h" #include "fsl_iocon.h" #include "gpio_pins.h" @@ -46,7 +46,7 @@ using namespace ::chip::Inet; using namespace ::chip::DeviceLayer; using namespace ::chip::Logging; -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) #include "Keyboard.h" #include "OtaSupport.h" #include "PWR_Configuration.h" @@ -67,7 +67,7 @@ extern InitFunc __init_array_end; extern "C" void sched_enable(); /* low power requirements */ -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) extern "C" void setThreadInitialized(bool isInitialized); extern "C" bool isThreadInitialized(); #endif @@ -133,7 +133,7 @@ extern "C" void main_task(void const * argument) goto exit; } -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) setThreadInitialized(TRUE); #endif @@ -172,7 +172,7 @@ extern "C" void main_task(void const * argument) extern "C" void otSysEventSignalPending(void) { -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) /* make sure that 15.4 radio is initialized before waking up the Thread task */ if (isThreadInitialized()) #endif @@ -182,7 +182,7 @@ extern "C" void otSysEventSignalPending(void) } } -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) extern "C" void vOptimizeConsumption(void) { /* BUTTON2 change contact, BUTTON4 start adv/factoryreset */ diff --git a/examples/platform/nxp/k32w/k32w0/app/support/FreeRtosHooks.c b/examples/platform/nxp/k32w/k32w0/app/support/FreeRtosHooks.c index 8a05dca08621e5..4d9b19781f1c92 100644 --- a/examples/platform/nxp/k32w/k32w0/app/support/FreeRtosHooks.c +++ b/examples/platform/nxp/k32w/k32w0/app/support/FreeRtosHooks.c @@ -112,7 +112,7 @@ void freertos_mbedtls_mutex_free(void) mbedtls_threading_free_alt(); } -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) && (configUSE_TICKLESS_IDLE != 0) +#if (configUSE_TICKLESS_IDLE != 0) /* * Setup the systick timer to generate the tick interrupts at the required @@ -239,7 +239,7 @@ void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime) OSA_InterruptEnable(); } -#endif /* (cPWR_UsePowerDownMode) && (configUSE_TICKLESS_IDLE != 0) */ +#endif /* (configUSE_TICKLESS_IDLE != 0) */ static void BOARD_ActionOnIdle(void) { diff --git a/examples/platform/nxp/k32w/k32w0/common/CustomFactoryDataProvider.cpp b/examples/platform/nxp/k32w/k32w0/common/CustomFactoryDataProvider.cpp index 249eddf975713f..18e809509fc803 100644 --- a/examples/platform/nxp/k32w/k32w0/common/CustomFactoryDataProvider.cpp +++ b/examples/platform/nxp/k32w/k32w0/common/CustomFactoryDataProvider.cpp @@ -32,7 +32,7 @@ CustomFactoryDataProvider & CustomFactoryDataProvider::GetDefaultInstance() CHIP_ERROR CustomFactoryDataProvider::SetCustomIds() { - static_assert(CustomFactoryIds::kCustomMaxId == K32W0FactoryDataProvider::kNumberOfIds, + static_assert(CustomFactoryIds::kCustomMaxId == FactoryDataProvider::kNumberOfIds, "kNumberOfIds is computed based on CHIP_DEVICE_CONFIG_CUSTOM_PROVIDER_NUMBER_IDS."); maxLengths[CustomFactoryIds::kCustomId1] = kMaxLengthCustomId1; maxLengths[CustomFactoryIds::kCustomId2] = kMaxLengthCustomId2; @@ -47,7 +47,7 @@ CHIP_ERROR CustomFactoryDataProvider::ParseFunctionExample() MutableByteSpan buffer(data_buf); memset(buffer.data(), 0, buffer.size()); uint16_t userDataSize = 0; - // A user can use K32W0FactoryDataProvider::SearchForId to read an id from internal + // A user can use FactoryDataProvider::SearchForId to read an id from internal // flash factory data section. ReturnErrorOnFailure(SearchForId(CustomFactoryIds::kCustomId1, buffer.data(), buffer.size(), userDataSize)); diff --git a/examples/platform/nxp/k32w/k32w0/common/CustomFactoryDataProvider.h b/examples/platform/nxp/k32w/k32w0/common/CustomFactoryDataProvider.h index 5a8fc5e0507fc0..9edd603b4677c8 100644 --- a/examples/platform/nxp/k32w/k32w0/common/CustomFactoryDataProvider.h +++ b/examples/platform/nxp/k32w/k32w0/common/CustomFactoryDataProvider.h @@ -16,7 +16,7 @@ */ #pragma once -#include "K32W0FactoryDataProvider.h" +#include namespace chip { namespace DeviceLayer { @@ -27,7 +27,7 @@ namespace DeviceLayer { * provider based on this example. */ -class CustomFactoryDataProvider : public K32W0FactoryDataProvider +class CustomFactoryDataProvider : public FactoryDataProviderImpl { public: /* Custom IDs should start from FactoryDataId::kMaxId, which is diff --git a/examples/platform/nxp/k32w/k32w0/common/README.md b/examples/platform/nxp/k32w/k32w0/common/README.md index 442529562babd2..459f62f049e337 100644 --- a/examples/platform/nxp/k32w/k32w0/common/README.md +++ b/examples/platform/nxp/k32w/k32w0/common/README.md @@ -4,20 +4,18 @@ orphan: true ## Usage of custom Factory Data Provider -`K32W0FactoryDataProvider` is the default factory data provider. It implements -three interfaces from common Matter stack: +`FactoryDataProviderImpl` is the default factory data provider. It is an +extension of `FactoryDataProvider` K32W common class, which implements the +following interfaces: - CommissionableDataProvider - DeviceAttestationCredentialsProvider - DeviceInstanceInfoProvider -A user can inherit `K32W0FactoryDataProvider` to provide additional -functionality (such as parsing custom factory data fields) that is customer -specific. Additionally, each method from the above three interfaces could be -overwritten in the custom provider, but the current platform provider -implementation should be enough for most use cases. +A user can inherit `FactoryDataProviderImpl` to provide additional functionality +(such as parsing custom factory data fields) that is customer specific. -What **MUST** be done to enable usage of a custom factory provider: +What **shall** be done to enable usage of a custom factory provider: - Set `use_custom_factory_provider=1`. This option is only available when factory data is used (`chip_with_factory_data=1`). An assert will be raised @@ -43,7 +41,7 @@ What **MUST** be done to enable usage of a custom factory provider: Note that new flags were introduced: - `CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER`: select between using - `K32W0FactoryDataProvider` or `CustomFactoryDataProvider` when + `FactoryDataProviderImpl` or `CustomFactoryDataProvider` when registering the provider. - `CHIP_DEVICE_CONFIG_CUSTOM_PROVIDER_NUMBER_IDS`: set the number of custom IDs (which are different than the default IDs). If this macro is @@ -51,12 +49,12 @@ What **MUST** be done to enable usage of a custom factory provider: - The default IDs are validated directly in `SearchForId`, but custom IDs should set their maximum lengths through `SetCustomIds` method. -- `K32W0FactoryDataProvider::kNumberOfIds` is computed at compile time and - should represent the number of IDs (custom + default). Custom IDs should - start from `FactoryDataId::kMaxId`, which is the next valid ID. IDs +- `FactoryDataProvider::kNumberOfIds` is computed at compile time and should + represent the number of IDs (custom + default). Custom IDs should start from + `FactoryDataId::kMaxId`, which is the next valid ID. IDs `[1, FactoryDataId::kMaxId - 1]` are reserved for default factory data IDs. Please refer to `CustomFactoryDataProvider` for a minimal example of a custom factory data provider and note that its implementation is just an example of how to integrate a custom provider into the application, while still using the -default implementation provided by `K32W0FactoryDataProvider`. +default implementation provided by `FactoryDataProviderImpl`. diff --git a/examples/platform/nxp/k32w/k32w0/scripts/sign-outdir.py b/examples/platform/nxp/k32w/k32w0/scripts/sign-outdir.py index 0c4a0b34a9dc17..577cc2424fd5b9 100644 --- a/examples/platform/nxp/k32w/k32w0/scripts/sign-outdir.py +++ b/examples/platform/nxp/k32w/k32w0/scripts/sign-outdir.py @@ -1,7 +1,10 @@ import os import subprocess -sign_images_path = os.environ["NXP_K32W0_SDK_ROOT"] + "/tools/imagetool/sign_images.sh" +if os.environ["NXP_K32W0_SDK_ROOT"] != "": + sign_images_path = os.environ["NXP_K32W0_SDK_ROOT"] + "/tools/imagetool/sign_images.sh" +else: + sign_images_path = os.getcwd() + "/../../../../../../third_party/nxp/k32w0_sdk/repo/core/tools/imagetool/sign_images.sh" # Give execute permission if needed if os.access(sign_images_path, os.X_OK) is False: diff --git a/src/platform/nxp/k32w/common/BLEManagerCommon.cpp b/src/platform/nxp/k32w/common/BLEManagerCommon.cpp new file mode 100644 index 00000000000000..05b878bfd3d202 --- /dev/null +++ b/src/platform/nxp/k32w/common/BLEManagerCommon.cpp @@ -0,0 +1,1418 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2020 Nest Labs, Inc. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides an implementation of the BLEManager singleton object + * for the K32W platforms. + */ + +/* this file behaves like a config.h, comes first */ +#include + +#include + +#include + +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + +#include + +#include "board.h" +#include "gatt_db_app_interface.h" +#include "gatt_db_handles.h" +#include "stdio.h" +#include "timers.h" + +#if defined(CPU_JN518X) && defined(chip_with_low_power) && (chip_with_low_power == 1) +#include "PWR_Configuration.h" +#endif + +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING +#include +#include +#endif + +/******************************************************************************* + * Local data types + *******************************************************************************/ +extern "C" bool_t Ble_ConfigureHostStackConfig(void); + +#if defined(chip_with_low_power) && (chip_with_low_power == 1) +extern "C" void PWR_DisallowDeviceToSleep(void); +extern "C" void PWR_AllowDeviceToSleep(void); +#endif + +using namespace ::chip; +using namespace ::chip::Ble; + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +namespace { +/******************************************************************************* + * Macros & Constants definitions + *******************************************************************************/ +/* Timeout of BLE commands */ +#define CHIP_BLE_KW_EVNT_TIMEOUT 1000 / portTICK_PERIOD_MS + +/** BLE advertisement state changed */ +#define CHIP_BLE_KW_EVNT_ADV_CHANGED 0x0001 +/** BLE advertisement command failed */ +#define CHIP_BLE_KW_EVNT_ADV_FAILED 0x0002 +/** BLE advertisement setup failed */ +#define CHIP_BLE_KW_EVNT_ADV_SETUP_FAILED 0x0004 +/** BLE advertisement parameters setup complete */ +#define CHIP_BLE_KW_EVNT_ADV_PAR_SETUP_COMPLETE 0x0008 +/** BLE advertisement data setup complete */ +#define CHIP_BLE_KW_EVNT_ADV_DAT_SETUP_COMPLETE 0x0010 +/** BLE random address set */ +#define CHIP_BLE_KW_EVNT_RND_ADDR_SET 0x0020 +/** BLE Initialization complete */ +#define CHIP_BLE_KW_EVNT_INIT_COMPLETE 0x0040 +/** BLE Received a handle value confirmation from the client */ +#define CHIP_BLE_KW_EVNT_INDICATION_CONFIRMED 0x0080 +/** BLE send indication failed */ +#define CHIP_BLE_KW_EVNT_INDICATION_FAILED 0x0100 +/** TX Power Level Set */ +#define CHIP_BLE_KW_EVNT_POWER_LEVEL_SET 0x0200 +/** Maximal time of connection without activity */ +#define CHIP_BLE_KW_CONN_TIMEOUT 60000 +/** Maximum number of pending BLE events */ +#define CHIP_BLE_EVENT_QUEUE_MAX_ENTRIES 10 + +#define LOOP_EV_BLE (0x08) + +/* controller task configuration */ +#define CONTROLLER_TASK_PRIORITY (6U) +#define CONTROLLER_TASK_STACK_SIZE (gControllerTaskStackSize_c / sizeof(StackType_t)) + +/* host task configuration */ +#define HOST_TASK_PRIORITY (4U) +#define HOST_TASK_STACK_SIZE (gHost_TaskStackSize_c / sizeof(StackType_t)) + +/* advertising configuration */ +#define BLEKW_ADV_MAX_NO (2) +#define BLEKW_SCAN_RSP_MAX_NO (2) +#define BLEKW_MAX_ADV_DATA_LEN (31) +#define CHIP_ADV_SHORT_UUID_LEN (2) + +/* FreeRTOS sw timer */ +TimerHandle_t sbleAdvTimeoutTimer; + +/* Queue used to synchronize asynchronous messages from the KW BLE tasks */ +QueueHandle_t sBleEventQueue; + +/* Used to manage asynchronous events from BLE Stack: e.g.: GAP setup finished */ +EventGroupHandle_t sEventGroup; + +TimerHandle_t connectionTimeout; + +const uint8_t ShortUUID_CHIPoBLEService[] = { 0xF6, 0xFF }; +const ChipBleUUID ChipUUID_CHIPoBLEChar_RX = { { 0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42, 0x9F, + 0x9D, 0x11 } }; +const ChipBleUUID ChipUUID_CHIPoBLEChar_TX = { { 0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42, 0x9F, + 0x9D, 0x12 } }; + +#if defined(chip_with_low_power) && (chip_with_low_power == 1) +static bool bleAppStopInProgress; +#endif + +BLEManagerCommon * sImplInstance; + +} // namespace + +CHIP_ERROR BLEManagerCommon::_Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + EventBits_t eventBits; + uint16_t attChipRxHandle[1] = { (uint16_t) value_chipoble_rx }; + +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + uint16_t attChipC3Handle[1] = { (uint16_t) value_chipoble_c3 }; +#endif + + mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Enabled; + + // Check if BLE stack is initialized + VerifyOrExit(!mFlags.Has(Flags::kK32WBLEStackInitialized), err = CHIP_ERROR_INCORRECT_STATE); + + // Initialize the Chip BleLayer. + err = BleLayer::Init(this, this, &DeviceLayer::SystemLayer()); + SuccessOrExit(err); + + /* Initialization of message wait events - + * used for receiving BLE Stack events */ + sEventGroup = xEventGroupCreate(); + VerifyOrExit(sEventGroup != NULL, err = CHIP_ERROR_INCORRECT_STATE); + + /* Prepare callback input queue.*/ + sBleEventQueue = xQueueCreate(CHIP_BLE_EVENT_QUEUE_MAX_ENTRIES, sizeof(blekw_msg_t *)); + VerifyOrExit(sBleEventQueue != NULL, err = CHIP_ERROR_INCORRECT_STATE); + + /* Create the connection timeout timer. */ + connectionTimeout = + xTimerCreate("bleTimeoutTmr", pdMS_TO_TICKS(CHIP_BLE_KW_CONN_TIMEOUT), pdFALSE, (void *) 0, blekw_connection_timeout_cb); + VerifyOrExit(connectionTimeout != NULL, err = CHIP_ERROR_INCORRECT_STATE); + + /* BLE platform code initialization */ + SuccessOrExit(err = InitHostController(&blekw_generic_cb)); + + sImplInstance = GetImplInstance(); + + /* Register the GATT server callback */ + VerifyOrExit(GattServer_RegisterCallback(blekw_gatt_server_cb) == gBleSuccess_c, err = CHIP_ERROR_INCORRECT_STATE); + + /* Wait until BLE Stack is ready */ + eventBits = xEventGroupWaitBits(sEventGroup, CHIP_BLE_KW_EVNT_INIT_COMPLETE, pdTRUE, pdTRUE, CHIP_BLE_KW_EVNT_TIMEOUT); + VerifyOrExit(eventBits & CHIP_BLE_KW_EVNT_INIT_COMPLETE, err = CHIP_ERROR_INCORRECT_STATE); + +#if defined(CPU_JN518X) && defined(chip_with_low_power) && (chip_with_low_power == 1) + PWR_ChangeDeepSleepMode(cPWR_PowerDown_RamRet); +#endif + + GattServer_RegisterHandlesForWriteNotifications(1, attChipRxHandle); +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + VerifyOrExit(GattServer_RegisterHandlesForReadNotifications(1, attChipC3Handle) == gBleSuccess_c, + err = CHIP_ERROR_INCORRECT_STATE); +#endif + + mFlags.Set(Flags::kK32WBLEStackInitialized); + mFlags.Set(Flags::kAdvertisingEnabled, CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART ? true : false); + mFlags.Set(Flags::kFastAdvertisingEnabled); + + // Create FreeRTOS sw timer for BLE timeouts and interval change. + sbleAdvTimeoutTimer = xTimerCreate("BleAdvTimer", // Just a text name, not used by the RTOS kernel + pdMS_TO_TICKS(100), // == default timer period (mS) + false, // no timer reload (==one-shot) + (void *) this, // init timer id = ble obj context + BleAdvTimeoutHandler // timer callback handler + ); + VerifyOrExit(sbleAdvTimeoutTimer != NULL, err = CHIP_ERROR_INCORRECT_STATE); + +exit: + return err; +} + +uint16_t BLEManagerCommon::_NumConnections(void) +{ + return static_cast(mDeviceConnected == true); +} + +bool BLEManagerCommon::_IsAdvertisingEnabled(void) +{ + return mFlags.Has(Flags::kAdvertisingEnabled); +} + +bool BLEManagerCommon::_IsAdvertising(void) +{ + return mFlags.Has(Flags::kAdvertising); +} + +CHIP_ERROR BLEManagerCommon::_SetAdvertisingEnabled(bool val) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); + + if (mFlags.Has(Flags::kAdvertisingEnabled) != val) + { + mFlags.Set(Flags::kAdvertisingEnabled, val); + PlatformMgr().ScheduleWork(DriveBLEState, 0); + } + +exit: + return err; +} + +CHIP_ERROR BLEManagerCommon::_SetAdvertisingMode(BLEAdvertisingMode mode) +{ + switch (mode) + { + case BLEAdvertisingMode::kFastAdvertising: + mFlags.Set(Flags::kFastAdvertisingEnabled); + break; + case BLEAdvertisingMode::kSlowAdvertising: { + // We are in FreeRTOS timer service context, which is a default daemon task and has + // the highest priority. Stop advertising should be scheduled to run from Matter task. + mFlags.Clear(Flags::kFastAdvertisingEnabled); + PlatformMgr().ScheduleWork(StopAdvertisingPriorToSwitchingMode, 0); + break; + } + default: + return CHIP_ERROR_INVALID_ARGUMENT; + } + mFlags.Set(Flags::kRestartAdvertising); + PlatformMgr().ScheduleWork(DriveBLEState, 0); + return CHIP_NO_ERROR; +} + +CHIP_ERROR BLEManagerCommon::_GetDeviceName(char * buf, size_t bufSize) +{ + if (strlen(mDeviceName) >= bufSize) + { + return CHIP_ERROR_BUFFER_TOO_SMALL; + } + strcpy(buf, mDeviceName); + return CHIP_NO_ERROR; +} + +CHIP_ERROR BLEManagerCommon::_SetDeviceName(const char * deviceName) +{ + if (mServiceMode == ConnectivityManager::kCHIPoBLEServiceMode_NotSupported) + { + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; + } + if (deviceName != NULL && deviceName[0] != 0) + { + if (strlen(deviceName) >= kMaxDeviceNameLength) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + memset(mDeviceName, 0, kMaxDeviceNameLength); + strcpy(mDeviceName, deviceName); + mFlags.Set(Flags::kDeviceNameSet); + ChipLogProgress(DeviceLayer, "Setting device name to : \"%s\"", deviceName); + } + else + { + mDeviceName[0] = 0; + mFlags.Clear(Flags::kDeviceNameSet); + } + + return CHIP_NO_ERROR; +} + +void BLEManagerCommon::_OnPlatformEvent(const ChipDeviceEvent * event) +{ + switch (event->Type) + { + case DeviceEventType::kCHIPoBLESubscribe: + ChipDeviceEvent connEstEvent; + + HandleSubscribeReceived(event->CHIPoBLESubscribe.ConId, &CHIP_BLE_SVC_ID, &ChipUUID_CHIPoBLEChar_TX); + connEstEvent.Type = DeviceEventType::kCHIPoBLEConnectionEstablished; + PlatformMgr().PostEventOrDie(&connEstEvent); + break; + + case DeviceEventType::kCHIPoBLEUnsubscribe: + HandleUnsubscribeReceived(event->CHIPoBLEUnsubscribe.ConId, &CHIP_BLE_SVC_ID, &ChipUUID_CHIPoBLEChar_TX); + break; + + case DeviceEventType::kCHIPoBLEWriteReceived: + HandleWriteReceived(event->CHIPoBLEWriteReceived.ConId, &CHIP_BLE_SVC_ID, &ChipUUID_CHIPoBLEChar_RX, + PacketBufferHandle::Adopt(event->CHIPoBLEWriteReceived.Data)); + break; + + case DeviceEventType::kCHIPoBLEConnectionError: + HandleConnectionError(event->CHIPoBLEConnectionError.ConId, event->CHIPoBLEConnectionError.Reason); + break; + + case DeviceEventType::kCHIPoBLEIndicateConfirm: + HandleIndicationConfirmation(event->CHIPoBLEIndicateConfirm.ConId, &CHIP_BLE_SVC_ID, &ChipUUID_CHIPoBLEChar_TX); + break; + + default: + break; + } +} + +bool BLEManagerCommon::SubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId) +{ + ChipLogProgress(DeviceLayer, "BLEManagerCommon::SubscribeCharacteristic() not supported"); + return false; +} + +bool BLEManagerCommon::UnsubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId) +{ + ChipLogProgress(DeviceLayer, "BLEManagerCommon::UnsubscribeCharacteristic() not supported"); + return false; +} + +bool BLEManagerCommon::CloseConnection(BLE_CONNECTION_OBJECT conId) +{ + return blekw_stop_connection_internal(conId); +} + +uint16_t BLEManagerCommon::GetMTU(BLE_CONNECTION_OBJECT conId) const +{ + uint16_t tempMtu = 0; + (void) Gatt_GetMtu(conId, &tempMtu); + + return tempMtu; +} + +bool BLEManagerCommon::SendWriteRequest(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, + PacketBufferHandle pBuf) +{ + ChipLogProgress(DeviceLayer, "BLEManagerCommon::SendWriteRequest() not supported"); + return false; +} + +bool BLEManagerCommon::SendReadRequest(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, + PacketBufferHandle pBuf) +{ + ChipLogProgress(DeviceLayer, "BLEManagerCommon::SendReadRequest() not supported"); + return false; +} + +bool BLEManagerCommon::SendReadResponse(BLE_CONNECTION_OBJECT conId, BLE_READ_REQUEST_CONTEXT requestContext, + const ChipBleUUID * svcId, const ChipBleUUID * charId) +{ + ChipLogProgress(DeviceLayer, "BLEManagerCommon::SendReadResponse() not supported"); + return false; +} + +void BLEManagerCommon::NotifyChipConnectionClosed(BLE_CONNECTION_OBJECT conId) +{ + BLEMgrImpl().CloseConnection(conId); +} + +bool BLEManagerCommon::SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, + PacketBufferHandle data) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + uint16_t cId = (UUIDsMatch(&ChipUUID_CHIPoBLEChar_TX, charId) ? value_chipoble_tx : 0); + ChipDeviceEvent event; + + if (cId != 0) + { + if (blekw_send_event(conId, cId, data->Start(), data->DataLength()) != BLE_OK) + { + err = CHIP_ERROR_SENDING_BLOCKED; + } + else + { + event.Type = DeviceEventType::kCHIPoBLEIndicateConfirm; + event.CHIPoBLEIndicateConfirm.ConId = conId; + err = PlatformMgr().PostEvent(&event); + } + + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "BLEManagerCommon::SendIndication() failed: %s", ErrorStr(err)); + return false; + } + return true; + } + return false; +} + +BLEManagerCommon::ble_err_t BLEManagerCommon::blekw_send_event(int8_t connection_handle, uint16_t handle, uint8_t * data, + uint32_t len) +{ + EventBits_t eventBits; + +#if CHIP_DEVICE_CHIP0BLE_DEBUG + ChipLogProgress(DeviceLayer, "Trying to send event."); +#endif + + if (connection_handle < 0 || handle <= 0) + { + ChipLogProgress(DeviceLayer, "BLE Event - Bad Handle"); + return BLE_E_FAIL; + } + + if (len > 0 && data == NULL) + { + ChipLogProgress(DeviceLayer, "BLE Event - Invalid Data"); + return BLE_E_FAIL; + } + + /************* Send the indication *************/ + xEventGroupClearBits(sEventGroup, CHIP_BLE_KW_EVNT_INDICATION_CONFIRMED | CHIP_BLE_KW_EVNT_INDICATION_FAILED); + + if (GattServer_SendInstantValueIndication(connection_handle, handle, len, data) != gBleSuccess_c) + { + ChipLogProgress(DeviceLayer, "BLE Event - Can't sent indication"); + return BLE_E_FAIL; + } + + /* Wait until BLE Stack is ready */ + eventBits = xEventGroupWaitBits(sEventGroup, CHIP_BLE_KW_EVNT_INDICATION_CONFIRMED | CHIP_BLE_KW_EVNT_INDICATION_FAILED, pdTRUE, + pdFALSE, CHIP_BLE_KW_EVNT_TIMEOUT); + + if (eventBits & CHIP_BLE_KW_EVNT_INDICATION_FAILED) + { + ChipLogProgress(DeviceLayer, "BLE Event - Sent Failed"); + return BLE_E_FAIL; + } + +#if CHIP_DEVICE_CHIP0BLE_DEBUG + ChipLogProgress(DeviceLayer, "BLE Event - Sent :-) "); +#endif + + return BLE_OK; +} +/******************************************************************************* + * Private functions + *******************************************************************************/ + +BLEManagerCommon::ble_err_t BLEManagerCommon::blekw_start_advertising(gapAdvertisingParameters_t * adv_params, + gapAdvertisingData_t * adv, gapScanResponseData_t * scnrsp) +{ + EventBits_t eventBits; + + /************* Set the advertising parameters *************/ + xEventGroupClearBits(sEventGroup, CHIP_BLE_KW_EVNT_ADV_SETUP_FAILED | CHIP_BLE_KW_EVNT_ADV_PAR_SETUP_COMPLETE); + + /* Set the advertising parameters */ + if (Gap_SetAdvertisingParameters(adv_params) != gBleSuccess_c) + { + vTaskDelay(1); + + /* Retry, just to make sure before giving up and sending an error. */ + if (Gap_SetAdvertisingParameters(adv_params) != gBleSuccess_c) + { + return BLE_E_SET_ADV_PARAMS; + } + } + + eventBits = xEventGroupWaitBits(sEventGroup, CHIP_BLE_KW_EVNT_ADV_SETUP_FAILED | CHIP_BLE_KW_EVNT_ADV_PAR_SETUP_COMPLETE, + pdTRUE, pdFALSE, CHIP_BLE_KW_EVNT_TIMEOUT); + + if (!(eventBits & CHIP_BLE_KW_EVNT_ADV_PAR_SETUP_COMPLETE)) + { + return BLE_E_ADV_PARAMS_FAILED; + } + + /************* Set the advertising data *************/ + xEventGroupClearBits(sEventGroup, CHIP_BLE_KW_EVNT_ADV_SETUP_FAILED | CHIP_BLE_KW_EVNT_ADV_DAT_SETUP_COMPLETE); + + /* Set the advertising data */ + if (Gap_SetAdvertisingData(adv, scnrsp) != gBleSuccess_c) + { + return BLE_E_SET_ADV_DATA; + } + + eventBits = xEventGroupWaitBits(sEventGroup, CHIP_BLE_KW_EVNT_ADV_SETUP_FAILED | CHIP_BLE_KW_EVNT_ADV_DAT_SETUP_COMPLETE, + pdTRUE, pdFALSE, CHIP_BLE_KW_EVNT_TIMEOUT); + + if (!(eventBits & CHIP_BLE_KW_EVNT_ADV_DAT_SETUP_COMPLETE)) + { + return BLE_E_ADV_SETUP_FAILED; + } + + /************* Start the advertising *************/ + xEventGroupClearBits(sEventGroup, CHIP_BLE_KW_EVNT_ADV_CHANGED | CHIP_BLE_KW_EVNT_ADV_FAILED); + + if (gBleSuccess_c != Gap_CreateRandomDeviceAddress(NULL, NULL)) + { + return BLE_E_SET_ADV_PARAMS; + } + + eventBits = xEventGroupWaitBits(sEventGroup, CHIP_BLE_KW_EVNT_RND_ADDR_SET, pdTRUE, pdTRUE, CHIP_BLE_KW_EVNT_TIMEOUT); + + if (!(eventBits & CHIP_BLE_KW_EVNT_RND_ADDR_SET)) + { + return BLE_E_ADV_PARAMS_FAILED; + } + + /* Start the advertising */ + if (Gap_StartAdvertising(blekw_gap_advertising_cb, blekw_gap_connection_cb) != gBleSuccess_c) + { + return BLE_E_START_ADV; + } + +#if defined(chip_with_low_power) && (chip_with_low_power == 1) + PWR_DisallowDeviceToSleep(); +#endif + + eventBits = xEventGroupWaitBits(sEventGroup, CHIP_BLE_KW_EVNT_ADV_CHANGED | CHIP_BLE_KW_EVNT_ADV_FAILED, pdTRUE, pdFALSE, + CHIP_BLE_KW_EVNT_TIMEOUT); + if (!(eventBits & CHIP_BLE_KW_EVNT_ADV_CHANGED)) + { +#if defined(chip_with_low_power) && (chip_with_low_power == 1) + PWR_AllowDeviceToSleep(); +#endif + return BLE_E_START_ADV_FAILED; + } + +#if defined(chip_with_low_power) && (chip_with_low_power == 1) + PWR_AllowDeviceToSleep(); +#endif + + return BLE_OK; +} + +BLEManagerCommon::ble_err_t BLEManagerCommon::blekw_stop_advertising(void) +{ + EventBits_t eventBits; + bleResult_t res; + + xEventGroupClearBits(sEventGroup, CHIP_BLE_KW_EVNT_ADV_CHANGED | CHIP_BLE_KW_EVNT_ADV_FAILED); + + /* Stop the advertising data */ + res = Gap_StopAdvertising(); + if (res != gBleSuccess_c) + { + ChipLogProgress(DeviceLayer, "Failed to stop advertising %d", res); + return BLE_E_STOP; + } + + eventBits = xEventGroupWaitBits(sEventGroup, CHIP_BLE_KW_EVNT_ADV_CHANGED | CHIP_BLE_KW_EVNT_ADV_FAILED, pdTRUE, pdFALSE, + CHIP_BLE_KW_EVNT_TIMEOUT); + + if (eventBits & CHIP_BLE_KW_EVNT_ADV_FAILED) + { + ChipLogProgress(DeviceLayer, "Stop advertising flat out failed."); + return BLE_E_ADV_FAILED; + } + else if (!(eventBits & CHIP_BLE_KW_EVNT_ADV_CHANGED)) + { + ChipLogProgress(DeviceLayer, "Stop advertising event timeout."); + return BLE_E_ADV_CHANGED; + } + + return BLE_OK; +} + +CHIP_ERROR BLEManagerCommon::ConfigureAdvertisingData(void) +{ + ble_err_t err; + CHIP_ERROR chipErr; + uint16_t discriminator; + uint16_t advInterval = 0; + gapAdvertisingData_t adv = { 0 }; + gapAdStructure_t adv_data[BLEKW_ADV_MAX_NO] = { { 0 } }; + gapAdStructure_t scan_rsp_data[BLEKW_SCAN_RSP_MAX_NO] = { { 0 } }; + uint8_t advPayload[BLEKW_MAX_ADV_DATA_LEN] = { 0 }; + gapScanResponseData_t scanRsp = { 0 }; + gapAdvertisingParameters_t adv_params = { 0 }; + uint8_t chipAdvDataFlags = (gLeGeneralDiscoverableMode_c | gBrEdrNotSupported_c); + uint8_t chipOverBleService[2]; + ChipBLEDeviceIdentificationInfo mDeviceIdInfo = { 0 }; + uint8_t mDeviceIdInfoLength = 0; + + chipErr = GetCommissionableDataProvider()->GetSetupDiscriminator(discriminator); + if (chipErr != CHIP_NO_ERROR) + { + return chipErr; + } + + if (!mFlags.Has(Flags::kDeviceNameSet)) + { + memset(mDeviceName, 0, kMaxDeviceNameLength); + snprintf(mDeviceName, kMaxDeviceNameLength, "%s%04u", CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX, discriminator); + } + + /**************** Prepare advertising data *******************************************/ + adv.cNumAdStructures = BLEKW_ADV_MAX_NO; + + chipErr = ConfigurationMgr().GetBLEDeviceIdentificationInfo(mDeviceIdInfo); + SuccessOrExit(chipErr); + mDeviceIdInfoLength = sizeof(mDeviceIdInfo); + + if ((mDeviceIdInfoLength + CHIP_ADV_SHORT_UUID_LEN + 1) > BLEKW_MAX_ADV_DATA_LEN) + { + return CHIP_ERROR_INCORRECT_STATE; + } + + adv_data[0].length = 0x02; + adv_data[0].adType = gAdFlags_c; + adv_data[0].aData = (uint8_t *) (&chipAdvDataFlags); + + adv_data[1].length = static_cast(mDeviceIdInfoLength + CHIP_ADV_SHORT_UUID_LEN + 1); + adv_data[1].adType = gAdServiceData16bit_c; + memcpy(advPayload, ShortUUID_CHIPoBLEService, CHIP_ADV_SHORT_UUID_LEN); + memcpy(&advPayload[CHIP_ADV_SHORT_UUID_LEN], (void *) &mDeviceIdInfo, mDeviceIdInfoLength); + adv_data[1].aData = advPayload; + + adv.aAdStructures = adv_data; + +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + ReturnErrorOnFailure(EncodeAdditionalDataTlv()); +#endif + + /**************** Prepare scan response data *******************************************/ + scanRsp.cNumAdStructures = BLEKW_SCAN_RSP_MAX_NO; + + scan_rsp_data[0].length = static_cast(strlen(mDeviceName) + 1); + scan_rsp_data[0].adType = gAdCompleteLocalName_c; + scan_rsp_data[0].aData = (uint8_t *) mDeviceName; + + scan_rsp_data[1].length = sizeof(chipOverBleService) + 1; + scan_rsp_data[1].adType = gAdComplete16bitServiceList_c; + chipOverBleService[0] = ShortUUID_CHIPoBLEService[0]; + chipOverBleService[1] = ShortUUID_CHIPoBLEService[1]; + scan_rsp_data[1].aData = (uint8_t *) chipOverBleService; + + scanRsp.aAdStructures = scan_rsp_data; + + /**************** Prepare advertising parameters *************************************/ + if (mFlags.Has(Flags::kFastAdvertisingEnabled)) + { + advInterval = CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX; + } + else + { + advInterval = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX; + } + advInterval = (uint16_t)(advInterval * 0.625F); + + adv_params.minInterval = adv_params.maxInterval = advInterval; + adv_params.advertisingType = gAdvConnectableUndirected_c; + adv_params.ownAddressType = gBleAddrTypeRandom_c; + adv_params.peerAddressType = gBleAddrTypePublic_c; + memset(adv_params.peerAddress, 0, gcBleDeviceAddressSize_c); + adv_params.channelMap = (gapAdvertisingChannelMapFlags_t)(gAdvChanMapFlag37_c | gAdvChanMapFlag38_c | gAdvChanMapFlag39_c); + adv_params.filterPolicy = gProcessAll_c; + + err = blekw_start_advertising(&adv_params, &adv, &scanRsp); + if (err == BLE_OK) + { + ChipLogProgress(DeviceLayer, "Started Advertising at %d ms", advInterval); + } + else + { + ChipLogProgress(DeviceLayer, "Advertising error 0x%x!", err); + mFlags.Clear(Flags::kAdvertising); + return CHIP_ERROR_INCORRECT_STATE; + } + +exit: + return chipErr; +} + +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING +CHIP_ERROR BLEManagerCommon::EncodeAdditionalDataTlv() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + BitFlags dataFields; + AdditionalDataPayloadGeneratorParams params; + +#if CHIP_ENABLE_ROTATING_DEVICE_ID && defined(CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID) + uint8_t rotatingDeviceIdUniqueId[ConfigurationManager::kRotatingDeviceIDUniqueIDLength] = {}; + MutableByteSpan rotatingDeviceIdUniqueIdSpan(rotatingDeviceIdUniqueId); + + err = DeviceLayer::GetDeviceInstanceInfoProvider()->GetRotatingDeviceIdUniqueId(rotatingDeviceIdUniqueIdSpan); + SuccessOrExit(err); + err = ConfigurationMgr().GetLifetimeCounter(params.rotatingDeviceIdLifetimeCounter); + SuccessOrExit(err); + params.rotatingDeviceIdUniqueId = rotatingDeviceIdUniqueIdSpan; + dataFields.Set(AdditionalDataFields::RotatingDeviceId); +#endif /* CHIP_ENABLE_ROTATING_DEVICE_ID && defined(CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID) */ + err = AdditionalDataPayloadGenerator().generateAdditionalDataPayload(params, sImplInstance->c3AdditionalDataBufferHandle, + dataFields); + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Failed to generate TLV encoded Additional Data (%s)", __func__); + } + + return err; +} + +void BLEManagerCommon::HandleC3ReadRequest(blekw_msg_t * msg) +{ + bleResult_t result; + blekw_att_read_data_t * att_rd_data = (blekw_att_read_data_t *) msg->data.data; + deviceId_t deviceId = att_rd_data->device_id; + uint16_t handle = att_rd_data->handle; + uint16_t length = sImplInstance->c3AdditionalDataBufferHandle->DataLength(); + const uint8_t * data = (const uint8_t *) sImplInstance->c3AdditionalDataBufferHandle->Start(); + + result = GattDb_WriteAttribute(handle, length, data); + if (result != gBleSuccess_c) + { + ChipLogError(DeviceLayer, "Failed to write C3 characteristic: %d", result); + } + + result = GattServer_SendAttributeReadStatus(deviceId, handle, gAttErrCodeNoError_c); + if (result != gBleSuccess_c) + { + ChipLogError(DeviceLayer, "Failed to send response to C3 read request: %d", result); + } +} +#endif /* CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING */ + +CHIP_ERROR BLEManagerCommon::StartAdvertising(void) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + mFlags.Set(Flags::kAdvertising); + mFlags.Clear(Flags::kRestartAdvertising); + + if (mFlags.Has(Flags::kFastAdvertisingEnabled)) + { + StartBleAdvTimeoutTimer(CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT); + } + + err = ConfigureAdvertisingData(); + + if (err == CHIP_NO_ERROR) + /* schedule NFC emulation stop */ + { + ChipDeviceEvent advChange; + advChange.Type = DeviceEventType::kCHIPoBLEAdvertisingChange; + advChange.CHIPoBLEAdvertisingChange.Result = kActivity_Started; + err = PlatformMgr().PostEvent(&advChange); + } + + return err; +} + +CHIP_ERROR BLEManagerCommon::StopAdvertising(void) +{ + CHIP_ERROR error = CHIP_NO_ERROR; + + if (mFlags.Has(Flags::kAdvertising)) + { + mFlags.Clear(Flags::kAdvertising); + mFlags.Clear(Flags::kRestartAdvertising); + + if (!mDeviceConnected) + { + ble_err_t err = blekw_stop_advertising(); + VerifyOrReturnError(err == BLE_OK, CHIP_ERROR_INCORRECT_STATE); + CancelBleAdvTimeoutTimer(); + } + +#if CONFIG_CHIP_NFC_COMMISSIONING + /* schedule NFC emulation stop */ + ChipDeviceEvent advChange; + advChange.Type = DeviceEventType::kCHIPoBLEAdvertisingChange; + advChange.CHIPoBLEAdvertisingChange.Result = kActivity_Stopped; + error = PlatformMgr().PostEvent(&advChange); +#endif + } + + return error; +} + +void BLEManagerCommon::DriveBLEState(void) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + // Check if BLE stack is initialized + VerifyOrExit(mFlags.Has(Flags::kK32WBLEStackInitialized), err = CHIP_ERROR_INCORRECT_STATE); + + // Start advertising if needed... + if (mServiceMode == ConnectivityManager::kCHIPoBLEServiceMode_Enabled && mFlags.Has(Flags::kAdvertisingEnabled)) + { + // Start/re-start advertising if not already started, or if there is a pending change + // to the advertising configuration. + if (!mFlags.Has(Flags::kAdvertising) || mFlags.Has(Flags::kRestartAdvertising)) + { + err = StartAdvertising(); + SuccessOrExit(err); + } + } + // Otherwise, stop advertising if it is enabled. + else if (mFlags.Has(Flags::kAdvertising)) + { + err = StopAdvertising(); + SuccessOrExit(err); + // Reset to fast advertising mode only if SetBLEAdvertisingEnabled(false) was called (usually from app). + mFlags.Set(Flags::kFastAdvertisingEnabled); + } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Disabling CHIPoBLE service due to error: %s", ErrorStr(err)); + mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Disabled; + } +} + +void BLEManagerCommon::DriveBLEState(intptr_t arg) +{ + sImplInstance->DriveBLEState(); +} + +void BLEManagerCommon::StopAdvertisingPriorToSwitchingMode(intptr_t arg) +{ + if (CHIP_NO_ERROR != sImplInstance->StopAdvertising()) + { + ChipLogProgress(DeviceLayer, "Failed to stop advertising"); + } +} + +void BLEManagerCommon::DoBleProcessing(void) +{ + blekw_msg_t * msg = NULL; + + while ((xQueueReceive(sBleEventQueue, &msg, 0) == pdTRUE) && msg) + { + if (msg->type == BLE_KW_MSG_ERROR) + { + if (msg->data.u8 == BLE_KW_MSG_2M_UPGRADE_ERROR) + { + ChipLogProgress(DeviceLayer, + "Warning. BLE is using 1Mbps. Couldn't upgrade to 2Mbps, " + "maybe the peer is missing 2Mbps support."); + } + else + { + ChipLogProgress(DeviceLayer, "BLE Error: %d.\n", msg->data.u8); + } + } + else if (msg->type == BLE_KW_MSG_CONNECTED) + { + sImplInstance->HandleConnectEvent(msg); + } + else if (msg->type == BLE_KW_MSG_DISCONNECTED) + { + sImplInstance->HandleConnectionCloseEvent(msg); + } + else if (msg->type == BLE_KW_MSG_MTU_CHANGED) + { + blekw_start_connection_timeout(); + ChipLogProgress(DeviceLayer, "BLE MTU size has been changed to %d.", msg->data.u16); + } + else if (msg->type == BLE_KW_MSG_ATT_WRITTEN || msg->type == BLE_KW_MSG_ATT_LONG_WRITTEN || + msg->type == BLE_KW_MSG_ATT_CCCD_WRITTEN) + { + sImplInstance->HandleWriteEvent(msg); + } + else if (msg->type == BLE_KW_MSG_ATT_READ) + { +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + blekw_att_read_data_t * att_rd_data = (blekw_att_read_data_t *) msg->data.data; + if (value_chipoble_c3 == att_rd_data->handle) + sImplInstance->HandleC3ReadRequest(msg); +#endif + } + else if (msg->type == BLE_KW_MSG_FORCE_DISCONNECT) + { + sImplInstance->HandleForceDisconnect(); + } + + /* Free the message from the queue */ + free(msg); + msg = NULL; + } +} + +void BLEManagerCommon::HandleConnectEvent(blekw_msg_t * msg) +{ + uint8_t deviceId = msg->data.u8; + ChipLogProgress(DeviceLayer, "BLE is connected with device: %d.\n", deviceId); + +#if gClkUseFro32K && defined(chip_with_low_power) && (chip_with_low_power == 1) + PWR_DisallowDeviceToSleep(); +#endif + + mDeviceId = deviceId; + mDeviceConnected = true; + + blekw_start_connection_timeout(); + PlatformMgr().ScheduleWork(DriveBLEState, 0); +} + +void BLEManagerCommon::HandleConnectionCloseEvent(blekw_msg_t * msg) +{ + uint8_t deviceId = msg->data.u8; + ChipLogProgress(DeviceLayer, "BLE is disconnected with device: %d.\n", deviceId); + +#if gClkUseFro32K && defined(chip_with_low_power) && (chip_with_low_power == 1) + PWR_AllowDeviceToSleep(); +#endif + + mDeviceConnected = false; + + ChipDeviceEvent event; + event.Type = DeviceEventType::kCHIPoBLEConnectionError; + event.CHIPoBLEConnectionError.ConId = deviceId; + event.CHIPoBLEConnectionError.Reason = BLE_ERROR_REMOTE_DEVICE_DISCONNECTED; + + CancelBleAdvTimeoutTimer(); + + PlatformMgr().PostEventOrDie(&event); + mFlags.Set(Flags::kRestartAdvertising); + mFlags.Set(Flags::kFastAdvertisingEnabled); + PlatformMgr().ScheduleWork(DriveBLEState, 0); +} + +void BLEManagerCommon::HandleWriteEvent(blekw_msg_t * msg) +{ + blekw_att_written_data_t * att_wr_data = (blekw_att_written_data_t *) msg->data.data; + attErrorCode_t status = gAttErrCodeNoError_c; + +#if CHIP_DEVICE_CHIP0BLE_DEBUG + ChipLogProgress(DeviceLayer, "Attribute write request(device: %d,handle: %d).", att_wr_data->device_id, att_wr_data->handle); +#endif + + blekw_start_connection_timeout(); + + if (value_chipoble_rx == att_wr_data->handle) + { + sImplInstance->HandleRXCharWrite(msg); + } + else if (cccd_chipoble_tx == att_wr_data->handle) + { + sImplInstance->HandleTXCharCCCDWrite(msg); + } + + /* TODO: do we need to send the status also for CCCD_WRITTEN? */ + if (msg->type != BLE_KW_MSG_ATT_CCCD_WRITTEN) + { + bleResult_t res = GattServer_SendAttributeWrittenStatus(att_wr_data->device_id, att_wr_data->handle, status); + + if (res != gBleSuccess_c) + { + ChipLogProgress(DeviceLayer, "GattServer_SendAttributeWrittenStatus returned %d", res); + } + } +} + +void BLEManagerCommon::HandleTXCharCCCDWrite(blekw_msg_t * msg) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + blekw_att_written_data_t * att_wr_data = (blekw_att_written_data_t *) msg->data.data; + ChipDeviceEvent event; + + VerifyOrExit(att_wr_data->length != 0, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(att_wr_data->data != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + +#if CHIP_DEVICE_CHIP0BLE_DEBUG + ChipLogProgress(DeviceLayer, "CHIPoBLE %s received", *att_wr_data->data ? "subscribe" : "unsubscribe"); +#endif + + if (*att_wr_data->data) + { + if (!mDeviceSubscribed) + { + mDeviceSubscribed = true; + event.Type = DeviceEventType::kCHIPoBLESubscribe; + event.CHIPoBLESubscribe.ConId = att_wr_data->device_id; + err = PlatformMgr().PostEvent(&event); + } + } + else + { + mDeviceSubscribed = false; + event.Type = DeviceEventType::kCHIPoBLEUnsubscribe; + event.CHIPoBLESubscribe.ConId = att_wr_data->device_id; + err = PlatformMgr().PostEvent(&event); + } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "HandleTXCharCCCDWrite() failed: %s", ErrorStr(err)); + } +} + +void BLEManagerCommon::HandleRXCharWrite(blekw_msg_t * msg) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + System::PacketBufferHandle buf; + blekw_att_written_data_t * att_wr_data = (blekw_att_written_data_t *) msg->data.data; + + VerifyOrExit(att_wr_data->length != 0, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(att_wr_data->data != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + // Copy the data to a PacketBuffer. + buf = System::PacketBufferHandle::NewWithData(att_wr_data->data, att_wr_data->length); + VerifyOrExit(!buf.IsNull(), err = CHIP_ERROR_NO_MEMORY); + +#if CHIP_DEVICE_CHIP0BLE_DEBUG + ChipLogDetail(DeviceLayer, + "Write request/command received for" + "CHIPoBLE RX characteristic (con %u, len %u)", + att_wr_data->device_id, buf->DataLength()); +#endif + + // Post an event to the CHIP queue to deliver the data into the CHIP stack. + { + ChipDeviceEvent event; + event.Type = DeviceEventType::kCHIPoBLEWriteReceived; + event.CHIPoBLEWriteReceived.ConId = att_wr_data->device_id; + event.CHIPoBLEWriteReceived.Data = std::move(buf).UnsafeRelease(); + err = PlatformMgr().PostEvent(&event); + } +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "HandleRXCharWrite() failed: %s", ErrorStr(err)); + } +} + +void BLEManagerCommon::HandleForceDisconnect() +{ + ChipLogProgress(DeviceLayer, "BLE connection timeout: Forcing disconnection."); + + /* Set the advertising parameters */ + if (Gap_Disconnect(mDeviceId) != gBleSuccess_c) + { + ChipLogProgress(DeviceLayer, "Gap_Disconnect() failed."); + } +} + +/******************************************************************************* + * BLE stack callbacks + *******************************************************************************/ +void BLEManagerCommon::blekw_generic_cb(gapGenericEvent_t * pGenericEvent) +{ + /* Call BLE Conn Manager */ + BleConnManager_GenericEvent(pGenericEvent); + + switch (pGenericEvent->eventType) + { + case gInternalError_c: + /* Notify the CHIP that the BLE hardware report fail */ + ChipLogProgress(DeviceLayer, "BLE Internal Error: Code 0x%04X, Source 0x%08X, HCI OpCode %d.\n", + pGenericEvent->eventData.internalError.errorCode, pGenericEvent->eventData.internalError.errorSource, + pGenericEvent->eventData.internalError.hciCommandOpcode); + if ((gHciUnsupportedRemoteFeature_c == pGenericEvent->eventData.internalError.errorCode) && + (gLeSetPhy_c == pGenericEvent->eventData.internalError.errorSource)) + { + (void) blekw_msg_add_u8(BLE_KW_MSG_ERROR, BLE_KW_MSG_2M_UPGRADE_ERROR); + } + else + { + (void) blekw_msg_add_u8(BLE_KW_MSG_ERROR, BLE_INTERNAL_ERROR); + } + break; + + case gAdvertisingSetupFailed_c: + xEventGroupSetBits(sEventGroup, CHIP_BLE_KW_EVNT_ADV_SETUP_FAILED); + break; + + case gAdvertisingParametersSetupComplete_c: + xEventGroupSetBits(sEventGroup, CHIP_BLE_KW_EVNT_ADV_PAR_SETUP_COMPLETE); + break; + + case gAdvertisingDataSetupComplete_c: + xEventGroupSetBits(sEventGroup, CHIP_BLE_KW_EVNT_ADV_DAT_SETUP_COMPLETE); + break; + + case gRandomAddressReady_c: + Gap_SetRandomAddress(pGenericEvent->eventData.addrReady.aAddress); + break; + + case gRandomAddressSet_c: + xEventGroupSetBits(sEventGroup, CHIP_BLE_KW_EVNT_RND_ADDR_SET); + break; + +#if BLE_HIGH_TX_POWER + case gTxPowerLevelSetComplete_c: + if (gBleSuccess_c == pGenericEvent->eventData.txPowerLevelSetStatus) + { + xEventGroupSetBits(sEventGroup, CHIP_BLE_KW_EVNT_POWER_LEVEL_SET); + } + break; +#endif + + case gInitializationComplete_c: + /* Common GAP configuration */ + BleConnManager_GapCommonConfig(); + + /* Set the local synchronization event */ + xEventGroupSetBits(sEventGroup, CHIP_BLE_KW_EVNT_INIT_COMPLETE); + break; + default: + break; + } +} + +void BLEManagerCommon::blekw_gap_advertising_cb(gapAdvertisingEvent_t * pAdvertisingEvent) +{ + if (pAdvertisingEvent->eventType == gAdvertisingStateChanged_c) + { + /* Set the local synchronization event */ + xEventGroupSetBits(sEventGroup, CHIP_BLE_KW_EVNT_ADV_CHANGED); + } + else + { + /* The advertisement start failed */ + ChipLogProgress(DeviceLayer, "Advertising failed: event=%d reason=0x%04X\n", pAdvertisingEvent->eventType, + pAdvertisingEvent->eventData.failReason); + + /* Set the local synchronization event */ + xEventGroupSetBits(sEventGroup, CHIP_BLE_KW_EVNT_ADV_FAILED); + } +} + +void BLEManagerCommon::blekw_gap_connection_cb(deviceId_t deviceId, gapConnectionEvent_t * pConnectionEvent) +{ + /* Call BLE Conn Manager */ + BleConnManager_GapPeripheralEvent(deviceId, pConnectionEvent); + + if (pConnectionEvent->eventType == gConnEvtConnected_c) + { +#if CHIP_DEVICE_CONFIG_BLE_SET_PHY_2M_REQ + ChipLogProgress(DeviceLayer, "BLE K32W: Trying to set the PHY to 2M"); + + (void) Gap_LeSetPhy(FALSE, deviceId, 0, gConnPhyUpdateReqTxPhySettings_c, gConnPhyUpdateReqRxPhySettings_c, + (uint16_t) gConnPhyUpdateReqPhyOptions_c); +#endif + + /* Notify App Task that the BLE is connected now */ + (void) blekw_msg_add_u8(BLE_KW_MSG_CONNECTED, (uint8_t) deviceId); +#if defined(chip_with_low_power) && (chip_with_low_power == 1) + PWR_AllowDeviceToSleep(); +#endif + } + else if (pConnectionEvent->eventType == gConnEvtDisconnected_c) + { + blekw_stop_connection_timeout(); + + /* Notify App Task that the BLE is disconnected now */ + (void) blekw_msg_add_u8(BLE_KW_MSG_DISCONNECTED, (uint8_t) deviceId); + +#if defined(chip_with_low_power) && (chip_with_low_power == 1) + if (bleAppStopInProgress == TRUE) + { + bleAppStopInProgress = FALSE; + PWR_AllowDeviceToSleep(); + } +#endif + } + else if (pConnectionEvent->eventType == gConnEvtPairingRequest_c) + { + /* Reject request for pairing */ + Gap_RejectPairing(deviceId, gPairingNotSupported_c); + } + else if (pConnectionEvent->eventType == gConnEvtAuthenticationRejected_c) + { + ChipLogProgress(DeviceLayer, "BLE Authentication rejected (reason:%d).\n", + pConnectionEvent->eventData.authenticationRejectedEvent.rejectReason); + } +} + +void BLEManagerCommon::blekw_connection_timeout_cb(TimerHandle_t timer) +{ + (void) blekw_msg_add_u8(BLE_KW_MSG_FORCE_DISCONNECT, 0); +} + +void BLEManagerCommon::blekw_start_connection_timeout(void) +{ + xTimerReset(connectionTimeout, 0); +} + +void BLEManagerCommon::blekw_stop_connection_timeout(void) +{ + ChipLogProgress(DeviceLayer, "Stopped connectionTimeout timer."); + xTimerStop(connectionTimeout, 0); +} + +void BLEManagerCommon::blekw_gatt_server_cb(deviceId_t deviceId, gattServerEvent_t * pServerEvent) +{ + switch (pServerEvent->eventType) + { + case gEvtMtuChanged_c: { + uint16_t tempMtu = 0; + + (void) Gatt_GetMtu(deviceId, &tempMtu); + blekw_msg_add_u16(BLE_KW_MSG_MTU_CHANGED, tempMtu); + break; + } + + case gEvtAttributeWritten_c: + blekw_msg_add_att_written(BLE_KW_MSG_ATT_WRITTEN, deviceId, pServerEvent->eventData.attributeWrittenEvent.handle, + pServerEvent->eventData.attributeWrittenEvent.aValue, + pServerEvent->eventData.attributeWrittenEvent.cValueLength); + break; + + case gEvtLongCharacteristicWritten_c: + blekw_msg_add_att_written(BLE_KW_MSG_ATT_LONG_WRITTEN, deviceId, pServerEvent->eventData.longCharWrittenEvent.handle, + pServerEvent->eventData.longCharWrittenEvent.aValue, + pServerEvent->eventData.longCharWrittenEvent.cValueLength); + break; + + case gEvtAttributeRead_c: + blekw_msg_add_att_read(BLE_KW_MSG_ATT_READ, deviceId, pServerEvent->eventData.attributeReadEvent.handle); + break; + + case gEvtCharacteristicCccdWritten_c: { + uint16_t cccd_val = pServerEvent->eventData.charCccdWrittenEvent.newCccd; + + blekw_msg_add_att_written(BLE_KW_MSG_ATT_CCCD_WRITTEN, deviceId, pServerEvent->eventData.charCccdWrittenEvent.handle, + (uint8_t *) &cccd_val, 2); + break; + } + + case gEvtHandleValueConfirmation_c: + /* Set the local synchronization event */ + xEventGroupSetBits(sEventGroup, CHIP_BLE_KW_EVNT_INDICATION_CONFIRMED); + break; + + case gEvtError_c: + if (pServerEvent->eventData.procedureError.procedureType == gSendIndication_c) + { + /* Set the local synchronization event */ + xEventGroupSetBits(sEventGroup, CHIP_BLE_KW_EVNT_INDICATION_FAILED); + } + else + { + ChipLogProgress(DeviceLayer, "BLE Gatt Server Error: Code 0x%04X, Source %d.\n", + pServerEvent->eventData.procedureError.error, pServerEvent->eventData.procedureError.procedureType); + + /* Notify CHIP BLE App Task that the BLE hardware report fail */ + (void) blekw_msg_add_u8(BLE_KW_MSG_ERROR, BLE_INTERNAL_GATT_ERROR); + } + break; + + default: + break; + } +} +/******************************************************************************* + * Add to message queue functions + *******************************************************************************/ +CHIP_ERROR BLEManagerCommon::blekw_msg_add_att_written(blekw_msg_type_t type, uint8_t device_id, uint16_t handle, uint8_t * data, + uint16_t length) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + blekw_msg_t * msg = NULL; + blekw_att_written_data_t * att_wr_data; + + /* Allocate a buffer with enough space to store the packet */ + msg = (blekw_msg_t *) malloc(sizeof(blekw_msg_t) + sizeof(blekw_att_written_data_t) + length); + VerifyOrExit(msg, err = CHIP_ERROR_NO_MEMORY); + + msg->type = type; + msg->length = sizeof(blekw_att_written_data_t) + length; + att_wr_data = (blekw_att_written_data_t *) msg->data.data; + att_wr_data->device_id = device_id; + att_wr_data->handle = handle; + att_wr_data->length = length; + FLib_MemCpy(att_wr_data->data, data, length); + + VerifyOrExit(xQueueSend(sBleEventQueue, &msg, 0) == pdTRUE, err = CHIP_ERROR_NO_MEMORY); + otTaskletsSignalPending(NULL); + +exit: + return err; +} + +CHIP_ERROR BLEManagerCommon::blekw_msg_add_att_read(blekw_msg_type_t type, uint8_t device_id, uint16_t handle) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + blekw_msg_t * msg = NULL; + blekw_att_read_data_t * att_rd_data; + + /* Allocate a buffer with enough space to store the packet */ + msg = (blekw_msg_t *) malloc(sizeof(blekw_msg_t) + sizeof(blekw_att_read_data_t)); + VerifyOrExit(msg, err = CHIP_ERROR_NO_MEMORY); + + msg->type = type; + msg->length = sizeof(blekw_att_read_data_t); + att_rd_data = (blekw_att_read_data_t *) msg->data.data; + att_rd_data->device_id = device_id; + att_rd_data->handle = handle; + + VerifyOrExit(xQueueSend(sBleEventQueue, &msg, 0) == pdTRUE, err = CHIP_ERROR_NO_MEMORY); + otTaskletsSignalPending(NULL); + +exit: + return err; +} + +CHIP_ERROR BLEManagerCommon::blekw_msg_add_u8(blekw_msg_type_t type, uint8_t data) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + blekw_msg_t * msg = NULL; + + /* Allocate a buffer with enough space to store the packet */ + msg = (blekw_msg_t *) malloc(sizeof(blekw_msg_t)); + VerifyOrExit(msg, err = CHIP_ERROR_NO_MEMORY); + + msg->type = type; + msg->length = 0; + msg->data.u8 = data; + + VerifyOrExit(xQueueSend(sBleEventQueue, &msg, 0) == pdTRUE, err = CHIP_ERROR_NO_MEMORY); + otTaskletsSignalPending(NULL); + +exit: + return err; +} + +CHIP_ERROR BLEManagerCommon::blekw_msg_add_u16(blekw_msg_type_t type, uint16_t data) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + blekw_msg_t * msg = NULL; + + /* Allocate a buffer with enough space to store the packet */ + msg = (blekw_msg_t *) malloc(sizeof(blekw_msg_t)); + VerifyOrExit(msg, err = CHIP_ERROR_NO_MEMORY); + + msg->type = type; + msg->length = 0; + msg->data.u16 = data; + + VerifyOrExit(xQueueSend(sBleEventQueue, &msg, 0) == pdTRUE, err = CHIP_ERROR_NO_MEMORY); + otTaskletsSignalPending(NULL); + +exit: + return err; +} + +void BLEManagerCommon::BleAdvTimeoutHandler(TimerHandle_t xTimer) +{ + if (BLEMgrImpl().mFlags.Has(Flags::kFastAdvertisingEnabled)) + { + ChipLogDetail(DeviceLayer, "Start slow advertisement"); + BLEMgr().SetAdvertisingMode(BLEAdvertisingMode::kSlowAdvertising); + } +} + +void BLEManagerCommon::CancelBleAdvTimeoutTimer(void) +{ + if (xTimerStop(sbleAdvTimeoutTimer, 0) == pdFAIL) + { + ChipLogError(DeviceLayer, "Failed to stop BledAdv timeout timer"); + } +} + +void BLEManagerCommon::StartBleAdvTimeoutTimer(uint32_t aTimeoutInMs) +{ + if (xTimerIsTimerActive(sbleAdvTimeoutTimer)) + { + CancelBleAdvTimeoutTimer(); + } + + // timer is not active, change its period to required value (== restart). + // FreeRTOS- Block for a maximum of 100 ticks if the change period command + // cannot immediately be sent to the timer command queue. + if (xTimerChangePeriod(sbleAdvTimeoutTimer, aTimeoutInMs / portTICK_PERIOD_MS, 100) != pdPASS) + { + ChipLogError(DeviceLayer, "Failed to start BledAdv timeout timer"); + } +} + +bool BLEManagerCommon::blekw_stop_connection_internal(BLE_CONNECTION_OBJECT conId) +{ + ChipLogProgress(DeviceLayer, "Closing BLE GATT connection (con %u)", conId); + + if (Gap_Disconnect(conId) != gBleSuccess_c) + { + ChipLogProgress(DeviceLayer, "Gap_Disconnect() failed."); + return false; + } +#if defined(chip_with_low_power) && (chip_with_low_power == 1) + else + { + bleAppStopInProgress = TRUE; + PWR_DisallowDeviceToSleep(); + } +#endif + + return true; +} + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip +#endif // CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE diff --git a/src/platform/nxp/k32w/common/BLEManagerCommon.h b/src/platform/nxp/k32w/common/BLEManagerCommon.h new file mode 100644 index 00000000000000..d8a6561e50b380 --- /dev/null +++ b/src/platform/nxp/k32w/common/BLEManagerCommon.h @@ -0,0 +1,238 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2020 Nest Labs, Inc. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides an implementation of the BLEManager singleton object + * for the K32W platforms. + */ + +#pragma once + +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + +#include "fsl_os_abstraction.h" + +#include "ble_conn_manager.h" +#include "ble_general.h" +#include "ble_host_task_config.h" +#include "ble_host_tasks.h" +#include "gap_interface.h" +#include "gatt_db_dynamic.h" +#include "gatt_server_interface.h" + +#include "FreeRTOS.h" +#include "event_groups.h" +#include "timers.h" + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +typedef void (*ble_generic_cb_fp)(gapGenericEvent_t * pGenericEvent); + +using namespace chip::Ble; + +/** + * Base class for different platform implementations (K32W0 and K32W1 for now). + */ +class BLEManagerCommon : public BLEManager, protected BleLayer, private BlePlatformDelegate, private BleApplicationDelegate +{ +protected: + // ===== Members that implement the BLEManager internal interface. + + CHIP_ERROR _Init(void); + CHIP_ERROR _Shutdown() { return CHIP_NO_ERROR; } + CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); + CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); + bool _IsAdvertisingEnabled(void); + CHIP_ERROR _SetAdvertisingEnabled(bool val); + bool _IsAdvertising(void); + CHIP_ERROR _SetAdvertisingMode(BLEAdvertisingMode mode); + CHIP_ERROR _GetDeviceName(char * buf, size_t bufSize); + CHIP_ERROR _SetDeviceName(const char * deviceName); + uint16_t _NumConnections(void); + void _OnPlatformEvent(const ChipDeviceEvent * event); + + // ===== Members that implement virtual methods on BlePlatformDelegate. + + bool SubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID * svcId, + const Ble::ChipBleUUID * charId) override; + bool UnsubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID * svcId, + const Ble::ChipBleUUID * charId) override; + bool CloseConnection(BLE_CONNECTION_OBJECT conId) override; + uint16_t GetMTU(BLE_CONNECTION_OBJECT conId) const override; + bool SendIndication(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID * svcId, const Ble::ChipBleUUID * charId, + System::PacketBufferHandle pBuf) override; + bool SendWriteRequest(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID * svcId, const Ble::ChipBleUUID * charId, + System::PacketBufferHandle pBuf) override; + bool SendReadRequest(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID * svcId, const Ble::ChipBleUUID * charId, + System::PacketBufferHandle pBuf) override; + bool SendReadResponse(BLE_CONNECTION_OBJECT conId, BLE_READ_REQUEST_CONTEXT requestContext, const Ble::ChipBleUUID * svcId, + const Ble::ChipBleUUID * charId) override; + + // ===== Members that implement virtual methods on BleApplicationDelegate. + + void NotifyChipConnectionClosed(BLE_CONNECTION_OBJECT conId) override; + + // ===== Private members reserved for use by this class only. + + enum class Flags : uint8_t + { + kAdvertisingEnabled = 0x0001, + kFastAdvertisingEnabled = 0x0002, + kAdvertising = 0x0004, + kRestartAdvertising = 0x0008, + kK32WBLEStackInitialized = 0x0010, + kDeviceNameSet = 0x0020, + }; + BitFlags mFlags; + + enum + { + kMaxDeviceNameLength = 16, + kUnusedIndex = 0xFF, + }; + + typedef enum + { + BLE_KW_MSG_ERROR = 0x01, + BLE_KW_MSG_CONNECTED, + BLE_KW_MSG_DISCONNECTED, + BLE_KW_MSG_MTU_CHANGED, + BLE_KW_MSG_ATT_WRITTEN, + BLE_KW_MSG_ATT_LONG_WRITTEN, + BLE_KW_MSG_ATT_READ, + BLE_KW_MSG_ATT_CCCD_WRITTEN, + BLE_KW_MSG_FORCE_DISCONNECT, + } blekw_msg_type_t; + + typedef struct hk_ble_kw_msg_s + { + blekw_msg_type_t type; + uint16_t length; + union + { + uint8_t u8; + uint16_t u16; + uint32_t u32; + uint8_t data[1]; + char * str; + } data; + } blekw_msg_t; + + typedef enum ble_err_t + { + BLE_OK = 0, + BLE_INTERNAL_GATT_ERROR, + BLE_E_SET_ADV_PARAMS, + BLE_E_ADV_PARAMS_FAILED, + BLE_E_SET_ADV_DATA, + BLE_E_ADV_CHANGED, + BLE_E_ADV_FAILED, + BLE_E_ADV_SETUP_FAILED, + BLE_E_START_ADV, + BLE_E_STOP, + BLE_E_FAIL, + BLE_E_START_ADV_FAILED, + BLE_KW_MSG_2M_UPGRADE_ERROR, + BLE_INTERNAL_ERROR, + } ble_err_t; + + typedef struct ble_att_written_data_s + { + uint8_t device_id; + uint16_t handle; + uint16_t length; + uint8_t data[1]; + } blekw_att_written_data_t; + + typedef struct hk_ble_att_read_data_s + { + uint8_t device_id; + uint16_t handle; + } blekw_att_read_data_t; + + CHIPoBLEServiceMode mServiceMode; + char mDeviceName[kMaxDeviceNameLength + 1]; +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + chip::System::PacketBufferHandle c3AdditionalDataBufferHandle; +#endif + uint8_t mDeviceId; + bool mDeviceSubscribed = false; + bool mDeviceConnected = false; + + void DriveBLEState(void); + CHIP_ERROR ConfigureAdvertising(void); + CHIP_ERROR ConfigureAdvertisingData(void); + CHIP_ERROR StartAdvertising(void); + CHIP_ERROR StopAdvertising(void); + + void HandleConnectEvent(blekw_msg_t * msg); + void HandleConnectionCloseEvent(blekw_msg_t * msg); + void HandleWriteEvent(blekw_msg_t * msg); + void HandleRXCharWrite(blekw_msg_t * msg); + void HandleTXCharCCCDWrite(blekw_msg_t * msg); + void HandleForceDisconnect(); + +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + CHIP_ERROR EncodeAdditionalDataTlv(); + void HandleC3ReadRequest(blekw_msg_t * msg); +#endif + BLEManagerCommon::ble_err_t blekw_send_event(int8_t connection_handle, uint16_t handle, uint8_t * data, uint32_t len); + + static void DriveBLEState(intptr_t arg); + static void StopAdvertisingPriorToSwitchingMode(intptr_t arg); + static void BleAdvTimeoutHandler(TimerHandle_t xTimer); + static void CancelBleAdvTimeoutTimer(void); + static void StartBleAdvTimeoutTimer(uint32_t aTimeoutInMs); + + static void blekw_connection_timeout_cb(TimerHandle_t timer); + static void blekw_generic_cb(gapGenericEvent_t * pGenericEvent); + static void blekw_gatt_server_cb(deviceId_t deviceId, gattServerEvent_t * pServerEvent); + static CHIP_ERROR blekw_msg_add_u8(blekw_msg_type_t type, uint8_t data); + static CHIP_ERROR blekw_msg_add_u16(blekw_msg_type_t type, uint16_t data); + static CHIP_ERROR blekw_msg_add_att_written(blekw_msg_type_t type, uint8_t device_id, uint16_t handle, uint8_t * data, + uint16_t length); + static CHIP_ERROR blekw_msg_add_att_read(blekw_msg_type_t type, uint8_t device_id, uint16_t handle); + static BLEManagerCommon::ble_err_t blekw_start_advertising(gapAdvertisingParameters_t * adv_params, gapAdvertisingData_t * adv, + gapScanResponseData_t * scnrsp); + static BLEManagerCommon::ble_err_t blekw_stop_advertising(void); + static void blekw_gap_advertising_cb(gapAdvertisingEvent_t * pAdvertisingEvent); + static void blekw_gap_connection_cb(deviceId_t deviceId, gapConnectionEvent_t * pConnectionEvent); + static void blekw_start_connection_timeout(void); + static void blekw_stop_connection_timeout(void); + static bool blekw_stop_connection_internal(BLE_CONNECTION_OBJECT conId); + +public: + virtual CHIP_ERROR InitHostController(ble_generic_cb_fp cb_fp) = 0; + virtual BLEManagerCommon * GetImplInstance() = 0; + void DoBleProcessing(void); +}; + +inline BLEManager::CHIPoBLEServiceMode BLEManagerCommon::_GetCHIPoBLEServiceMode(void) +{ + return mServiceMode; +} + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip + +#endif // CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE diff --git a/src/platform/nxp/k32w/common/CHIPDevicePlatformRamStorageConfig.h b/src/platform/nxp/k32w/common/CHIPDevicePlatformRamStorageConfig.h index b55e8fccc38fc8..58c1c73bba5b73 100644 --- a/src/platform/nxp/k32w/common/CHIPDevicePlatformRamStorageConfig.h +++ b/src/platform/nxp/k32w/common/CHIPDevicePlatformRamStorageConfig.h @@ -108,6 +108,9 @@ * @def kNvmId_KvsValues * * PDM ID used for KVS values RAM storage. + * KVS buffer can become quite big, so this PDM + * id is used as base id for subsequent PDM ids + * used to store data in chunks of PDM page size. */ #ifndef kNvmId_KvsValues #define kNvmId_KvsValues (uint16_t) 0x6001 @@ -132,13 +135,13 @@ #define kNvmId_ApplicationBase (uint16_t) 0xA000 #endif -#if CONFIG_CHIP_K32W0_REAL_FACTORY_DATA +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA /** * @def kNvmId_FactoryDataBackup * - * PDM ID used for factory data backup in K32W0FactoryDataProvider. + * PDM ID used for factory data backup in FactoryDataProvider. */ #ifndef kNvmId_FactoryDataBackup #define kNvmId_FactoryDataBackup (uint16_t) 0x7000 #endif -#endif // CONFIG_CHIP_K32W0_REAL_FACTORY_DATA +#endif // CONFIG_CHIP_LOAD_REAL_FACTORY_DATA diff --git a/src/platform/nxp/k32w/k32w0/K32W0FactoryDataProvider.cpp b/src/platform/nxp/k32w/common/FactoryDataProvider.cpp similarity index 51% rename from src/platform/nxp/k32w/k32w0/K32W0FactoryDataProvider.cpp rename to src/platform/nxp/k32w/common/FactoryDataProvider.cpp index 53533218cccf72..5e99042ba4f0ed 100644 --- a/src/platform/nxp/k32w/k32w0/K32W0FactoryDataProvider.cpp +++ b/src/platform/nxp/k32w/common/FactoryDataProvider.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#if (!CONFIG_CHIP_K32W0_REAL_FACTORY_DATA || !(defined CONFIG_CHIP_K32W0_REAL_FACTORY_DATA)) +#if (!CONFIG_CHIP_LOAD_REAL_FACTORY_DATA || !(defined CONFIG_CHIP_LOAD_REAL_FACTORY_DATA)) #include #include #include @@ -29,11 +29,7 @@ #include #include #include - -#include "K32W0FactoryDataProvider.h" -extern "C" { -#include "Flash_Adapter.h" -} +#include #include @@ -43,63 +39,17 @@ namespace DeviceLayer { static constexpr size_t kSpake2pSerializedVerifier_MaxBase64Len = BASE64_ENCODED_LEN(chip::Crypto::kSpake2p_VerifierSerialized_Length) + 1; static constexpr size_t kSpake2pSalt_MaxBase64Len = BASE64_ENCODED_LEN(chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length) + 1; -static constexpr size_t kMaxKeyLen = 32; - -OtaUtils_EEPROM_ReadData pFunctionEepromRead = (OtaUtils_EEPROM_ReadData) K32W0FactoryDataProvider::ReadDataMemcpy; - -uint32_t K32W0FactoryDataProvider::kFactoryDataStart = (uint32_t) __FACTORY_DATA_START; -uint32_t K32W0FactoryDataProvider::kFactoryDataSize = (uint32_t) __FACTORY_DATA_SIZE; -uint32_t K32W0FactoryDataProvider::kFactoryDataPayloadStart = kFactoryDataStart + sizeof(K32W0FactoryDataProvider::Header); - -uint8_t K32W0FactoryDataProvider::ReadDataMemcpy(uint16_t num, uint32_t src, uint8_t * dst) -{ - memcpy(dst, (void *) (src), num); - return 0; -} -K32W0FactoryDataProvider & K32W0FactoryDataProvider::GetDefaultInstance() -{ - static K32W0FactoryDataProvider sInstance; - return sInstance; -} +uint32_t FactoryDataProvider::kFactoryDataStart = (uint32_t) __FACTORY_DATA_START; +uint32_t FactoryDataProvider::kFactoryDataSize = (uint32_t) __FACTORY_DATA_SIZE; +uint32_t FactoryDataProvider::kFactoryDataPayloadStart = kFactoryDataStart + sizeof(FactoryDataProvider::Header); -extern "C" WEAK CHIP_ERROR FactoryDataDefaultRestoreMechanism() -{ - CHIP_ERROR error = CHIP_NO_ERROR; - uint16_t backupLength = 0; - -#if CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR - // Check if PDM id related to factory data backup exists. - // If it does, it means an external event (such as a power loss) - // interrupted the factory data update process and the section - // from internal flash is most likely erased and should be restored. - if (PDM_bDoesDataExist(kNvmId_FactoryDataBackup, &backupLength)) - { - chip::Platform::ScopedMemoryBuffer buffer; - buffer.Calloc(K32W0FactoryDataProvider::kFactoryDataSize); - ReturnErrorCodeIf(buffer.Get() == nullptr, CHIP_ERROR_NO_MEMORY); - - auto status = PDM_eReadDataFromRecord(kNvmId_FactoryDataBackup, (void *) buffer.Get(), - K32W0FactoryDataProvider::kFactoryDataSize, &backupLength); - ReturnErrorCodeIf(PDM_E_STATUS_OK != status, CHIP_FACTORY_DATA_PDM_RESTORE); - - error = K32W0FactoryDataProvider::GetDefaultInstance().UpdateData(buffer.Get()); - if (error == CHIP_NO_ERROR) - { - ChipLogProgress(DeviceLayer, "Factory data was restored successfully"); - } - } -#endif - - return error; -} - -K32W0FactoryDataProvider::K32W0FactoryDataProvider() +FactoryDataProvider::FactoryDataProvider() { maxLengths[FactoryDataId::kVerifierId] = kSpake2pSerializedVerifier_MaxBase64Len; maxLengths[FactoryDataId::kSaltId] = kSpake2pSalt_MaxBase64Len; maxLengths[FactoryDataId::kIcId] = sizeof(uint32_t); - maxLengths[FactoryDataId::kDacPrivateKeyId] = kMaxKeyLen; + maxLengths[FactoryDataId::kDacPrivateKeyId] = Crypto::kP256_PrivateKey_Length; maxLengths[FactoryDataId::kDacCertificateId] = Credentials::kMaxDERCertLength; maxLengths[FactoryDataId::kPaiCertificateId] = Credentials::kMaxDERCertLength; maxLengths[FactoryDataId::kDiscriminatorId] = sizeof(uint32_t); @@ -117,150 +67,61 @@ K32W0FactoryDataProvider::K32W0FactoryDataProvider() maxLengths[FactoryDataId::kPartNumber] = ConfigurationManager::kMaxPartNumberLength; maxLengths[FactoryDataId::kProductURL] = ConfigurationManager::kMaxProductURLLength; maxLengths[FactoryDataId::kProductLabel] = ConfigurationManager::kMaxProductLabelLength; - - RegisterRestoreMechanism(FactoryDataDefaultRestoreMechanism); } -CHIP_ERROR K32W0FactoryDataProvider::Init() -{ - CHIP_ERROR error = CHIP_NO_ERROR; - uint32_t sum = 0; - - ReturnErrorOnFailure(SetCustomIds()); - - for (uint8_t i = 1; i < K32W0FactoryDataProvider::kNumberOfIds; i++) - { - sum += maxLengths[i]; - } - - if (sum > kFactoryDataSize) - { - ChipLogError(DeviceLayer, "Max size of factory data: %" PRIu32 " is bigger than reserved factory data size: %" PRIu32, sum, - kFactoryDataSize); - } - - VerifyOrReturnError(mRestoreMechanisms.size() > 0, CHIP_FACTORY_DATA_RESTORE_MECHANISM); - - for (auto & restore : mRestoreMechanisms) - { - error = restore(); - if (error != CHIP_NO_ERROR) - { - continue; - } - - error = Validate(); - if (error != CHIP_NO_ERROR) - { - continue; - } +FactoryDataProvider::~FactoryDataProvider() {} - break; - } - - if (error != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "Factory data init failed with: %s", ErrorStr(error)); - } - else - { -#if CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR - PDM_vDeleteDataRecord(kNvmId_FactoryDataBackup); -#endif - } - - return error; -} - -CHIP_ERROR K32W0FactoryDataProvider::Validate() +CHIP_ERROR FactoryDataProvider::Validate() { - uint8_t sha256Output[SHA256_HASH_SIZE] = { 0 }; + uint8_t output[Crypto::kSHA256_Hash_Length] = { 0 }; - auto status = OtaUtils_ReadFromInternalFlash((uint16_t) sizeof(Header), kFactoryDataStart, (uint8_t *) &mHeader, NULL, - pFunctionEepromRead); - ReturnErrorCodeIf(gOtaUtilsSuccess_c != status, CHIP_FACTORY_DATA_HEADER_READ); + memcpy(&mHeader, (void *) kFactoryDataStart, sizeof(Header)); ReturnErrorCodeIf(mHeader.hashId != kHashId, CHIP_FACTORY_DATA_HASH_ID); - SHA256_Hash((uint8_t *) kFactoryDataPayloadStart, mHeader.size, sha256Output); - ReturnErrorCodeIf(memcmp(sha256Output, mHeader.hash, kHashLen) != 0, CHIP_FACTORY_DATA_SHA_CHECK); - - return CHIP_NO_ERROR; -} - -void K32W0FactoryDataProvider::RegisterRestoreMechanism(RestoreMechanism restore) -{ - mRestoreMechanisms.insert(mRestoreMechanisms.end(), restore); -} - -CHIP_ERROR K32W0FactoryDataProvider::UpdateData(uint8_t * pBuf) -{ - NV_Init(); - - auto status = NV_FlashEraseSector(kFactoryDataStart, kFactoryDataSize); - ReturnErrorCodeIf(status != kStatus_FLASH_Success, CHIP_FACTORY_DATA_FLASH_ERASE); - - Header * header = (Header *) pBuf; - status = NV_FlashProgramUnaligned(kFactoryDataStart, sizeof(Header) + header->size, pBuf); - ReturnErrorCodeIf(status != kStatus_FLASH_Success, CHIP_FACTORY_DATA_FLASH_PROGRAM); + ReturnErrorOnFailure(Crypto::Hash_SHA256((uint8_t *) kFactoryDataPayloadStart, mHeader.size, output)); + ReturnErrorCodeIf(memcmp(output, mHeader.hash, kHashLen) != 0, CHIP_FACTORY_DATA_SHA_CHECK); return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::SearchForId(uint8_t searchedType, uint8_t * pBuf, size_t bufLength, uint16_t & length, - uint32_t * offset) +CHIP_ERROR FactoryDataProvider::SearchForId(uint8_t searchedType, uint8_t * pBuf, size_t bufLength, uint16_t & length, + uint32_t * offset) { - CHIP_ERROR err = CHIP_ERROR_NOT_FOUND; - uint32_t addr = kFactoryDataPayloadStart; - uint8_t type = 0; + uint32_t addr = kFactoryDataPayloadStart; + uint8_t type = 0; while (addr < (kFactoryDataPayloadStart + mHeader.size)) { - if (gOtaUtilsSuccess_c != OtaUtils_ReadFromInternalFlash((uint16_t) sizeof(type), addr, &type, NULL, pFunctionEepromRead) || - gOtaUtilsSuccess_c != - OtaUtils_ReadFromInternalFlash((uint16_t) sizeof(length), addr + 1, (uint8_t *) &length, NULL, pFunctionEepromRead)) - break; + memcpy(&type, (void *) addr, sizeof(type)); + memcpy(&length, (void *) (addr + 1), sizeof(length)); if (searchedType == type) { - if ((type >= K32W0FactoryDataProvider::kNumberOfIds) || (length > maxLengths[type])) + if ((type >= FactoryDataProvider::kNumberOfIds) || (length > maxLengths[type])) { ChipLogError(DeviceLayer, "Failed validity check for factory data with: id=%d, length=%d", type, length); break; } - if (bufLength < length) - { - err = CHIP_ERROR_BUFFER_TOO_SMALL; - } - else - { - if (gOtaUtilsSuccess_c != - OtaUtils_ReadFromInternalFlash(length, addr + kValueOffset, pBuf, NULL, pFunctionEepromRead)) - break; + ReturnErrorCodeIf(bufLength < length, CHIP_ERROR_BUFFER_TOO_SMALL); + memcpy(pBuf, (void *) (addr + kValueOffset), length); - if (offset) - *offset = (addr - kFactoryDataPayloadStart); - err = CHIP_NO_ERROR; - } - break; + if (offset) + *offset = (addr - kFactoryDataPayloadStart); + + return CHIP_NO_ERROR; } else { - /* Jump past 2 bytes of length and then use length to jump to next data */ + /* Jump past 3 bytes of length and then use length to jump to next data */ addr = addr + kValueOffset + length; } } - return err; -} - -CHIP_ERROR K32W0FactoryDataProvider::SetCustomIds() -{ - ChipLogError(DeviceLayer, "SetCustomIds() is not implemented for default FactoryDataProvider"); - return CHIP_NO_ERROR; + return CHIP_ERROR_NOT_FOUND; } -CHIP_ERROR K32W0FactoryDataProvider::GetCertificationDeclaration(MutableByteSpan & outBuffer) +CHIP_ERROR FactoryDataProvider::GetCertificationDeclaration(MutableByteSpan & outBuffer) { uint16_t declarationSize = 0; ReturnErrorOnFailure(SearchForId(FactoryDataId::kCertDeclarationId, outBuffer.data(), outBuffer.size(), declarationSize)); @@ -269,12 +130,12 @@ CHIP_ERROR K32W0FactoryDataProvider::GetCertificationDeclaration(MutableByteSpan return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetFirmwareInformation(MutableByteSpan & out_firmware_info_buffer) +CHIP_ERROR FactoryDataProvider::GetFirmwareInformation(MutableByteSpan & out_firmware_info_buffer) { return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetDeviceAttestationCert(MutableByteSpan & outBuffer) +CHIP_ERROR FactoryDataProvider::GetDeviceAttestationCert(MutableByteSpan & outBuffer) { uint16_t certificateSize = 0; ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacCertificateId, outBuffer.data(), outBuffer.size(), certificateSize)); @@ -282,7 +143,7 @@ CHIP_ERROR K32W0FactoryDataProvider::GetDeviceAttestationCert(MutableByteSpan & return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetProductAttestationIntermediateCert(MutableByteSpan & outBuffer) +CHIP_ERROR FactoryDataProvider::GetProductAttestationIntermediateCert(MutableByteSpan & outBuffer) { uint16_t certificateSize = 0; ReturnErrorOnFailure(SearchForId(FactoryDataId::kPaiCertificateId, outBuffer.data(), outBuffer.size(), certificateSize)); @@ -290,34 +151,12 @@ CHIP_ERROR K32W0FactoryDataProvider::GetProductAttestationIntermediateCert(Mutab return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::SignWithDeviceAttestationKey(const ByteSpan & messageToSign, MutableByteSpan & outSignBuffer) +CHIP_ERROR FactoryDataProvider::SignWithDeviceAttestationKey(const ByteSpan & messageToSign, MutableByteSpan & outSignBuffer) { - Crypto::P256ECDSASignature signature; - Crypto::P256Keypair keypair; - Crypto::P256SerializedKeypair serializedKeypair; - - VerifyOrReturnError(IsSpanUsable(outSignBuffer), CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(IsSpanUsable(messageToSign), CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(outSignBuffer.size() >= signature.Capacity(), CHIP_ERROR_BUFFER_TOO_SMALL); - - /* Get private key of DAC certificate from reserved section */ - uint8_t keyBuf[kMaxKeyLen]; - MutableByteSpan dacPrivateKeySpan(keyBuf); - uint16_t keySize = 0; - ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacPrivateKeyId, dacPrivateKeySpan.data(), dacPrivateKeySpan.size(), keySize)); - dacPrivateKeySpan.reduce_size(keySize); - - /* Only the private key is used when signing */ - ReturnErrorOnFailure(serializedKeypair.SetLength(Crypto::kP256_PublicKey_Length + dacPrivateKeySpan.size())); - memcpy(serializedKeypair.Bytes() + Crypto::kP256_PublicKey_Length, dacPrivateKeySpan.data(), dacPrivateKeySpan.size()); - - ReturnErrorOnFailure(keypair.Deserialize(serializedKeypair)); - ReturnErrorOnFailure(keypair.ECDSA_sign_msg(messageToSign.data(), messageToSign.size(), signature)); - - return CopySpanToMutableSpan(ByteSpan{ signature.ConstBytes(), signature.Length() }, outSignBuffer); + return SignWithDacKey(messageToSign, outSignBuffer); } -CHIP_ERROR K32W0FactoryDataProvider::GetSetupDiscriminator(uint16_t & setupDiscriminator) +CHIP_ERROR FactoryDataProvider::GetSetupDiscriminator(uint16_t & setupDiscriminator) { uint32_t discriminator = 0; uint16_t temp = 0; @@ -328,12 +167,12 @@ CHIP_ERROR K32W0FactoryDataProvider::GetSetupDiscriminator(uint16_t & setupDiscr return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::SetSetupDiscriminator(uint16_t setupDiscriminator) +CHIP_ERROR FactoryDataProvider::SetSetupDiscriminator(uint16_t setupDiscriminator) { return CHIP_ERROR_NOT_IMPLEMENTED; } -CHIP_ERROR K32W0FactoryDataProvider::GetSpake2pIterationCount(uint32_t & iterationCount) +CHIP_ERROR FactoryDataProvider::GetSpake2pIterationCount(uint32_t & iterationCount) { uint16_t temp = 0; ReturnErrorOnFailure(SearchForId(FactoryDataId::kIcId, (uint8_t *) &iterationCount, sizeof(iterationCount), temp)); @@ -341,7 +180,7 @@ CHIP_ERROR K32W0FactoryDataProvider::GetSpake2pIterationCount(uint32_t & iterati return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) +CHIP_ERROR FactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) { char saltB64[kSpake2pSalt_MaxBase64Len] = { 0 }; uint16_t saltB64Len = 0; @@ -356,7 +195,7 @@ CHIP_ERROR K32W0FactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & verifierLen) +CHIP_ERROR FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & verifierLen) { char verifierB64[kSpake2pSerializedVerifier_MaxBase64Len] = { 0 }; uint16_t verifierB64Len = 0; @@ -370,7 +209,7 @@ CHIP_ERROR K32W0FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifi return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetSetupPasscode(uint32_t & setupPasscode) +CHIP_ERROR FactoryDataProvider::GetSetupPasscode(uint32_t & setupPasscode) { uint16_t length = 0; ReturnErrorOnFailure(SearchForId(FactoryDataId::kSetupPasscodeId, (uint8_t *) &setupPasscode, sizeof(setupPasscode), length)); @@ -378,12 +217,12 @@ CHIP_ERROR K32W0FactoryDataProvider::GetSetupPasscode(uint32_t & setupPasscode) return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::SetSetupPasscode(uint32_t setupPasscode) +CHIP_ERROR FactoryDataProvider::SetSetupPasscode(uint32_t setupPasscode) { return CHIP_ERROR_NOT_IMPLEMENTED; } -CHIP_ERROR K32W0FactoryDataProvider::GetVendorName(char * buf, size_t bufSize) +CHIP_ERROR FactoryDataProvider::GetVendorName(char * buf, size_t bufSize) { uint16_t length = 0; ReturnErrorOnFailure(SearchForId(FactoryDataId::kVendorNameId, (uint8_t *) buf, bufSize, length)); @@ -392,7 +231,7 @@ CHIP_ERROR K32W0FactoryDataProvider::GetVendorName(char * buf, size_t bufSize) return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetVendorId(uint16_t & vendorId) +CHIP_ERROR FactoryDataProvider::GetVendorId(uint16_t & vendorId) { uint16_t length = 0; ReturnErrorOnFailure(SearchForId(FactoryDataId::kVidId, (uint8_t *) &vendorId, sizeof(vendorId), length)); @@ -400,7 +239,7 @@ CHIP_ERROR K32W0FactoryDataProvider::GetVendorId(uint16_t & vendorId) return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetProductName(char * buf, size_t bufSize) +CHIP_ERROR FactoryDataProvider::GetProductName(char * buf, size_t bufSize) { uint16_t length = 0; ReturnErrorOnFailure(SearchForId(FactoryDataId::kProductNameId, (uint8_t *) buf, bufSize, length)); @@ -409,7 +248,7 @@ CHIP_ERROR K32W0FactoryDataProvider::GetProductName(char * buf, size_t bufSize) return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetProductId(uint16_t & productId) +CHIP_ERROR FactoryDataProvider::GetProductId(uint16_t & productId) { uint16_t length = 0; ReturnErrorOnFailure(SearchForId(FactoryDataId::kPidId, (uint8_t *) &productId, sizeof(productId), length)); @@ -417,7 +256,7 @@ CHIP_ERROR K32W0FactoryDataProvider::GetProductId(uint16_t & productId) return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetPartNumber(char * buf, size_t bufSize) +CHIP_ERROR FactoryDataProvider::GetPartNumber(char * buf, size_t bufSize) { uint16_t length = 0; ReturnErrorOnFailure(SearchForId(FactoryDataId::kPartNumber, (uint8_t *) buf, bufSize, length)); @@ -426,7 +265,7 @@ CHIP_ERROR K32W0FactoryDataProvider::GetPartNumber(char * buf, size_t bufSize) return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetProductURL(char * buf, size_t bufSize) +CHIP_ERROR FactoryDataProvider::GetProductURL(char * buf, size_t bufSize) { uint16_t length = 0; ReturnErrorOnFailure(SearchForId(FactoryDataId::kProductURL, (uint8_t *) buf, bufSize, length)); @@ -435,7 +274,7 @@ CHIP_ERROR K32W0FactoryDataProvider::GetProductURL(char * buf, size_t bufSize) return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetProductLabel(char * buf, size_t bufSize) +CHIP_ERROR FactoryDataProvider::GetProductLabel(char * buf, size_t bufSize) { uint16_t length = 0; ReturnErrorOnFailure(SearchForId(FactoryDataId::kProductLabel, (uint8_t *) buf, bufSize, length)); @@ -444,7 +283,7 @@ CHIP_ERROR K32W0FactoryDataProvider::GetProductLabel(char * buf, size_t bufSize) return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetSerialNumber(char * buf, size_t bufSize) +CHIP_ERROR FactoryDataProvider::GetSerialNumber(char * buf, size_t bufSize) { uint16_t length = 0; ReturnErrorOnFailure(SearchForId(FactoryDataId::kSerialNumberId, (uint8_t *) buf, bufSize, length)); @@ -453,7 +292,7 @@ CHIP_ERROR K32W0FactoryDataProvider::GetSerialNumber(char * buf, size_t bufSize) return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetManufacturingDate(uint16_t & year, uint8_t & month, uint8_t & day) +CHIP_ERROR FactoryDataProvider::GetManufacturingDate(uint16_t & year, uint8_t & month, uint8_t & day) { uint16_t length = 0; uint8_t date[ConfigurationManager::kMaxManufacturingDateLength]; @@ -478,7 +317,7 @@ CHIP_ERROR K32W0FactoryDataProvider::GetManufacturingDate(uint16_t & year, uint8 return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetHardwareVersion(uint16_t & hardwareVersion) +CHIP_ERROR FactoryDataProvider::GetHardwareVersion(uint16_t & hardwareVersion) { uint16_t length = 0; ReturnErrorOnFailure( @@ -487,7 +326,7 @@ CHIP_ERROR K32W0FactoryDataProvider::GetHardwareVersion(uint16_t & hardwareVersi return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetHardwareVersionString(char * buf, size_t bufSize) +CHIP_ERROR FactoryDataProvider::GetHardwareVersionString(char * buf, size_t bufSize) { uint16_t length = 0; ReturnErrorOnFailure(SearchForId(FactoryDataId::kHardwareVersionStrId, (uint8_t *) buf, bufSize, length)); @@ -496,7 +335,7 @@ CHIP_ERROR K32W0FactoryDataProvider::GetHardwareVersionString(char * buf, size_t return CHIP_NO_ERROR; } -CHIP_ERROR K32W0FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) +CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) { CHIP_ERROR err = CHIP_ERROR_NOT_IMPLEMENTED; #if CHIP_ENABLE_ROTATING_DEVICE_ID diff --git a/src/platform/nxp/k32w/k32w0/K32W0FactoryDataProvider.h b/src/platform/nxp/k32w/common/FactoryDataProvider.h similarity index 85% rename from src/platform/nxp/k32w/k32w0/K32W0FactoryDataProvider.h rename to src/platform/nxp/k32w/common/FactoryDataProvider.h index 2cbfeb664dc7fa..db10a8f6accb23 100644 --- a/src/platform/nxp/k32w/k32w0/K32W0FactoryDataProvider.h +++ b/src/platform/nxp/k32w/common/FactoryDataProvider.h @@ -19,17 +19,12 @@ #include #include #include - -#include "CHIPPlatformConfig.h" -#include "K32W0Config.h" -#include #include -#include "OtaUtils.h" -#include "SecLib.h" - #include +#include "CHIPPlatformConfig.h" + /* Grab symbol for the base address from the linker file. */ extern uint32_t __FACTORY_DATA_START[]; extern uint32_t __FACTORY_DATA_SIZE[]; @@ -57,9 +52,9 @@ namespace DeviceLayer { * and Device Instance Info. */ -class K32W0FactoryDataProvider : public DeviceInstanceInfoProvider, - public CommissionableDataProvider, - public Credentials::DeviceAttestationCredentialsProvider +class FactoryDataProvider : public DeviceInstanceInfoProvider, + public CommissionableDataProvider, + public Credentials::DeviceAttestationCredentialsProvider { public: struct Header @@ -112,24 +107,11 @@ class K32W0FactoryDataProvider : public DeviceInstanceInfoProvider, static constexpr uint32_t kHashLen = 4; static constexpr size_t kHashId = 0xCE47BA5E; - typedef otaUtilsResult_t (*OtaUtils_EEPROM_ReadData)(uint16_t nbBytes, uint32_t address, uint8_t * pInbuf); - - using RestoreMechanism = CHIP_ERROR (*)(void); - - static uint8_t ReadDataMemcpy(uint16_t num, uint32_t src, uint8_t * dst); - static K32W0FactoryDataProvider & GetDefaultInstance(); + FactoryDataProvider(); + virtual ~FactoryDataProvider(); - K32W0FactoryDataProvider(); - - CHIP_ERROR Init(); - CHIP_ERROR Validate(); - void RegisterRestoreMechanism(RestoreMechanism mechanism); - CHIP_ERROR UpdateData(uint8_t * pBuf); - CHIP_ERROR SearchForId(uint8_t searchedType, uint8_t * pBuf, size_t bufLength, uint16_t & length, uint32_t * offset = nullptr); - - // Custom factory data providers must implement this method in order to define - // their own custom IDs. - virtual CHIP_ERROR SetCustomIds(); + virtual CHIP_ERROR Init() = 0; + virtual CHIP_ERROR SignWithDacKey(const ByteSpan & messageToSign, MutableByteSpan & outSignBuffer) = 0; // ===== Members functions that implement the CommissionableDataProvider CHIP_ERROR GetSetupDiscriminator(uint16_t & setupDiscriminator) override; @@ -162,9 +144,11 @@ class K32W0FactoryDataProvider : public DeviceInstanceInfoProvider, CHIP_ERROR GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) override; protected: + CHIP_ERROR Validate(); + CHIP_ERROR SearchForId(uint8_t searchedType, uint8_t * pBuf, size_t bufLength, uint16_t & length, uint32_t * offset = nullptr); + uint16_t maxLengths[kNumberOfIds]; Header mHeader; - std::vector mRestoreMechanisms; }; } // namespace DeviceLayer diff --git a/src/platform/nxp/k32w/common/K32W_OTA_README.md b/src/platform/nxp/k32w/common/K32W_OTA_README.md index 97c73ec9e5a7a2..4f2ba7b6e52960 100644 --- a/src/platform/nxp/k32w/common/K32W_OTA_README.md +++ b/src/platform/nxp/k32w/common/K32W_OTA_README.md @@ -124,13 +124,19 @@ implementation. The OTA image should be generated with the Prior to factory data update, the old factory data is backed up in external flash. If anything interrupts the update (e.g. power loss), there is a slight chance the internal flash factory data section is erased and has to be restored -at next boot. The `K32W0FactoryDataProvider` offers a default restore mechanism -and support for registering additional restore mechanisms or overwriting the -default one. +at next boot. The `FactoryDataProvider` offers a default restore mechanism and +support for registering additional restore mechanisms or overwriting the default +one. Restore mechanisms are just functions that have this signature: `CHIP_ERROR (*)(void)`. Any such function can be registered through -`K32W0FactoryDataProvider::RegisterRestoreMechanism`. +`FactoryDataProvider::RegisterRestoreMechanism`. + +The default restore mechanism is implemented as a weak function: +`FactoryDataDefaultRestoreMechanism`. It is registered in +`FactoryDataProvider::Init`, before factory data validation, and it can be +overwritten at application level. When doing the actual restore, the mechanisms +are called in the order they were registered. The default restore mechanism is implemented as a weak function: `FactoryDataDefaultRestoreMechanism`. It is registered in diff --git a/src/platform/nxp/k32w/common/OTAImageProcessorImpl.cpp b/src/platform/nxp/k32w/common/OTAImageProcessorImpl.cpp index b87ef560aa5841..69317d7c0cbf6f 100644 --- a/src/platform/nxp/k32w/common/OTAImageProcessorImpl.cpp +++ b/src/platform/nxp/k32w/common/OTAImageProcessorImpl.cpp @@ -17,7 +17,9 @@ */ #include +#include #include +#include #include #include @@ -377,6 +379,8 @@ void OTAImageProcessorImpl::HandleApply(intptr_t context) imageProcessor->mAccumulator.Clear(); + ConfigurationManagerImpl().StoreSoftwareUpdateCompleted(); + // Set the necessary information to inform the SSBL that a new image is available // and trigger the actual device reboot after some time, to take into account // queued actions, e.g. sending events to a subscription diff --git a/src/platform/nxp/k32w/common/RamStorageKey.cpp b/src/platform/nxp/k32w/common/RamStorageKey.cpp deleted file mode 100644 index 131559e9a39c30..00000000000000 --- a/src/platform/nxp/k32w/common/RamStorageKey.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include - -namespace chip::DeviceLayer::Internal { - -RamStorageKey::RamStorageKey(RamStorage * storage, uint8_t keyId, uint8_t pdmId) -{ - mStorage = storage; - mId = GetPdmId(keyId, pdmId); -} - -CHIP_ERROR RamStorageKey::Read(uint8_t * buf, uint16_t & sizeToRead) const -{ - return mStorage->Read(mId, 0, buf, &sizeToRead); -} - -CHIP_ERROR RamStorageKey::Write(const uint8_t * buf, uint16_t length) -{ - return mStorage->Write(mId, buf, length); -} - -CHIP_ERROR RamStorageKey::Delete() -{ - return mStorage->Delete(mId, -1); -} - -} // namespace chip::DeviceLayer::Internal diff --git a/src/platform/nxp/k32w/common/RamStorageKey.h b/src/platform/nxp/k32w/common/RamStorageKey.h deleted file mode 100644 index e1596eeec1ec85..00000000000000 --- a/src/platform/nxp/k32w/common/RamStorageKey.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#pragma once - -#include - -namespace chip { -namespace DeviceLayer { -namespace Internal { - -class RamStorageKey -{ -public: - RamStorageKey(RamStorage * storage, uint8_t keyId, uint8_t pdmId); - CHIP_ERROR Read(uint8_t * buf, uint16_t & sizeToRead) const; - CHIP_ERROR Write(const uint8_t * buf, uint16_t length); - CHIP_ERROR Delete(); - - static uint16_t GetPdmId(uint8_t keyId, uint8_t pdmId) { return static_cast(keyId) << 8 | pdmId; } - -private: - RamStorage * mStorage; - uint16_t mId; -}; - -} // namespace Internal -} // namespace DeviceLayer -} // namespace chip diff --git a/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp index 7ae29b191578fe..a7bc09d524360e 100644 --- a/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp @@ -1,7 +1,6 @@ /* * - * Copyright (c) 2020-2021 Project CHIP Authors - * Copyright (c) 2020 Nest Labs, Inc. + * Copyright (c) 2021-2023 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,181 +16,50 @@ * limitations under the License. */ -/** - * @file - * Provides an implementation of the BLEManager singleton object - * for the K32W platforms. - */ - /* this file behaves like a config.h, comes first */ #include -#include - -#include - -#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE - -#include - -#include "board.h" -#include "fsl_xcvr.h" -#include "gatt_db_app_interface.h" -#include "gatt_db_handles.h" -#include "stdio.h" -#include "timers.h" - -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) #include "PWR_Configuration.h" +#include "PWR_Interface.h" #endif -#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING -#include -#include -#endif +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + +/* controller task configuration */ +#define CONTROLLER_TASK_PRIORITY (6U) +#define CONTROLLER_TASK_STACK_SIZE (gControllerTaskStackSize_c / sizeof(StackType_t)) -/******************************************************************************* - * Local data types - *******************************************************************************/ -extern "C" bool_t Ble_ConfigureHostStackConfig(void); extern "C" void (*pfBLE_SignalFromISR)(void); -extern "C" bool_t Ble_CheckMemoryStorage(void); extern osaEventId_t gHost_TaskEvent; +osaEventId_t mControllerTaskEvent; extern msgQueue_t gApp2Host_TaskQueue; extern msgQueue_t gHci2Host_TaskQueue; -using namespace ::chip; -using namespace ::chip::Ble; +#include + +extern "C" bool_t Ble_ConfigureHostStackConfig(void); namespace chip { namespace DeviceLayer { namespace Internal { -namespace { -/******************************************************************************* - * Macros & Constants definitions - *******************************************************************************/ -/* Timeout of BLE commands */ -#define CHIP_BLE_KW_EVNT_TIMEOUT 1000 - -/** BLE advertisement state changed */ -#define CHIP_BLE_KW_EVNT_ADV_CHANGED 0x0001 -/** BLE advertisement command failed */ -#define CHIP_BLE_KW_EVNT_ADV_FAILED 0x0002 -/** BLE advertisement setup failed */ -#define CHIP_BLE_KW_EVNT_ADV_SETUP_FAILED 0x0004 -/** BLE advertisement parameters setup complete */ -#define CHIP_BLE_KW_EVNT_ADV_PAR_SETUP_COMPLETE 0x0008 -/** BLE advertisement data setup complete */ -#define CHIP_BLE_KW_EVNT_ADV_DAT_SETUP_COMPLETE 0x0010 -/** BLE random address set */ -#define CHIP_BLE_KW_EVNT_RND_ADDR_SET 0x0020 -/** BLE Initialization complete */ -#define CHIP_BLE_KW_EVNT_INIT_COMPLETE 0x0040 -/** BLE Received a handle value confirmation from the client */ -#define CHIP_BLE_KW_EVNT_INDICATION_CONFIRMED 0x0080 -/** BLE send indication failed */ -#define CHIP_BLE_KW_EVNT_INDICATION_FAILED 0x0100 -/** Maximal time of connection without activity */ -#define CHIP_BLE_KW_CONN_TIMEOUT 60000 - -#define LOOP_EV_BLE (0x08) - -/* controller task configuration */ -#define CONTROLLER_TASK_PRIORITY (6U) -#define CONTROLLER_TASK_STACK_SIZE (gControllerTaskStackSize_c / sizeof(StackType_t)) - -/* host task configuration */ -#define HOST_TASK_PRIORITY (4U) -#define HOST_TASK_STACK_SIZE (gHost_TaskStackSize_c / sizeof(StackType_t)) - -/* ble app task configuration */ -#define CHIP_DEVICE_CONFIG_BLE_APP_TASK_PRIORITY (HOST_TASK_PRIORITY - 1) -#define CHIP_DEVICE_CONFIG_BLE_APP_TASK_STACK_SIZE (1024) - -/* advertising configuration */ -#define BLEKW_ADV_MAX_NO (2) -#define BLEKW_SCAN_RSP_MAX_NO (2) -#define BLEKW_MAX_ADV_DATA_LEN (31) -#define CHIP_ADV_SHORT_UUID_LEN (2) - -/* FreeRTOS sw timer */ -TimerHandle_t sbleAdvTimeoutTimer; - -/* Message list used to synchronize asynchronous messages from the KW BLE tasks */ -anchor_t blekw_msg_list; - -/* Used to manage asynchronous events from BLE Stack: e.g.: GAP setup finished */ -osaEventId_t event_msg; - -osaEventId_t mControllerTaskEvent; -TimerHandle_t connectionTimeout; - -/* Used by BLE App Task to handle asynchronous GATT events */ -EventGroupHandle_t bleAppTaskLoopEvent; - -/* keep the device ID of the connected peer */ -uint8_t g_device_id; - -const uint8_t ShortUUID_CHIPoBLEService[] = { 0xF6, 0xFF }; -const ChipBleUUID ChipUUID_CHIPoBLEChar_RX = { { 0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42, 0x9F, - 0x9D, 0x11 } }; -const ChipBleUUID ChipUUID_CHIPoBLEChar_TX = { { 0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42, 0x9F, - 0x9D, 0x12 } }; - -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) -static bool bleAppStopInProgress; -#endif -} // namespace - BLEManagerImpl BLEManagerImpl::sInstance; -CHIP_ERROR BLEManagerImpl::_Init() +BLEManagerCommon * BLEManagerImpl::GetImplInstance() +{ + return &BLEManagerImpl::sInstance; +} +CHIP_ERROR BLEManagerImpl::InitHostController(ble_generic_cb_fp cb_fp) { CHIP_ERROR err = CHIP_NO_ERROR; - osaEventFlags_t flags; - BaseType_t bleAppCreated = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY; - uint16_t attChipRxHandle[1] = { (uint16_t) value_chipoble_rx }; - -#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING - uint16_t attChipC3Handle[1] = { (uint16_t) value_chipoble_c3 }; -#endif - - mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Enabled; - - // Check if BLE stack is initialized - VerifyOrExit(!mFlags.Has(Flags::kK32WBLEStackInitialized), err = CHIP_ERROR_INCORRECT_STATE); - - // Initialize the Chip BleLayer. - err = BleLayer::Init(this, this, &DeviceLayer::SystemLayer()); - SuccessOrExit(err); - - /* Initialization of message wait events - - * used for receiving BLE Stack events */ - event_msg = OSA_EventCreate(TRUE); - VerifyOrExit(event_msg != NULL, err = CHIP_ERROR_INCORRECT_STATE); pfBLE_SignalFromISR = BLE_SignalFromISRCallback; /* Set the config structure to the host stack */ VerifyOrExit(Ble_ConfigureHostStackConfig() == TRUE, err = CHIP_ERROR_INCORRECT_STATE); - /* Prepare callback input queue.*/ - MSG_InitQueue(&blekw_msg_list); - - /* Create the connection timeout timer. */ - connectionTimeout = - xTimerCreate("bleTimeoutTmr", pdMS_TO_TICKS(CHIP_BLE_KW_CONN_TIMEOUT), pdFALSE, (void *) 0, blekw_connection_timeout_cb); - - /* Create BLE App Task */ - bleAppTaskLoopEvent = xEventGroupCreate(); - VerifyOrExit(bleAppTaskLoopEvent != NULL, err = CHIP_ERROR_INCORRECT_STATE); - bleAppCreated = xTaskCreate(bleAppTask, CHIP_DEVICE_CONFIG_BLE_APP_TASK_NAME, - CHIP_DEVICE_CONFIG_BLE_APP_TASK_STACK_SIZE / sizeof(StackType_t), this, - CHIP_DEVICE_CONFIG_BLE_APP_TASK_PRIORITY, NULL); - VerifyOrExit(bleAppCreated == pdPASS, err = CHIP_ERROR_INCORRECT_STATE); - /* BLE Radio Init */ VerifyOrExit(XCVR_Init(BLE_MODE, DR_2MBPS) == gXcvrSuccess_c, err = CHIP_ERROR_INCORRECT_STATE); @@ -202,365 +70,47 @@ CHIP_ERROR BLEManagerImpl::_Init() VerifyOrExit(blekw_host_init() == CHIP_NO_ERROR, err = CHIP_ERROR_INCORRECT_STATE); /* BLE Host Stack Init */ - Ble_HostInitialize(blekw_generic_cb, (hciHostToControllerInterface_t) Hci_SendPacketToController); - - /* Register the GATT server callback */ - VerifyOrExit(GattServer_RegisterCallback(blekw_gatt_server_cb) == gBleSuccess_c, err = CHIP_ERROR_INCORRECT_STATE); - - /* Wait until BLE Stack is ready */ - VerifyOrExit(OSA_EventWait(event_msg, CHIP_BLE_KW_EVNT_INIT_COMPLETE, TRUE, CHIP_BLE_KW_EVNT_TIMEOUT, &flags) == - osaStatus_Success, - err = CHIP_ERROR_INCORRECT_STATE); - -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) - PWR_ChangeDeepSleepMode(cPWR_PowerDown_RamRet); -#endif - - GattServer_RegisterHandlesForWriteNotifications(1, attChipRxHandle); -#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING - GattServer_RegisterHandlesForReadNotifications(1, attChipC3Handle); -#endif - - mFlags.Set(Flags::kK32WBLEStackInitialized); - mFlags.Set(Flags::kAdvertisingEnabled, CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART ? true : false); - mFlags.Set(Flags::kFastAdvertisingEnabled); + VerifyOrExit(Ble_HostInitialize(cb_fp, Hci_SendPacketToController) == gBleSuccess_c, err = CHIP_ERROR_INCORRECT_STATE); - // Create FreeRTOS sw timer for BLE timeouts and interval change. - sbleAdvTimeoutTimer = xTimerCreate("BleAdvTimer", // Just a text name, not used by the RTOS kernel - 1, // == default timer period (mS) - false, // no timer reload (==one-shot) - (void *) this, // init timer id = ble obj context - BleAdvTimeoutHandler // timer callback handler - ); - VerifyOrExit(sbleAdvTimeoutTimer != NULL, err = CHIP_ERROR_INCORRECT_STATE); exit: return err; } -uint16_t BLEManagerImpl::_NumConnections(void) -{ - uint16_t numCons = 0; - for (uint16_t i = 0; i < kMaxConnections; i++) - { - if (mBleConnections[i].allocated) - { - numCons++; - } - } - - return numCons; -} - -bool BLEManagerImpl::_IsAdvertisingEnabled(void) -{ - return mFlags.Has(Flags::kAdvertisingEnabled); -} - -bool BLEManagerImpl::_IsAdvertising(void) -{ - return mFlags.Has(Flags::kAdvertising); -} - -bool BLEManagerImpl::RemoveConnection(uint8_t connectionHandle) -{ - CHIPoBLEConState * bleConnState = GetConnectionState(connectionHandle, true); - bool status = false; - - if (bleConnState != NULL) - { - memset(bleConnState, 0, sizeof(CHIPoBLEConState)); - status = true; - } - - return status; -} - -void BLEManagerImpl::AddConnection(uint8_t connectionHandle) -{ - CHIPoBLEConState * bleConnState = GetConnectionState(connectionHandle, true); - - if (bleConnState != NULL) - { - memset(bleConnState, 0, sizeof(CHIPoBLEConState)); - bleConnState->allocated = 1; - bleConnState->connectionHandle = connectionHandle; - } -} - -BLEManagerImpl::CHIPoBLEConState * BLEManagerImpl::GetConnectionState(uint8_t connectionHandle, bool allocate) +/* Called by BLE when a connect is received */ +void BLEManagerImpl::BLE_SignalFromISRCallback(void) { - uint8_t freeIndex = kMaxConnections; - - for (uint8_t i = 0; i < kMaxConnections; i++) - { - if (mBleConnections[i].allocated == 1) - { - if (mBleConnections[i].connectionHandle == connectionHandle) - { - return &mBleConnections[i]; - } - } - - else if (i < freeIndex) - { - freeIndex = i; - } - } - - if (allocate) - { - if (freeIndex < kMaxConnections) - { - return &mBleConnections[freeIndex]; - } - - ChipLogError(DeviceLayer, "Failed to allocate CHIPoBLEConState"); - } - - return NULL; +#if defined(chip_with_low_power) + PWR_DisallowDeviceToSleep(); +#endif } -CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) +void BLEManagerImpl::Host_Task(osaTaskParam_t argument) { - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - - if (mFlags.Has(Flags::kAdvertisingEnabled) != val) - { - mFlags.Set(Flags::kAdvertisingEnabled, val); - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } - -exit: - return err; + Host_TaskHandler((void *) NULL); } -CHIP_ERROR BLEManagerImpl::_SetAdvertisingMode(BLEAdvertisingMode mode) +CHIP_ERROR BLEManagerImpl::blekw_host_init(void) { - switch (mode) + /* Initialization of task related */ + gHost_TaskEvent = OSA_EventCreate(TRUE); + if (!gHost_TaskEvent) { - case BLEAdvertisingMode::kFastAdvertising: - mFlags.Set(Flags::kFastAdvertisingEnabled, true); - break; - case BLEAdvertisingMode::kSlowAdvertising: - mFlags.Set(Flags::kFastAdvertisingEnabled, false); - break; - default: - return CHIP_ERROR_INVALID_ARGUMENT; + return CHIP_ERROR_NO_MEMORY; } - mFlags.Set(Flags::kRestartAdvertising); - PlatformMgr().ScheduleWork(DriveBLEState, 0); - return CHIP_NO_ERROR; -} -CHIP_ERROR BLEManagerImpl::_GetDeviceName(char * buf, size_t bufSize) -{ - if (strlen(mDeviceName) >= bufSize) - { - return CHIP_ERROR_BUFFER_TOO_SMALL; - } - strcpy(buf, mDeviceName); - return CHIP_NO_ERROR; -} + /* Initialization of task message queue */ + MSG_InitQueue(&gApp2Host_TaskQueue); + MSG_InitQueue(&gHci2Host_TaskQueue); -CHIP_ERROR BLEManagerImpl::_SetDeviceName(const char * deviceName) -{ - if (mServiceMode == ConnectivityManager::kCHIPoBLEServiceMode_NotSupported) - { - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; - } - if (deviceName != NULL && deviceName[0] != 0) - { - if (strlen(deviceName) >= kMaxDeviceNameLength) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - memset(mDeviceName, 0, kMaxDeviceNameLength); - strcpy(mDeviceName, deviceName); - mFlags.Set(Flags::kDeviceNameSet); - ChipLogProgress(DeviceLayer, "Setting device name to : \"%s\"", deviceName); - } - else + /* Task creation */ + if (pdPASS != xTaskCreate(Host_Task, "hostTask", HOST_TASK_STACK_SIZE, (void *) 0, HOST_TASK_PRIORITY, NULL)) { - mDeviceName[0] = 0; - mFlags.Clear(Flags::kDeviceNameSet); + return CHIP_ERROR_NO_MEMORY; } return CHIP_NO_ERROR; } -void BLEManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) -{ - switch (event->Type) - { - case DeviceEventType::kCHIPoBLESubscribe: - ChipDeviceEvent connEstEvent; - - HandleSubscribeReceived(event->CHIPoBLESubscribe.ConId, &CHIP_BLE_SVC_ID, &ChipUUID_CHIPoBLEChar_TX); - connEstEvent.Type = DeviceEventType::kCHIPoBLEConnectionEstablished; - PlatformMgr().PostEventOrDie(&connEstEvent); - break; - - case DeviceEventType::kCHIPoBLEUnsubscribe: - HandleUnsubscribeReceived(event->CHIPoBLEUnsubscribe.ConId, &CHIP_BLE_SVC_ID, &ChipUUID_CHIPoBLEChar_TX); - break; - - case DeviceEventType::kCHIPoBLEWriteReceived: - HandleWriteReceived(event->CHIPoBLEWriteReceived.ConId, &CHIP_BLE_SVC_ID, &ChipUUID_CHIPoBLEChar_RX, - PacketBufferHandle::Adopt(event->CHIPoBLEWriteReceived.Data)); - break; - - case DeviceEventType::kCHIPoBLEConnectionError: - HandleConnectionError(event->CHIPoBLEConnectionError.ConId, event->CHIPoBLEConnectionError.Reason); - break; - - case DeviceEventType::kCHIPoBLEIndicateConfirm: - HandleIndicationConfirmation(event->CHIPoBLEIndicateConfirm.ConId, &CHIP_BLE_SVC_ID, &ChipUUID_CHIPoBLEChar_TX); - break; - - default: - break; - } -} - -bool BLEManagerImpl::SubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId) -{ - ChipLogProgress(DeviceLayer, "BLEManagerImpl::SubscribeCharacteristic() not supported"); - return false; -} - -bool BLEManagerImpl::UnsubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId) -{ - ChipLogProgress(DeviceLayer, "BLEManagerImpl::UnsubscribeCharacteristic() not supported"); - return false; -} - -bool BLEManagerImpl::CloseConnection(BLE_CONNECTION_OBJECT conId) -{ - return blekw_stop_connection_internal(conId); -} - -uint16_t BLEManagerImpl::GetMTU(BLE_CONNECTION_OBJECT conId) const -{ - uint16_t tempMtu = 0; - (void) Gatt_GetMtu(conId, &tempMtu); - - return tempMtu; -} - -bool BLEManagerImpl::SendWriteRequest(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, - PacketBufferHandle pBuf) -{ - ChipLogProgress(DeviceLayer, "BLEManagerImpl::SendWriteRequest() not supported"); - return false; -} - -bool BLEManagerImpl::SendReadRequest(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, - PacketBufferHandle pBuf) -{ - ChipLogProgress(DeviceLayer, "BLEManagerImpl::SendReadRequest() not supported"); - return false; -} - -bool BLEManagerImpl::SendReadResponse(BLE_CONNECTION_OBJECT conId, BLE_READ_REQUEST_CONTEXT requestContext, - const ChipBleUUID * svcId, const ChipBleUUID * charId) -{ - ChipLogProgress(DeviceLayer, "BLEManagerImpl::SendReadResponse() not supported"); - return false; -} - -void BLEManagerImpl::NotifyChipConnectionClosed(BLE_CONNECTION_OBJECT conId) -{ - BLEMgrImpl().blekw_stop_connection_internal(conId); - BLEMgrImpl().RemoveConnection(conId); -} - -bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, - PacketBufferHandle data) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - uint16_t cId = (UUIDsMatch(&ChipUUID_CHIPoBLEChar_TX, charId) ? value_chipoble_tx : 0); - ChipDeviceEvent event; - - if (cId != 0) - { - if (blekw_send_event(conId, cId, data->Start(), data->DataLength()) != BLE_OK) - { - err = CHIP_ERROR_SENDING_BLOCKED; - } - else - { - event.Type = DeviceEventType::kCHIPoBLEIndicateConfirm; - event.CHIPoBLEIndicateConfirm.ConId = conId; - err = PlatformMgr().PostEvent(&event); - } - - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "BLEManagerImpl::SendIndication() failed: %s", ErrorStr(err)); - return false; - } - return true; - } - return false; -} - -BLEManagerImpl::ble_err_t BLEManagerImpl::blekw_send_event(int8_t connection_handle, uint16_t handle, uint8_t * data, uint32_t len) -{ - osaEventFlags_t event_mask; - -#if CHIP_DEVICE_CHIP0BLE_DEBUG - ChipLogProgress(DeviceLayer, "Trying to send event."); -#endif - - if (connection_handle < 0 || handle <= 0) - { - ChipLogProgress(DeviceLayer, "BLE Event - Bad Handle"); - return BLE_E_FAIL; - } - - if (len > 0 && data == NULL) - { - ChipLogProgress(DeviceLayer, "BLE Event - Invalid Data"); - return BLE_E_FAIL; - } - - /************* Send the indication *************/ - if (OSA_EventClear(event_msg, CHIP_BLE_KW_EVNT_INDICATION_CONFIRMED | CHIP_BLE_KW_EVNT_INDICATION_FAILED) != osaStatus_Success) - { - ChipLogProgress(DeviceLayer, "BLE Event - Can't clear OSA Events"); - return BLE_E_FAIL; - } - - if (GattServer_SendInstantValueIndication(connection_handle, handle, len, data) != gBleSuccess_c) - { - ChipLogProgress(DeviceLayer, "BLE Event - Can't sent indication"); - return BLE_E_FAIL; - } - - if (OSA_EventWait(event_msg, CHIP_BLE_KW_EVNT_INDICATION_CONFIRMED | CHIP_BLE_KW_EVNT_INDICATION_FAILED, FALSE, - CHIP_BLE_KW_EVNT_TIMEOUT, &event_mask) != osaStatus_Success) - { - ChipLogProgress(DeviceLayer, "BLE Event - OSA Event failed"); - return BLE_E_FAIL; - } - - if (event_mask & CHIP_BLE_KW_EVNT_INDICATION_FAILED) - { - ChipLogProgress(DeviceLayer, "BLE Event - Sent Failed"); - return BLE_E_FAIL; - } - -#if CHIP_DEVICE_CHIP0BLE_DEBUG - ChipLogProgress(DeviceLayer, "BLE Event - Sent :-) "); -#endif - - return BLE_OK; -} -/******************************************************************************* - * Private functions - *******************************************************************************/ CHIP_ERROR BLEManagerImpl::blekw_controller_init(void) { mControllerTaskEvent = OSA_EventCreate(TRUE); @@ -580,26 +130,6 @@ CHIP_ERROR BLEManagerImpl::blekw_controller_init(void) return CHIP_ERROR_NO_MEMORY; } - /* Setup Interrupt priorities of Interrupt handlers that are used - * in application to meet requirements of FreeRTOS */ - - // BLE_DP_IRQHandler - NVIC_SetPriority(BLE_DP_IRQn, configMAX_PRIORITIES - 1); - // BLE_DP0_IRQHandler - NVIC_SetPriority(BLE_DP0_IRQn, configMAX_PRIORITIES - 1); - // BLE_DP1_IRQHandler - NVIC_SetPriority(BLE_DP1_IRQn, configMAX_PRIORITIES - 1); - // BLE_DP2_IRQHandler - NVIC_SetPriority(BLE_DP2_IRQn, configMAX_PRIORITIES - 1); - // BLE_LL_ALL_IRQHandler - NVIC_SetPriority(BLE_LL_ALL_IRQn, configMAX_PRIORITIES - 1); - - /* Check for available memory storage */ - if (!Ble_CheckMemoryStorage()) - { - return CHIP_ERROR_NO_MEMORY; - } - /* BLE Controller Init */ if (osaStatus_Success != Controller_Init(Ble_HciRecv)) { @@ -609,1072 +139,8 @@ CHIP_ERROR BLEManagerImpl::blekw_controller_init(void) return CHIP_NO_ERROR; } -void BLEManagerImpl::Host_Task(osaTaskParam_t argument) -{ - Host_TaskHandler((void *) NULL); -} - -CHIP_ERROR BLEManagerImpl::blekw_host_init(void) -{ - /* Initialization of task related */ - gHost_TaskEvent = OSA_EventCreate(TRUE); - if (!gHost_TaskEvent) - { - return CHIP_ERROR_NO_MEMORY; - } - - /* Initialization of task message queue */ - MSG_InitQueue(&gApp2Host_TaskQueue); - MSG_InitQueue(&gHci2Host_TaskQueue); - - /* Task creation */ - if (pdPASS != xTaskCreate(Host_Task, "hostTask", HOST_TASK_STACK_SIZE, (void *) 0, HOST_TASK_PRIORITY, NULL)) - { - return CHIP_ERROR_NO_MEMORY; - } - - return CHIP_NO_ERROR; -} - -BLEManagerImpl::ble_err_t BLEManagerImpl::blekw_start_advertising(gapAdvertisingParameters_t * adv_params, - gapAdvertisingData_t * adv, gapScanResponseData_t * scnrsp) -{ - osaEventFlags_t event_mask; - - /************* Set the advertising parameters *************/ - OSA_EventClear(event_msg, (CHIP_BLE_KW_EVNT_ADV_SETUP_FAILED | CHIP_BLE_KW_EVNT_ADV_PAR_SETUP_COMPLETE)); - - /* Set the advertising parameters */ - if (Gap_SetAdvertisingParameters(adv_params) != gBleSuccess_c) - { - vTaskDelay(1); - - /* Retry, just to make sure before giving up and sending an error. */ - if (Gap_SetAdvertisingParameters(adv_params) != gBleSuccess_c) - { - return BLE_E_SET_ADV_PARAMS; - } - } - - if (OSA_EventWait(event_msg, (CHIP_BLE_KW_EVNT_ADV_SETUP_FAILED | CHIP_BLE_KW_EVNT_ADV_PAR_SETUP_COMPLETE), FALSE, - CHIP_BLE_KW_EVNT_TIMEOUT, &event_mask) != osaStatus_Success) - { - return BLE_E_ADV_PARAMS_FAILED; - } - - if (event_mask & CHIP_BLE_KW_EVNT_ADV_SETUP_FAILED) - { - return BLE_E_ADV_PARAMS_FAILED; - } - - /************* Set the advertising data *************/ - OSA_EventClear(event_msg, (CHIP_BLE_KW_EVNT_ADV_SETUP_FAILED | CHIP_BLE_KW_EVNT_ADV_DAT_SETUP_COMPLETE)); - - /* Set the advertising data */ - if (Gap_SetAdvertisingData(adv, scnrsp) != gBleSuccess_c) - { - return BLE_E_SET_ADV_DATA; - } - - if (OSA_EventWait(event_msg, (CHIP_BLE_KW_EVNT_ADV_SETUP_FAILED | CHIP_BLE_KW_EVNT_ADV_DAT_SETUP_COMPLETE), FALSE, - CHIP_BLE_KW_EVNT_TIMEOUT, &event_mask) != osaStatus_Success) - { - return BLE_E_ADV_SETUP_FAILED; - } - - if (event_mask & CHIP_BLE_KW_EVNT_ADV_SETUP_FAILED) - { - return BLE_E_ADV_SETUP_FAILED; - } - - /************* Start the advertising *************/ - OSA_EventClear(event_msg, (CHIP_BLE_KW_EVNT_ADV_CHANGED | CHIP_BLE_KW_EVNT_ADV_FAILED)); +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip - if (gBleSuccess_c != Gap_CreateRandomDeviceAddress(NULL, NULL)) - { - return BLE_E_SET_ADV_PARAMS; - } - - if (OSA_EventWait(event_msg, CHIP_BLE_KW_EVNT_RND_ADDR_SET, FALSE, CHIP_BLE_KW_EVNT_TIMEOUT, &event_mask) != osaStatus_Success) - { - return BLE_E_ADV_PARAMS_FAILED; - } - - /* Start the advertising */ - if (Gap_StartAdvertising(blekw_gap_advertising_cb, blekw_gap_connection_cb) != gBleSuccess_c) - { - return BLE_E_START_ADV; - } - -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) - PWR_DisallowDeviceToSleep(); -#endif - - if (OSA_EventWait(event_msg, (CHIP_BLE_KW_EVNT_ADV_CHANGED | CHIP_BLE_KW_EVNT_ADV_FAILED), FALSE, CHIP_BLE_KW_EVNT_TIMEOUT, - &event_mask) != osaStatus_Success) - { -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) - PWR_AllowDeviceToSleep(); -#endif - return BLE_E_START_ADV_FAILED; - } - - if (event_mask & CHIP_BLE_KW_EVNT_ADV_FAILED) - { -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) - PWR_AllowDeviceToSleep(); -#endif - return BLE_E_START_ADV_FAILED; - } - -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) - PWR_AllowDeviceToSleep(); -#endif - - return BLE_OK; -} - -BLEManagerImpl::ble_err_t BLEManagerImpl::blekw_stop_advertising(void) -{ - osaEventFlags_t event_mask; - bleResult_t res; - - OSA_EventClear(event_msg, (CHIP_BLE_KW_EVNT_ADV_CHANGED | CHIP_BLE_KW_EVNT_ADV_FAILED)); - - /* Stop the advertising data */ - res = Gap_StopAdvertising(); - if (res != gBleSuccess_c) - { - ChipLogProgress(DeviceLayer, "Failed to stop advertising %d", res); - return BLE_E_STOP; - } - - if (OSA_EventWait(event_msg, (CHIP_BLE_KW_EVNT_ADV_CHANGED | CHIP_BLE_KW_EVNT_ADV_FAILED), FALSE, CHIP_BLE_KW_EVNT_TIMEOUT, - &event_mask) != osaStatus_Success) - { - ChipLogProgress(DeviceLayer, "Stop advertising event timeout."); - return BLE_E_ADV_CHANGED; - } - - if (event_mask & CHIP_BLE_KW_EVNT_ADV_FAILED) - { - ChipLogProgress(DeviceLayer, "Stop advertising flat out failed."); - return BLE_E_ADV_FAILED; - } - - return BLE_OK; -} - -CHIP_ERROR BLEManagerImpl::ConfigureAdvertisingData(void) -{ - ble_err_t err; - CHIP_ERROR chipErr; - uint16_t discriminator; - uint16_t advInterval = 0; - gapAdvertisingData_t adv = { 0 }; - gapAdStructure_t adv_data[BLEKW_ADV_MAX_NO] = { { 0 } }; - gapAdStructure_t scan_rsp_data[BLEKW_SCAN_RSP_MAX_NO] = { { 0 } }; - uint8_t advPayload[BLEKW_MAX_ADV_DATA_LEN] = { 0 }; - gapScanResponseData_t scanRsp = { 0 }; - gapAdvertisingParameters_t adv_params = { 0 }; - uint8_t chipAdvDataFlags = (gLeGeneralDiscoverableMode_c | gBrEdrNotSupported_c); - uint8_t chipOverBleService[2]; - ChipBLEDeviceIdentificationInfo mDeviceIdInfo = { 0 }; - uint8_t mDeviceIdInfoLength = 0; - - chipErr = GetCommissionableDataProvider()->GetSetupDiscriminator(discriminator); - if (chipErr != CHIP_NO_ERROR) - { - return chipErr; - } - - if (!mFlags.Has(Flags::kDeviceNameSet)) - { - memset(mDeviceName, 0, kMaxDeviceNameLength); - snprintf(mDeviceName, kMaxDeviceNameLength, "%s%04u", CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX, discriminator); - } - - /**************** Prepare advertising data *******************************************/ - adv.cNumAdStructures = BLEKW_ADV_MAX_NO; - - chipErr = ConfigurationMgr().GetBLEDeviceIdentificationInfo(mDeviceIdInfo); - SuccessOrExit(chipErr); - mDeviceIdInfoLength = sizeof(mDeviceIdInfo); - - if ((mDeviceIdInfoLength + CHIP_ADV_SHORT_UUID_LEN + 1) > BLEKW_MAX_ADV_DATA_LEN) - { - return CHIP_ERROR_INCORRECT_STATE; - } - - adv_data[0].length = 0x02; - adv_data[0].adType = gAdFlags_c; - adv_data[0].aData = (uint8_t *) (&chipAdvDataFlags); - - adv_data[1].length = static_cast(mDeviceIdInfoLength + CHIP_ADV_SHORT_UUID_LEN + 1); - adv_data[1].adType = gAdServiceData16bit_c; - memcpy(advPayload, ShortUUID_CHIPoBLEService, CHIP_ADV_SHORT_UUID_LEN); - memcpy(&advPayload[CHIP_ADV_SHORT_UUID_LEN], (void *) &mDeviceIdInfo, mDeviceIdInfoLength); - adv_data[1].aData = advPayload; - - adv.aAdStructures = adv_data; - -#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING - ReturnErrorOnFailure(EncodeAdditionalDataTlv()); -#endif - - /**************** Prepare scan response data *******************************************/ - scanRsp.cNumAdStructures = BLEKW_SCAN_RSP_MAX_NO; - - scan_rsp_data[0].length = static_cast(strlen(mDeviceName) + 1); - scan_rsp_data[0].adType = gAdCompleteLocalName_c; - scan_rsp_data[0].aData = (uint8_t *) mDeviceName; - - scan_rsp_data[1].length = sizeof(chipOverBleService) + 1; - scan_rsp_data[1].adType = gAdComplete16bitServiceList_c; - chipOverBleService[0] = ShortUUID_CHIPoBLEService[0]; - chipOverBleService[1] = ShortUUID_CHIPoBLEService[1]; - scan_rsp_data[1].aData = (uint8_t *) chipOverBleService; - - scanRsp.aAdStructures = scan_rsp_data; - - /**************** Prepare advertising parameters *************************************/ - if (mFlags.Has(Flags::kFastAdvertisingEnabled)) - { - advInterval = CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX; - } - else - { - advInterval = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX; - } - advInterval = (uint16_t)(advInterval * 0.625F); - - adv_params.minInterval = adv_params.maxInterval = advInterval; - adv_params.advertisingType = gAdvConnectableUndirected_c; - adv_params.ownAddressType = gBleAddrTypeRandom_c; - adv_params.peerAddressType = gBleAddrTypePublic_c; - memset(adv_params.peerAddress, 0, gcBleDeviceAddressSize_c); - adv_params.channelMap = (gapAdvertisingChannelMapFlags_t)(gAdvChanMapFlag37_c | gAdvChanMapFlag38_c | gAdvChanMapFlag39_c); - adv_params.filterPolicy = gProcessAll_c; - - err = blekw_start_advertising(&adv_params, &adv, &scanRsp); - if (err == BLE_OK) - { - ChipLogProgress(DeviceLayer, "Started Advertising at %d ms", advInterval); - } - else - { - ChipLogProgress(DeviceLayer, "Advertising error 0x%x!", err); - mFlags.Clear(Flags::kAdvertising); - return CHIP_ERROR_INCORRECT_STATE; - } - -exit: - return chipErr; -} - -#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING -CHIP_ERROR BLEManagerImpl::EncodeAdditionalDataTlv() -{ - CHIP_ERROR err = CHIP_NO_ERROR; - BitFlags dataFields; - AdditionalDataPayloadGeneratorParams params; - -#if CHIP_ENABLE_ROTATING_DEVICE_ID && defined(CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID) - uint8_t rotatingDeviceIdUniqueId[ConfigurationManager::kRotatingDeviceIDUniqueIDLength] = {}; - MutableByteSpan rotatingDeviceIdUniqueIdSpan(rotatingDeviceIdUniqueId); - - err = DeviceLayer::GetDeviceInstanceInfoProvider()->GetRotatingDeviceIdUniqueId(rotatingDeviceIdUniqueIdSpan); - SuccessOrExit(err); - err = ConfigurationMgr().GetLifetimeCounter(params.rotatingDeviceIdLifetimeCounter); - SuccessOrExit(err); - params.rotatingDeviceIdUniqueId = rotatingDeviceIdUniqueIdSpan; - dataFields.Set(AdditionalDataFields::RotatingDeviceId); -#endif /* CHIP_ENABLE_ROTATING_DEVICE_ID && defined(CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID) */ - err = - AdditionalDataPayloadGenerator().generateAdditionalDataPayload(params, sInstance.c3AdditionalDataBufferHandle, dataFields); - -exit: - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "Failed to generate TLV encoded Additional Data (%s)", __func__); - } - - return err; -} - -void BLEManagerImpl::HandleC3ReadRequest(blekw_msg_t * msg) -{ - bleResult_t result; - blekw_att_read_data_t * att_rd_data = (blekw_att_read_data_t *) msg->data.data; - deviceId_t deviceId = att_rd_data->device_id; - uint16_t handle = att_rd_data->handle; - uint16_t length = sInstance.c3AdditionalDataBufferHandle->DataLength(); - const uint8_t * data = (const uint8_t *) sInstance.c3AdditionalDataBufferHandle->Start(); - - result = GattDb_WriteAttribute(handle, length, data); - if (result != gBleSuccess_c) - { - ChipLogError(DeviceLayer, "Failed to write C3 characteristic: %d", result); - } - - result = GattServer_SendAttributeReadStatus(deviceId, handle, gAttErrCodeNoError_c); - if (result != gBleSuccess_c) - { - ChipLogError(DeviceLayer, "Failed to send response to C3 read request: %d", result); - } -} -#endif /* CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING */ - -CHIP_ERROR BLEManagerImpl::StartAdvertising(void) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - mFlags.Set(Flags::kAdvertising); - mFlags.Clear(Flags::kRestartAdvertising); - - if (mFlags.Has(Flags::kFastAdvertisingEnabled)) - { - StartBleAdvTimeoutTimer(CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT); - } - - err = ConfigureAdvertisingData(); - - if (err == CHIP_NO_ERROR) - /* schedule NFC emulation stop */ - { - ChipDeviceEvent advChange; - advChange.Type = DeviceEventType::kCHIPoBLEAdvertisingChange; - advChange.CHIPoBLEAdvertisingChange.Result = kActivity_Started; - err = PlatformMgr().PostEvent(&advChange); - } - - return err; -} - -CHIP_ERROR BLEManagerImpl::StopAdvertising(void) -{ - ble_err_t err; - CHIP_ERROR error = CHIP_NO_ERROR; - - if (mFlags.Has(Flags::kAdvertising)) - { - mFlags.Clear(Flags::kAdvertising); - mFlags.Clear(Flags::kFastAdvertisingEnabled); - mFlags.Clear(Flags::kRestartAdvertising); - - err = blekw_stop_advertising(); - if (err != BLE_OK) - { - return CHIP_ERROR_INCORRECT_STATE; - } - else - { - /* schedule NFC emulation stop */ - { - ChipDeviceEvent advChange; - advChange.Type = DeviceEventType::kCHIPoBLEAdvertisingChange; - advChange.CHIPoBLEAdvertisingChange.Result = kActivity_Stopped; - error = PlatformMgr().PostEvent(&advChange); - } - } - } - CancelBleAdvTimeoutTimer(); - - return error; -} - -void BLEManagerImpl::DriveBLEState(void) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - // Check if BLE stack is initialized - VerifyOrExit(mFlags.Has(Flags::kK32WBLEStackInitialized), /* */); - - // Start advertising if needed... - if (mServiceMode == ConnectivityManager::kCHIPoBLEServiceMode_Enabled && mFlags.Has(Flags::kAdvertisingEnabled)) - { - // Start/re-start advertising if not already started, or if there is a pending change - // to the advertising configuration. - if (!mFlags.Has(Flags::kAdvertising) || mFlags.Has(Flags::kRestartAdvertising)) - { - err = StartAdvertising(); - SuccessOrExit(err); - } - } - // Otherwise, stop advertising if it is enabled. - else if (mFlags.Has(Flags::kAdvertising)) - { - err = StopAdvertising(); - SuccessOrExit(err); - ChipLogProgress(DeviceLayer, "Stopped Advertising"); - } - -exit: - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "Disabling CHIPoBLE service due to error: %s", ErrorStr(err)); - mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Disabled; - } -} - -void BLEManagerImpl::DriveBLEState(intptr_t arg) -{ - sInstance.DriveBLEState(); -} - -/******************************************************************************* - * BLE App Task Processing - *******************************************************************************/ -void BLEManagerImpl::bleAppTask(void * p_arg) -{ - while (true) - { - xEventGroupWaitBits(bleAppTaskLoopEvent, LOOP_EV_BLE, true, false, portMAX_DELAY); - - if (MSG_Pending(&blekw_msg_list)) - { - /* There is message from the BLE tasks to solve */ - blekw_msg_t * msg = (blekw_msg_t *) MSG_DeQueue(&blekw_msg_list); - - assert(msg != NULL); - - if (msg->type == BLE_KW_MSG_ERROR) - { - if (msg->data.u8 == BLE_KW_MSG_2M_UPGRADE_ERROR) - { - ChipLogProgress(DeviceLayer, - "Warning. BLE is using 1Mbps. Couldn't upgrade to 2Mbps, " - "maybe the peer is missing 2Mbps support."); - } - else - { - ChipLogProgress(DeviceLayer, "BLE Error: %d.\n", msg->data.u8); - } - } - else if (msg->type == BLE_KW_MSG_CONNECTED) - { - sInstance.HandleConnectEvent(msg); - } - else if (msg->type == BLE_KW_MSG_DISCONNECTED) - { - sInstance.HandleConnectionCloseEvent(msg); - } - else if (msg->type == BLE_KW_MSG_MTU_CHANGED) - { - blekw_start_connection_timeout(); - ChipLogProgress(DeviceLayer, "BLE MTU size has been changed to %d.", msg->data.u16); - } - else if (msg->type == BLE_KW_MSG_ATT_WRITTEN || msg->type == BLE_KW_MSG_ATT_LONG_WRITTEN || - msg->type == BLE_KW_MSG_ATT_CCCD_WRITTEN) - { - sInstance.HandleWriteEvent(msg); - } - else if (msg->type == BLE_KW_MSG_ATT_READ) - { -#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING - blekw_att_read_data_t * att_rd_data = (blekw_att_read_data_t *) msg->data.data; - if (value_chipoble_c3 == att_rd_data->handle) - sInstance.HandleC3ReadRequest(msg); -#endif - } - else if (msg->type == BLE_KW_MSG_FORCE_DISCONNECT) - { - ChipLogProgress(DeviceLayer, "BLE connection timeout: Forcing disconnection."); - - /* Set the advertising parameters */ - if (Gap_Disconnect(g_device_id) != gBleSuccess_c) - { - ChipLogProgress(DeviceLayer, "Gap_Disconnect() failed."); - } - sInstance.RemoveConnection(g_device_id); - } - - /* Freed the message from the queue */ - MSG_Free(msg); - } - } -} - -void BLEManagerImpl::HandleConnectEvent(blekw_msg_t * msg) -{ - uint8_t device_id_loc = msg->data.u8; - ChipLogProgress(DeviceLayer, "BLE is connected with device: %d.\n", device_id_loc); - -#if gClkUseFro32K -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) - PWR_DisallowDeviceToSleep(); -#endif -#endif - - g_device_id = device_id_loc; - blekw_start_connection_timeout(); - sInstance.AddConnection(device_id_loc); - mFlags.Set(Flags::kRestartAdvertising); - PlatformMgr().ScheduleWork(DriveBLEState, 0); -} - -void BLEManagerImpl::HandleConnectionCloseEvent(blekw_msg_t * msg) -{ - uint8_t device_id_loc = msg->data.u8; - ChipLogProgress(DeviceLayer, "BLE is disconnected with device: %d.\n", device_id_loc); - -#if gClkUseFro32K -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) - PWR_AllowDeviceToSleep(); -#endif -#endif - - if (sInstance.RemoveConnection(device_id_loc)) - { - ChipDeviceEvent event; - event.Type = DeviceEventType::kCHIPoBLEConnectionError; - event.CHIPoBLEConnectionError.ConId = device_id_loc; - event.CHIPoBLEConnectionError.Reason = BLE_ERROR_REMOTE_DEVICE_DISCONNECTED; - - PlatformMgr().PostEventOrDie(&event); - mFlags.Set(Flags::kRestartAdvertising); - mFlags.Set(Flags::kFastAdvertisingEnabled); - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } -} - -void BLEManagerImpl::HandleWriteEvent(blekw_msg_t * msg) -{ - blekw_att_written_data_t * att_wr_data = (blekw_att_written_data_t *) msg->data.data; - attErrorCode_t status = gAttErrCodeNoError_c; - -#if CHIP_DEVICE_CHIP0BLE_DEBUG - ChipLogProgress(DeviceLayer, "Attribute write request(device: %d,handle: %d).", att_wr_data->device_id, att_wr_data->handle); -#endif - - blekw_start_connection_timeout(); - - if (value_chipoble_rx == att_wr_data->handle) - { - sInstance.HandleRXCharWrite(msg); - } - else if (cccd_chipoble_tx == att_wr_data->handle) - { - sInstance.HandleTXCharCCCDWrite(msg); - } - - /* TODO: do we need to send the status also for CCCD_WRITTEN? */ - if (msg->type != BLE_KW_MSG_ATT_CCCD_WRITTEN) - { - bleResult_t res = GattServer_SendAttributeWrittenStatus(att_wr_data->device_id, att_wr_data->handle, status); - - if (res != gBleSuccess_c) - { - ChipLogProgress(DeviceLayer, "GattServer_SendAttributeWrittenStatus returned %d", res); - } - } -} - -void BLEManagerImpl::HandleTXCharCCCDWrite(blekw_msg_t * msg) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - CHIPoBLEConState * bleConnState; - bool indicationsEnabled; - ChipDeviceEvent event; - blekw_att_written_data_t * att_wr_data = (blekw_att_written_data_t *) msg->data.data; - uint16_t writeLen = att_wr_data->length; - uint8_t * data = att_wr_data->data; - - VerifyOrExit(writeLen != 0, err = CHIP_ERROR_INCORRECT_STATE); - bleConnState = GetConnectionState(att_wr_data->device_id, false); - VerifyOrExit(bleConnState != NULL, err = CHIP_ERROR_NO_MEMORY); - - /* Determine if the client is enabling or disabling indications. - * TODO: Check the indications corresponding bit - */ - indicationsEnabled = (*data); - -#if CHIP_DEVICE_CHIP0BLE_DEBUG - ChipLogProgress(DeviceLayer, "CHIPoBLE %s received", indicationsEnabled ? "subscribe" : "unsubscribe"); -#endif - - if (indicationsEnabled) - { - // If indications are not already enabled for the connection... - if (!bleConnState->subscribed) - { - bleConnState->subscribed = 1; - /* Post an event to the CHIP queue to process either a CHIPoBLE - * Subscribe or Unsubscribe based on whether the client - * is enabling or disabling indications. */ - { - event.Type = DeviceEventType::kCHIPoBLESubscribe; - event.CHIPoBLESubscribe.ConId = att_wr_data->device_id; - err = PlatformMgr().PostEvent(&event); - } - } - } - else - { - bleConnState->subscribed = 0; - event.Type = DeviceEventType::kCHIPoBLEUnsubscribe; - event.CHIPoBLESubscribe.ConId = att_wr_data->device_id; - err = PlatformMgr().PostEvent(&event); - } - -exit: - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "HandleTXCharCCCDWrite() failed: %s", ErrorStr(err)); - } -} - -void BLEManagerImpl::HandleRXCharWrite(blekw_msg_t * msg) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - System::PacketBufferHandle buf; - blekw_att_written_data_t * att_wr_data = (blekw_att_written_data_t *) msg->data.data; - uint16_t writeLen = att_wr_data->length; - uint8_t * data = att_wr_data->data; - - // Copy the data to a PacketBuffer. - buf = System::PacketBufferHandle::New(writeLen); - VerifyOrExit(!buf.IsNull(), err = CHIP_ERROR_NO_MEMORY); - VerifyOrExit(buf->AvailableDataLength() >= writeLen, err = CHIP_ERROR_BUFFER_TOO_SMALL); - memcpy(buf->Start(), data, writeLen); - buf->SetDataLength(writeLen); - -#if CHIP_DEVICE_CHIP0BLE_DEBUG - ChipLogDetail(DeviceLayer, - "Write request/command received for" - "CHIPoBLE RX characteristic (con %u, len %u)", - att_wr_data->device_id, buf->DataLength()); -#endif - - // Post an event to the CHIP queue to deliver the data into the CHIP stack. - { - ChipDeviceEvent event; - event.Type = DeviceEventType::kCHIPoBLEWriteReceived; - event.CHIPoBLEWriteReceived.ConId = att_wr_data->device_id; - event.CHIPoBLEWriteReceived.Data = std::move(buf).UnsafeRelease(); - err = PlatformMgr().PostEvent(&event); - } -exit: - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "HandleRXCharWrite() failed: %s", ErrorStr(err)); - } -} -/******************************************************************************* - * BLE stack callbacks - *******************************************************************************/ -void BLEManagerImpl::blekw_generic_cb(gapGenericEvent_t * pGenericEvent) -{ - /* Call BLE Conn Manager */ - BleConnManager_GenericEvent(pGenericEvent); - - switch (pGenericEvent->eventType) - { - case gInternalError_c: - /* Notify the CHIP that the BLE hardware report fail */ - ChipLogProgress(DeviceLayer, "BLE Internal Error: Code 0x%04X, Source 0x%08X, HCI OpCode %d.\n", - pGenericEvent->eventData.internalError.errorCode, pGenericEvent->eventData.internalError.errorSource, - pGenericEvent->eventData.internalError.hciCommandOpcode); - if ((gHciUnsupportedRemoteFeature_c == pGenericEvent->eventData.internalError.errorCode) && - (gLeSetPhy_c == pGenericEvent->eventData.internalError.errorSource)) - { - (void) blekw_msg_add_u8(BLE_KW_MSG_ERROR, BLE_KW_MSG_2M_UPGRADE_ERROR); - } - else - { - (void) blekw_msg_add_u8(BLE_KW_MSG_ERROR, BLE_INTERNAL_ERROR); - } - break; - - case gAdvertisingSetupFailed_c: - OSA_EventSet(event_msg, CHIP_BLE_KW_EVNT_ADV_SETUP_FAILED); - break; - - case gAdvertisingParametersSetupComplete_c: - OSA_EventSet(event_msg, CHIP_BLE_KW_EVNT_ADV_PAR_SETUP_COMPLETE); - break; - - case gAdvertisingDataSetupComplete_c: - OSA_EventSet(event_msg, CHIP_BLE_KW_EVNT_ADV_DAT_SETUP_COMPLETE); - break; - - case gRandomAddressReady_c: - Gap_SetRandomAddress(pGenericEvent->eventData.addrReady.aAddress); - break; - - case gRandomAddressSet_c: - OSA_EventSet(event_msg, CHIP_BLE_KW_EVNT_RND_ADDR_SET); - break; - - case gInitializationComplete_c: - /* Common GAP configuration */ - BleConnManager_GapCommonConfig(); - - /* Set the local synchronization event */ - OSA_EventSet(event_msg, CHIP_BLE_KW_EVNT_INIT_COMPLETE); - break; - default: - break; - } -} - -void BLEManagerImpl::blekw_gap_advertising_cb(gapAdvertisingEvent_t * pAdvertisingEvent) -{ - if (pAdvertisingEvent->eventType == gAdvertisingStateChanged_c) - { - /* Set the local synchronization event */ - OSA_EventSet(event_msg, CHIP_BLE_KW_EVNT_ADV_CHANGED); - } - else - { - /* The advertisement start failed */ - ChipLogProgress(DeviceLayer, "Advertising failed: event=%d reason=0x%04X\n", pAdvertisingEvent->eventType, - pAdvertisingEvent->eventData.failReason); - - /* Set the local synchronization event */ - OSA_EventSet(event_msg, CHIP_BLE_KW_EVNT_ADV_FAILED); - } -} - -void BLEManagerImpl::blekw_gap_connection_cb(deviceId_t deviceId, gapConnectionEvent_t * pConnectionEvent) -{ - /* Call BLE Conn Manager */ - BleConnManager_GapPeripheralEvent(deviceId, pConnectionEvent); - - if (pConnectionEvent->eventType == gConnEvtConnected_c) - { -#if CHIP_DEVICE_CONFIG_BLE_SET_PHY_2M_REQ - ChipLogProgress(DeviceLayer, "BLE K32W: Trying to set the PHY to 2M"); - - (void) Gap_LeSetPhy(FALSE, deviceId, 0, gConnPhyUpdateReqTxPhySettings_c, gConnPhyUpdateReqRxPhySettings_c, - (uint16_t) gConnPhyUpdateReqPhyOptions_c); -#endif - - /* Notify App Task that the BLE is connected now */ - (void) blekw_msg_add_u8(BLE_KW_MSG_CONNECTED, (uint8_t) deviceId); -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) - PWR_AllowDeviceToSleep(); -#endif - } - else if (pConnectionEvent->eventType == gConnEvtDisconnected_c) - { - blekw_stop_connection_timeout(); - - /* Notify App Task that the BLE is disconnected now */ - (void) blekw_msg_add_u8(BLE_KW_MSG_DISCONNECTED, (uint8_t) deviceId); - -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) - if (bleAppStopInProgress == TRUE) - { - bleAppStopInProgress = FALSE; - PWR_AllowDeviceToSleep(); - } -#endif - } - else if (pConnectionEvent->eventType == gConnEvtPairingRequest_c) - { - /* Reject request for pairing */ - Gap_RejectPairing(deviceId, gPairingNotSupported_c); - } - else if (pConnectionEvent->eventType == gConnEvtAuthenticationRejected_c) - { - ChipLogProgress(DeviceLayer, "BLE Authentication rejected (reason:%d).\n", - pConnectionEvent->eventData.authenticationRejectedEvent.rejectReason); - } -} - -/* Called by BLE when a connect is received */ -void BLEManagerImpl::BLE_SignalFromISRCallback(void) -{ -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) - PWR_DisallowDeviceToSleep(); -#endif /* cPWR_UsePowerDownMode */ -} - -void BLEManagerImpl::blekw_connection_timeout_cb(TimerHandle_t timer) -{ - (void) blekw_msg_add_u8(BLE_KW_MSG_FORCE_DISCONNECT, 0); -} - -void BLEManagerImpl::blekw_start_connection_timeout(void) -{ - xTimerReset(connectionTimeout, 0); -} - -void BLEManagerImpl::blekw_stop_connection_timeout(void) -{ - ChipLogProgress(DeviceLayer, "Stopped connectionTimeout timer."); - xTimerStop(connectionTimeout, 0); -} - -void BLEManagerImpl::blekw_gatt_server_cb(deviceId_t deviceId, gattServerEvent_t * pServerEvent) -{ - switch (pServerEvent->eventType) - { - case gEvtMtuChanged_c: { - uint16_t tempMtu = 0; - - (void) Gatt_GetMtu(deviceId, &tempMtu); - blekw_msg_add_u16(BLE_KW_MSG_MTU_CHANGED, tempMtu); - break; - } - - case gEvtAttributeWritten_c: - blekw_msg_add_att_written(BLE_KW_MSG_ATT_WRITTEN, deviceId, pServerEvent->eventData.attributeWrittenEvent.handle, - pServerEvent->eventData.attributeWrittenEvent.aValue, - pServerEvent->eventData.attributeWrittenEvent.cValueLength); - break; - - case gEvtLongCharacteristicWritten_c: - blekw_msg_add_att_written(BLE_KW_MSG_ATT_LONG_WRITTEN, deviceId, pServerEvent->eventData.longCharWrittenEvent.handle, - pServerEvent->eventData.longCharWrittenEvent.aValue, - pServerEvent->eventData.longCharWrittenEvent.cValueLength); - break; - - case gEvtAttributeRead_c: - blekw_msg_add_att_read(BLE_KW_MSG_ATT_READ, deviceId, pServerEvent->eventData.attributeReadEvent.handle); - break; - - case gEvtCharacteristicCccdWritten_c: { - uint16_t cccd_val = pServerEvent->eventData.charCccdWrittenEvent.newCccd; - - blekw_msg_add_att_written(BLE_KW_MSG_ATT_CCCD_WRITTEN, deviceId, pServerEvent->eventData.charCccdWrittenEvent.handle, - (uint8_t *) &cccd_val, 2); - break; - } - - case gEvtHandleValueConfirmation_c: - /* Set the local synchronization event */ - OSA_EventSet(event_msg, CHIP_BLE_KW_EVNT_INDICATION_CONFIRMED); - break; - - case gEvtError_c: - if (pServerEvent->eventData.procedureError.procedureType == gSendIndication_c) - { - /* Set the local synchronization event */ - OSA_EventSet(event_msg, CHIP_BLE_KW_EVNT_INDICATION_FAILED); - } - else - { - ChipLogProgress(DeviceLayer, "BLE Gatt Server Error: Code 0x%04X, Source %d.\n", - pServerEvent->eventData.procedureError.error, pServerEvent->eventData.procedureError.procedureType); - - /* Notify CHIP BLE App Task that the BLE hardware report fail */ - (void) blekw_msg_add_u8(BLE_KW_MSG_ERROR, BLE_INTERNAL_GATT_ERROR); - } - break; - - default: - break; - } -} -/******************************************************************************* - * Add to message queue functions - *******************************************************************************/ -CHIP_ERROR BLEManagerImpl::blekw_msg_add_att_written(blekw_msg_type_t type, uint8_t device_id, uint16_t handle, uint8_t * data, - uint16_t length) -{ - blekw_msg_t * msg = NULL; - blekw_att_written_data_t * att_wr_data; - - /* Allocate a buffer with enough space to store the packet */ - msg = (blekw_msg_t *) MSG_Alloc(sizeof(blekw_msg_t) + sizeof(blekw_att_written_data_t) + length); - - if (!msg) - { - return CHIP_ERROR_NO_MEMORY; - assert(0); - } - - msg->type = type; - msg->length = sizeof(blekw_att_written_data_t) + length; - att_wr_data = (blekw_att_written_data_t *) msg->data.data; - att_wr_data->device_id = device_id; - att_wr_data->handle = handle; - att_wr_data->length = length; - FLib_MemCpy(att_wr_data->data, data, length); - - /* Put message in the queue */ - if (gListOk_c != MSG_Queue(&blekw_msg_list, msg)) - { - assert(0); - } - - /* Notify BLE-APP Task to serve the BLE subsystem */ - blekw_new_data_received_notification(LOOP_EV_BLE); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR BLEManagerImpl::blekw_msg_add_att_read(blekw_msg_type_t type, uint8_t device_id, uint16_t handle) -{ - blekw_msg_t * msg = NULL; - blekw_att_read_data_t * att_rd_data; - - /* Allocate a buffer with enough space to store the packet */ - msg = (blekw_msg_t *) MSG_Alloc(sizeof(blekw_msg_t) + sizeof(blekw_att_read_data_t)); - - if (!msg) - { - return CHIP_ERROR_NO_MEMORY; - assert(0); - } - - msg->type = type; - msg->length = sizeof(blekw_att_read_data_t); - att_rd_data = (blekw_att_read_data_t *) msg->data.data; - att_rd_data->device_id = device_id; - att_rd_data->handle = handle; - - /* Put message in the queue */ - if (gListOk_c != MSG_Queue(&blekw_msg_list, msg)) - { - assert(0); - } - - /* Notify BLE-APP Task to serve the BLE subsystem */ - blekw_new_data_received_notification(LOOP_EV_BLE); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR BLEManagerImpl::blekw_msg_add_u8(blekw_msg_type_t type, uint8_t data) -{ - blekw_msg_t * msg = NULL; - - /* Allocate a buffer with enough space to store the packet */ - msg = (blekw_msg_t *) MSG_Alloc(sizeof(blekw_msg_t)); - - if (!msg) - { - return CHIP_ERROR_NO_MEMORY; - } - - msg->type = type; - msg->length = 0; - msg->data.u8 = data; - - /* Put message in the queue */ - MSG_Queue(&blekw_msg_list, msg); - - /* Notify BLE-APP Task to serve the BLE subsystem */ - blekw_new_data_received_notification(LOOP_EV_BLE); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR BLEManagerImpl::blekw_msg_add_u16(blekw_msg_type_t type, uint16_t data) -{ - blekw_msg_t * msg = NULL; - - /* Allocate a buffer with enough space to store the packet */ - msg = (blekw_msg_t *) MSG_Alloc(sizeof(blekw_msg_t)); - - if (!msg) - { - return CHIP_ERROR_NO_MEMORY; - } - - msg->type = type; - msg->length = 0; - msg->data.u16 = data; - - /* Put message in the queue */ - MSG_Queue(&blekw_msg_list, msg); - - /* Notify BLE-APP Task to serve the BLE subsystem */ - blekw_new_data_received_notification(LOOP_EV_BLE); - - return CHIP_NO_ERROR; -} - -/******************************************************************************* - * FreeRTOS Task Management Functions - *******************************************************************************/ -void BLEManagerImpl::blekw_new_data_received_notification(uint32_t mask) -{ - portBASE_TYPE taskToWake = pdFALSE; - - if (__get_IPSR()) - { - if (xEventGroupSetBitsFromISR(bleAppTaskLoopEvent, mask, &taskToWake) == pdPASS) - { - /* If xHigherPriorityTaskWoken is now set to pdTRUE then a context - switch should be requested. The macro used is port specific and will - be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() - refer to - the documentation page for the port being used. */ - portYIELD_FROM_ISR(taskToWake); - } - } - else - { - xEventGroupSetBits(bleAppTaskLoopEvent, mask); - } -} - -void BLEManagerImpl::BleAdvTimeoutHandler(TimerHandle_t xTimer) -{ - // If stop advertising fails (timeout on event wait), then - // rearm the timer as fast as possible to retry. - // Once stop advertising is successful, slow advertising can start. - auto err = sInstance.StopAdvertising(); - if (err != CHIP_NO_ERROR) - { - ChipLogDetail(DeviceLayer, "Stop advertising failed. Retrying..."); - StartBleAdvTimeoutTimer(portTICK_PERIOD_MS); - return; - } - - sInstance.mFlags.Clear(Flags::kFastAdvertisingEnabled); - ChipLogDetail(DeviceLayer, "Start slow advertisement"); - sInstance.StartAdvertising(); -} - -void BLEManagerImpl::CancelBleAdvTimeoutTimer(void) -{ - if (xTimerStop(sbleAdvTimeoutTimer, 0) == pdFAIL) - { - ChipLogError(DeviceLayer, "Failed to stop BledAdv timeout timer"); - } -} - -void BLEManagerImpl::StartBleAdvTimeoutTimer(uint32_t aTimeoutInMs) -{ - if (xTimerIsTimerActive(sbleAdvTimeoutTimer)) - { - CancelBleAdvTimeoutTimer(); - } - - // timer is not active, change its period to required value (== restart). - // FreeRTOS- Block for a maximum of 100 ticks if the change period command - // cannot immediately be sent to the timer command queue. - if (xTimerChangePeriod(sbleAdvTimeoutTimer, aTimeoutInMs / portTICK_PERIOD_MS, 100) != pdPASS) - { - ChipLogError(DeviceLayer, "Failed to start BledAdv timeout timer"); - } -} - -bool BLEManagerImpl::blekw_stop_connection_internal(BLE_CONNECTION_OBJECT conId) -{ - ChipLogProgress(DeviceLayer, "Closing BLE GATT connection (con %u)", conId); - - if (Gap_Disconnect(conId) != gBleSuccess_c) - { - ChipLogProgress(DeviceLayer, "Gap_Disconnect() failed."); - return false; - } -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) - else - { - bleAppStopInProgress = TRUE; - PWR_DisallowDeviceToSleep(); - } -#endif - - return true; -} - -} // namespace Internal -} // namespace DeviceLayer -} // namespace chip -#endif // CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#endif /* CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE */ diff --git a/src/platform/nxp/k32w/k32w0/BLEManagerImpl.h b/src/platform/nxp/k32w/k32w0/BLEManagerImpl.h index f946ef9a9a562c..52fd69007d9aa0 100644 --- a/src/platform/nxp/k32w/k32w0/BLEManagerImpl.h +++ b/src/platform/nxp/k32w/k32w0/BLEManagerImpl.h @@ -1,7 +1,6 @@ /* * - * Copyright (c) 2020-2021 Project CHIP Authors - * Copyright (c) 2020 Nest Labs, Inc. + * Copyright (c) 2021-2023 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,33 +16,20 @@ * limitations under the License. */ -/** - * @file - * Provides an implementation of the BLEManager singleton object - * for the K32W platforms. - */ - #pragma once #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE -#include "Messaging.h" - -#include "fsl_os_abstraction.h" - -#include "ble_conn_manager.h" #include "ble_controller_task_config.h" #include "ble_general.h" #include "ble_host_task_config.h" -#include "ble_host_tasks.h" #include "controller_interface.h" -#include "gap_interface.h" -#include "gatt_db_dynamic.h" -#include "gatt_server_interface.h" -#include "FreeRTOS.h" -#include "event_groups.h" -#include "timers.h" +#include + +/* host task configuration */ +#define HOST_TASK_PRIORITY (4U) +#define HOST_TASK_STACK_SIZE (gHost_TaskStackSize_c / sizeof(StackType_t)) namespace chip { namespace DeviceLayer { @@ -51,214 +37,29 @@ namespace Internal { using namespace chip::Ble; -/** - * Concrete implementation of the BLEManager singleton object for the K32W platforms. - */ -class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePlatformDelegate, private BleApplicationDelegate +class BLEManagerImpl : public BLEManagerCommon { +public: // Allow the BLEManager interface class to delegate method calls to // the implementation methods provided by this class. friend BLEManager; -private: - // ===== Members that implement the BLEManager internal interface. - - CHIP_ERROR _Init(void); - void _Shutdown() {} - bool _IsAdvertisingEnabled(void); - CHIP_ERROR _SetAdvertisingEnabled(bool val); - bool _IsAdvertising(void); - CHIP_ERROR _SetAdvertisingMode(BLEAdvertisingMode mode); - CHIP_ERROR _GetDeviceName(char * buf, size_t bufSize); - CHIP_ERROR _SetDeviceName(const char * deviceName); - uint16_t _NumConnections(void); - void _OnPlatformEvent(const ChipDeviceEvent * event); - BleLayer * _GetBleLayer(void); - - // ===== Members that implement virtual methods on BlePlatformDelegate. - - bool SubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID * svcId, - const Ble::ChipBleUUID * charId) override; - bool UnsubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID * svcId, - const Ble::ChipBleUUID * charId) override; - bool CloseConnection(BLE_CONNECTION_OBJECT conId) override; - uint16_t GetMTU(BLE_CONNECTION_OBJECT conId) const override; - bool SendIndication(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID * svcId, const Ble::ChipBleUUID * charId, - System::PacketBufferHandle pBuf) override; - bool SendWriteRequest(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID * svcId, const Ble::ChipBleUUID * charId, - System::PacketBufferHandle pBuf) override; - bool SendReadRequest(BLE_CONNECTION_OBJECT conId, const Ble::ChipBleUUID * svcId, const Ble::ChipBleUUID * charId, - System::PacketBufferHandle pBuf) override; - bool SendReadResponse(BLE_CONNECTION_OBJECT conId, BLE_READ_REQUEST_CONTEXT requestContext, const Ble::ChipBleUUID * svcId, - const Ble::ChipBleUUID * charId) override; - - // ===== Members that implement virtual methods on BleApplicationDelegate. - - void NotifyChipConnectionClosed(BLE_CONNECTION_OBJECT conId) override; - - // ===== Members for internal use by the following friends. - - friend BLEManager & BLEMgr(void); - friend BLEManagerImpl & BLEMgrImpl(void); + CHIP_ERROR InitHostController(ble_generic_cb_fp cb_fp) override; + BLEManagerCommon * GetImplInstance() override; +private: static BLEManagerImpl sInstance; - // ===== Private members reserved for use by this class only. - - enum class Flags : uint8_t - { - kAdvertisingEnabled = 0x0001, - kFastAdvertisingEnabled = 0x0002, - kAdvertising = 0x0004, - kRestartAdvertising = 0x0008, - kK32WBLEStackInitialized = 0x0010, - kDeviceNameSet = 0x0020, - }; - BitFlags mFlags; - - enum - { - kMaxConnections = BLE_LAYER_NUM_BLE_ENDPOINTS, - kMaxDeviceNameLength = 32, - kUnusedIndex = 0xFF, - }; - - typedef enum - { - BLE_KW_MSG_ERROR = 0x01, - BLE_KW_MSG_CONNECTED, - BLE_KW_MSG_DISCONNECTED, - BLE_KW_MSG_MTU_CHANGED, - BLE_KW_MSG_ATT_WRITTEN, - BLE_KW_MSG_ATT_LONG_WRITTEN, - BLE_KW_MSG_ATT_READ, - BLE_KW_MSG_ATT_CCCD_WRITTEN, - BLE_KW_MSG_FORCE_DISCONNECT, - } blekw_msg_type_t; - - typedef struct hk_ble_kw_msg_s - { - blekw_msg_type_t type; - uint16_t length; - union - { - uint8_t u8; - uint16_t u16; - uint32_t u32; - uint8_t data[1]; - char * str; - } data; - } blekw_msg_t; - - typedef enum ble_err_t - { - BLE_OK = 0, - BLE_INTERNAL_GATT_ERROR, - BLE_E_SET_ADV_PARAMS, - BLE_E_ADV_PARAMS_FAILED, - BLE_E_SET_ADV_DATA, - BLE_E_ADV_CHANGED, - BLE_E_ADV_FAILED, - BLE_E_ADV_SETUP_FAILED, - BLE_E_START_ADV, - BLE_E_STOP, - BLE_E_FAIL, - BLE_E_START_ADV_FAILED, - BLE_INTERNAL_ERROR, - BLE_KW_MSG_2M_UPGRADE_ERROR, - } ble_err_t; - - typedef struct ble_att_written_data_s - { - uint8_t device_id; - uint16_t handle; - uint16_t length; - uint8_t data[1]; - } blekw_att_written_data_t; - - typedef struct hk_ble_att_read_data_s - { - uint8_t device_id; - uint16_t handle; - } blekw_att_read_data_t; - - struct CHIPoBLEConState - { - uint16_t mtu : 10; - uint16_t allocated : 1; - uint16_t subscribed : 1; - uint16_t unused : 4; - uint8_t connectionHandle; - uint8_t bondingHandle; - }; - CHIPoBLEConState mBleConnections[kMaxConnections]; - - CHIPoBLEServiceMode mServiceMode; - uint16_t mNumGAPCons; - uint8_t mAdvHandle; - char mDeviceName[kMaxDeviceNameLength + 1]; -#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING - chip::System::PacketBufferHandle c3AdditionalDataBufferHandle; -#endif - - void DriveBLEState(void); - CHIP_ERROR ConfigureAdvertising(void); - CHIP_ERROR StartAdvertising(void); - CHIP_ERROR StopAdvertising(void); - void HandleSoftDeviceBLEEvent(const ChipDeviceEvent * event); - void HandleConnectEvent(blekw_msg_t * msg); - void HandleConnectionCloseEvent(blekw_msg_t * msg); - void HandleWriteEvent(blekw_msg_t * msg); - void HandleRXCharWrite(blekw_msg_t * msg); - void HandleTXCharCCCDWrite(blekw_msg_t * msg); - CHIP_ERROR HandleGAPConnect(const ChipDeviceEvent * event); - CHIP_ERROR HandleGAPDisconnect(const ChipDeviceEvent * event); - CHIP_ERROR HandleRXCharWrite(const ChipDeviceEvent * event); - CHIP_ERROR HandleTXCharCCCDWrite(const ChipDeviceEvent * event); - CHIP_ERROR HandleTXComplete(const ChipDeviceEvent * event); - CHIP_ERROR SetSubscribed(uint16_t conId); - bool UnsetSubscribed(uint16_t conId); - bool IsSubscribed(uint16_t conId); - CHIP_ERROR ConfigureAdvertisingData(void); -#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING - CHIP_ERROR EncodeAdditionalDataTlv(); - void HandleC3ReadRequest(blekw_msg_t * msg); -#endif - BLEManagerImpl::ble_err_t blekw_send_event(int8_t connection_handle, uint16_t handle, uint8_t * data, uint32_t len); - bool RemoveConnection(uint8_t connectionHandle); - void AddConnection(uint8_t connectionHandle); - BLEManagerImpl::CHIPoBLEConState * GetConnectionState(uint8_t connectionHandle, bool allocate); - - static void DriveBLEState(intptr_t arg); - - static void BLE_SignalFromISRCallback(void); - static void blekw_connection_timeout_cb(TimerHandle_t timer); - static CHIP_ERROR blekw_msg_add_u8(blekw_msg_type_t type, uint8_t data); - static void blekw_new_data_received_notification(uint32_t mask); - static void BleAdvTimeoutHandler(TimerHandle_t xTimer); - static void CancelBleAdvTimeoutTimer(void); - static void StartBleAdvTimeoutTimer(uint32_t aTimeoutInMs); - static CHIP_ERROR blekw_controller_init(void); static CHIP_ERROR blekw_host_init(void); static void Host_Task(osaTaskParam_t argument); - static void blekw_generic_cb(gapGenericEvent_t * pGenericEvent); - static void blekw_gatt_server_cb(deviceId_t deviceId, gattServerEvent_t * pServerEvent); - static CHIP_ERROR blekw_msg_add_u16(blekw_msg_type_t type, uint16_t data); - static CHIP_ERROR blekw_msg_add_att_written(blekw_msg_type_t type, uint8_t device_id, uint16_t handle, uint8_t * data, - uint16_t length); - static CHIP_ERROR blekw_msg_add_att_read(blekw_msg_type_t type, uint8_t device_id, uint16_t handle); - static BLEManagerImpl::ble_err_t blekw_start_advertising(gapAdvertisingParameters_t * adv_params, gapAdvertisingData_t * adv, - gapScanResponseData_t * scnrsp); - static BLEManagerImpl::ble_err_t blekw_stop_advertising(void); - static void blekw_gap_advertising_cb(gapAdvertisingEvent_t * pAdvertisingEvent); - static void blekw_gap_connection_cb(deviceId_t deviceId, gapConnectionEvent_t * pConnectionEvent); - static void blekw_start_connection_timeout(void); - static void blekw_stop_connection_timeout(void); + static void BLE_SignalFromISRCallback(void); + static CHIP_ERROR blekw_controller_init(void); - static void bleAppTask(void * p_arg); + BleLayer * _GetBleLayer(void); -public: - static bool blekw_stop_connection_internal(BLE_CONNECTION_OBJECT conId); + // ===== Members for internal use by the following friends. + friend BLEManager & BLEMgr(void); + friend BLEManagerImpl & BLEMgrImpl(void); }; /** @@ -292,4 +93,4 @@ inline BleLayer * BLEManagerImpl::_GetBleLayer() } // namespace DeviceLayer } // namespace chip -#endif // CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#endif /* CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE */ diff --git a/src/platform/nxp/k32w/k32w0/BUILD.gn b/src/platform/nxp/k32w/k32w0/BUILD.gn index 9e2a205d8e0ba6..7c9d11aaa4433b 100644 --- a/src/platform/nxp/k32w/k32w0/BUILD.gn +++ b/src/platform/nxp/k32w/k32w0/BUILD.gn @@ -27,8 +27,8 @@ if (chip_enable_openthread) { static_library("k32w0") { sources = [ "../../../SingletonConfigurationManager.cpp", - "../common/RamStorage.cpp", - "../common/RamStorageKey.cpp", + "../common/BLEManagerCommon.cpp", + "../common/BLEManagerCommon.h", "BLEManagerImpl.cpp", "BLEManagerImpl.h", "CHIPDevicePlatformConfig.h", @@ -50,6 +50,7 @@ static_library("k32w0") { "NFCManagerImpl.h", "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", + "RamStorage.cpp", "SystemTimeSupport.cpp", "ble_function_mux.c", ] @@ -59,14 +60,12 @@ static_library("k32w0") { "${chip_root}/src/credentials/examples/DeviceAttestationCredsExample.h", "${chip_root}/src/credentials/examples/ExampleDACs.h", "${chip_root}/src/credentials/examples/ExamplePAI.h", - "../common/RamStorage.h", - "../common/RamStorageKey.h", ] if (chip_with_factory_data == 1) { sources += [ - "K32W0FactoryDataProvider.cpp", - "K32W0FactoryDataProvider.h", + "../common/FactoryDataProvider.cpp", + "FactoryDataProviderImpl.cpp", ] public += [ "${chip_root}/src/credentials/CHIPCert.h", diff --git a/src/platform/nxp/k32w/k32w0/CHIPDevicePlatformConfig.h b/src/platform/nxp/k32w/k32w0/CHIPDevicePlatformConfig.h index 310a175fcf4cbf..0f6258fe9cd824 100644 --- a/src/platform/nxp/k32w/k32w0/CHIPDevicePlatformConfig.h +++ b/src/platform/nxp/k32w/k32w0/CHIPDevicePlatformConfig.h @@ -37,6 +37,16 @@ #define CHIP_DEVICE_CHIP0BLE_DEBUG 0 #endif +/** + * @def CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH + * + * Set unique id to maximum length if not defined to ensure the actual unique + * id is retrieved instead of the default one (if factory data read fails). + */ +#ifndef CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH +#define CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH 32 +#endif + // ========== Platform-specific Configuration ========= // These are configuration options that are unique to the K32W platform. diff --git a/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.cpp index b27bdec546e4d0..d7e9088f322143 100644 --- a/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.cpp @@ -40,8 +40,6 @@ namespace DeviceLayer { using namespace ::chip::DeviceLayer::Internal; -// TODO: Define a Singleton instance of CHIP Group Key Store here - ConfigurationManagerImpl & ConfigurationManagerImpl::GetDefaultInstance() { static ConfigurationManagerImpl sInstance; @@ -51,49 +49,40 @@ ConfigurationManagerImpl & ConfigurationManagerImpl::GetDefaultInstance() CHIP_ERROR ConfigurationManagerImpl::Init() { CHIP_ERROR err; - uint32_t rebootCount = 0; + uint8_t rebootCause = POWER_GetResetCause(); if (K32WConfig::ConfigValueExists(K32WConfig::kCounterKey_RebootCount)) { - err = GetRebootCount(rebootCount); - SuccessOrExit(err); - - err = StoreRebootCount(rebootCount + 1); - SuccessOrExit(err); + uint32_t rebootCount = 0; + SuccessOrExit(err = GetRebootCount(rebootCount)); + SuccessOrExit(err = StoreRebootCount(rebootCount + 1)); } else { // The first boot after factory reset of the Node. - err = StoreRebootCount(0); - SuccessOrExit(err); + SuccessOrExit(err = StoreRebootCount(0)); } if (!K32WConfig::ConfigValueExists(K32WConfig::kCounterKey_TotalOperationalHours)) { - err = StoreTotalOperationalHours(0); - SuccessOrExit(err); - } - - if (!K32WConfig::ConfigValueExists(K32WConfig::kCounterKey_BootReason)) - { - err = StoreBootReason(to_underlying(BootReasonType::kUnspecified)); - SuccessOrExit(err); + SuccessOrExit(err = StoreTotalOperationalHours(0)); } - rebootCause = POWER_GetResetCause(); + SuccessOrExit(err = DetermineBootReason(rebootCause)); // Initialize the generic implementation base class. err = Internal::GenericConfigurationManagerImpl::Init(); SuccessOrExit(err); - // TODO: Initialize the global GroupKeyStore object here - - err = CHIP_NO_ERROR; - exit: return err; } +CHIP_ERROR ConfigurationManagerImpl::StoreSoftwareUpdateCompleted() +{ + return WriteConfigValue(K32WConfig::kConfigKey_SoftwareUpdateCompleted, true); +} + CHIP_ERROR ConfigurationManagerImpl::GetRebootCount(uint32_t & rebootCount) { return ReadConfigValue(K32WConfig::kCounterKey_RebootCount, rebootCount); @@ -116,31 +105,7 @@ CHIP_ERROR ConfigurationManagerImpl::StoreTotalOperationalHours(uint32_t totalOp CHIP_ERROR ConfigurationManagerImpl::GetBootReason(uint32_t & bootReason) { - bootReason = to_underlying(BootReasonType::kUnspecified); - // rebootCause is obtained at bootup. - if (rebootCause == RESET_UNDEFINED) - { - bootReason = to_underlying(BootReasonType::kUnspecified); - } - else if ((rebootCause == RESET_POR) || (rebootCause == RESET_EXT_PIN)) - { - bootReason = to_underlying(BootReasonType::kPowerOnReboot); - } - else if (rebootCause == RESET_BOR) - { - bootReason = to_underlying(BootReasonType::kBrownOutReset); - } - else if (rebootCause == RESET_SW_REQ) - { - bootReason = to_underlying(BootReasonType::kSoftwareReset); - } - else if (rebootCause == RESET_WDT) - { - bootReason = to_underlying(BootReasonType::kSoftwareWatchdogReset); - /* Reboot can be due to hardware or software watchdog */ - } - - return CHIP_NO_ERROR; + return ReadConfigValue(K32WConfig::kCounterKey_BootReason, bootReason); } CHIP_ERROR ConfigurationManagerImpl::StoreBootReason(uint32_t bootReason) @@ -275,6 +240,40 @@ CHIP_ERROR ConfigurationManagerImpl::WriteConfigValueBin(Key key, const uint8_t void ConfigurationManagerImpl::RunConfigUnitTest(void) {} +CHIP_ERROR ConfigurationManagerImpl::DetermineBootReason(uint8_t rebootCause) +{ + BootReasonType bootReason = BootReasonType::kUnspecified; + + if ((rebootCause & RESET_POR) || (rebootCause & RESET_EXT_PIN)) + { + bootReason = BootReasonType::kPowerOnReboot; + } + else if (rebootCause & RESET_BOR) + { + bootReason = BootReasonType::kBrownOutReset; + } + else if (rebootCause & RESET_WDT) + { + /* Reboot can be due to hardware or software watchdog */ + bootReason = BootReasonType::kHardwareWatchdogReset; + } + else if (rebootCause & RESET_SW_REQ) + { + if (K32WConfig::ConfigValueExists(K32WConfig::kConfigKey_SoftwareUpdateCompleted)) + { + bootReason = BootReasonType::kSoftwareUpdateCompleted; + } + else + { + bootReason = BootReasonType::kSoftwareReset; + } + } + + K32WConfig::ClearConfigValue(K32WConfig::kConfigKey_SoftwareUpdateCompleted); + + return StoreBootReason(to_underlying(bootReason)); +} + void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) { CHIP_ERROR err; diff --git a/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.h b/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.h index 4807162ee00ba9..8fded100d00a87 100644 --- a/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.h +++ b/src/platform/nxp/k32w/k32w0/ConfigurationManagerImpl.h @@ -39,10 +39,9 @@ class ConfigurationManagerImpl final : public Internal::GenericConfigurationMana public: // This returns an instance of this class. static ConfigurationManagerImpl & GetDefaultInstance(); + CHIP_ERROR StoreSoftwareUpdateCompleted(); -private: // ===== Members that implement the ConfigurationManager public interface. - CHIP_ERROR Init(void) override; CHIP_ERROR GetPrimaryWiFiMACAddress(uint8_t * buf) override; bool CanFactoryReset(void) override; @@ -59,8 +58,8 @@ class ConfigurationManagerImpl final : public Internal::GenericConfigurationMana CHIP_ERROR StoreUniqueId(const char * uniqueId, size_t uniqueIdLen) override; CHIP_ERROR GenerateUniqueId(char * buf, size_t bufSize) override; +private: // NOTE: Other public interface methods are implemented by GenericConfigurationManagerImpl<>. - // ===== Members that implement the GenericConfigurationManagerImpl protected interface. CHIP_ERROR ReadConfigValue(Key key, bool & val) override; CHIP_ERROR ReadConfigValue(Key key, uint32_t & val) override; @@ -76,7 +75,7 @@ class ConfigurationManagerImpl final : public Internal::GenericConfigurationMana void RunConfigUnitTest(void) override; // ===== Private members reserved for use by this class only. - uint8_t rebootCause; + CHIP_ERROR DetermineBootReason(uint8_t rebootCause); static void DoFactoryReset(intptr_t arg); }; diff --git a/src/platform/nxp/k32w/k32w0/DiagnosticDataProviderImpl.cpp b/src/platform/nxp/k32w/k32w0/DiagnosticDataProviderImpl.cpp index 96b8e663fe15aa..4331e007c4b07c 100644 --- a/src/platform/nxp/k32w/k32w0/DiagnosticDataProviderImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/DiagnosticDataProviderImpl.cpp @@ -117,8 +117,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics(ThreadMetrics ** threadM thread->stackFreeMinimum.Emplace(taskStatusArray[x].usStackHighWaterMark); /* Unsupported metrics */ - // thread->stackSize; - // thread->stackFreeCurrent; + thread->stackFreeCurrent.ClearValue(); + thread->stackSize.ClearValue(); thread->Next = head; head = thread; diff --git a/src/platform/nxp/k32w/k32w0/FactoryDataProviderImpl.cpp b/src/platform/nxp/k32w/k32w0/FactoryDataProviderImpl.cpp new file mode 100644 index 00000000000000..026aceb5dfad27 --- /dev/null +++ b/src/platform/nxp/k32w/k32w0/FactoryDataProviderImpl.cpp @@ -0,0 +1,183 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include + +#if CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR +extern "C" { +#include "Flash_Adapter.h" +} +extern "C" WEAK CHIP_ERROR FactoryDataDefaultRestoreMechanism(); +#endif + +namespace chip { +namespace DeviceLayer { + +FactoryDataProviderImpl::FactoryDataProviderImpl() +{ +#if CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR + RegisterRestoreMechanism(FactoryDataDefaultRestoreMechanism); +#endif +} + +CHIP_ERROR FactoryDataProviderImpl::Init() +{ + CHIP_ERROR error = CHIP_NO_ERROR; + uint32_t sum = 0; + +#if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER + ReturnErrorOnFailure(SetCustomIds()); +#endif + + for (uint8_t i = 1; i < FactoryDataProvider::kNumberOfIds; i++) + { + sum += maxLengths[i]; + } + + if (sum > kFactoryDataSize) + { + ChipLogError(DeviceLayer, "Max size of factory data: %lu is bigger than reserved factory data size: %lu", sum, + kFactoryDataSize); + } + +#if CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR + error = ValidateWithRestore(); +#else + error = Validate(); +#endif + if (error != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Factory data init failed with: %s", ErrorStr(error)); + } + + return error; +} + +CHIP_ERROR FactoryDataProviderImpl::SignWithDacKey(const ByteSpan & messageToSign, MutableByteSpan & outSignBuffer) +{ + Crypto::P256ECDSASignature signature; + Crypto::P256Keypair keypair; + Crypto::P256SerializedKeypair serializedKeypair; + + VerifyOrReturnError(IsSpanUsable(outSignBuffer), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(IsSpanUsable(messageToSign), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(outSignBuffer.size() >= signature.Capacity(), CHIP_ERROR_BUFFER_TOO_SMALL); + + /* Get private key of DAC certificate from reserved section */ + uint8_t keyBuf[Crypto::kP256_PrivateKey_Length]; + MutableByteSpan dacPrivateKeySpan(keyBuf); + uint16_t keySize = 0; + ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacPrivateKeyId, dacPrivateKeySpan.data(), dacPrivateKeySpan.size(), keySize)); + dacPrivateKeySpan.reduce_size(keySize); + + /* Only the private key is used when signing */ + ReturnErrorOnFailure(serializedKeypair.SetLength(Crypto::kP256_PublicKey_Length + dacPrivateKeySpan.size())); + memcpy(serializedKeypair.Bytes() + Crypto::kP256_PublicKey_Length, dacPrivateKeySpan.data(), dacPrivateKeySpan.size()); + + ReturnErrorOnFailure(keypair.Deserialize(serializedKeypair)); + ReturnErrorOnFailure(keypair.ECDSA_sign_msg(messageToSign.data(), messageToSign.size(), signature)); + + // TODO: sanitize temporary buffers used to store the private key, so it doesn't leak on the stack? + + return CopySpanToMutableSpan(ByteSpan{ signature.ConstBytes(), signature.Length() }, outSignBuffer); +} + +#if CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR +extern "C" WEAK CHIP_ERROR FactoryDataDefaultRestoreMechanism() +{ + CHIP_ERROR error = CHIP_NO_ERROR; + uint16_t backupLength = 0; + + // Check if PDM id related to factory data backup exists. + // If it does, it means an external event (such as a power loss) + // interrupted the factory data update process and the section + // from internal flash is most likely erased and should be restored. + if (PDM_bDoesDataExist(kNvmId_FactoryDataBackup, &backupLength)) + { + chip::Platform::ScopedMemoryBuffer buffer; + buffer.Calloc(FactoryDataProvider::kFactoryDataSize); + ReturnErrorCodeIf(buffer.Get() == nullptr, CHIP_ERROR_NO_MEMORY); + + auto status = PDM_eReadDataFromRecord(kNvmId_FactoryDataBackup, (void *) buffer.Get(), + FactoryDataProvider::kFactoryDataSize, &backupLength); + ReturnErrorCodeIf(PDM_E_STATUS_OK != status, CHIP_FACTORY_DATA_PDM_RESTORE); + + error = FactoryDataProviderImpl::UpdateData(buffer.Get()); + if (error == CHIP_NO_ERROR) + { + ChipLogProgress(DeviceLayer, "Factory data was restored successfully"); + } + } + + return error; +} + +CHIP_ERROR FactoryDataProviderImpl::ValidateWithRestore() +{ + CHIP_ERROR error = CHIP_NO_ERROR; + + VerifyOrReturnError(mRestoreMechanisms.size() > 0, CHIP_FACTORY_DATA_RESTORE_MECHANISM); + + for (auto & restore : mRestoreMechanisms) + { + error = restore(); + if (error != CHIP_NO_ERROR) + { + continue; + } + + error = Validate(); + if (error != CHIP_NO_ERROR) + { + continue; + } + + break; + } + + if (error == CHIP_NO_ERROR) + { + PDM_vDeleteDataRecord(kNvmId_FactoryDataBackup); + } + + return error; +} + +CHIP_ERROR FactoryDataProviderImpl::UpdateData(uint8_t * pBuf) +{ + NV_Init(); + + auto status = NV_FlashEraseSector(kFactoryDataStart, kFactoryDataSize); + ReturnErrorCodeIf(status != kStatus_FLASH_Success, CHIP_FACTORY_DATA_FLASH_ERASE); + + Header * header = (Header *) pBuf; + status = NV_FlashProgramUnaligned(kFactoryDataStart, sizeof(Header) + header->size, pBuf); + ReturnErrorCodeIf(status != kStatus_FLASH_Success, CHIP_FACTORY_DATA_FLASH_PROGRAM); + + return CHIP_NO_ERROR; +} + +void FactoryDataProviderImpl::RegisterRestoreMechanism(RestoreMechanism restore) +{ + mRestoreMechanisms.insert(mRestoreMechanisms.end(), restore); +} +#endif // CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/k32w/k32w0/FactoryDataProviderImpl.h b/src/platform/nxp/k32w/k32w0/FactoryDataProviderImpl.h new file mode 100644 index 00000000000000..f8d51573f6c488 --- /dev/null +++ b/src/platform/nxp/k32w/k32w0/FactoryDataProviderImpl.h @@ -0,0 +1,59 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include +#include + +namespace chip { +namespace DeviceLayer { + +/** + * This class provides K32W0 specific factory data features. + * CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER - application defined factory data provider + * CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR - enables factory data OTA + */ + +class FactoryDataProviderImpl : public FactoryDataProvider +{ +public: + FactoryDataProviderImpl(); + + CHIP_ERROR Init() override; + CHIP_ERROR SignWithDacKey(const ByteSpan & messageToSign, MutableByteSpan & outSignBuffer) override; + +#if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER + virtual ~FactoryDataProviderImpl() {} + // Custom factory data providers must implement this method in order to define + // their own custom IDs. + virtual CHIP_ERROR SetCustomIds() = 0; +#endif + +#if CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR + using RestoreMechanism = CHIP_ERROR (*)(void); + + static CHIP_ERROR UpdateData(uint8_t * pBuf); + CHIP_ERROR ValidateWithRestore(); + void RegisterRestoreMechanism(RestoreMechanism mechanism); + +private: + std::vector mRestoreMechanisms; +#endif +}; + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/k32w/k32w0/K32W0Config.cpp b/src/platform/nxp/k32w/k32w0/K32W0Config.cpp index e1427b32c63813..a346d18d69c90c 100644 --- a/src/platform/nxp/k32w/k32w0/K32W0Config.cpp +++ b/src/platform/nxp/k32w/k32w0/K32W0Config.cpp @@ -62,6 +62,7 @@ const K32WConfig::Key K32WConfig::kConfigKey_RegulatoryLocation{ &K32WConfig::sC const K32WConfig::Key K32WConfig::kConfigKey_CountryCode{ &K32WConfig::sConfigStorage, kKeyId_Config, 0x08 }; const K32WConfig::Key K32WConfig::kConfigKey_UniqueId{ &K32WConfig::sConfigStorage, kKeyId_Config, 0x0A }; const K32WConfig::Key K32WConfig::kConfigKey_SoftwareVersion{ &K32WConfig::sConfigStorage, kKeyId_Config, 0x0B }; +const K32WConfig::Key K32WConfig::kConfigKey_SoftwareUpdateCompleted{ &K32WConfig::sConfigStorage, kKeyId_Config, 0x0C }; const K32WConfig::Key K32WConfig::kCounterKey_RebootCount{ &K32WConfig::sCounterStorage, kKeyId_Counter, 0x00 }; const K32WConfig::Key K32WConfig::kCounterKey_UpTime{ &K32WConfig::sCounterStorage, kKeyId_Counter, 0x01 }; diff --git a/src/platform/nxp/k32w/k32w0/K32W0Config.h b/src/platform/nxp/k32w/k32w0/K32W0Config.h index 6e2ec0f850d6be..e364c045c25b1c 100644 --- a/src/platform/nxp/k32w/k32w0/K32W0Config.h +++ b/src/platform/nxp/k32w/k32w0/K32W0Config.h @@ -20,8 +20,7 @@ #include #include -#include -#include +#include namespace chip { namespace DeviceLayer { @@ -74,6 +73,7 @@ class K32WConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_UniqueId; static const Key kConfigKey_SoftwareVersion; + static const Key kConfigKey_SoftwareUpdateCompleted; // CHIP Counter Keys static const Key kCounterKey_RebootCount; diff --git a/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.cpp index 46ad467ca470ba..8b3e7491eec3bb 100644 --- a/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.cpp @@ -25,17 +25,16 @@ #include #include -#include -#include #include #include +#include #include namespace chip { namespace DeviceLayer { namespace PersistedStorage { -constexpr size_t kMaxNumberOfKeys = 150; +constexpr size_t kMaxNumberOfKeys = 200; constexpr size_t kMaxKeyValueBytes = 255; Internal::RamStorage KeyValueStoreManagerImpl::sKeysStorage = { kNvmId_KvsKeys }; @@ -54,7 +53,7 @@ uint16_t GetStringKeyId(const char * key, uint16_t * freeId) for (keyId = 0; keyId < kMaxNumberOfKeys; keyId++) { uint16_t keyStringSize = kMaxKeyValueBytes; - pdmInternalId = Internal::RamStorageKey::GetPdmId(kKeyId_KvsKeys, keyId); + pdmInternalId = Internal::RamStorageKey::GetInternalId(kKeyId_KvsKeys, keyId); err = KeyValueStoreManagerImpl::sKeysStorage.Read(pdmInternalId, 0, (uint8_t *) keyString, &keyStringSize); if (err == CHIP_NO_ERROR) @@ -82,7 +81,8 @@ CHIP_ERROR KeyValueStoreManagerImpl::Init() { ChipLogProgress(DeviceLayer, "Cannot init KVS keys storage with id: %d. Error: %s", kNvmId_KvsKeys, ErrorStr(err)); } - err = sValuesStorage.Init(Internal::RamStorage::kRamBufferInitialSize); + // Set values storage to max RAM buffer size as a temporary fix for TC-RR-1.1. + err = sValuesStorage.Init(kRamBufferMaxAllocSize, true); if (err != CHIP_NO_ERROR) { ChipLogProgress(DeviceLayer, "Cannot init KVS values storage with id: %d. Error: %s", kNvmId_KvsValues, ErrorStr(err)); @@ -106,7 +106,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t if (keyId < kMaxNumberOfKeys) { // This is the ID of the actual data - pdmInternalId = Internal::RamStorageKey::GetPdmId(kKeyId_KvsValues, keyId); + pdmInternalId = Internal::RamStorageKey::GetInternalId(kKeyId_KvsValues, keyId); ChipLogProgress(DeviceLayer, "KVS, get the value of Matter key [%s] with PDM id: %i", key, pdmInternalId); err = KeyValueStoreManagerImpl::sValuesStorage.Read(pdmInternalId, 0, (uint8_t *) value, &valueSize); *read_bytes_size = valueSize; @@ -140,7 +140,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, keyId = freeKeyId; } - pdmInternalId = Internal::RamStorageKey::GetPdmId(kKeyId_KvsValues, keyId); + pdmInternalId = Internal::RamStorageKey::GetInternalId(kKeyId_KvsValues, keyId); ChipLogProgress(DeviceLayer, "KVS, save in flash the value of the Matter key [%s] with PDM id: %i", key, pdmInternalId); err = sValuesStorage.Write(pdmInternalId, (uint8_t *) value, value_size); @@ -150,7 +150,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, { if (putKey) { - pdmInternalId = Internal::RamStorageKey::GetPdmId(kKeyId_KvsKeys, keyId); + pdmInternalId = Internal::RamStorageKey::GetInternalId(kKeyId_KvsKeys, keyId); ChipLogProgress(DeviceLayer, "KVS, save in flash the Matter key [%s] with PDM id: %i and length %d", key, pdmInternalId, strlen(key) + 1); @@ -185,7 +185,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Delete(const char * key) if (keyId < kMaxNumberOfKeys) { // entry exists so we can remove it - pdmInternalId = Internal::RamStorageKey::GetPdmId(kKeyId_KvsKeys, keyId); + pdmInternalId = Internal::RamStorageKey::GetInternalId(kKeyId_KvsKeys, keyId); ChipLogProgress(DeviceLayer, "KVS, delete from flash the Matter key [%s] with PDM id: %i", key, pdmInternalId); err = sKeysStorage.Delete(pdmInternalId, -1); @@ -193,7 +193,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Delete(const char * key) /* also delete the 'key string' from flash */ if (err == CHIP_NO_ERROR) { - pdmInternalId = Internal::RamStorageKey::GetPdmId(kKeyId_KvsValues, keyId); + pdmInternalId = Internal::RamStorageKey::GetInternalId(kKeyId_KvsValues, keyId); ChipLogProgress(DeviceLayer, "KVS, delete from flash the value of the Matter key [%s] with PDM id: %i", key, pdmInternalId); diff --git a/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.h b/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.h index db9036eb3586e2..a83a29b8a2e3ef 100644 --- a/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.h +++ b/src/platform/nxp/k32w/k32w0/KeyValueStoreManagerImpl.h @@ -24,7 +24,7 @@ #pragma once -#include +#include namespace chip { namespace DeviceLayer { diff --git a/src/platform/nxp/k32w/k32w0/LowPowerHooks.cpp b/src/platform/nxp/k32w/k32w0/LowPowerHooks.cpp index eb980e179882b1..a9bbcac8613d8f 100644 --- a/src/platform/nxp/k32w/k32w0/LowPowerHooks.cpp +++ b/src/platform/nxp/k32w/k32w0/LowPowerHooks.cpp @@ -20,7 +20,7 @@ * Provides a glue layer between Matter and NXP-SDK Low Power */ -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) #include #include diff --git a/src/platform/nxp/k32w/k32w0/OTAFactoryDataProcessor.cpp b/src/platform/nxp/k32w/k32w0/OTAFactoryDataProcessor.cpp index 8a3a9b7b661779..dbf7d09c892de4 100644 --- a/src/platform/nxp/k32w/k32w0/OTAFactoryDataProcessor.cpp +++ b/src/platform/nxp/k32w/k32w0/OTAFactoryDataProcessor.cpp @@ -27,8 +27,6 @@ namespace chip { -static OtaUtils_EEPROM_ReadData pFunctionEepromRead = (OtaUtils_EEPROM_ReadData) FactoryProvider::ReadDataMemcpy; - CHIP_ERROR OTAFactoryDataProcessor::Init() { mAccumulator.Init(mLength); @@ -81,7 +79,7 @@ CHIP_ERROR OTAFactoryDataProcessor::ApplyAction() SuccessOrExit(error = Update((uint8_t) Tags::kPaiCertificateId, mPayload.mCertPai)); SuccessOrExit(error = Update((uint8_t) Tags::kCertDeclarationId, mPayload.mCertDeclaration)); - error = FactoryProvider::GetDefaultInstance().UpdateData(mFactoryData); + error = FactoryProviderImpl::UpdateData(mFactoryData); exit: if (error != CHIP_NO_ERROR) @@ -99,7 +97,7 @@ CHIP_ERROR OTAFactoryDataProcessor::ApplyAction() CHIP_ERROR OTAFactoryDataProcessor::AbortAction() { ReturnErrorOnFailure(Restore()); - ReturnErrorOnFailure(FactoryProvider::GetDefaultInstance().UpdateData(mFactoryData)); + ReturnErrorOnFailure(FactoryProviderImpl::UpdateData(mFactoryData)); PDM_vDeleteDataRecord(kNvmId_FactoryDataBackup); @@ -158,20 +156,12 @@ CHIP_ERROR OTAFactoryDataProcessor::Update(uint8_t tag, Optional & opt CHIP_ERROR OTAFactoryDataProcessor::Read() { FactoryProvider::Header header; - auto status = OtaUtils_ReadFromInternalFlash(sizeof(FactoryProvider::Header), FactoryProvider::kFactoryDataStart, - (uint8_t *) &header, NULL, pFunctionEepromRead); + memcpy(&header, (void *) FactoryProvider::kFactoryDataStart, sizeof(FactoryProvider::Header)); mFactoryData = static_cast(chip::Platform::MemoryAlloc(FactoryProvider::kFactoryDataSize)); ReturnErrorCodeIf(mFactoryData == nullptr, CHIP_FACTORY_DATA_NULL); memset(mFactoryData, 0, FactoryProvider::kFactoryDataSize); - - status = OtaUtils_ReadFromInternalFlash(sizeof(FactoryProvider::Header) + header.size, FactoryProvider::kFactoryDataStart, - mFactoryData, NULL, pFunctionEepromRead); - if (status != gOtaUtilsSuccess_c) - { - ClearBuffer(); - return CHIP_FACTORY_DATA_INTERNAL_FLASH_READ; - } + memcpy(mFactoryData, (void *) FactoryProvider::kFactoryDataStart, sizeof(FactoryProvider::Header) + header.size); return CHIP_NO_ERROR; } diff --git a/src/platform/nxp/k32w/k32w0/OTAFactoryDataProcessor.h b/src/platform/nxp/k32w/k32w0/OTAFactoryDataProcessor.h index e40e81f199c1ac..8682d0bcc1e9dc 100644 --- a/src/platform/nxp/k32w/k32w0/OTAFactoryDataProcessor.h +++ b/src/platform/nxp/k32w/k32w0/OTAFactoryDataProcessor.h @@ -21,13 +21,15 @@ #include #include #include +#include #include -#include +#include namespace chip { -using FactoryProvider = DeviceLayer::K32W0FactoryDataProvider; -using Tags = FactoryProvider::FactoryDataId; +using FactoryProvider = DeviceLayer::FactoryDataProvider; +using FactoryProviderImpl = DeviceLayer::FactoryDataProviderImpl; +using Tags = FactoryProvider::FactoryDataId; /** * OTA custom payload that uses Matter TLVs. diff --git a/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.cpp index 05e53f40bd044a..198f9318ba41fb 100644 --- a/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/PlatformManagerImpl.cpp @@ -56,7 +56,7 @@ namespace DeviceLayer { PlatformManagerImpl PlatformManagerImpl::sInstance; -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) extern "C" void InitLowPower(); #endif @@ -97,7 +97,7 @@ CHIP_ERROR PlatformManagerImpl::InitBoardFwk(void) BOARD_ADCWakeupInit(); #endif -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) /* Low Power Init */ InitLowPower(); #endif diff --git a/src/platform/nxp/k32w/common/RamStorage.cpp b/src/platform/nxp/k32w/k32w0/RamStorage.cpp similarity index 74% rename from src/platform/nxp/k32w/common/RamStorage.cpp rename to src/platform/nxp/k32w/k32w0/RamStorage.cpp index d02537ff6f4be5..db7ab50a0f1247 100644 --- a/src/platform/nxp/k32w/common/RamStorage.cpp +++ b/src/platform/nxp/k32w/k32w0/RamStorage.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include "pdm_ram_storage_glue.h" @@ -39,13 +39,41 @@ #define ot_free(...) #endif +#if PDM_SAVE_IDLE +// Segment data size is: D_SEGMENT_MEMORY_SIZE (4096) - D_PDM_NVM_SEGMENT_HEADER_SIZE (size of internal header). +// Subtract 64 to have more margin. +#define PDM_SEGMENT_SIZE (4096 - 64) +#endif + namespace chip::DeviceLayer::Internal { -CHIP_ERROR RamStorage::Init(uint16_t aInitialSize) +RamStorageKey::RamStorageKey(RamStorage * storage, uint8_t keyId, uint8_t internalId) +{ + mStorage = storage; + mId = GetInternalId(keyId, internalId); +} + +CHIP_ERROR RamStorageKey::Read(uint8_t * buf, uint16_t & sizeToRead) const +{ + return mStorage->Read(mId, 0, buf, &sizeToRead); +} + +CHIP_ERROR RamStorageKey::Write(const uint8_t * buf, uint16_t length) +{ + return mStorage->Write(mId, buf, length); +} + +CHIP_ERROR RamStorageKey::Delete() +{ + return mStorage->Delete(mId, -1); +} + +CHIP_ERROR RamStorage::Init(uint16_t aInitialSize, bool extendedSearch) { CHIP_ERROR err; - mBuffer = getRamBuffer(mPdmId, aInitialSize); + mBuffer = getRamBuffer(mPdmId, aInitialSize, extendedSearch); + mExtendedSearch = extendedSearch; return mBuffer ? CHIP_NO_ERROR : CHIP_ERROR_NO_MEMORY; } @@ -124,8 +152,25 @@ CHIP_ERROR RamStorage::Delete(uint16_t aKey, int aIndex) void RamStorage::OnFactoryReset() { + uint16_t i = 0; + uint16_t length; + mutex_lock(mBuffer, osaWaitForever_c); - PDM_vDeleteDataRecord(mPdmId); + // Have to cover the extended search case, in which a large RAM + // buffer is saved at multiple PDM ids. + if (mExtendedSearch) + { + while (PDM_bDoesDataExist(mPdmId + i, &length)) + { + ChipLogProgress(DeviceLayer, "Ram Storage: delete PDM id: %x", mPdmId + i); + PDM_vDeleteDataRecord(mPdmId + i); + i++; + } + } + else + { + PDM_vDeleteDataRecord(mPdmId); + } mutex_unlock(mBuffer); FreeBuffer(); } diff --git a/src/platform/nxp/k32w/common/RamStorage.h b/src/platform/nxp/k32w/k32w0/RamStorage.h similarity index 68% rename from src/platform/nxp/k32w/common/RamStorage.h rename to src/platform/nxp/k32w/k32w0/RamStorage.h index 767f850c250046..5b244b69df2bad 100644 --- a/src/platform/nxp/k32w/common/RamStorage.h +++ b/src/platform/nxp/k32w/k32w0/RamStorage.h @@ -26,9 +26,31 @@ namespace chip { namespace DeviceLayer { namespace Internal { +class RamStorage; + +/** + * + * This class describes a RAM storage key wrapper. + */ +struct RamStorageKey +{ + RamStorageKey(RamStorage * storage, uint8_t keyId, uint8_t internalId); + + CHIP_ERROR Read(uint8_t * buf, uint16_t & sizeToRead) const; + CHIP_ERROR Write(const uint8_t * buf, uint16_t length); + CHIP_ERROR Delete(); + + static uint16_t GetInternalId(uint8_t keyId, uint8_t internalId) { return static_cast(keyId) << 8 | internalId; } + +private: + RamStorage * mStorage; + uint16_t mId; +}; + /** * - * All ram storage operations should be managed by this class. + * This class manages a RAM buffer and its operations. + * All operations on the buffer are protected by a mutex. */ class RamStorage { @@ -39,7 +61,7 @@ class RamStorage RamStorage(uint16_t aPdmId) : mPdmId(aPdmId), mBuffer(nullptr) {} - CHIP_ERROR Init(uint16_t aInitialSize); + CHIP_ERROR Init(uint16_t aInitialSize, bool extendedSearch = false); void FreeBuffer(); Buffer * GetBuffer() const { return mBuffer; } CHIP_ERROR Read(uint16_t aKey, int aIndex, uint8_t * aValue, uint16_t * aValueLength) const; @@ -53,6 +75,7 @@ class RamStorage uint16_t mPdmId; Buffer * mBuffer; + bool mExtendedSearch; }; } // namespace Internal diff --git a/src/platform/nxp/k32w/k32w0/ThreadStackManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/ThreadStackManagerImpl.cpp index d525fc4a1e3ee7..e67680554fc0a9 100644 --- a/src/platform/nxp/k32w/k32w0/ThreadStackManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/ThreadStackManagerImpl.cpp @@ -36,7 +36,7 @@ #include -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) extern "C" bool isThreadInitialized(); #endif @@ -68,8 +68,16 @@ CHIP_ERROR ThreadStackManagerImpl::InitThreadStack(otInstance * otInst) void ThreadStackManagerImpl::ProcessThreadActivity() { + /* reuse thread task for ble processing. + * by doing this, we avoid allocating a new stack for short-lived + * BLE processing (e.g.: only during Matter commissioning) + */ +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + auto * bleManager = &chip::DeviceLayer::Internal::BLEMgrImpl(); + bleManager->DoBleProcessing(); +#endif -#if defined(cPWR_UsePowerDownMode) && (cPWR_UsePowerDownMode) +#if defined(chip_with_low_power) && (chip_with_low_power == 1) if (isThreadInitialized()) #endif { diff --git a/src/platform/nxp/k32w/k32w0/args.gni b/src/platform/nxp/k32w/k32w0/args.gni index 0364287bd8196c..59a41ae6931585 100644 --- a/src/platform/nxp/k32w/k32w0/args.gni +++ b/src/platform/nxp/k32w/k32w0/args.gni @@ -18,6 +18,12 @@ import("//build_overrides/openthread.gni") chip_device_platform = "k32w0" +if (getenv("NXP_K32W0_SDK_ROOT") == "") { + k32w0_sdk_root = "${chip_root}/third_party/nxp/k32w0_sdk/repo/core" +} else { + k32w0_sdk_root = getenv("NXP_K32W0_SDK_ROOT") +} + lwip_platform = "k32w0" chip_inet_config_enable_ipv4 = false diff --git a/src/platform/nxp/k32w/k32w0/crypto/ksdk_mbedtls.c b/src/platform/nxp/k32w/k32w0/crypto/ksdk_mbedtls.c deleted file mode 100644 index 14f1070097393d..00000000000000 --- a/src/platform/nxp/k32w/k32w0/crypto/ksdk_mbedtls.c +++ /dev/null @@ -1,4324 +0,0 @@ -/* - * Copyright 2015-2016, Freescale Semiconductor, Inc. - * Copyright 2017 NXP - * All rights reserved. - * - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include "SecLib.h" - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "fsl_common.h" - -#if defined(FSL_FEATURE_SOC_LTC_COUNT) && (FSL_FEATURE_SOC_LTC_COUNT > 0) -#include "fsl_ltc.h" -#endif -#if defined(FSL_FEATURE_SOC_CAAM_COUNT) && (FSL_FEATURE_SOC_CAAM_COUNT > 0) -#include "fsl_caam.h" -#endif -#if defined(FSL_FEATURE_SOC_CAU3_COUNT) && (FSL_FEATURE_SOC_CAU3_COUNT > 0) -#include "fsl_cau3.h" -#endif -#if defined(FSL_FEATURE_SOC_DCP_COUNT) && (FSL_FEATURE_SOC_DCP_COUNT > 0) -#include "fsl_dcp.h" -#endif -#if defined(FSL_FEATURE_SOC_HASHCRYPT_COUNT) && (FSL_FEATURE_SOC_HASHCRYPT_COUNT > 0) -#include "fsl_hashcrypt.h" -#endif -#if defined(FSL_FEATURE_SOC_TRNG_COUNT) && (FSL_FEATURE_SOC_TRNG_COUNT > 0) -#if defined CPU_JN518X -#include "fsl_rng.h" -#else -#include "fsl_trng.h" -#endif -#elif defined(FSL_FEATURE_SOC_RNG_COUNT) && (FSL_FEATURE_SOC_RNG_COUNT > 0) -#include "fsl_rnga.h" -#elif defined(FSL_FEATURE_SOC_LPC_RNG1_COUNT) && (FSL_FEATURE_SOC_LPC_RNG1_COUNT > 0) -#include "fsl_rng.h" -#endif - -#define CLEAN_RETURN(value) \ - { \ - ret = value; \ - goto cleanup; \ - } - -/******************************************************************************/ -/*************************** CAAM *********************************************/ -/******************************************************************************/ -#if defined(FSL_FEATURE_SOC_CAAM_COUNT) && (FSL_FEATURE_SOC_CAAM_COUNT > 0) && defined(CRYPTO_USE_DRIVER_CAAM) -static caam_handle_t s_caamHandle = { .jobRing = kCAAM_JobRing0 }; -#endif - -/******************************************************************************/ -/*************************** CAU3 *********************************************/ -/******************************************************************************/ -#if defined(FSL_FEATURE_SOC_CAU3_COUNT) && (FSL_FEATURE_SOC_CAU3_COUNT > 0) -static cau3_handle_t s_cau3Handle = { .taskDone = MBEDTLS_CAU3_COMPLETION_SIGNAL, .keySlot = kCAU3_KeySlot0 }; -#endif - -/******************************************************************************/ -/**************************** DCP *********************************************/ -/******************************************************************************/ -#if defined(FSL_FEATURE_SOC_DCP_COUNT) && (FSL_FEATURE_SOC_DCP_COUNT > 0) -static dcp_handle_t s_dcpHandle = { .channel = kDCP_Channel0, .keySlot = kDCP_KeySlot0, .swapConfig = kDCP_NoSwap }; -#endif - -/******************************************************************************/ -/************************* Key slot management ********************************/ -/******************************************************************************/ -#if (defined(FSL_FEATURE_SOC_CAU3_COUNT) && (FSL_FEATURE_SOC_CAU3_COUNT > 0)) || (defined(MBEDTLS_FREESCALE_DCP_AES)) -static const void * s_mbedtlsCtx[4] = { 0 }; - -static void crypto_attach_ctx_to_key_slot(const void * ctx, uint8_t keySlot) -{ - s_mbedtlsCtx[keySlot] = ctx; -} - -static void crypto_detach_ctx_from_key_slot(const void * ctx) -{ - for (int i = 0; i < 4; i++) - { - if (ctx == s_mbedtlsCtx[i]) - { - s_mbedtlsCtx[i] = NULL; - break; - } - } -} - -static bool crypto_key_is_loaded(const void * ctx) -{ - bool ret = false; - for (int i = 0; i < 4; i++) - { - if (ctx == s_mbedtlsCtx[i]) - { - ret = true; - break; - } - } - return ret; -} -#endif - -#if defined(MBEDTLS_SHA1_ALT) || defined(MBEDTLS_SHA256_ALT) -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize(void * v, size_t n) -{ - volatile unsigned char * p = v; - while (n--) - *p++ = 0; -} -#endif /* MBEDTLS_SHA1_ALT || MBEDTLS_SHA256_ALT */ - -/******************************************************************************/ -/******************** CRYPTO_InitHardware **************************************/ -/******************************************************************************/ -/*! - * @brief Application init for various Crypto blocks. - * - * This function is provided to be called by MCUXpresso SDK applications. - * It calls basic init for Crypto Hw acceleration and Hw entropy modules. - */ -void CRYPTO_InitHardware(void) -{ -#if defined(FSL_FEATURE_SOC_LTC_COUNT) && (FSL_FEATURE_SOC_LTC_COUNT > 0) - /* Initialize LTC driver. - * This enables clocking and resets the module to a known state. */ - LTC_Init(LTC0); -#endif -#if defined(FSL_FEATURE_SOC_CAAM_COUNT) && (FSL_FEATURE_SOC_CAAM_COUNT > 0) && defined(CRYPTO_USE_DRIVER_CAAM) - /* Initialize CAAM driver. */ - caam_config_t caamConfig; - - CAAM_GetDefaultConfig(&caamConfig); - caamConfig.jobRingInterface[0] = &s_jrif0; - caamConfig.jobRingInterface[1] = &s_jrif1; - CAAM_Init(CAAM, &caamConfig); -#endif -#if defined(FSL_FEATURE_SOC_CAU3_COUNT) && (FSL_FEATURE_SOC_CAU3_COUNT > 0) - /* Initialize CAU3 */ - CAU3_Init(CAU3); -#endif -#if defined(FSL_FEATURE_SOC_DCP_COUNT) && (FSL_FEATURE_SOC_DCP_COUNT > 0) - /* Initialize DCP */ - dcp_config_t dcpConfig; - - DCP_GetDefaultConfig(&dcpConfig); - DCP_Init(DCP, &dcpConfig); -#endif -#if defined(FSL_FEATURE_SOC_CASPER_COUNT) && (FSL_FEATURE_SOC_CASPER_COUNT > 0) - /* Initialize CASPER */ - CASPER_Init(CASPER); -#endif -#if defined(FSL_FEATURE_SOC_HASHCRYPT_COUNT) && (FSL_FEATURE_SOC_HASHCRYPT_COUNT > 0) - /* Initialize HASHCRYPT */ - HASHCRYPT_Init(HASHCRYPT); -#endif - { /* Init RNG module.*/ -#if defined(FSL_FEATURE_SOC_TRNG_COUNT) && (FSL_FEATURE_SOC_TRNG_COUNT > 0) -#if defined CPU_JN518X -#if defined(RNG) -#define TRNG0 RNG -#endif -#else -#if defined(TRNG) -#define TRNG0 TRNG -#endif -#endif - trng_config_t trngConfig; - - TRNG_GetDefaultConfig(&trngConfig); - /* Set sample mode of the TRNG ring oscillator to Von Neumann, for better random data.*/ - /* Initialize TRNG */ - TRNG_Init(TRNG0, &trngConfig); -#elif defined(FSL_FEATURE_SOC_RNG_COUNT) && (FSL_FEATURE_SOC_RNG_COUNT > 0) - RNGA_Init(RNG); - RNGA_Seed(RNG, SIM->UIDL); -#endif - } -} - -/******************************************************************************/ -/*************************** DES **********************************************/ -/******************************************************************************/ - -#if defined(MBEDTLS_DES_C) - -#if defined(MBEDTLS_FREESCALE_LTC_DES) || defined(MBEDTLS_FREESCALE_MMCAU_DES) || defined(MBEDTLS_FREESCALE_CAAM_DES) || \ - defined(MBEDTLS_FREESCALE_CAU3_DES) - -#include "mbedtls/des.h" - -#if defined(MBEDTLS_FREESCALE_MMCAU_DES) -const unsigned char parityLookup[128] = { 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, - 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, - 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, - 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, - 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 }; -#endif - -#if defined(MBEDTLS_FREESCALE_MMCAU_DES) || defined(MBEDTLS_FREESCALE_LTC_DES) || defined(MBEDTLS_FREESCALE_CAAM_DES) -/* - * DES key schedule (56-bit, encryption) - */ -int mbedtls_des_setkey_enc(mbedtls_des_context * ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE]) -{ -#if defined(MBEDTLS_FREESCALE_LTC_DES) || defined(MBEDTLS_FREESCALE_CAAM_DES) - memcpy(ctx->sk, key, MBEDTLS_DES_KEY_SIZE); -#elif defined(MBEDTLS_FREESCALE_MMCAU_DES) - int i; - unsigned char * sk_b = (unsigned char *) ctx->sk; - - /* fix key parity, if needed */ - for (i = 0; i < MBEDTLS_DES_KEY_SIZE; i++) - { - sk_b[i] = ((key[i] & 0xFE) | parityLookup[key[i] >> 1]); - } -#endif - ctx->mode = MBEDTLS_DES_ENCRYPT; - - return (0); -} - -/* - * DES key schedule (56-bit, decryption) - */ -int mbedtls_des_setkey_dec(mbedtls_des_context * ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE]) -{ -#if defined(MBEDTLS_FREESCALE_LTC_DES) || defined(MBEDTLS_FREESCALE_CAAM_DES) - memcpy(ctx->sk, key, MBEDTLS_DES_KEY_SIZE); -#elif defined(MBEDTLS_FREESCALE_MMCAU_DES) - int i; - unsigned char * sk_b = (unsigned char *) ctx->sk; - - /* fix key parity, if needed */ - for (i = 0; i < MBEDTLS_DES_KEY_SIZE; i++) - { - sk_b[i] = ((key[i] & 0xFE) | parityLookup[key[i] >> 1]); - } -#endif - ctx->mode = MBEDTLS_DES_DECRYPT; - - return (0); -} -#endif /* MBEDTLS_FREESCALE_MMCAU_DES || MBEDTLS_FREESCALE_LTC_DES || MBEDTLS_FREESCALE_CAAM_DES */ - -/* - * Triple-DES key schedule (112-bit, encryption) - */ -int mbedtls_des3_set2key_enc(mbedtls_des3_context * ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE * 2]) -{ -#if defined(MBEDTLS_FREESCALE_LTC_DES) || defined(MBEDTLS_FREESCALE_CAAM_DES) || defined(MBEDTLS_FREESCALE_CAU3_DES) - memcpy(ctx->sk, key, MBEDTLS_DES_KEY_SIZE * 2); - memcpy(&ctx->sk[4], key, MBEDTLS_DES_KEY_SIZE); /* K3 = K1 */ -#if defined(MBEDTLS_FREESCALE_CAU3_DES) - crypto_detach_ctx_from_key_slot(ctx); -#endif -#elif defined(MBEDTLS_FREESCALE_MMCAU_DES) - int i; - unsigned char * sk_b = (unsigned char *) ctx->sk; - - /* fix key parity, if needed */ - for (i = 0; i < MBEDTLS_DES_KEY_SIZE * 2; i++) - { - sk_b[i] = ((key[i] & 0xFE) | parityLookup[key[i] >> 1]); - } - for (i = MBEDTLS_DES_KEY_SIZE * 2; i < MBEDTLS_DES_KEY_SIZE * 3; i++) - { - sk_b[i] = ((key[i - MBEDTLS_DES_KEY_SIZE * 2] & 0xFE) | parityLookup[key[i - MBEDTLS_DES_KEY_SIZE * 2] >> 1]); - } -#endif - ctx->mode = MBEDTLS_DES_ENCRYPT; - - return (0); -} - -/* - * Triple-DES key schedule (112-bit, decryption) - */ -int mbedtls_des3_set2key_dec(mbedtls_des3_context * ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE * 2]) -{ -#if defined(MBEDTLS_FREESCALE_LTC_DES) || defined(MBEDTLS_FREESCALE_CAAM_DES) || defined(MBEDTLS_FREESCALE_CAU3_DES) - memcpy(ctx->sk, key, MBEDTLS_DES_KEY_SIZE * 2); - memcpy(&ctx->sk[4], key, MBEDTLS_DES_KEY_SIZE); /* K3 = K1 */ -#if defined(MBEDTLS_FREESCALE_CAU3_DES) - crypto_detach_ctx_from_key_slot(ctx); -#endif -#elif defined(MBEDTLS_FREESCALE_MMCAU_DES) - int i; - unsigned char * sk_b = (unsigned char *) ctx->sk; - - /* fix key parity, if needed */ - for (i = 0; i < MBEDTLS_DES_KEY_SIZE * 2; i++) - { - sk_b[i] = ((key[i] & 0xFE) | parityLookup[key[i] >> 1]); - } - for (i = MBEDTLS_DES_KEY_SIZE * 2; i < MBEDTLS_DES_KEY_SIZE * 3; i++) - { - sk_b[i] = ((key[i - MBEDTLS_DES_KEY_SIZE * 2] & 0xFE) | parityLookup[key[i - MBEDTLS_DES_KEY_SIZE * 2] >> 1]); - } -#endif - ctx->mode = MBEDTLS_DES_DECRYPT; - - return (0); -} - -/* - * Triple-DES key schedule (168-bit, encryption) - */ -int mbedtls_des3_set3key_enc(mbedtls_des3_context * ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE * 3]) -{ -#if defined(MBEDTLS_FREESCALE_LTC_DES) || defined(MBEDTLS_FREESCALE_CAAM_DES) || defined(MBEDTLS_FREESCALE_CAU3_DES) - memcpy(ctx->sk, key, MBEDTLS_DES_KEY_SIZE * 3); -#if defined(MBEDTLS_FREESCALE_CAU3_DES) - crypto_detach_ctx_from_key_slot(ctx); -#endif -#elif defined(MBEDTLS_FREESCALE_MMCAU_DES) - int i; - unsigned char * sk_b = (unsigned char *) ctx->sk; - - /* fix key parity, if needed */ - for (i = 0; i < MBEDTLS_DES_KEY_SIZE * 3; i++) - { - sk_b[i] = ((key[i] & 0xFE) | parityLookup[key[i] >> 1]); - } -#endif - ctx->mode = MBEDTLS_DES_ENCRYPT; - - return (0); -} - -/* - * Triple-DES key schedule (168-bit, decryption) - */ -int mbedtls_des3_set3key_dec(mbedtls_des3_context * ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE * 3]) -{ -#if defined(MBEDTLS_FREESCALE_LTC_DES) || defined(MBEDTLS_FREESCALE_CAAM_DES) || defined(MBEDTLS_FREESCALE_CAU3_DES) - memcpy(ctx->sk, key, MBEDTLS_DES_KEY_SIZE * 3); -#if defined(MBEDTLS_FREESCALE_CAU3_DES) - crypto_detach_ctx_from_key_slot(ctx); -#endif -#elif defined(MBEDTLS_FREESCALE_MMCAU_DES) - int i; - unsigned char * sk_b = (unsigned char *) ctx->sk; - - /* fix key parity, if needed */ - for (i = 0; i < MBEDTLS_DES_KEY_SIZE * 3; i++) - { - sk_b[i] = ((key[i] & 0xFE) | parityLookup[key[i] >> 1]); - } -#endif - ctx->mode = MBEDTLS_DES_DECRYPT; - return (0); -} - -#if defined(MBEDTLS_FREESCALE_LTC_DES) || defined(MBEDTLS_FREESCALE_MMCAU_DES) || defined(MBEDTLS_FREESCALE_CAAM_DES) -/* - * DES-ECB block encryption/decryption - */ -int mbedtls_des_crypt_ecb(mbedtls_des_context * ctx, const unsigned char input[8], unsigned char output[8]) -{ - uint8_t * key = (uint8_t *) ctx->sk; -#if defined(MBEDTLS_FREESCALE_LTC_DES) - if (ctx->mode == MBEDTLS_DES_ENCRYPT) - { - LTC_DES_EncryptEcb(LTC_INSTANCE, input, output, 8, key); - } - else - { - LTC_DES_DecryptEcb(LTC_INSTANCE, input, output, 8, key); - } -#elif defined(MBEDTLS_FREESCALE_MMCAU_DES) - if (ctx->mode == MBEDTLS_DES_ENCRYPT) - { - MMCAU_DES_EncryptEcb(input, key, output); - } - else - { - MMCAU_DES_DecryptEcb(input, key, output); - } -#elif defined(MBEDTLS_FREESCALE_CAAM_DES) - if (ctx->mode == MBEDTLS_DES_ENCRYPT) - { - CAAM_DES_EncryptEcb(CAAM_INSTANCE, &s_caamHandle, input, output, 8, key); - } - else - { - CAAM_DES_DecryptEcb(CAAM_INSTANCE, &s_caamHandle, input, output, 8, key); - } -#endif - return (0); -} -#endif /* MBEDTLS_FREESCALE_LTC_DES || MBEDTLS_FREESCALE_MMCAU_DES || MBEDTLS_FREESCALE_CAAM_DES */ - -/* - * 3DES-ECB block encryption/decryption - */ -int mbedtls_des3_crypt_ecb(mbedtls_des3_context * ctx, const unsigned char input[8], unsigned char output[8]) -{ - uint8_t * key = (uint8_t *) ctx->sk; -#if defined(MBEDTLS_FREESCALE_LTC_DES) - if (ctx->mode == MBEDTLS_DES_ENCRYPT) - { - LTC_DES3_EncryptEcb(LTC_INSTANCE, input, output, 8, key, key + 8, key + 16); - } - else - { - LTC_DES3_DecryptEcb(LTC_INSTANCE, input, output, 8, key, key + 8, key + 16); - } -#elif defined(MBEDTLS_FREESCALE_MMCAU_DES) - if (ctx->mode == MBEDTLS_DES_ENCRYPT) - { - MMCAU_DES_EncryptEcb(input, key, output); - MMCAU_DES_DecryptEcb(output, key + 8, output); - MMCAU_DES_EncryptEcb(output, key + 16, output); - } - else - { - MMCAU_DES_DecryptEcb(input, key + 16, output); - MMCAU_DES_EncryptEcb(output, key + 8, output); - MMCAU_DES_DecryptEcb(output, key, output); - } -#elif defined(MBEDTLS_FREESCALE_CAAM_DES) - if (ctx->mode == MBEDTLS_DES_ENCRYPT) - { - CAAM_DES3_EncryptEcb(CAAM_INSTANCE, &s_caamHandle, input, output, 8, key, key + 8, key + 16); - } - else - { - CAAM_DES3_DecryptEcb(CAAM_INSTANCE, &s_caamHandle, input, output, 8, key, key + 8, key + 16); - } -#elif defined(MBEDTLS_FREESCALE_CAU3_DES) - if (!crypto_key_is_loaded(ctx)) - { - CAU3_TDES_SetKey(CAU3, &s_cau3Handle, key, 24); - crypto_attach_ctx_to_key_slot(ctx, s_cau3Handle.keySlot); - } - - if (ctx->mode == MBEDTLS_DES_ENCRYPT) - { - CAU3_TDES_Encrypt(CAU3, &s_cau3Handle, input, output); - } - else - { - CAU3_TDES_Decrypt(CAU3, &s_cau3Handle, input, output); - } -#endif - return (0); -} - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -/* - * DES-CBC buffer encryption/decryption - */ -#if defined(MBEDTLS_FREESCALE_LTC_DES) -int mbedtls_des_crypt_cbc(mbedtls_des_context * ctx, int mode, size_t length, unsigned char iv[8], const unsigned char * input, - unsigned char * output) -{ - unsigned char temp[8]; - uint8_t * key = (uint8_t *) ctx->sk; - - if (length % 8) - return (MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH); - - if (mode == MBEDTLS_DES_ENCRYPT) - { - LTC_DES_EncryptCbc(LTC_INSTANCE, input, output, length, iv, key); - memcpy(iv, output + length - 8, 8); - } - else /* MBEDTLS_DES_DECRYPT */ - { - memcpy(temp, input + length - 8, 8); - LTC_DES_DecryptCbc(LTC_INSTANCE, input, output, length, iv, key); - memcpy(iv, temp, 8); - } - return (0); -} - -/* - * 3DES-CBC buffer encryption/decryption - */ -int mbedtls_des3_crypt_cbc(mbedtls_des3_context * ctx, int mode, size_t length, unsigned char iv[8], const unsigned char * input, - unsigned char * output) -{ - unsigned char temp[8]; - uint8_t * key = (uint8_t *) ctx->sk; - - if (length % 8) - return (MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH); - - if (mode == MBEDTLS_DES_ENCRYPT) - { - LTC_DES3_EncryptCbc(LTC_INSTANCE, input, output, length, iv, key, key + 8, key + 16); - memcpy(iv, output + length - 8, 8); - } - else /* MBEDTLS_DES_DECRYPT */ - { - memcpy(temp, input + length - 8, 8); - LTC_DES3_DecryptCbc(LTC_INSTANCE, input, output, length, iv, key, key + 8, key + 16); - memcpy(iv, temp, 8); - } - - return (0); -} -#elif defined(MBEDTLS_FREESCALE_CAAM_DES) -int mbedtls_des_crypt_cbc(mbedtls_des_context * ctx, int mode, size_t length, unsigned char iv[8], const unsigned char * input, - unsigned char * output) -{ - unsigned char temp[8]; - uint8_t * key = (uint8_t *) ctx->sk; - - if (length % 8) - return (MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH); - - if (mode == MBEDTLS_DES_ENCRYPT) - { - CAAM_DES_EncryptCbc(CAAM_INSTANCE, &s_caamHandle, input, output, length, iv, key); - memcpy(iv, output + length - 8, 8); - } - else /* MBEDTLS_DES_DECRYPT */ - { - memcpy(temp, input + length - 8, 8); - CAAM_DES_DecryptCbc(CAAM_INSTANCE, &s_caamHandle, input, output, length, iv, key); - memcpy(iv, temp, 8); - } - return (0); -} - -/* - * 3DES-CBC buffer encryption/decryption - */ -int mbedtls_des3_crypt_cbc(mbedtls_des3_context * ctx, int mode, size_t length, unsigned char iv[8], const unsigned char * input, - unsigned char * output) -{ - unsigned char temp[8]; - uint8_t * key = (uint8_t *) ctx->sk; - - if (length % 8) - return (MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH); - - if (mode == MBEDTLS_DES_ENCRYPT) - { - CAAM_DES3_EncryptCbc(CAAM_INSTANCE, &s_caamHandle, input, output, length, iv, key, key + 8, key + 16); - memcpy(iv, output + length - 8, 8); - } - else /* MBEDTLS_DES_DECRYPT */ - { - memcpy(temp, input + length - 8, 8); - CAAM_DES3_DecryptCbc(CAAM_INSTANCE, &s_caamHandle, input, output, length, iv, key, key + 8, key + 16); - memcpy(iv, temp, 8); - } - - return (0); -} - -#endif /* MBEDTLS_FREESCALE_LTC_DES */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#endif /*MBEDTLS_FREESCALE_LTC_DES || MBEDTLS_FREESCALE_MMCAU_DES || MBEDTLS_FREESCALE_CAAM_DES*/ - -#endif /* MBEDTLS_DES_C */ - -/******************************************************************************/ -/*************************** AES **********************************************/ -/******************************************************************************/ - -#if defined(MBEDTLS_AES_C) - -#if defined(MBEDTLS_FREESCALE_LTC_AES) || defined(MBEDTLS_FREESCALE_MMCAU_AES) || defined(MBEDTLS_FREESCALE_LPC_AES) || \ - defined(MBEDTLS_FREESCALE_CAU3_AES) || defined(MBEDTLS_FREESCALE_CAAM_AES) || defined(MBEDTLS_FREESCALE_DCP_AES) - -#include "mbedtls/aes.h" - -/* - * AES key schedule (encryption) - */ -int mbedtls_aes_setkey_enc(mbedtls_aes_context * ctx, const unsigned char * key, unsigned int keybits) -{ - uint32_t * RK; - -#ifdef MBEDTLS_AES_ALT_NO_192 - if (keybits == 192u) - { - return (MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE); - } -#endif - -#ifdef MBEDTLS_AES_ALT_NO_256 - if (keybits == 256u) - { - return (MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE); - } -#endif - -#if defined(MBEDTLS_FREESCALE_LTC_AES) || defined(MBEDTLS_FREESCALE_LPC_AES) || defined(MBEDTLS_FREESCALE_CAU3_AES) || \ - defined(MBEDTLS_FREESCALE_CAAM_AES) || defined(MBEDTLS_FREESCALE_DCP_AES) - const unsigned char * key_tmp = key; - ctx->rk = RK = ctx->buf; - memcpy(RK, key_tmp, keybits / 8); - -#if defined(MBEDTLS_FREESCALE_CAU3_AES) || defined(MBEDTLS_FREESCALE_DCP_AES) - crypto_detach_ctx_from_key_slot(ctx); -#endif /* MBEDTLS_FREESCALE_CAU3_AES || MBEDTLS_FREESCALE_DCP_AES */ - - switch (keybits) - { /* Set keysize in bytes.*/ - case 128: - ctx->nr = 16; - break; - case 192: - ctx->nr = 24; - break; - case 256: - ctx->nr = 32; - break; - default: - return (MBEDTLS_ERR_AES_INVALID_KEY_LENGTH); - } -#elif defined(MBEDTLS_FREESCALE_MMCAU_AES) - ctx->rk = RK = ctx->buf; - - switch (keybits) - { - case 128: - ctx->nr = 10; - break; - case 192: - ctx->nr = 12; - break; - case 256: - ctx->nr = 14; - break; - default: - return (MBEDTLS_ERR_AES_INVALID_KEY_LENGTH); - } - - MMCAU_AES_SetKey(key, keybits / 8, (uint8_t *) RK); -#endif - - return (0); -} - -/* - * AES key schedule (decryption) - */ -int mbedtls_aes_setkey_dec(mbedtls_aes_context * ctx, const unsigned char * key, unsigned int keybits) -{ - uint32_t * RK; - -#ifdef MBEDTLS_AES_ALT_NO_192 - if (keybits == 192u) - { - return (MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE); - } -#endif - -#ifdef MBEDTLS_AES_ALT_NO_256 - if (keybits == 256u) - { - return (MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE); - } -#endif - - ctx->rk = RK = ctx->buf; - -#if defined(MBEDTLS_FREESCALE_LTC_AES) || defined(MBEDTLS_FREESCALE_LPC_AES) || defined(MBEDTLS_FREESCALE_CAU3_AES) || \ - defined(MBEDTLS_FREESCALE_CAAM_AES) || defined(MBEDTLS_FREESCALE_DCP_AES) - const unsigned char * key_tmp = key; - memcpy(RK, key_tmp, keybits / 8); - -#if defined(MBEDTLS_FREESCALE_CAU3_AES) || defined(MBEDTLS_FREESCALE_DCP_AES) - crypto_detach_ctx_from_key_slot(ctx); -#endif /* MBEDTLS_FREESCALE_CAU3_AES || MBEDTLS_FREESCALE_DCP_AES */ - - switch (keybits) - { - case 128: - ctx->nr = 16; - break; - case 192: - ctx->nr = 24; - break; - case 256: - ctx->nr = 32; - break; - default: - return (MBEDTLS_ERR_AES_INVALID_KEY_LENGTH); - } -#elif defined(MBEDTLS_FREESCALE_MMCAU_AES) - ctx->rk = RK = ctx->buf; - - switch (keybits) - { - case 128: - ctx->nr = 10; - break; - case 192: - ctx->nr = 12; - break; - case 256: - ctx->nr = 14; - break; - default: - return (MBEDTLS_ERR_AES_INVALID_KEY_LENGTH); - } - - MMCAU_AES_SetKey(key, keybits / 8, (uint8_t *) RK); -#endif - - return 0; -} - -/* - * AES-ECB block encryption - */ -int mbedtls_internal_aes_encrypt(mbedtls_aes_context * ctx, const unsigned char input[16], unsigned char output[16]) -{ - uint8_t * key; - - key = (uint8_t *) ctx->rk; -#if defined(MBEDTLS_FREESCALE_LTC_AES) - LTC_AES_EncryptEcb(LTC_INSTANCE, input, output, 16, key, ctx->nr); -#elif defined(MBEDTLS_FREESCALE_MMCAU_AES) - MMCAU_AES_EncryptEcb(input, key, ctx->nr, output); -#elif defined(MBEDTLS_FREESCALE_CAU3_AES) - if (!crypto_key_is_loaded(ctx)) - { - CAU3_AES_SetKey(CAU3, &s_cau3Handle, key, ctx->nr); - crypto_attach_ctx_to_key_slot(ctx, s_cau3Handle.keySlot); - } - CAU3_AES_Encrypt(CAU3, &s_cau3Handle, input, output); -#elif defined(MBEDTLS_FREESCALE_LPC_AES) - AES_128_Encrypt(input, key, output); -#elif defined(MBEDTLS_FREESCALE_CAAM_AES) - CAAM_AES_EncryptEcb(CAAM_INSTANCE, &s_caamHandle, input, output, 16, key, ctx->nr); -#elif defined(MBEDTLS_FREESCALE_DCP_AES) - if (!crypto_key_is_loaded(ctx)) - { - DCP_AES_SetKey(DCP, &s_dcpHandle, key, ctx->nr); - crypto_attach_ctx_to_key_slot(ctx, s_dcpHandle.keySlot); - } - DCP_AES_EncryptEcb(DCP, &s_dcpHandle, input, output, 16); -#endif - - return (0); -} - -/* - * AES-ECB block decryption - */ -int mbedtls_internal_aes_decrypt(mbedtls_aes_context * ctx, const unsigned char input[16], unsigned char output[16]) -{ - uint8_t * key; - - key = (uint8_t *) ctx->rk; -#if defined(MBEDTLS_FREESCALE_LTC_AES) - LTC_AES_DecryptEcb(LTC_INSTANCE, input, output, 16, key, ctx->nr, kLTC_EncryptKey); -#elif defined(MBEDTLS_FREESCALE_MMCAU_AES) - MMCAU_AES_DecryptEcb(input, key, ctx->nr, output); -#elif defined(MBEDTLS_FREESCALE_CAU3_AES) - if (!crypto_key_is_loaded(ctx)) - { - CAU3_AES_SetKey(CAU3, &s_cau3Handle, key, ctx->nr); - crypto_attach_ctx_to_key_slot(ctx, s_cau3Handle.keySlot); - } - CAU3_AES_Decrypt(CAU3, &s_cau3Handle, input, output); -#elif defined(MBEDTLS_FREESCALE_LPC_AES) - AES_128_Decrypt(input, key, output); -#elif defined(MBEDTLS_FREESCALE_CAAM_AES) - CAAM_AES_DecryptEcb(CAAM_INSTANCE, &s_caamHandle, input, output, 16, key, ctx->nr); -#elif defined(MBEDTLS_FREESCALE_DCP_AES) - if (!crypto_key_is_loaded(ctx)) - { - DCP_AES_SetKey(DCP, &s_dcpHandle, key, ctx->nr); - crypto_attach_ctx_to_key_slot(ctx, s_dcpHandle.keySlot); - } - DCP_AES_DecryptEcb(DCP, &s_dcpHandle, input, output, 16); -#endif - - return (0); -} - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -/* - * AES-CBC buffer encryption/decryption - */ -#if defined(MBEDTLS_FREESCALE_LTC_AES) -int mbedtls_aes_crypt_cbc(mbedtls_aes_context * ctx, int mode, size_t length, unsigned char iv[16], const unsigned char * input, - unsigned char * output) -{ - uint8_t * key = (uint8_t *) ctx->rk; - uint32_t keySize = ctx->nr; - - if (length % 16) - return (MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH); - - if (mode == MBEDTLS_AES_DECRYPT) - { - uint8_t tmp[16]; - memcpy(tmp, input + length - 16, 16); - LTC_AES_DecryptCbc(LTC_INSTANCE, input, output, length, iv, key, keySize, kLTC_EncryptKey); - memcpy(iv, tmp, 16); - } - else - { - LTC_AES_EncryptCbc(LTC_INSTANCE, input, output, length, iv, key, keySize); - memcpy(iv, output + length - 16, 16); - } - - return (0); -} -#elif defined(MBEDTLS_FREESCALE_LPC_AES) -int mbedtls_aes_crypt_cbc(mbedtls_aes_context * ctx, int mode, size_t length, unsigned char iv[16], const unsigned char * input, - unsigned char * output) -{ - uint8_t * key; - size_t keySize; - - if (length % 16) - return (MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH); - - key = (uint8_t *) ctx->rk; - keySize = (size_t) ctx->nr; - - if (mode == MBEDTLS_AES_DECRYPT) - { - uint8_t tmp[16]; - memcpy(tmp, input + length - 16, 16); - AES_128_CBC_Decrypt_And_Depad(tmp, length, iv, key, output); - memcpy(iv, tmp, 16); - } - else - { - AES_128_CBC_Encrypt(input, length, iv, key, output); - memcpy(iv, output + length - 16, 16); - } - - return (0); -} -#elif defined(MBEDTLS_FREESCALE_CAAM_AES) -int mbedtls_aes_crypt_cbc(mbedtls_aes_context * ctx, int mode, size_t length, unsigned char iv[16], const unsigned char * input, - unsigned char * output) -{ - uint8_t * key = (uint8_t *) ctx->rk; - uint32_t keySize = ctx->nr; - - if (length % 16) - return (MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH); - - if (mode == MBEDTLS_AES_DECRYPT) - { - uint8_t tmp[16]; - memcpy(tmp, input + length - 16, 16); - CAAM_AES_DecryptCbc(CAAM_INSTANCE, &s_caamHandle, input, output, length, iv, key, keySize); - memcpy(iv, tmp, 16); - } - else - { - CAAM_AES_EncryptCbc(CAAM_INSTANCE, &s_caamHandle, input, output, length, iv, key, keySize); - memcpy(iv, output + length - 16, 16); - } - - return (0); -} -#elif defined(MBEDTLS_FREESCALE_DCP_AES) -int mbedtls_aes_crypt_cbc(mbedtls_aes_context * ctx, int mode, size_t length, unsigned char iv[16], const unsigned char * input, - unsigned char * output) -{ - uint8_t * key; - - if (length % 16) - return (MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH); - - key = (uint8_t *) ctx->rk; - if (!crypto_key_is_loaded(ctx)) - { - DCP_AES_SetKey(DCP, &s_dcpHandle, key, ctx->nr); - crypto_attach_ctx_to_key_slot(ctx, s_dcpHandle.keySlot); - } - - if (mode == MBEDTLS_AES_DECRYPT) - { - uint8_t tmp[16]; - memcpy(tmp, input + length - 16, 16); - DCP_AES_DecryptCbc(DCP, &s_dcpHandle, input, output, length, iv); - memcpy(iv, tmp, 16); - } - else - { - DCP_AES_EncryptCbc(DCP, &s_dcpHandle, input, output, length, iv); - memcpy(iv, output + length - 16, 16); - } - - return (0); -} -#endif -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) -#if defined(MBEDTLS_FREESCALE_LPC_AES) -/* - * AES-CFB128 buffer encryption/decryption - */ -int mbedtls_aes_crypt_cfb128(mbedtls_aes_context * ctx, int mode, size_t length, size_t * iv_off, unsigned char iv[16], - const unsigned char * input, unsigned char * output) -{ - uint8_t * key; - size_t keySize; - - key = (uint8_t *) ctx->rk; - keySize = (size_t) ctx->nr; - AES_SetKey(AES_INSTANCE, key, keySize); - - if (mode == MBEDTLS_AES_DECRYPT) - { - AES_DecryptCfb(AES_INSTANCE, input, output, length, iv); - } - else - { - AES_EncryptCfb(AES_INSTANCE, input, output, length, iv); - } - - return (0); -} - -/* - * AES-CFB8 buffer encryption/decryption - */ -int mbedtls_aes_crypt_cfb8(mbedtls_aes_context * ctx, int mode, size_t length, unsigned char iv[16], const unsigned char * input, - unsigned char * output) -{ - int status; - unsigned char c; - unsigned char ov[17]; - - while (length--) - { - memcpy(ov, iv, 16); - status = mbedtls_aes_crypt_ecb(ctx, MBEDTLS_AES_ENCRYPT, iv, iv); - if (status != 0) - { - return status; - } - - if (mode == MBEDTLS_AES_DECRYPT) - ov[16] = *input; - - c = *output++ = (unsigned char) (iv[0] ^ *input++); - - if (mode == MBEDTLS_AES_ENCRYPT) - ov[16] = c; - - memcpy(iv, ov + 1, 16); - } - - return (0); -} -#endif /* MBEDTLS_FREESCALE_LPC_AES */ -#endif /* MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -/* - * AES-CTR buffer encryption/decryption - */ -#if defined(MBEDTLS_FREESCALE_LTC_AES) -int mbedtls_aes_crypt_ctr(mbedtls_aes_context * ctx, size_t length, size_t * nc_off, unsigned char nonce_counter[16], - unsigned char stream_block[16], const unsigned char * input, unsigned char * output) -{ - uint8_t * key; - uint32_t keySize; - - key = (uint8_t *) ctx->rk; - keySize = ctx->nr; - LTC_AES_CryptCtr(LTC_INSTANCE, input, output, length, nonce_counter, key, keySize, stream_block, (uint32_t *) nc_off); - - return (0); -} -#elif defined(MBEDTLS_FREESCALE_LPC_AES) -int mbedtls_aes_crypt_ctr(mbedtls_aes_context * ctx, size_t length, size_t * nc_off, unsigned char nonce_counter[16], - unsigned char stream_block[16], const unsigned char * input, unsigned char * output) -{ - uint8_t * key; - size_t keySize; - - key = (uint8_t *) ctx->rk; - keySize = (size_t) ctx->nr; - - AES_128_CTR(input, length, nonce_counter, key, output); - - return (0); -} -#elif defined(MBEDTLS_FREESCALE_CAAM_AES) -int mbedtls_aes_crypt_ctr(mbedtls_aes_context * ctx, size_t length, size_t * nc_off, unsigned char nonce_counter[16], - unsigned char stream_block[16], const unsigned char * input, unsigned char * output) -{ - uint8_t * key; - uint32_t keySize; - - key = (uint8_t *) ctx->rk; - keySize = ctx->nr; - - CAAM_AES_CryptCtr(CAAM_INSTANCE, &s_caamHandle, input, output, length, nonce_counter, key, keySize, stream_block, nc_off); - - return (0); -} -#endif -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -#if defined(MBEDTLS_CIPHER_CMAC_ALT) && defined(MBEDTLS_CMAC_C) - -#include "mbedtls/cipher.h" -#include "mbedtls/cmac.h" - -#if defined(MBEDTLS_FREESCALE_CAU3_CIPHER_CMAC) -int mbedtls_cipher_cmac(const mbedtls_cipher_info_t * cipher_info, const unsigned char * key, size_t keylen, - const unsigned char * input, size_t ilen, unsigned char * output) -{ - mbedtls_cipher_context_t ctx; - int ret; - - if (cipher_info == NULL || key == NULL || input == NULL || output == NULL) - return (MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA); - - mbedtls_cipher_init(&ctx); - - if ((ret = mbedtls_cipher_setup(&ctx, cipher_info)) != 0) - goto exit; - - ret = mbedtls_cipher_cmac_starts(&ctx, key, keylen); - if (ret != 0) - goto exit; - - /* AES-CMAC-128 is directly supported by CAU3 firmware */ - if (cipher_info->type == MBEDTLS_CIPHER_AES_128_ECB) - { - status_t status; - uint8_t mac[16]; - - status = CAU3_AES_SetKey(CAU3, &s_cau3Handle, key, keylen / 8u); - if (status != kStatus_Success) - { - ret = MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA; - goto exit; - } - status = CAU3_AES_Cmac(CAU3, &s_cau3Handle, input, ilen, mac); - if (status != kStatus_Success) - { - ret = MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA; - goto exit; - } - memcpy(output, mac, 16); - } -#if defined(MBEDTLS_CIPHER_CMAC_TDES_ENABLED) || defined(MBEDTLS_CIPHER_CMAC_AES_256_ENABLED) - else if (cipher_info->type == MBEDTLS_CIPHER_AES_192_ECB) - { - /* CAU3 initial firmware does not support AES 192 */ - ret = MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA; - goto exit; - } - else - { - /* AES-CMAC-256 and TDES-CMAC. - * If both MBEDTLS_DES_C and MBEDTLS_CIPHER_CMAC_WANTS_AES_256 are undefined, - * this does not compile - */ - ret = mbedtls_cipher_cmac_update(&ctx, input, ilen); - if (ret != 0) - goto exit; - - ret = mbedtls_cipher_cmac_finish(&ctx, output); - } -#else - else - { - ret = MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA; - goto exit; - } -#endif /* MBEDTLS_CIPHER_CMAC_TDES_ENABLED || MBEDTLS_CIPHER_CMAC_AES_256_ENABLED */ - -exit: - mbedtls_cipher_free(&ctx); - - return (ret); -} -#endif /* MBEDTLS_FREESCALE_CAU3_CIPHER_CMAC */ -#endif /* MBEDTLS_CIPHER_CMAC_ALT && MBEDTLS_CMAC_C */ - -#if defined(MBEDTLS_CCM_C) - -#include "mbedtls/ccm.h" - -#define CCM_ENCRYPT 0 -#define CCM_DECRYPT 1 - -/* - * Authenticated encryption or decryption - */ -#if defined(MBEDTLS_FREESCALE_LTC_AES) -static int ccm_auth_crypt(mbedtls_ccm_context * ctx, int mode, size_t length, const unsigned char * iv, size_t iv_len, - const unsigned char * add, size_t add_len, const unsigned char * input, unsigned char * output, - unsigned char * tag, size_t tag_len) -{ - status_t status; - const uint8_t * key; - uint8_t keySize; - mbedtls_aes_context * aes_ctx; - - aes_ctx = (mbedtls_aes_context *) ctx->cipher_ctx.cipher_ctx; - key = (uint8_t *) aes_ctx->rk; - keySize = aes_ctx->nr; - if (mode == CCM_ENCRYPT) - { - status = LTC_AES_EncryptTagCcm(LTC_INSTANCE, input, output, length, iv, iv_len, add, add_len, key, keySize, tag, tag_len); - } - else - { - status = LTC_AES_DecryptTagCcm(LTC_INSTANCE, input, output, length, iv, iv_len, add, add_len, key, keySize, tag, tag_len); - } - - if (status == kStatus_InvalidArgument) - { - return MBEDTLS_ERR_CCM_BAD_INPUT; - } - else if (status != kStatus_Success) - { - return MBEDTLS_ERR_CCM_AUTH_FAILED; - } - - return (0); -} -#elif defined(MBEDTLS_FREESCALE_CAAM_AES) -static int ccm_auth_crypt(mbedtls_ccm_context * ctx, int mode, size_t length, const unsigned char * iv, size_t iv_len, - const unsigned char * add, size_t add_len, const unsigned char * input, unsigned char * output, - unsigned char * tag, size_t tag_len) -{ - status_t status; - const uint8_t * key; - uint8_t keySize; - mbedtls_aes_context * aes_ctx; - - aes_ctx = (mbedtls_aes_context *) ctx->cipher_ctx.cipher_ctx; - key = (uint8_t *) aes_ctx->rk; - keySize = aes_ctx->nr; - if (mode == CCM_ENCRYPT) - { - status = CAAM_AES_EncryptTagCcm(CAAM_INSTANCE, &s_caamHandle, input, output, length, iv, iv_len, add, add_len, key, keySize, - tag, tag_len); - } - else - { - status = CAAM_AES_DecryptTagCcm(CAAM_INSTANCE, &s_caamHandle, input, output, length, iv, iv_len, add, add_len, key, keySize, - tag, tag_len); - } - - if (status == kStatus_InvalidArgument) - { - return MBEDTLS_ERR_CCM_BAD_INPUT; - } - else if (status != kStatus_Success) - { - return MBEDTLS_ERR_CCM_AUTH_FAILED; - } - - return (0); -} -#endif /* MBEDTLS_FREESCALE_LTC_AES */ - -#if defined(MBEDTLS_FREESCALE_LTC_AES) || defined(MBEDTLS_FREESCALE_CAAM_AES) -/* - * Authenticated encryption - */ -int mbedtls_ccm_encrypt_and_tag(mbedtls_ccm_context * ctx, size_t length, const unsigned char * iv, size_t iv_len, - const unsigned char * add, size_t add_len, const unsigned char * input, unsigned char * output, - unsigned char * tag, size_t tag_len) -{ - return (ccm_auth_crypt(ctx, CCM_ENCRYPT, length, iv, iv_len, add, add_len, input, output, tag, tag_len)); -} - -/* - * Authenticated decryption - */ -int mbedtls_ccm_auth_decrypt(mbedtls_ccm_context * ctx, size_t length, const unsigned char * iv, size_t iv_len, - const unsigned char * add, size_t add_len, const unsigned char * input, unsigned char * output, - const unsigned char * tag, size_t tag_len) -{ - unsigned char tagCopy[16]; - unsigned char * actTag = NULL; - if (tag) - { - memcpy(tagCopy, tag, tag_len); - actTag = tagCopy; - } - return (ccm_auth_crypt(ctx, CCM_DECRYPT, length, iv, iv_len, add, add_len, input, output, actTag, tag_len)); -} -#endif /* MBEDTLS_FREESCALE_LTC_AES || MBEDTLS_FREESCALE_CAAM_AES */ -#endif /* MBEDTLS_CCM_C */ - -#if defined(MBEDTLS_GCM_C) -#if defined(MBEDTLS_FREESCALE_LTC_AES_GCM) - -#include "mbedtls/gcm.h" - -int mbedtls_gcm_crypt_and_tag(mbedtls_gcm_context * ctx, int mode, size_t length, const unsigned char * iv, size_t iv_len, - const unsigned char * add, size_t add_len, const unsigned char * input, unsigned char * output, - size_t tag_len, unsigned char * tag) -{ - status_t status; - uint8_t * key; - uint32_t keySize; - mbedtls_aes_context * aes_ctx; - - ctx->len = length; - ctx->add_len = add_len; - aes_ctx = (mbedtls_aes_context *) ctx->cipher_ctx.cipher_ctx; - key = (uint8_t *) aes_ctx->rk; - keySize = aes_ctx->nr; - if (mode == MBEDTLS_GCM_ENCRYPT) - { - status = LTC_AES_EncryptTagGcm(LTC_INSTANCE, input, output, length, iv, iv_len, add, add_len, key, keySize, tag, tag_len); - } - else - { - status = LTC_AES_DecryptTagGcm(LTC_INSTANCE, input, output, length, iv, iv_len, add, add_len, key, keySize, tag, tag_len); - } - - if (status == kStatus_InvalidArgument) - { - return MBEDTLS_ERR_GCM_BAD_INPUT; - } - else if (status != kStatus_Success) - { - return MBEDTLS_ERR_GCM_AUTH_FAILED; - } - - return 0; -} - -int mbedtls_gcm_auth_decrypt(mbedtls_gcm_context * ctx, size_t length, const unsigned char * iv, size_t iv_len, - const unsigned char * add, size_t add_len, const unsigned char * tag, size_t tag_len, - const unsigned char * input, unsigned char * output) -{ - unsigned char tag_copy[16]; - unsigned char * actTag = NULL; - if (tag) - { - memcpy(tag_copy, tag, tag_len); - actTag = tag_copy; - } - return (mbedtls_gcm_crypt_and_tag(ctx, MBEDTLS_GCM_DECRYPT, length, iv, iv_len, add, add_len, input, output, tag_len, actTag)); -} - -#elif defined(MBEDTLS_FREESCALE_LPC_AES_GCM) - -#include "mbedtls/gcm.h" - -int mbedtls_gcm_crypt_and_tag(mbedtls_gcm_context * ctx, int mode, size_t length, const unsigned char * iv, size_t iv_len, - const unsigned char * add, size_t add_len, const unsigned char * input, unsigned char * output, - size_t tag_len, unsigned char * tag) -{ - status_t status; - uint8_t * key; - size_t keySize; - mbedtls_aes_context * aes_ctx; - - ctx->len = length; - ctx->add_len = add_len; - aes_ctx = (mbedtls_aes_context *) ctx->cipher_ctx.cipher_ctx; - key = (uint8_t *) aes_ctx->rk; - keySize = (size_t) aes_ctx->nr; - - status = AES_SetKey(AES_INSTANCE, key, keySize); - if (status != kStatus_Success) - { - return MBEDTLS_ERR_GCM_BAD_INPUT; - } - - if (mode == MBEDTLS_GCM_ENCRYPT) - { - status = AES_EncryptTagGcm(AES_INSTANCE, input, output, length, iv, iv_len, add, add_len, tag, tag_len); - } - else - { - status = AES_DecryptTagGcm(AES_INSTANCE, input, output, length, iv, iv_len, add, add_len, tag, tag_len); - } - - if (status == kStatus_InvalidArgument) - { - return MBEDTLS_ERR_GCM_BAD_INPUT; - } - else if (status != kStatus_Success) - { - return MBEDTLS_ERR_GCM_AUTH_FAILED; - } - - return 0; -} - -int mbedtls_gcm_auth_decrypt(mbedtls_gcm_context * ctx, size_t length, const unsigned char * iv, size_t iv_len, - const unsigned char * add, size_t add_len, const unsigned char * tag, size_t tag_len, - const unsigned char * input, unsigned char * output) -{ - unsigned char tag_copy[16]; - - memcpy(tag_copy, tag, tag_len); - return ( - mbedtls_gcm_crypt_and_tag(ctx, MBEDTLS_GCM_DECRYPT, length, iv, iv_len, add, add_len, input, output, tag_len, tag_copy)); -} - -#elif defined(MBEDTLS_FREESCALE_CAAM_AES_GCM) - -#include "mbedtls/gcm.h" - -int mbedtls_gcm_crypt_and_tag(mbedtls_gcm_context * ctx, int mode, size_t length, const unsigned char * iv, size_t iv_len, - const unsigned char * add, size_t add_len, const unsigned char * input, unsigned char * output, - size_t tag_len, unsigned char * tag) -{ - status_t status; - uint8_t * key; - uint32_t keySize; - mbedtls_aes_context * aes_ctx; - - ctx->len = length; - ctx->add_len = add_len; - aes_ctx = (mbedtls_aes_context *) ctx->cipher_ctx.cipher_ctx; - key = (uint8_t *) aes_ctx->rk; - keySize = aes_ctx->nr; - if (mode == MBEDTLS_GCM_ENCRYPT) - { - status = CAAM_AES_EncryptTagGcm(CAAM_INSTANCE, &s_caamHandle, input, output, length, iv, iv_len, add, add_len, key, keySize, - tag, tag_len); - } - else - { - status = CAAM_AES_DecryptTagGcm(CAAM_INSTANCE, &s_caamHandle, input, output, length, iv, iv_len, add, add_len, key, keySize, - tag, tag_len); - } - - if (status == kStatus_InvalidArgument) - { - return MBEDTLS_ERR_GCM_BAD_INPUT; - } - else if (status != kStatus_Success) - { - return MBEDTLS_ERR_GCM_AUTH_FAILED; - } - - return 0; -} - -int mbedtls_gcm_auth_decrypt(mbedtls_gcm_context * ctx, size_t length, const unsigned char * iv, size_t iv_len, - const unsigned char * add, size_t add_len, const unsigned char * tag, size_t tag_len, - const unsigned char * input, unsigned char * output) -{ - unsigned char tag_copy[16]; - unsigned char * actTag = NULL; - if (tag) - { - memcpy(tag_copy, tag, tag_len); - actTag = tag_copy; - } - return (mbedtls_gcm_crypt_and_tag(ctx, MBEDTLS_GCM_DECRYPT, length, iv, iv_len, add, add_len, input, output, tag_len, actTag)); -} -#endif -#endif /* MBEDTLS_GCM_C */ - -#endif /* MBEDTLS_FREESCALE_LTC_AES || MBEDTLS_FREESCALE_MMCAU_AES || MBEDTLS_FREESCALE_LPC_AES */ - -#endif /* MBEDTLS_AES_C */ - -/******************************************************************************/ -/*************************** PKHA *********************************************/ -/******************************************************************************/ - -#if defined(MBEDTLS_FREESCALE_LTC_PKHA) || defined(MBEDTLS_FREESCALE_CAU3_PKHA) || defined(MBEDTLS_FREESCALE_CAAM_PKHA) - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -static void ltc_reverse_array(uint8_t * src, size_t src_len) -{ - int i; - - for (i = 0; i < src_len / 2; i++) - { - uint8_t tmp; - - tmp = src[i]; - src[i] = src[src_len - 1 - i]; - src[src_len - 1 - i] = tmp; - } -} - -#if defined(MBEDTLS_BIGNUM_C) - -#include "mbedtls/bignum.h" - -#if defined(MBEDTLS_FREESCALE_CAU3_PKHA) -#define LTC_PKHA_ModAdd CAU3_PKHA_ModAdd -#define LTC_PKHA_ModSub1 CAU3_PKHA_ModSub1 -#define LTC_PKHA_ModMul CAU3_PKHA_ModMul -#define LTC_PKHA_ModRed CAU3_PKHA_ModRed -#define LTC_PKHA_ModExp CAU3_PKHA_ModExp -#define LTC_PKHA_GCD CAU3_PKHA_ModGcd -#define LTC_PKHA_ModInv CAU3_PKHA_ModInv -#define LTC_PKHA_PrimalityTest CAU3_PKHA_PrimalityTest -#define LTC_INSTANCE ((CAU3_Type *) CAU3_BASE) - -#define kLTC_PKHA_IntegerArith kCAU3_PKHA_IntegerArith -#define kLTC_PKHA_NormalValue kCAU3_PKHA_NormalValue -#define kLTC_PKHA_TimingEqualized kCAU3_PKHA_TimingEqualized - -#define cau3_reverse_array ltc_reverse_array -#define cau3_get_from_mbedtls_mpi ltc_get_from_mbedtls_mpi -#endif - -#if defined(MBEDTLS_FREESCALE_LTC_PKHA) -typedef uint16_t pkha_size_t; -#else -typedef size_t pkha_size_t; -#endif - -#if defined(MBEDTLS_MPI_ADD_ABS_ALT) - -/* Access to original version of mbedtls_mpi_add_abs function. */ -int mbedtls_mpi_add_abs_orig(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * B); - -/* - * Unsigned addition: X = |A| + |B| (HAC 14.7) - */ -#if defined(MBEDTLS_FREESCALE_LTC_PKHA) || defined(MBEDTLS_FREESCALE_CAU3_PKHA) -int mbedtls_mpi_add_abs(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * B) -{ - pkha_size_t sizeA = mbedtls_mpi_size(A); - pkha_size_t sizeB = mbedtls_mpi_size(B); - pkha_size_t sizeN = FREESCALE_PKHA_INT_MAX_BYTES; - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - /* - * Perform HW acceleration only if the size in bytes is less than maximum. - * Since modular add is used below, the result would be wrong - * if the real sum of operands exceeded LTC maximum number value. - */ - if ((sizeA < sizeN) && (sizeB < sizeN)) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - int ret; - pkha_size_t sizeC; - uint8_t * N = mbedtls_calloc(4, FREESCALE_PKHA_INT_MAX_BYTES); - uint8_t * ptrA = N + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrB = ptrA + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrC = ptrB + FREESCALE_PKHA_INT_MAX_BYTES; - if (NULL == N) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - memset(N, 0xFF, sizeN); - - mbedtls_mpi_write_binary(A, ptrA, sizeA); - ltc_reverse_array(ptrA, sizeA); - - mbedtls_mpi_write_binary(B, ptrB, sizeB); - ltc_reverse_array(ptrB, sizeB); - - ret = (int) LTC_PKHA_ModAdd(LTC_INSTANCE, ptrA, sizeA, ptrB, sizeB, N, sizeN, ptrC, &sizeC, kLTC_PKHA_IntegerArith); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - ltc_reverse_array(ptrC, sizeC); - mbedtls_mpi_read_binary(X, ptrC, sizeC); - X->s = 1; - cleanup: - if (N) - { - mbedtls_free(N); - } - return (ret); -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_add_abs_orig(X, A, B); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} - -#elif defined(MBEDTLS_FREESCALE_CAAM_PKHA) -int mbedtls_mpi_add_abs(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * B) -{ - pkha_size_t sizeA = mbedtls_mpi_size(A); - pkha_size_t sizeB = mbedtls_mpi_size(B); - pkha_size_t sizeN = FREESCALE_PKHA_INT_MAX_BYTES; - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - /* - * Perform HW acceleration only if the size in bytes is less than maximum. - * Since modular add is used below, the result would be wrong - * if the real sum of operands exceeded CAAM maximum number value. - */ - if ((sizeA < sizeN) && (sizeB < sizeN)) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - int ret; - pkha_size_t sizeC; - uint8_t * N = mbedtls_calloc(4, FREESCALE_PKHA_INT_MAX_BYTES); - uint8_t * ptrA = N + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrB = ptrA + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrC = ptrB + FREESCALE_PKHA_INT_MAX_BYTES; - if (NULL == N) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - memset(N, 0xFF, sizeN); - - mbedtls_mpi_write_binary(A, ptrA, sizeA); - mbedtls_mpi_write_binary(B, ptrB, sizeB); - - ret = (int) CAAM_PKHA_ModAdd(CAAM_INSTANCE, &s_caamHandle, ptrA, sizeA, ptrB, sizeB, N, sizeN, ptrC, &sizeC, - kCAAM_PKHA_IntegerArith); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - mbedtls_mpi_read_binary(X, ptrC, sizeC); - X->s = 1; - cleanup: - if (N) - { - mbedtls_free(N); - } - return (ret); -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_add_abs_orig(X, A, B); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} -#endif /* MBEDTLS_FREESCALE_LTC_PKHA || MBEDTLS_FREESCALE_CAU3_PKHA */ -#endif /* MBEDTLS_MPI_ADD_ABS_ALT */ - -#if defined(MBEDTLS_MPI_SUB_ABS_ALT) - -/* Access to original version of mbedtls_mpi_sub_abs function. */ -int mbedtls_mpi_sub_abs_orig(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * B); - -/* - * Unsigned subtraction: X = |A| - |B| (HAC 14.9) - */ -#if defined(MBEDTLS_FREESCALE_LTC_PKHA) || defined(MBEDTLS_FREESCALE_CAU3_PKHA) -int mbedtls_mpi_sub_abs(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * B) -{ - pkha_size_t sizeA = mbedtls_mpi_size(A); - pkha_size_t sizeB = mbedtls_mpi_size(B); - pkha_size_t sizeN = FREESCALE_PKHA_INT_MAX_BYTES; - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - /* - * Perform HW acceleration only if |A| >= |B|. Since modular subtraction is used below, - * the result would be wrong if the real sum of operands exceeded maximum. - */ - if ((sizeA <= sizeN) && (sizeB <= sizeN) && (mbedtls_mpi_cmp_abs(A, B) >= 0)) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - int ret; - pkha_size_t sizeC; - uint8_t * N = mbedtls_calloc(4, FREESCALE_PKHA_INT_MAX_BYTES); - uint8_t * ptrA = N + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrB = ptrA + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrC = ptrB + FREESCALE_PKHA_INT_MAX_BYTES; - if (NULL == N) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - memset(N, 0xFF, sizeN); - - mbedtls_mpi_write_binary(A, ptrA, sizeA); - ltc_reverse_array(ptrA, sizeA); - - mbedtls_mpi_write_binary(B, ptrB, sizeB); - ltc_reverse_array(ptrB, sizeB); - - ret = (int) LTC_PKHA_ModSub1(LTC_INSTANCE, ptrA, sizeA, ptrB, sizeB, N, sizeN, ptrC, &sizeC); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - ltc_reverse_array(ptrC, sizeC); - mbedtls_mpi_read_binary(X, ptrC, sizeC); - X->s = 1; - cleanup: - if (N) - { - mbedtls_free(N); - } - return (ret); -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_sub_abs_orig(X, A, B); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} - -#elif defined(MBEDTLS_FREESCALE_CAAM_PKHA) -int mbedtls_mpi_sub_abs(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * B) -{ - pkha_size_t sizeA = mbedtls_mpi_size(A); - pkha_size_t sizeB = mbedtls_mpi_size(B); - pkha_size_t sizeN = FREESCALE_PKHA_INT_MAX_BYTES; - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - /* - * Perform HW acceleration only if |A| >= |B|. Since modular subtraction is used below, - * the result would be wrong if the real sum of operands exceeded maximum. - */ - if ((sizeA <= sizeN) && (sizeB <= sizeN) && (mbedtls_mpi_cmp_abs(A, B) >= 0)) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - int ret; - pkha_size_t sizeC; - uint8_t * N = mbedtls_calloc(4, FREESCALE_PKHA_INT_MAX_BYTES); - uint8_t * ptrA = N + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrB = ptrA + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrC = ptrB + FREESCALE_PKHA_INT_MAX_BYTES; - if (NULL == N) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - memset(N, 0xFF, sizeN); - - mbedtls_mpi_write_binary(A, ptrA, sizeA); - mbedtls_mpi_write_binary(B, ptrB, sizeB); - - ret = (int) CAAM_PKHA_ModSub1(CAAM_INSTANCE, &s_caamHandle, ptrA, sizeA, ptrB, sizeB, N, sizeN, ptrC, &sizeC); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - mbedtls_mpi_read_binary(X, ptrC, sizeC); - X->s = 1; - cleanup: - if (N) - { - mbedtls_free(N); - } - return (ret); -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_sub_abs_orig(X, A, B); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} -#endif /* MBEDTLS_FREESCALE_LTC_PKHA || MBEDTLS_FREESCALE_CAU3_PKHA */ -#endif /* MBEDTLS_MPI_SUB_ABS_ALT */ - -#if defined(MBEDTLS_MPI_MUL_MPI_ALT) - -/* Access to original version of mbedtls_mpi_mul_mpi function. */ -int mbedtls_mpi_mul_mpi_orig(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * B); - -/* - * Baseline multiplication: X = A * B (HAC 14.12) - */ -#if defined(MBEDTLS_FREESCALE_LTC_PKHA) || defined(MBEDTLS_FREESCALE_CAU3_PKHA) -int mbedtls_mpi_mul_mpi(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * B) -{ - pkha_size_t sizeA = mbedtls_mpi_size(A); - pkha_size_t sizeB = mbedtls_mpi_size(B); - pkha_size_t sizeN = FREESCALE_PKHA_INT_MAX_BYTES; - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - /* - * Should be "if ((sizeA + sizeB) <= sizeN)", but if the multiplication result - * would be maximum LTC number (the same value as the modulus N below), - * zero would be returned instead, which is wrong value. - */ - if ((sizeA + sizeB) < sizeN) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - int ret; - pkha_size_t sizeC; - int sign = A->s * B->s; - - uint8_t * N = mbedtls_calloc(4, FREESCALE_PKHA_INT_MAX_BYTES); - uint8_t * ptrA = N + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrB = ptrA + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrC = ptrB + FREESCALE_PKHA_INT_MAX_BYTES; - if (NULL == N) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - memset(N, 0xFF, sizeN); - - mbedtls_mpi_write_binary(A, ptrA, sizeA); - ltc_reverse_array(ptrA, sizeA); - - mbedtls_mpi_write_binary(B, ptrB, sizeB); - ltc_reverse_array(ptrB, sizeB); - - /* - * Modular multiplication operation is used here. Since the modulus N is larger - * than the expected result of A * B, the effect is normal multiplication. - * TODO use PKHA MUL_IM_OM instead. - */ - ret = (int) LTC_PKHA_ModMul(LTC_INSTANCE, ptrA, sizeA, ptrB, sizeB, N, sizeN, ptrC, &sizeC, kLTC_PKHA_IntegerArith, - kLTC_PKHA_NormalValue, kLTC_PKHA_NormalValue, kLTC_PKHA_TimingEqualized); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - ltc_reverse_array(ptrC, sizeC); - mbedtls_mpi_read_binary(X, ptrC, sizeC); - X->s = sign; - cleanup: - if (N) - { - mbedtls_free(N); - } - return (ret); -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_mul_mpi_orig(X, A, B); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} - -#elif defined(MBEDTLS_FREESCALE_CAAM_PKHA) -int mbedtls_mpi_mul_mpi(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * B) -{ - pkha_size_t sizeA = mbedtls_mpi_size(A); - pkha_size_t sizeB = mbedtls_mpi_size(B); - pkha_size_t sizeN = FREESCALE_PKHA_INT_MAX_BYTES; - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - /* - * Should be "if ((sizeA + sizeB) <= sizeN)", but if the multiplication result - * would be maximum CAAM number (the same value as the modulus N below), - * zero would be returned instead, which is wrong value. - */ - if ((sizeA + sizeB) < sizeN) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - int ret; - pkha_size_t sizeC; - int sign = A->s * B->s; - - uint8_t * N = mbedtls_calloc(4, FREESCALE_PKHA_INT_MAX_BYTES); - uint8_t * ptrA = N + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrB = ptrA + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrC = ptrB + FREESCALE_PKHA_INT_MAX_BYTES; - if (NULL == N) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - memset(N, 0xFF, sizeN); - - mbedtls_mpi_write_binary(A, ptrA, sizeA); - mbedtls_mpi_write_binary(B, ptrB, sizeB); - - /* - * Modular multiplication operation is used here. Since the modulus N is larger - * than the expected result of A * B, the effect is normal multiplication. - * TODO use PKHA MUL_IM_OM instead. - */ - ret = (int) CAAM_PKHA_ModMul(CAAM_INSTANCE, &s_caamHandle, ptrA, sizeA, ptrB, sizeB, N, sizeN, ptrC, &sizeC, - kCAAM_PKHA_IntegerArith, kCAAM_PKHA_NormalValue, kCAAM_PKHA_NormalValue, - kCAAM_PKHA_TimingEqualized); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - mbedtls_mpi_read_binary(X, ptrC, sizeC); - X->s = sign; - cleanup: - if (N) - { - mbedtls_free(N); - } - return (ret); -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_mul_mpi_orig(X, A, B); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} -#endif /* MBEDTLS_FREESCALE_LTC_PKHA || MBEDTLS_FREESCALE_CAU3_PKHA */ -#endif /* MBEDTLS_MPI_MUL_MPI_ALT */ - -#if defined(MBEDTLS_MPI_MOD_MPI_ALT) - -/* Access to original version of mbedtls_mpi_mod_mpi function. */ -int mbedtls_mpi_mod_mpi_orig(mbedtls_mpi * R, const mbedtls_mpi * A, const mbedtls_mpi * B); - -/* - * Modulo: R = A mod B - */ -#if defined(MBEDTLS_FREESCALE_LTC_PKHA) || defined(MBEDTLS_FREESCALE_CAU3_PKHA) -int mbedtls_mpi_mod_mpi(mbedtls_mpi * R, const mbedtls_mpi * A, const mbedtls_mpi * B) -{ - pkha_size_t sizeA = mbedtls_mpi_size(A); - pkha_size_t sizeB = mbedtls_mpi_size(B); - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - if ((sizeA <= FREESCALE_PKHA_INT_MAX_BYTES) && (sizeB <= FREESCALE_PKHA_INT_MAX_BYTES)) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - int ret; - pkha_size_t sizeC; - int sign = A->s; - uint8_t * ptrA = mbedtls_calloc(3, FREESCALE_PKHA_INT_MAX_BYTES); - uint8_t * ptrB = ptrA + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrC = ptrB + FREESCALE_PKHA_INT_MAX_BYTES; - if (NULL == ptrA) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - mbedtls_mpi_write_binary(A, ptrA, sizeA); - ltc_reverse_array(ptrA, sizeA); - - mbedtls_mpi_write_binary(B, ptrB, sizeB); - ltc_reverse_array(ptrB, sizeB); - - ret = (int) LTC_PKHA_ModRed(LTC_INSTANCE, ptrA, sizeA, ptrB, sizeB, ptrC, &sizeC, kLTC_PKHA_IntegerArith); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - ltc_reverse_array(ptrC, sizeC); - mbedtls_mpi_read_binary(R, ptrC, sizeC); - R->s = sign; - - while (mbedtls_mpi_cmp_int(R, 0) < 0) - mbedtls_mpi_add_mpi(R, R, B); /* MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( R, R, B ) ); */ - - while (mbedtls_mpi_cmp_mpi(R, B) >= 0) - mbedtls_mpi_sub_mpi(R, R, B); /* MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( R, R, B ) ); cleanup:*/ - cleanup: - if (ptrA) - { - mbedtls_free(ptrA); - } - return (ret); -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_mod_mpi_orig(R, A, B); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} - -#elif defined(MBEDTLS_FREESCALE_CAAM_PKHA) -int mbedtls_mpi_mod_mpi(mbedtls_mpi * R, const mbedtls_mpi * A, const mbedtls_mpi * B) -{ - pkha_size_t sizeA = mbedtls_mpi_size(A); - pkha_size_t sizeB = mbedtls_mpi_size(B); - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - if ((sizeA <= FREESCALE_PKHA_INT_MAX_BYTES) && (sizeB <= FREESCALE_PKHA_INT_MAX_BYTES)) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - int ret; - pkha_size_t sizeC; - int sign = A->s; - uint8_t * ptrA = mbedtls_calloc(3, FREESCALE_PKHA_INT_MAX_BYTES); - uint8_t * ptrB = ptrA + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrC = ptrB + FREESCALE_PKHA_INT_MAX_BYTES; - if (NULL == ptrA) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - mbedtls_mpi_write_binary(A, ptrA, sizeA); - mbedtls_mpi_write_binary(B, ptrB, sizeB); - - ret = (int) CAAM_PKHA_ModRed(CAAM_INSTANCE, &s_caamHandle, ptrA, sizeA, ptrB, sizeB, ptrC, &sizeC, kCAAM_PKHA_IntegerArith); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - mbedtls_mpi_read_binary(R, ptrC, sizeC); - R->s = sign; - - while (mbedtls_mpi_cmp_int(R, 0) < 0) - mbedtls_mpi_add_mpi(R, R, B); /* MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( R, R, B ) ); */ - - while (mbedtls_mpi_cmp_mpi(R, B) >= 0) - mbedtls_mpi_sub_mpi(R, R, B); /* MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( R, R, B ) ); cleanup:*/ - cleanup: - if (ptrA) - { - mbedtls_free(ptrA); - } - return (ret); -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_mod_mpi_orig(R, A, B); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} -#endif /* MBEDTLS_FREESCALE_LTC_PKHA || MBEDTLS_FREESCALE_CAU3_PKHA */ -#endif /* MBEDTLS_MPI_MOD_MPI_ALT */ - -#if defined(MBEDTLS_MPI_EXP_MOD_ALT) - -/* Access to original version of mbedtls_mpi_exp_mod function. */ -int mbedtls_mpi_exp_mod_orig(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * E, const mbedtls_mpi * N, - mbedtls_mpi * _RR); - -/* - * Sliding-window exponentiation: X = A^E mod N (HAC 14.85) - */ -#if defined(MBEDTLS_FREESCALE_LTC_PKHA) || defined(MBEDTLS_FREESCALE_CAU3_PKHA) -int mbedtls_mpi_exp_mod(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * E, const mbedtls_mpi * N, mbedtls_mpi * _RR) -{ - int ret; - pkha_size_t sizeE = mbedtls_mpi_size(E); - pkha_size_t sizeN = mbedtls_mpi_size(N); - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - if ((sizeE <= FREESCALE_PKHA_INT_MAX_BYTES) && (sizeN <= FREESCALE_PKHA_INT_MAX_BYTES)) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - mbedtls_mpi * AA; // TODO rename etc. - - /* - * If number is greater than modulus, we must first reduce it due to LTC requirement - * on modular exponentiaton that it needs number less than modulus. - * We can take advantage of modular arithmetic rule that: A^B mod C = ( (A mod C)^B ) mod C. - * So we do (A mod N) first and if the size of A in bytes fits into LTC, it will be done in LTC - * (here LTC does not give size requirement on A versus N), otherwise it will be done in SW - * and since the size of N fits into LTC, the result of (A mod N) will also fit into LTC. - * Then we can do modular exponentiation in LTC. - */ - if (mbedtls_mpi_cmp_mpi(A, N) >= 0) - { - /* A >= N, perform X = (A mod N). */ - ret = mbedtls_mpi_mod_mpi(X, A, N); - - if (ret != kStatus_Success) - return (MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - /* Exponenciation will be performed with X. */ - AA = X; - } - else - { - /* Exponentiation will be performed with original A. */ - AA = (mbedtls_mpi *) A; - } - - pkha_size_t sizeA = mbedtls_mpi_size(AA); - uint8_t * ptrA = mbedtls_calloc(3, FREESCALE_PKHA_INT_MAX_BYTES); - uint8_t * ptrE = ptrA + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrN = ptrE + FREESCALE_PKHA_INT_MAX_BYTES; - if (NULL == ptrA) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - mbedtls_mpi_write_binary(AA, ptrA, sizeA); - ltc_reverse_array(ptrA, sizeA); - - mbedtls_mpi_write_binary(E, ptrE, sizeE); - ltc_reverse_array(ptrE, sizeE); - - mbedtls_mpi_write_binary(N, ptrN, sizeN); - ltc_reverse_array(ptrN, sizeN); - - ret = (int) LTC_PKHA_ModExp(LTC_INSTANCE, ptrA, sizeA, ptrN, sizeN, ptrE, sizeE, ptrN, &sizeN, kLTC_PKHA_IntegerArith, - kLTC_PKHA_NormalValue, kLTC_PKHA_TimingEqualized); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - ltc_reverse_array(ptrN, sizeN); - mbedtls_mpi_read_binary(X, ptrN, sizeN); - cleanup: - if (ptrA) - { - mbedtls_free(ptrA); - } - return (ret); -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_exp_mod_orig(X, A, E, N, _RR); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} - -#elif defined(MBEDTLS_FREESCALE_CAAM_PKHA) -int mbedtls_mpi_exp_mod(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * E, const mbedtls_mpi * N, mbedtls_mpi * _RR) -{ - int ret; - pkha_size_t sizeE = mbedtls_mpi_size(E); - pkha_size_t sizeN = mbedtls_mpi_size(N); - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - if ((sizeE <= FREESCALE_PKHA_INT_MAX_BYTES) && (sizeN <= FREESCALE_PKHA_INT_MAX_BYTES)) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - mbedtls_mpi * AA; // TODO rename etc. - - /* - * If number is greater than modulus, we must first reduce it due to CAAM requirement - * on modular exponentiaton that it needs number less than modulus. - * We can take advantage of modular arithmetic rule that: A^B mod C = ( (A mod C)^B ) mod C. - * So we do (A mod N) first and if the size of A in bytes fits into CAAM, it will be done in CAAM - * (here CAAM does not give size requirement on A versus N), otherwise it will be done in SW - * and since the size of N fits into CAAM, the result of (A mod N) will also fit into CAAM. - * Then we can do modular exponentiation in CAAM. - */ - if (mbedtls_mpi_cmp_mpi(A, N) >= 0) - { - /* A >= N, perform X = (A mod N). */ - ret = mbedtls_mpi_mod_mpi(X, A, N); - - if (ret != kStatus_Success) - return (MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - /* Exponenciation will be performed with X. */ - AA = X; - } - else - { - /* Exponentiation will be performed with original A. */ - AA = (mbedtls_mpi *) A; - } - - pkha_size_t sizeA = mbedtls_mpi_size(AA); - uint8_t * ptrA = mbedtls_calloc(3, FREESCALE_PKHA_INT_MAX_BYTES); - uint8_t * ptrE = ptrA + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrN = ptrE + FREESCALE_PKHA_INT_MAX_BYTES; - if (NULL == ptrA) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - mbedtls_mpi_write_binary(AA, ptrA, sizeA); - mbedtls_mpi_write_binary(E, ptrE, sizeE); - mbedtls_mpi_write_binary(N, ptrN, sizeN); - - ret = (int) CAAM_PKHA_ModExp(CAAM_INSTANCE, &s_caamHandle, ptrA, sizeA, ptrN, sizeN, ptrE, sizeE, ptrN, &sizeN, - kCAAM_PKHA_IntegerArith, kCAAM_PKHA_NormalValue, kCAAM_PKHA_TimingEqualized); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - mbedtls_mpi_read_binary(X, ptrN, sizeN); - cleanup: - if (ptrA) - { - mbedtls_free(ptrA); - } - return (ret); -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_exp_mod_orig(X, A, E, N, _RR); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} -#endif /* MBEDTLS_FREESCALE_LTC_PKHA || MBEDTLS_FREESCALE_CAU3_PKHA */ -#endif /* MBEDTLS_MPI_EXP_MOD_ALT */ - -#if defined(MBEDTLS_MPI_GCD_ALT) - -/* Access to original version of mbedtls_mpi_gcd function. */ -int mbedtls_mpi_gcd_orig(mbedtls_mpi * G, const mbedtls_mpi * A, const mbedtls_mpi * B); - -/* - * Greatest common divisor: G = gcd(A, B) (HAC 14.54) - */ -#if defined(MBEDTLS_FREESCALE_LTC_PKHA) || defined(MBEDTLS_FREESCALE_CAU3_PKHA) -int mbedtls_mpi_gcd(mbedtls_mpi * G, const mbedtls_mpi * A, const mbedtls_mpi * B) -{ - pkha_size_t sizeA = mbedtls_mpi_size(A); - pkha_size_t sizeB = mbedtls_mpi_size(B); - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - if ((sizeA <= FREESCALE_PKHA_INT_MAX_BYTES) && (sizeB <= FREESCALE_PKHA_INT_MAX_BYTES)) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - int ret; - pkha_size_t sizeC; - uint8_t * ptrA = mbedtls_calloc(3, FREESCALE_PKHA_INT_MAX_BYTES); - uint8_t * ptrB = ptrA + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrC = ptrB + FREESCALE_PKHA_INT_MAX_BYTES; - if (NULL == ptrA) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - mbedtls_mpi_write_binary(A, ptrA, sizeA); - ltc_reverse_array(ptrA, sizeA); - - mbedtls_mpi_write_binary(B, ptrB, sizeB); - ltc_reverse_array(ptrB, sizeB); - - if (mbedtls_mpi_cmp_mpi(A, B) >= 0) - { - ret = (int) LTC_PKHA_ModRed(LTC_INSTANCE, ptrA, sizeA, ptrB, sizeB, ptrA, &sizeA, kLTC_PKHA_IntegerArith); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - } - - ret = (int) LTC_PKHA_GCD(LTC_INSTANCE, ptrA, sizeA, ptrB, sizeB, ptrC, &sizeC, kLTC_PKHA_IntegerArith); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - ltc_reverse_array(ptrC, sizeC); - mbedtls_mpi_read_binary(G, ptrC, sizeC); - cleanup: - if (ptrA) - { - mbedtls_free(ptrA); - } - return (ret); -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_gcd_orig(G, A, B); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} - -#elif defined(MBEDTLS_FREESCALE_CAAM_PKHA) -int mbedtls_mpi_gcd(mbedtls_mpi * G, const mbedtls_mpi * A, const mbedtls_mpi * B) -{ - pkha_size_t sizeA = mbedtls_mpi_size(A); - pkha_size_t sizeB = mbedtls_mpi_size(B); - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - if ((sizeA <= FREESCALE_PKHA_INT_MAX_BYTES) && (sizeB <= FREESCALE_PKHA_INT_MAX_BYTES)) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - int ret; - pkha_size_t sizeC; - uint8_t * ptrA = mbedtls_calloc(3, FREESCALE_PKHA_INT_MAX_BYTES); - uint8_t * ptrB = ptrA + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrC = ptrB + FREESCALE_PKHA_INT_MAX_BYTES; - if (NULL == ptrA) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - mbedtls_mpi_write_binary(A, ptrA, sizeA); - mbedtls_mpi_write_binary(B, ptrB, sizeB); - - if (mbedtls_mpi_cmp_mpi(A, B) >= 0) - { - ret = (int) CAAM_PKHA_ModRed(CAAM_INSTANCE, &s_caamHandle, ptrA, sizeA, ptrB, sizeB, ptrA, &sizeA, - kCAAM_PKHA_IntegerArith); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - } - - ret = (int) CAAM_PKHA_ModGcd(CAAM_INSTANCE, &s_caamHandle, ptrA, sizeA, ptrB, sizeB, ptrC, &sizeC, kCAAM_PKHA_IntegerArith); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - mbedtls_mpi_read_binary(G, ptrC, sizeC); - cleanup: - if (ptrA) - { - mbedtls_free(ptrA); - } - return (ret); -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_gcd_orig(G, A, B); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} -#endif /* MBEDTLS_FREESCALE_LTC_PKHA || MBEDTLS_FREESCALE_CAU3_PKHA */ -#endif /* MBEDTLS_MPI_GCD_ALT */ - -#if defined(MBEDTLS_MPI_INV_MOD_ALT) - -/* Access to original version of mbedtls_mpi_inv_mod function. */ -int mbedtls_mpi_inv_mod_orig(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * N); - -/* - * Modular inverse: X = A^-1 mod N (HAC 14.61 / 14.64) - */ -#if defined(MBEDTLS_FREESCALE_LTC_PKHA) || defined(MBEDTLS_FREESCALE_CAU3_PKHA) -int mbedtls_mpi_inv_mod(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * N) -{ - pkha_size_t sizeA = mbedtls_mpi_size(A); - pkha_size_t sizeN = mbedtls_mpi_size(N); - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - if ((sizeA <= FREESCALE_PKHA_INT_MAX_BYTES) && (sizeN <= FREESCALE_PKHA_INT_MAX_BYTES)) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - int ret; - pkha_size_t sizeC; - uint8_t * ptrA = mbedtls_calloc(3, FREESCALE_PKHA_INT_MAX_BYTES); - uint8_t * ptrN = ptrA + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrC = ptrN + FREESCALE_PKHA_INT_MAX_BYTES; - if (NULL == ptrA) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - /* N cannot be negative */ - if (N->s < 0 || mbedtls_mpi_cmp_int(N, 0) == 0) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_BAD_INPUT_DATA); - } - - mbedtls_mpi_write_binary(A, ptrA, sizeA); - ltc_reverse_array(ptrA, sizeA); - - mbedtls_mpi_write_binary(N, ptrN, sizeN); - ltc_reverse_array(ptrN, sizeN); - - if (mbedtls_mpi_cmp_mpi(A, N) >= 0) - { - ret = (int) LTC_PKHA_ModRed(LTC_INSTANCE, ptrA, sizeA, ptrN, sizeN, ptrA, &sizeA, kLTC_PKHA_IntegerArith); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - } - - ret = (int) LTC_PKHA_ModInv(LTC_INSTANCE, ptrA, sizeA, ptrN, sizeN, ptrC, &sizeC, kLTC_PKHA_IntegerArith); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - ltc_reverse_array(ptrC, sizeC); - mbedtls_mpi_read_binary(X, ptrC, sizeC); - cleanup: - if (ptrA) - { - mbedtls_free(ptrA); - } - return (ret); -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_inv_mod_orig(X, A, N); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} - -#elif defined(MBEDTLS_FREESCALE_CAAM_PKHA) -int mbedtls_mpi_inv_mod(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * N) -{ - pkha_size_t sizeA = mbedtls_mpi_size(A); - pkha_size_t sizeN = mbedtls_mpi_size(N); - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - if ((sizeA <= FREESCALE_PKHA_INT_MAX_BYTES) && (sizeN <= FREESCALE_PKHA_INT_MAX_BYTES)) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - int ret; - pkha_size_t sizeC; - uint8_t * ptrA = mbedtls_calloc(3, FREESCALE_PKHA_INT_MAX_BYTES); - uint8_t * ptrN = ptrA + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrC = ptrN + FREESCALE_PKHA_INT_MAX_BYTES; - if (NULL == ptrA) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - /* N cannot be negative */ - if (N->s < 0 || mbedtls_mpi_cmp_int(N, 0) == 0) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_BAD_INPUT_DATA); - } - - mbedtls_mpi_write_binary(A, ptrA, sizeA); - mbedtls_mpi_write_binary(N, ptrN, sizeN); - - if (mbedtls_mpi_cmp_mpi(A, N) >= 0) - { - ret = (int) CAAM_PKHA_ModRed(CAAM_INSTANCE, &s_caamHandle, ptrA, sizeA, ptrN, sizeN, ptrA, &sizeA, - kCAAM_PKHA_IntegerArith); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - } - - ret = (int) CAAM_PKHA_ModInv(CAAM_INSTANCE, &s_caamHandle, ptrA, sizeA, ptrN, sizeN, ptrC, &sizeC, kCAAM_PKHA_IntegerArith); - - if (ret != kStatus_Success) - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - - mbedtls_mpi_read_binary(X, ptrC, sizeC); - cleanup: - if (ptrA) - { - mbedtls_free(ptrA); - } - return (ret); -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_inv_mod_orig(X, A, N); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} -#endif /* MBEDTLS_FREESCALE_LTC_PKHA || MBEDTLS_FREESCALE_CAU3_PKHA */ -#endif /* MBEDTLS_MPI_INV_MOD_ALT */ - -#if defined(MBEDTLS_MPI_IS_PRIME_ALT) - -/* Access to original version of mbedtls_mpi_is_prime function. */ -int mbedtls_mpi_is_prime_orig(const mbedtls_mpi * X, int (*f_rng)(void *, unsigned char *, size_t), void * p_rng); - -/* - * Pseudo-primality test: small factors, then Miller-Rabin - */ -#if defined(MBEDTLS_FREESCALE_LTC_PKHA) || defined(MBEDTLS_FREESCALE_CAU3_PKHA) -int mbedtls_mpi_is_prime(const mbedtls_mpi * X, int (*f_rng)(void *, unsigned char *, size_t), void * p_rng) -{ - pkha_size_t sizeX = mbedtls_mpi_size(X); - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - if (sizeX <= FREESCALE_PKHA_INT_MAX_BYTES) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - int ret; - int random; - bool result = false; - uint8_t * ptrX = mbedtls_calloc(1, FREESCALE_PKHA_INT_MAX_BYTES); - if (NULL == ptrX) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - mbedtls_mpi_write_binary(X, ptrX, FREESCALE_PKHA_INT_MAX_BYTES); - ltc_reverse_array(ptrX, FREESCALE_PKHA_INT_MAX_BYTES); - - // Get the random seed number - f_rng(p_rng, (unsigned char *) (&random), sizeof(random)); - - ret = (int) LTC_PKHA_PrimalityTest(LTC_INSTANCE, (unsigned char *) &random, sizeof(random), (const uint8_t *) "1", 1u, ptrX, - sizeX, &result); - - if (ret != kStatus_Success) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - } - - if (result == false) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - } - cleanup: - if (ptrX) - { - mbedtls_free(ptrX); - } - return ret; -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_is_prime_orig(X, f_rng, p_rng); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} - -#elif defined(MBEDTLS_FREESCALE_CAAM_PKHA) -int mbedtls_mpi_is_prime(const mbedtls_mpi * X, int (*f_rng)(void *, unsigned char *, size_t), void * p_rng) -{ - pkha_size_t sizeX = mbedtls_mpi_size(X); - -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - if (sizeX <= FREESCALE_PKHA_INT_MAX_BYTES) - { -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ - int ret; - int random; - bool result = false; - uint8_t * ptrX = mbedtls_calloc(1, FREESCALE_PKHA_INT_MAX_BYTES); - if (NULL == ptrX) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - mbedtls_mpi_write_binary(X, ptrX, FREESCALE_PKHA_INT_MAX_BYTES); - - // Get the random seed number - f_rng(p_rng, (unsigned char *) (&random), sizeof(random)); - - ret = (int) CAAM_PKHA_PrimalityTest(CAAM_INSTANCE, &s_caamHandle, (unsigned char *) &random, sizeof(random), - (const uint8_t *) "1", 1u, ptrX, sizeX, &result); - - if (ret != kStatus_Success) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - } - - if (result == false) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE); - } - cleanup: - if (ptrX) - { - mbedtls_free(ptrX); - } - return ret; -#if defined(FREESCALE_PKHA_LONG_OPERANDS_ENABLE) - } - else - { - return mbedtls_mpi_is_prime_orig(X, f_rng, p_rng); - } -#endif /* FREESCALE_PKHA_LONG_OPERANDS_ENABLE */ -} -#endif /* MBEDTLS_FREESCALE_LTC_PKHA || MBEDTLS_FREESCALE_CAU3_PKHA */ -#endif /* MBEDTLS_MPI_IS_PRIME_ALT */ - -#endif /* MBEDTLS_BIGNUM_C */ - -#if defined(MBEDTLS_ECP_C) - -#include "mbedtls/ecp.h" - -#define LTC_MAX_ECC (512) -#define CAAM_MAX_ECC (528) -#define CAU3_MAX_ECC (512) - -typedef enum -{ - kBigEndian = 0U, - kLittleEndian = 1U -} endian_t; - -/* convert from mbedtls_mpi to LTC or CAAM integer, as array of bytes of size sz. - * if mbedtls_mpi has less bytes than sz, add zero bytes at most significant byte positions. - * This is when for example modulus is 32 bytes (P-256 curve) - * and mbedtls_mpi has only 31 bytes, we add leading zeroes - * so that result array has 32 bytes, same as modulus (sz). - */ -#if defined(MBEDTLS_ECP_MUL_COMB_ALT) || defined(MBEDTLS_ECP_ADD_ALT) -static int get_and_extend_mbedtls_mpi(uint8_t * dst, const mbedtls_mpi * a, size_t sz, endian_t endian) -{ - size_t szbin; - int offset; - int ret; - - /* check how many bytes are in the mbedtls_mpi */ - szbin = mbedtls_mpi_size(a); - - /* compute offset from dst */ - offset = sz - szbin; - if (offset < 0) - offset = 0; - if (offset > sz) - offset = sz; - - /* add leading zeroes */ - if (offset) - memset(dst, 0, offset); - - /* convert mbedtls_mpi to array of bytes */ - MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(a, dst + offset, szbin)); - - /* reverse array for LTC direct use */ - if (endian == kLittleEndian) - ltc_reverse_array(dst, sz); -cleanup: - return (ret); -} - -#if defined(MBEDTLS_FREESCALE_LTC_PKHA) || defined(MBEDTLS_FREESCALE_CAU3_PKHA) -static int ltc_get_from_mbedtls_mpi(uint8_t * dst, const mbedtls_mpi * a, size_t sz) -{ - return get_and_extend_mbedtls_mpi(dst, a, sz, kLittleEndian); -} - -#elif defined(MBEDTLS_FREESCALE_CAAM_PKHA) -static int caam_get_from_mbedtls_mpi(uint8_t * dst, const mbedtls_mpi * a, size_t sz) -{ - return get_and_extend_mbedtls_mpi(dst, a, sz, kBigEndian); -} -#endif /* MBEDTLS_FREESCALE_LTC_PKHA */ -#endif /* MBEDTLS_ECP_MUL_COMB_ALT || MBEDTLS_ECP_ADD_ALT */ - -/* - * Multiplication using the comb method, - * for curves in short Weierstrass form - */ -#if defined(MBEDTLS_ECP_MUL_COMB_ALT) -#if defined(MBEDTLS_FREESCALE_LTC_PKHA) -int ecp_mul_comb(mbedtls_ecp_group * grp, mbedtls_ecp_point * R, const mbedtls_mpi * m, const mbedtls_ecp_point * P, - int (*f_rng)(void *, unsigned char *, size_t), void * p_rng) -{ - int ret; - bool is_inf; - size_t size; - size_t size_bin; - int sign = m->s; - - ltc_pkha_ecc_point_t A; - ltc_pkha_ecc_point_t result; - - /* Allocate 7 elements with size of (LTC_MAX_ECC / 8) plus ptrE with size of FREESCALE_PKHA_INT_MAX_BYTES */ - uint8_t * ptrAX = mbedtls_calloc((7 * (LTC_MAX_ECC / 8)) + FREESCALE_PKHA_INT_MAX_BYTES, 1); - uint8_t * ptrAY = ptrAX + (LTC_MAX_ECC / 8); - uint8_t * ptrRX = ptrAY + (LTC_MAX_ECC / 8); - uint8_t * ptrRY = ptrRX + (LTC_MAX_ECC / 8); - uint8_t * ptrN = ptrRY + (LTC_MAX_ECC / 8); - uint8_t * ptrParamA = ptrN + (LTC_MAX_ECC / 8); - uint8_t * ptrParamB = ptrParamA + (LTC_MAX_ECC / 8); - uint8_t * ptrE = ptrParamB + (LTC_MAX_ECC / 8); - if (NULL == ptrAX) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - A.X = ptrAX; - A.Y = ptrAY; - result.X = ptrRX; - result.Y = ptrRY; - size = mbedtls_mpi_size(&grp->P); - if (mbedtls_mpi_size(&P->X) > (LTC_MAX_ECC / 8) || (mbedtls_mpi_get_bit(&grp->N, 0) != 1)) - { - CLEAN_RETURN(MBEDTLS_ERR_ECP_BAD_INPUT_DATA); - } - - /* Convert multi precision integers to arrays */ - MBEDTLS_MPI_CHK(ltc_get_from_mbedtls_mpi(A.X, &P->X, size)); - MBEDTLS_MPI_CHK(ltc_get_from_mbedtls_mpi(A.Y, &P->Y, size)); - MBEDTLS_MPI_CHK(ltc_get_from_mbedtls_mpi(ptrParamA, &grp->A, size)); - MBEDTLS_MPI_CHK(ltc_get_from_mbedtls_mpi(ptrParamB, &grp->B, size)); - - /* scalar multiplier integer of any size */ - size_bin = mbedtls_mpi_size(m); - MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(m, ptrE, size_bin)); - ltc_reverse_array(ptrE, size_bin); - - /* modulus */ - MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&grp->P, ptrN, size)); - ltc_reverse_array(ptrN, size); - - /* Multiply */ - LTC_PKHA_ECC_PointMul(LTC_INSTANCE, &A, ptrE, size_bin, ptrN, NULL, ptrParamA, ptrParamB, size, kLTC_PKHA_TimingEqualized, - kLTC_PKHA_IntegerArith, &result, &is_inf); - /* Convert result */ - ltc_reverse_array(ptrRX, size); - MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&R->X, ptrRX, size)); - ltc_reverse_array(ptrRY, size); - MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&R->Y, ptrRY, size)); - /* if the integer multiplier is negative, the computation happens with abs() value - * and the result (x,y) is changed to (x, -y) - */ - R->Y.s = sign; - MBEDTLS_MPI_CHK(mbedtls_mpi_lset(&R->Z, 1)); - -cleanup: - if (ptrAX) - { - mbedtls_free(ptrAX); - } - return (ret); -} - -#elif defined(MBEDTLS_FREESCALE_CAAM_PKHA) -int ecp_mul_comb(mbedtls_ecp_group * grp, mbedtls_ecp_point * R, const mbedtls_mpi * m, const mbedtls_ecp_point * P, - int (*f_rng)(void *, unsigned char *, size_t), void * p_rng) -{ - int ret; - size_t size; - size_t size_bin; - int sign = m->s; - - caam_pkha_ecc_point_t A; - caam_pkha_ecc_point_t result; - - /* Allocate 7 elements with size of (CAAM_MAX_ECC / 8) plus ptrE with size of FREESCALE_PKHA_INT_MAX_BYTES */ - uint8_t * ptrAX = mbedtls_calloc((7 * (CAAM_MAX_ECC / 8)) + FREESCALE_PKHA_INT_MAX_BYTES, 1); - uint8_t * ptrAY = ptrAX + (CAAM_MAX_ECC / 8); - uint8_t * ptrRX = ptrAY + (CAAM_MAX_ECC / 8); - uint8_t * ptrRY = ptrRX + (CAAM_MAX_ECC / 8); - uint8_t * ptrN = ptrRY + (CAAM_MAX_ECC / 8); - uint8_t * ptrParamA = ptrN + (CAAM_MAX_ECC / 8); - uint8_t * ptrParamB = ptrParamA + (CAAM_MAX_ECC / 8); - uint8_t * ptrE = ptrParamB + (CAAM_MAX_ECC / 8); - if (NULL == ptrAX) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - A.X = ptrAX; - A.Y = ptrAY; - result.X = ptrRX; - result.Y = ptrRY; - size = mbedtls_mpi_size(&grp->P); - if (mbedtls_mpi_size(&P->X) > (CAAM_MAX_ECC / 8) || (mbedtls_mpi_get_bit(&grp->N, 0) != 1)) - { - CLEAN_RETURN(MBEDTLS_ERR_ECP_BAD_INPUT_DATA); - } - - /* Convert multi precision integers to arrays */ - MBEDTLS_MPI_CHK(caam_get_from_mbedtls_mpi(A.X, &P->X, size)); - MBEDTLS_MPI_CHK(caam_get_from_mbedtls_mpi(A.Y, &P->Y, size)); - MBEDTLS_MPI_CHK(caam_get_from_mbedtls_mpi(ptrParamA, &grp->A, size)); - MBEDTLS_MPI_CHK(caam_get_from_mbedtls_mpi(ptrParamB, &grp->B, size)); - - /* scalar multiplier integer of any size */ - size_bin = mbedtls_mpi_size(m); - MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(m, ptrE, size_bin)); - - /* modulus */ - MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&grp->P, ptrN, size)); - - /* Multiply */ - CAAM_PKHA_ECC_PointMul(CAAM_INSTANCE, &s_caamHandle, &A, ptrE, size_bin, ptrN, NULL, ptrParamA, ptrParamB, size, - kCAAM_PKHA_TimingEqualized, kCAAM_PKHA_IntegerArith, &result); - /* Convert result */ - MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&R->X, ptrRX, size)); - MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&R->Y, ptrRY, size)); - /* if the integer multiplier is negative, the computation happens with abs() value - * and the result (x,y) is changed to (x, -y) - */ - R->Y.s = sign; - MBEDTLS_MPI_CHK(mbedtls_mpi_lset(&R->Z, 1)); - -cleanup: - if (ptrAX) - { - mbedtls_free(ptrAX); - } - return (ret); -} - -#elif defined(MBEDTLS_FREESCALE_CAU3_PKHA) -int ecp_mul_comb(mbedtls_ecp_group * grp, mbedtls_ecp_point * R, const mbedtls_mpi * m, const mbedtls_ecp_point * P, - int (*f_rng)(void *, unsigned char *, size_t), void * p_rng) -{ - int ret; - status_t status; - size_t size; - size_t size_bin; - int sign = m->s; - - cau3_pkha_ecc_point_t A; - cau3_pkha_ecc_point_t result; - - /* Allocate 7 elements with size of (CAU3_MAX_ECC / 8) plus ptrE with size of FREESCALE_PKHA_INT_MAX_BYTES */ - uint8_t * ptrAX = mbedtls_calloc((7 * (CAU3_MAX_ECC / 8)) + FREESCALE_PKHA_INT_MAX_BYTES, 1); - uint8_t * ptrAY = ptrAX + (CAU3_MAX_ECC / 8); - uint8_t * ptrRX = ptrAY + (CAU3_MAX_ECC / 8); - uint8_t * ptrRY = ptrRX + (CAU3_MAX_ECC / 8); - uint8_t * ptrN = ptrRY + (CAU3_MAX_ECC / 8); - uint8_t * ptrParamA = ptrN + (CAU3_MAX_ECC / 8); - uint8_t * ptrParamB = ptrParamA + (CAU3_MAX_ECC / 8); - uint8_t * ptrE = ptrParamB + (CAU3_MAX_ECC / 8); - if (NULL == ptrAX) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - A.X = ptrAX; - A.Y = ptrAY; - result.X = ptrRX; - result.Y = ptrRY; - size = mbedtls_mpi_size(&grp->P); - if (mbedtls_mpi_size(&P->X) > (CAU3_MAX_ECC / 8) || (mbedtls_mpi_get_bit(&grp->N, 0) != 1)) - { - CLEAN_RETURN(MBEDTLS_ERR_ECP_BAD_INPUT_DATA); - } - - /* Convert multi precision integers to arrays */ - MBEDTLS_MPI_CHK(cau3_get_from_mbedtls_mpi(A.X, &P->X, size)); - MBEDTLS_MPI_CHK(cau3_get_from_mbedtls_mpi(A.Y, &P->Y, size)); - MBEDTLS_MPI_CHK(cau3_get_from_mbedtls_mpi(ptrParamA, &grp->A, size)); - MBEDTLS_MPI_CHK(cau3_get_from_mbedtls_mpi(ptrParamB, &grp->B, size)); - - /* scalar multiplier integer of any size */ - size_bin = mbedtls_mpi_size(m); - MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(m, ptrE, size_bin)); - cau3_reverse_array(ptrE, size_bin); - - /* modulus */ - MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&grp->P, ptrN, size)); - cau3_reverse_array(ptrN, size); - - /* Multiply */ - status = CAU3_PKHA_ECC_PointMul(CAU3, &A, ptrE, size_bin, ptrN, NULL, ptrParamA, ptrParamB, size, kCAU3_PKHA_TimingEqualized, - kCAU3_PKHA_IntegerArith, &result); - - if (status != kStatus_Success) - { - CLEAN_RETURN(MBEDTLS_ERR_ECP_BAD_INPUT_DATA); - } - - /* Convert result */ - cau3_reverse_array(ptrRX, size); - MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&R->X, ptrRX, size)); - cau3_reverse_array(ptrRY, size); - MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&R->Y, ptrRY, size)); - /* if the integer multiplier is negative, the computation happens with abs() value - * and the result (x,y) is changed to (x, -y) - */ - R->Y.s = sign; - MBEDTLS_MPI_CHK(mbedtls_mpi_lset(&R->Z, 1)); - -cleanup: - if (ptrAX) - { - mbedtls_free(ptrAX); - } - return (ret); -} - -#endif /* MBEDTLS_FREESCALE_LTC_PKHA */ -#endif /* MBEDTLS_ECP_MUL_COMB_ALT */ - -/* - * Curve types: internal for now, might be exposed later - */ -typedef enum -{ - ECP_TYPE_NONE = 0, - ECP_TYPE_SHORT_WEIERSTRASS, /* y^2 = x^3 + a x + b */ - ECP_TYPE_MONTGOMERY, /* y^2 = x^3 + a x^2 + x */ -} ecp_curve_type; -/* - * Get the type of a curve - */ -static inline ecp_curve_type ecp_get_type(const mbedtls_ecp_group * grp) -{ - if (grp->G.X.p == NULL) - return (ECP_TYPE_NONE); - - if (grp->G.Y.p == NULL) - return (ECP_TYPE_MONTGOMERY); - else - return (ECP_TYPE_SHORT_WEIERSTRASS); -} - -/* - * Addition: R = P + Q, result's coordinates normalized - */ -#if defined(MBEDTLS_ECP_ADD_ALT) -#if defined(MBEDTLS_FREESCALE_LTC_PKHA) -int ecp_add(const mbedtls_ecp_group * grp, mbedtls_ecp_point * R, const mbedtls_ecp_point * P, const mbedtls_ecp_point * Q) -{ - int ret; - size_t size; - ltc_pkha_ecc_point_t A; - ltc_pkha_ecc_point_t B; - ltc_pkha_ecc_point_t result; - - uint8_t * ptrAX = mbedtls_calloc(9, (LTC_MAX_ECC / 8)); - uint8_t * ptrAY = ptrAX + (LTC_MAX_ECC / 8); - uint8_t * ptrBX = ptrAY + (LTC_MAX_ECC / 8); - uint8_t * ptrBY = ptrBX + (LTC_MAX_ECC / 8); - uint8_t * ptrRX = ptrBY + (LTC_MAX_ECC / 8); - uint8_t * ptrRY = ptrRX + (LTC_MAX_ECC / 8); - uint8_t * ptrN = ptrRY + (LTC_MAX_ECC / 8); - uint8_t * ptrParamA = ptrN + (LTC_MAX_ECC / 8); - uint8_t * ptrParamB = ptrParamA + (LTC_MAX_ECC / 8); - if (NULL == ptrAX) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - if (ecp_get_type(grp) != ECP_TYPE_SHORT_WEIERSTRASS) - CLEAN_RETURN(MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE); - - A.X = ptrAX; - A.Y = ptrAY; - B.X = ptrBX; - B.Y = ptrBY; - result.X = ptrRX; - result.Y = ptrRY; - size = mbedtls_mpi_size(&grp->P); - if (mbedtls_mpi_size(&P->X) > (LTC_MAX_ECC / 8) || (mbedtls_mpi_get_bit(&grp->P, 0) != 1)) - { - CLEAN_RETURN(MBEDTLS_ERR_ECP_BAD_INPUT_DATA); - } - - /* Convert multi precision integers to arrays */ - MBEDTLS_MPI_CHK(ltc_get_from_mbedtls_mpi(A.X, &P->X, size)); - MBEDTLS_MPI_CHK(ltc_get_from_mbedtls_mpi(A.Y, &P->Y, size)); - MBEDTLS_MPI_CHK(ltc_get_from_mbedtls_mpi(B.X, &Q->X, size)); - MBEDTLS_MPI_CHK(ltc_get_from_mbedtls_mpi(B.Y, &Q->Y, size)); - MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&grp->P, ptrN, size)); - ltc_reverse_array(ptrN, size); - /* Multiply */ - LTC_PKHA_ECC_PointAdd(LTC_INSTANCE, &A, &B, ptrN, NULL, ptrParamA, ptrParamB, size, kLTC_PKHA_IntegerArith, &result); - /* Convert result */ - ltc_reverse_array(ptrRX, size); - MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&R->X, ptrRX, size)); - ltc_reverse_array(ptrRY, size); - MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&R->Y, ptrRY, size)); - R->X.s = P->X.s; - R->Y.s = P->Y.s; - MBEDTLS_MPI_CHK(mbedtls_mpi_lset(&R->Z, 1)); - -cleanup: - if (ptrAX) - { - mbedtls_free(ptrAX); - } - return (ret); -} - -#elif defined(MBEDTLS_FREESCALE_CAAM_PKHA) -int ecp_add(const mbedtls_ecp_group * grp, mbedtls_ecp_point * R, const mbedtls_ecp_point * P, const mbedtls_ecp_point * Q) -{ - int ret; - size_t size; - caam_pkha_ecc_point_t A; - caam_pkha_ecc_point_t B; - caam_pkha_ecc_point_t result; - - uint8_t * ptrAX = mbedtls_calloc(9, (CAAM_MAX_ECC / 8)); - uint8_t * ptrAY = ptrAX + (CAAM_MAX_ECC / 8); - uint8_t * ptrBX = ptrAY + (CAAM_MAX_ECC / 8); - uint8_t * ptrBY = ptrBX + (CAAM_MAX_ECC / 8); - uint8_t * ptrRX = ptrBY + (CAAM_MAX_ECC / 8); - uint8_t * ptrRY = ptrRX + (CAAM_MAX_ECC / 8); - uint8_t * ptrN = ptrRY + (CAAM_MAX_ECC / 8); - uint8_t * ptrParamA = ptrN + (CAAM_MAX_ECC / 8); - uint8_t * ptrParamB = ptrParamA + (CAAM_MAX_ECC / 8); - if (NULL == ptrAX) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - if (ecp_get_type(grp) != ECP_TYPE_SHORT_WEIERSTRASS) - CLEAN_RETURN(MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE); - - A.X = ptrAX; - A.Y = ptrAY; - B.X = ptrBX; - B.Y = ptrBY; - result.X = ptrRX; - result.Y = ptrRY; - size = mbedtls_mpi_size(&grp->P); - if (mbedtls_mpi_size(&P->X) > (CAAM_MAX_ECC / 8) || (mbedtls_mpi_get_bit(&grp->P, 0) != 1)) - { - CLEAN_RETURN(MBEDTLS_ERR_ECP_BAD_INPUT_DATA); - } - - /* Convert multi precision integers to arrays */ - MBEDTLS_MPI_CHK(caam_get_from_mbedtls_mpi(A.X, &P->X, size)); - MBEDTLS_MPI_CHK(caam_get_from_mbedtls_mpi(A.Y, &P->Y, size)); - MBEDTLS_MPI_CHK(caam_get_from_mbedtls_mpi(B.X, &Q->X, size)); - MBEDTLS_MPI_CHK(caam_get_from_mbedtls_mpi(B.Y, &Q->Y, size)); - MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&grp->P, ptrN, size)); - - /* Multiply */ - CAAM_PKHA_ECC_PointAdd(CAAM_INSTANCE, &s_caamHandle, &A, &B, ptrN, NULL, ptrParamA, ptrParamB, size, kCAAM_PKHA_IntegerArith, - &result); - /* Convert result */ - MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&R->X, ptrRX, size)); - MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&R->Y, ptrRY, size)); - R->X.s = P->X.s; - R->Y.s = P->Y.s; - MBEDTLS_MPI_CHK(mbedtls_mpi_lset(&R->Z, 1)); - -cleanup: - if (ptrAX) - { - mbedtls_free(ptrAX); - } - return (ret); -} - -#elif defined(MBEDTLS_FREESCALE_CAU3_PKHA) -int ecp_add(const mbedtls_ecp_group * grp, mbedtls_ecp_point * R, const mbedtls_ecp_point * P, const mbedtls_ecp_point * Q) -{ - int ret; - status_t status; - size_t size; - cau3_pkha_ecc_point_t A; - cau3_pkha_ecc_point_t B; - cau3_pkha_ecc_point_t result; - - uint8_t * ptrAX = mbedtls_calloc(9, (CAU3_MAX_ECC / 8)); - uint8_t * ptrAY = ptrAX + (CAU3_MAX_ECC / 8); - uint8_t * ptrBX = ptrAY + (CAU3_MAX_ECC / 8); - uint8_t * ptrBY = ptrBX + (CAU3_MAX_ECC / 8); - uint8_t * ptrRX = ptrBY + (CAU3_MAX_ECC / 8); - uint8_t * ptrRY = ptrRX + (CAU3_MAX_ECC / 8); - uint8_t * ptrN = ptrRY + (CAU3_MAX_ECC / 8); - uint8_t * ptrParamA = ptrN + (CAU3_MAX_ECC / 8); - uint8_t * ptrParamB = ptrParamA + (CAU3_MAX_ECC / 8); - if (NULL == ptrAX) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - if (ecp_get_type(grp) != ECP_TYPE_SHORT_WEIERSTRASS) - CLEAN_RETURN(MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE); - - A.X = ptrAX; - A.Y = ptrAY; - B.X = ptrBX; - B.Y = ptrBY; - result.X = ptrRX; - result.Y = ptrRY; - size = mbedtls_mpi_size(&grp->P); - if (mbedtls_mpi_size(&P->X) > (CAU3_MAX_ECC / 8) || (mbedtls_mpi_get_bit(&grp->P, 0) != 1)) - { - CLEAN_RETURN(MBEDTLS_ERR_ECP_BAD_INPUT_DATA); - } - - /* Convert multi precision integers to arrays */ - MBEDTLS_MPI_CHK(cau3_get_from_mbedtls_mpi(A.X, &P->X, size)); - MBEDTLS_MPI_CHK(cau3_get_from_mbedtls_mpi(A.Y, &P->Y, size)); - MBEDTLS_MPI_CHK(cau3_get_from_mbedtls_mpi(B.X, &Q->X, size)); - MBEDTLS_MPI_CHK(cau3_get_from_mbedtls_mpi(B.Y, &Q->Y, size)); - MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&grp->P, ptrN, size)); - cau3_reverse_array(ptrN, size); - /* Multiply */ - status = CAU3_PKHA_ECC_PointAdd(CAU3, &A, &B, ptrN, NULL, ptrParamA, ptrParamB, size, kCAU3_PKHA_IntegerArith, &result); - - if (status != kStatus_Success) - { - CLEAN_RETURN(MBEDTLS_ERR_ECP_BAD_INPUT_DATA); - } - - /* Convert result */ - cau3_reverse_array(ptrRX, size); - MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&R->X, ptrRX, size)); - cau3_reverse_array(ptrRY, size); - MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&R->Y, ptrRY, size)); - R->X.s = P->X.s; - R->Y.s = P->Y.s; - MBEDTLS_MPI_CHK(mbedtls_mpi_lset(&R->Z, 1)); - -cleanup: - if (ptrAX) - { - mbedtls_free(ptrAX); - } - return (ret); -} - -#endif /* MBEDTLS_FREESCALE_LTC_PKHA */ - -#endif /* MBEDTLS_ECP_ADD_ALT */ - -#if defined(MBEDTLS_ECP_MUL_MXZ_ALT) -#if defined(MBEDTLS_FREESCALE_CAU3_PKHA) - -/* curve25519 params - in little endian for CAU3 */ -static const uint8_t s_curve25519_A24[] = { 0x42, 0xdb, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - -static const uint8_t s_curve25519_N[] = { 0xed, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f }; - -static const uint8_t s_curve25519_R2modN[] = { 0xa4, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - -int ecp_mul_mxz(mbedtls_ecp_group * grp, mbedtls_ecp_point * R, const mbedtls_mpi * m, const mbedtls_ecp_point * P, - int (*f_rng)(void *, unsigned char *, size_t), void * p_rng) -{ - int ret; - status_t status; - size_t size; - size_t size_bin; - - cau3_pkha_ecc_point_t A; - cau3_pkha_ecc_point_t result; - - /* Allocate 2 elements with size of (CAU3_MAX_ECC / 8) plus ptrE with size of FREESCALE_PKHA_INT_MAX_BYTES */ - uint8_t * ptrAX = mbedtls_calloc((2 * (CAU3_MAX_ECC / 8)) + FREESCALE_PKHA_INT_MAX_BYTES, 1); - uint8_t * ptrRX = ptrAX + (CAU3_MAX_ECC / 8); - uint8_t * ptrE = ptrRX + (CAU3_MAX_ECC / 8); - if (NULL == ptrAX) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - A.X = ptrAX; - result.X = ptrRX; - size = mbedtls_mpi_size(&grp->P); - if (mbedtls_mpi_size(&P->X) > (CAAM_MAX_ECC / 8)) - { - CLEAN_RETURN(MBEDTLS_ERR_ECP_BAD_INPUT_DATA); - } - - /* Convert multi precision integers to arrays */ - MBEDTLS_MPI_CHK(cau3_get_from_mbedtls_mpi(A.X, &P->X, size)); - - /* scalar multiplier integer of any size */ - size_bin = mbedtls_mpi_size(m); - MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(m, ptrE, size_bin)); - cau3_reverse_array(ptrE, size_bin); - - /* Multiply */ - status = CAU3_PKHA_ECM_PointMul(CAU3, ptrE, size_bin, A.X, s_curve25519_A24, s_curve25519_N, s_curve25519_R2modN, size, - kCAU3_PKHA_TimingEqualized, result.X); - - if (status != kStatus_Success) - { - CLEAN_RETURN(MBEDTLS_ERR_ECP_BAD_INPUT_DATA); - } - - /* Convert result */ - cau3_reverse_array(ptrRX, size); - MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&R->X, ptrRX, size)); - MBEDTLS_MPI_CHK(mbedtls_mpi_lset(&R->Z, 1)); - -cleanup: - if (ptrAX) - { - mbedtls_free(ptrAX); - } - return (ret); -} - -#endif /* MBEDTLS_FREESCALE_CAU3_PKHA */ -#endif /* MBEDTLS_ECP_MUL_MXZ_ALT */ - -#endif /* MBEDTLS_ECP_C */ - -#endif /* MBEDTLS_FREESCALE_LTC_PKHA */ - -#if defined(MBEDTLS_RSA_PUBLIC_ALT) -#if defined(MBEDTLS_FREESCALE_CASPER_PKHA) - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -#include "mbedtls/bignum.h" -#include "mbedtls/rsa.h" - -static void reverse_array(uint8_t * src, size_t src_len) -{ - int i; - - for (i = 0; i < src_len / 2; i++) - { - uint8_t tmp; - - tmp = src[i]; - src[i] = src[src_len - 1 - i]; - src[src_len - 1 - i] = tmp; - } -} -/* - * Do an RSA public key operation - */ -static int mbedtls_mpi_exp_mod_shim(mbedtls_mpi * X, const mbedtls_mpi * A, const mbedtls_mpi * E, - const mbedtls_mpi * N /*, mbedtls_mpi *_RR */) -{ - int ret = MBEDTLS_ERR_MPI_ALLOC_FAILED; - size_t sizeA = mbedtls_mpi_size(A); - size_t sizeN = mbedtls_mpi_size(N); - uint8_t * ptrX = mbedtls_calloc(3, FREESCALE_PKHA_INT_MAX_BYTES); - uint8_t * ptrA = ptrX + FREESCALE_PKHA_INT_MAX_BYTES; - uint8_t * ptrN = ptrA + FREESCALE_PKHA_INT_MAX_BYTES; - - if (NULL == ptrX) - { - CLEAN_RETURN(MBEDTLS_ERR_MPI_ALLOC_FAILED); - } - - MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(A, ptrA, sizeA)); - reverse_array(ptrA, sizeA); - - MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(N, ptrN, sizeN)); - reverse_array(ptrN, sizeN); - - CASPER_ModExp(CASPER, ptrA, ptrN, sizeN / 4, E->p[0], ptrX); - - reverse_array(ptrX, sizeN); - MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(X, ptrX, sizeN)); -cleanup: - if (ptrX != NULL) - { - mbedtls_free(ptrX); - } - - return ret; -} - -int mbedtls_rsa_public(mbedtls_rsa_context * ctx, const unsigned char * input, unsigned char * output) -{ - int ret; - size_t olen; - mbedtls_mpi T; - - mbedtls_mpi_init(&T); - -#if defined(MBEDTLS_THREADING_C) - if ((ret = mbedtls_mutex_lock(&ctx->mutex)) != 0) - return (ret); -#endif - - MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&T, input, ctx->len)); - - if (mbedtls_mpi_cmp_mpi(&T, &ctx->N) >= 0) - { - ret = MBEDTLS_ERR_MPI_BAD_INPUT_DATA; - goto cleanup; - } - - olen = ctx->len; - - MBEDTLS_MPI_CHK(mbedtls_mpi_exp_mod_shim(&T, &T, &ctx->E, &ctx->N /*, &ctx->RN */)); - - MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&T, output, olen)); - -cleanup: -#if defined(MBEDTLS_THREADING_C) - if (mbedtls_mutex_unlock(&ctx->mutex) != 0) - return (MBEDTLS_ERR_THREADING_MUTEX_ERROR); -#endif - - mbedtls_mpi_free(&T); - - if (ret != 0) - return (MBEDTLS_ERR_RSA_PUBLIC_FAILED + ret); - - return (0); -} - -#endif /* MBEDTLS_FREESCALE_CASPER_PKHA */ -#endif /* MBEDTLS_RSA_PUBLIC_ALT */ - -/******************************************************************************/ -/*************************** MD5 **********************************************/ -/******************************************************************************/ - -#if defined(MBEDTLS_MD5_C) - -#if defined(MBEDTLS_FREESCALE_MMCAU_MD5) - -#include "mbedtls/md5.h" - -int mbedtls_internal_md5_process(mbedtls_md5_context * ctx, const unsigned char data[64]) -{ - status_t ret = kStatus_Fail; - ret = MMCAU_MD5_HashN(data, 1, ctx->state); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_MD5_HW_ACCEL_FAILED; - } - return 0; -} - -#endif /* MBEDTLS_FREESCALE_MMCAU_MD5 */ - -#endif /* MBEDTLS_MD5_C */ - -/******************************************************************************/ -/*************************** SHA1 *********************************************/ -/******************************************************************************/ - -#if defined(MBEDTLS_SHA1_C) - -#if defined(MBEDTLS_FREESCALE_LTC_SHA1) -#include "mbedtls/sha1.h" - -void mbedtls_sha1_init(mbedtls_sha1_context * ctx) -{ - memset(ctx, 0, sizeof(mbedtls_sha1_context)); -} - -void mbedtls_sha1_free(mbedtls_sha1_context * ctx) -{ - if (ctx == NULL) - return; - - mbedtls_zeroize(ctx, sizeof(mbedtls_sha1_context)); -} - -void mbedtls_sha1_clone(mbedtls_sha1_context * dst, const mbedtls_sha1_context * src) -{ - memcpy(dst, src, sizeof(mbedtls_sha1_context)); -} - -/* - * SHA-1 context setup - */ -int mbedtls_sha1_starts_ret(mbedtls_sha1_context * ctx) -{ - status_t ret = kStatus_Fail; - ret = LTC_HASH_Init(LTC_INSTANCE, ctx, kLTC_Sha1, NULL, 0); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -int mbedtls_internal_sha1_process(mbedtls_sha1_context * ctx, const unsigned char data[64]) -{ - status_t ret = kStatus_Fail; - ret = LTC_HASH_Update(ctx, data, 64); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-1 process buffer - */ -int mbedtls_sha1_update_ret(mbedtls_sha1_context * ctx, const unsigned char * input, size_t ilen) -{ - status_t ret = kStatus_Fail; - ret = LTC_HASH_Update(ctx, input, ilen); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-1 final digest - */ -int mbedtls_sha1_finish_ret(mbedtls_sha1_context * ctx, unsigned char output[20]) -{ - status_t ret = kStatus_Fail; - ret = LTC_HASH_Finish(ctx, output, 0); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -#elif defined(MBEDTLS_FREESCALE_MMCAU_SHA1) - -#include "mbedtls/sha1.h" - -int mbedtls_internal_sha1_process(mbedtls_sha1_context * ctx, const unsigned char data[64]) -{ - status_t ret = kStatus_Fail; - ret = MMCAU_SHA1_HashN(data, 1, ctx->state); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -#elif defined(MBEDTLS_FREESCALE_LPC_SHA1) -#include "mbedtls/sha1.h" - -void mbedtls_sha1_init(mbedtls_sha1_context * ctx) -{ - memset(ctx, 0, sizeof(mbedtls_sha1_context)); -} - -void mbedtls_sha1_free(mbedtls_sha1_context * ctx) -{ - if (ctx == NULL) - return; - - mbedtls_zeroize(ctx, sizeof(mbedtls_sha1_context)); -} - -void mbedtls_sha1_clone(mbedtls_sha1_context * dst, const mbedtls_sha1_context * src) -{ - memcpy(dst, src, sizeof(mbedtls_sha1_context)); -} - -/* - * SHA-1 context setup - */ -int mbedtls_sha1_starts_ret(mbedtls_sha1_context * ctx) -{ - status_t ret = kStatus_Fail; - ret = SHA_Init(SHA_INSTANCE, ctx, kSHA_Sha1); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -int mbedtls_internal_sha1_process(mbedtls_sha1_context * ctx, const unsigned char data[64]) -{ - status_t ret = kStatus_Fail; - ret = SHA_Update(SHA_INSTANCE, ctx, data, 64); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-1 process buffer - */ -int mbedtls_sha1_update_ret(mbedtls_sha1_context * ctx, const unsigned char * input, size_t ilen) -{ - status_t ret = kStatus_Fail; - ret = SHA_Update(SHA_INSTANCE, ctx, input, ilen); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-1 final digest - */ -int mbedtls_sha1_finish_ret(mbedtls_sha1_context * ctx, unsigned char output[20]) -{ - size_t outputSize = 20u; - status_t ret = kStatus_Fail; - ret = SHA_Finish(SHA_INSTANCE, ctx, output, &outputSize); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} -#elif defined(MBEDTLS_FREESCALE_CAAM_SHA1) -#include "mbedtls/sha1.h" - -void mbedtls_sha1_init(mbedtls_sha1_context * ctx) -{ - memset(ctx, 0, sizeof(mbedtls_sha1_context)); -} - -void mbedtls_sha1_free(mbedtls_sha1_context * ctx) -{ - if (ctx == NULL) - return; - - mbedtls_zeroize(ctx, sizeof(mbedtls_sha1_context)); -} - -void mbedtls_sha1_clone(mbedtls_sha1_context * dst, const mbedtls_sha1_context * src) -{ - memcpy(dst, src, sizeof(mbedtls_sha1_context)); -} - -/* - * SHA-1 context setup - */ -int mbedtls_sha1_starts_ret(mbedtls_sha1_context * ctx) -{ - status_t ret = kStatus_Fail; - ret = CAAM_HASH_Init(CAAM_INSTANCE, &s_caamHandle, ctx, kCAAM_Sha1, NULL, 0); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -int mbedtls_internal_sha1_process(mbedtls_sha1_context * ctx, const unsigned char data[64]) -{ - status_t ret = kStatus_Fail; - ret = CAAM_HASH_Update(ctx, data, 64); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-1 process buffer - */ -int mbedtls_sha1_update_ret(mbedtls_sha1_context * ctx, const unsigned char * input, size_t ilen) -{ - status_t ret = kStatus_Fail; - ret = CAAM_HASH_Update(ctx, input, ilen); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-1 final digest - */ -int mbedtls_sha1_finish_ret(mbedtls_sha1_context * ctx, unsigned char output[20]) -{ - status_t ret = kStatus_Fail; - ret = CAAM_HASH_Finish(ctx, output, 0); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -#elif defined(MBEDTLS_FREESCALE_CAU3_SHA1) -#include "mbedtls/sha1.h" - -void mbedtls_sha1_init(mbedtls_sha1_context * ctx) -{ - memset(ctx, 0, sizeof(mbedtls_sha1_context)); -} - -void mbedtls_sha1_free(mbedtls_sha1_context * ctx) -{ - if (ctx == NULL) - return; - - mbedtls_zeroize(ctx, sizeof(mbedtls_sha1_context)); -} - -void mbedtls_sha1_clone(mbedtls_sha1_context * dst, const mbedtls_sha1_context * src) -{ - memcpy(dst, src, sizeof(mbedtls_sha1_context)); -} - -/* - * SHA-1 context setup - */ -int mbedtls_sha1_starts_ret(mbedtls_sha1_context * ctx) -{ - status_t ret = kStatus_Fail; - ret = CAU3_HASH_Init(CAU3, ctx, kCAU3_Sha1); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -int mbedtls_internal_sha1_process(mbedtls_sha1_context * ctx, const unsigned char data[64]) -{ - status_t ret = kStatus_Fail; - ret = CAU3_HASH_Update(CAU3, ctx, data, 64); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-1 process buffer - */ -int mbedtls_sha1_update_ret(mbedtls_sha1_context * ctx, const unsigned char * input, size_t ilen) -{ - status_t ret = kStatus_Fail; - ret = CAU3_HASH_Update(CAU3, ctx, input, ilen); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-1 final digest - */ -int mbedtls_sha1_finish_ret(mbedtls_sha1_context * ctx, unsigned char output[20]) -{ - status_t ret = kStatus_Fail; - ret = CAU3_HASH_Finish(CAU3, ctx, output, 0); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -#elif defined(MBEDTLS_FREESCALE_DCP_SHA1) -#include "mbedtls/sha1.h" - -void mbedtls_sha1_init(mbedtls_sha1_context * ctx) -{ - memset(ctx, 0, sizeof(mbedtls_sha1_context)); -} - -void mbedtls_sha1_free(mbedtls_sha1_context * ctx) -{ - if (ctx == NULL) - return; - - mbedtls_zeroize(ctx, sizeof(mbedtls_sha1_context)); -} - -void mbedtls_sha1_clone(mbedtls_sha1_context * dst, const mbedtls_sha1_context * src) -{ - memcpy(dst, src, sizeof(mbedtls_sha1_context)); -} - -/* - * SHA-1 context setup - */ -int mbedtls_sha1_starts_ret(mbedtls_sha1_context * ctx) -{ - status_t ret = kStatus_Fail; - ret = DCP_HASH_Init(DCP, &s_dcpHandle, ctx, kDCP_Sha1); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -int mbedtls_internal_sha1_process(mbedtls_sha1_context * ctx, const unsigned char data[64]) -{ - status_t ret = kStatus_Fail; - ret = DCP_HASH_Update(DCP, ctx, data, 64); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-1 process buffer - */ -int mbedtls_sha1_update_ret(mbedtls_sha1_context * ctx, const unsigned char * input, size_t ilen) -{ - status_t ret = kStatus_Fail; - ret = DCP_HASH_Update(DCP, ctx, input, ilen); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-1 final digest - */ -int mbedtls_sha1_finish_ret(mbedtls_sha1_context * ctx, unsigned char output[20]) -{ - status_t ret = kStatus_Fail; - ret = DCP_HASH_Finish(DCP, ctx, output, NULL); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -#elif defined(MBEDTLS_FREESCALE_HASHCRYPT_SHA1) -#include "mbedtls/sha1.h" - -void mbedtls_sha1_init(mbedtls_sha1_context * ctx) -{ - memset(ctx, 0, sizeof(mbedtls_sha1_context)); -} - -void mbedtls_sha1_free(mbedtls_sha1_context * ctx) -{ - if (ctx == NULL) - return; - - mbedtls_zeroize(ctx, sizeof(mbedtls_sha1_context)); -} - -void mbedtls_sha1_clone(mbedtls_sha1_context * dst, const mbedtls_sha1_context * src) -{ - memcpy(dst, src, sizeof(mbedtls_sha1_context)); -} - -/* - * SHA-1 context setup - */ -int mbedtls_sha1_starts_ret(mbedtls_sha1_context * ctx) -{ - status_t ret = kStatus_Fail; - ret = HASHCRYPT_SHA_Init(HASHCRYPT, ctx, kHASHCRYPT_Sha1); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -int mbedtls_internal_sha1_process(mbedtls_sha1_context * ctx, const unsigned char data[64]) -{ - status_t ret = kStatus_Fail; - ret = HASHCRYPT_SHA_Update(HASHCRYPT, ctx, data, 64); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-1 process buffer - */ -int mbedtls_sha1_update_ret(mbedtls_sha1_context * ctx, const unsigned char * input, size_t ilen) -{ - status_t ret = kStatus_Fail; - ret = HASHCRYPT_SHA_Update(HASHCRYPT, ctx, input, ilen); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-1 final digest - */ -int mbedtls_sha1_finish_ret(mbedtls_sha1_context * ctx, unsigned char output[20]) -{ - status_t ret = kStatus_Fail; - size_t outputSize = 20; - ret = HASHCRYPT_SHA_Finish(HASHCRYPT, ctx, output, &outputSize); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED; - } - return 0; -} -#endif /* MBEDTLS_FREESCALE_LPC_SHA1 */ -#if !defined(MBEDTLS_DEPRECATED_REMOVED) && defined(MBEDTLS_SHA1_ALT) -#include "mbedtls/sha1.h" - -void mbedtls_sha1_starts(mbedtls_sha1_context * ctx) -{ - mbedtls_sha1_starts_ret(ctx); -} - -void mbedtls_sha1_update(mbedtls_sha1_context * ctx, const unsigned char * input, size_t ilen) -{ - mbedtls_sha1_update_ret(ctx, input, ilen); -} - -void mbedtls_sha1_finish(mbedtls_sha1_context * ctx, unsigned char output[20]) -{ - mbedtls_sha1_finish_ret(ctx, output); -} - -void mbedtls_sha1_process(mbedtls_sha1_context * ctx, const unsigned char data[64]) -{ - mbedtls_internal_sha1_process(ctx, data); -} -#endif /* MBEDTLS_DEPRECATED_REMOVED */ -#endif /* MBEDTLS_SHA1_C */ - -/******************************************************************************/ -/*************************** SHA256********************************************/ -/******************************************************************************/ - -#if defined(MBEDTLS_SHA256_C) - -#if defined(MBEDTLS_FREESCALE_LTC_SHA256) -#include "mbedtls/sha256.h" - -void mbedtls_sha256_init(mbedtls_sha256_context * ctx) -{ - memset(ctx, 0, sizeof(mbedtls_sha256_context)); -} - -void mbedtls_sha256_free(mbedtls_sha256_context * ctx) -{ - if (ctx == NULL) - return; - - mbedtls_zeroize(ctx, sizeof(mbedtls_sha256_context)); -} - -void mbedtls_sha256_clone(mbedtls_sha256_context * dst, const mbedtls_sha256_context * src) -{ - memcpy(dst, src, sizeof(*dst)); -} - -/* - * SHA-256 context setup - */ -int mbedtls_sha256_starts_ret(mbedtls_sha256_context * ctx, int is224) -{ - status_t ret = kStatus_Fail; - if (is224) - { - ret = LTC_HASH_Init(LTC_INSTANCE, ctx, kLTC_Sha224, NULL, 0); - } - else - { - ret = LTC_HASH_Init(LTC_INSTANCE, ctx, kLTC_Sha256, NULL, 0); - } - - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -int mbedtls_internal_sha256_process(mbedtls_sha256_context * ctx, const unsigned char data[64]) -{ - status_t ret = kStatus_Fail; - ret = LTC_HASH_Update(ctx, data, 64); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-256 process buffer - */ -int mbedtls_sha256_update_ret(mbedtls_sha256_context * ctx, const unsigned char * input, size_t ilen) -{ - status_t ret = kStatus_Fail; - ret = LTC_HASH_Update(ctx, input, ilen); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-256 final digest - */ -int mbedtls_sha256_finish_ret(mbedtls_sha256_context * ctx, unsigned char output[32]) -{ - status_t ret = kStatus_Fail; - ret = LTC_HASH_Finish(ctx, output, 0); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -#elif defined(MBEDTLS_FREESCALE_MMCAU_SHA256) - -#include "mbedtls/sha256.h" - -int mbedtls_internal_sha256_process(mbedtls_sha256_context * ctx, const unsigned char data[64]) -{ - status_t ret = kStatus_Fail; - ret = MMCAU_SHA256_HashN(data, 1, ctx->state); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -#elif defined(MBEDTLS_FREESCALE_CAU3_SHA256) - -#include "mbedtls/sha256.h" - -void mbedtls_sha256_init(mbedtls_sha256_context * ctx) -{ - memset(ctx, 0, sizeof(mbedtls_sha256_context)); -} - -void mbedtls_sha256_free(mbedtls_sha256_context * ctx) -{ - if (ctx == NULL) - return; - - mbedtls_zeroize(ctx, sizeof(mbedtls_sha256_context)); -} - -void mbedtls_sha256_clone(mbedtls_sha256_context * dst, const mbedtls_sha256_context * src) -{ - memcpy(dst, src, sizeof(*dst)); -} - -/* - * SHA-256 context setup - */ -int mbedtls_sha256_starts_ret(mbedtls_sha256_context * ctx, int is224) -{ - status_t ret = kStatus_Fail; - if (!is224) /* SHA-224 not supported at the moment */ - { - ret = CAU3_HASH_Init(CAU3, ctx, kCAU3_Sha256); - } - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -int mbedtls_internal_sha256_process(mbedtls_sha256_context * ctx, const unsigned char data[64]) -{ - status_t ret = kStatus_Fail; - ret = CAU3_HASH_Update(CAU3, ctx, data, 64); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-256 process buffer - */ -int mbedtls_sha256_update_ret(mbedtls_sha256_context * ctx, const unsigned char * input, size_t ilen) -{ - status_t ret = kStatus_Fail; - ret = CAU3_HASH_Update(CAU3, ctx, input, ilen); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-256 final digest - */ -int mbedtls_sha256_finish_ret(mbedtls_sha256_context * ctx, unsigned char output[32]) -{ - status_t ret = kStatus_Fail; - ret = CAU3_HASH_Finish(CAU3, ctx, output, 0); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -#elif defined(MBEDTLS_FREESCALE_LPC_SHA256) -#include "mbedtls/sha256.h" - -void mbedtls_sha256_init(mbedtls_sha256_context * ctx) -{ - memset(ctx, 0, sizeof(mbedtls_sha256_context)); -} - -void mbedtls_sha256_free(mbedtls_sha256_context * ctx) -{ - if (ctx == NULL) - return; - - mbedtls_zeroize(ctx, sizeof(mbedtls_sha256_context)); -} - -void mbedtls_sha256_clone(mbedtls_sha256_context * dst, const mbedtls_sha256_context * src) -{ - memcpy(dst, src, sizeof(*dst)); -} - -/* - * SHA-256 context setup - */ -int mbedtls_sha256_starts_ret(mbedtls_sha256_context * ctx, int is224) -{ - int status = MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - if (!is224) /* SHA-224 not supported */ - { - SHA256_Init(ctx); - status = 0; - } - return status; -} - -int mbedtls_internal_sha256_process(mbedtls_sha256_context * ctx, const unsigned char data[64]) -{ - SHA256_HashUpdate(ctx, data, 64); - return 0; -} - -/* - * SHA-256 process buffer - */ -int mbedtls_sha256_update_ret(mbedtls_sha256_context * ctx, const unsigned char * input, size_t ilen) -{ - SHA256_HashUpdate(ctx, input, ilen); - - return 0; -} - -/* - * SHA-256 final digest - */ -int mbedtls_sha256_finish_ret(mbedtls_sha256_context * ctx, unsigned char output[32]) -{ - SHA256_HashFinish(ctx, output); - return 0; -} - -#elif defined(MBEDTLS_FREESCALE_CAAM_SHA256) -#include "mbedtls/sha256.h" - -void mbedtls_sha256_init(mbedtls_sha256_context * ctx) -{ - memset(ctx, 0, sizeof(mbedtls_sha256_context)); -} - -void mbedtls_sha256_free(mbedtls_sha256_context * ctx) -{ - if (ctx == NULL) - return; - - mbedtls_zeroize(ctx, sizeof(mbedtls_sha256_context)); -} - -void mbedtls_sha256_clone(mbedtls_sha256_context * dst, const mbedtls_sha256_context * src) -{ - memcpy(dst, src, sizeof(*dst)); -} - -/* - * SHA-256 context setup - */ -int mbedtls_sha256_starts_ret(mbedtls_sha256_context * ctx, int is224) -{ - status_t ret = kStatus_Fail; - if (is224) - { - ret = CAAM_HASH_Init(CAAM_INSTANCE, &s_caamHandle, ctx, kCAAM_Sha224, NULL, 0); - } - else - { - ret = CAAM_HASH_Init(CAAM_INSTANCE, &s_caamHandle, ctx, kCAAM_Sha256, NULL, 0); - } - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -int mbedtls_internal_sha256_process(mbedtls_sha256_context * ctx, const unsigned char data[64]) -{ - status_t ret = kStatus_Fail; - ret = CAAM_HASH_Update(ctx, data, 64); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-256 process buffer - */ -int mbedtls_sha256_update_ret(mbedtls_sha256_context * ctx, const unsigned char * input, size_t ilen) -{ - status_t ret = kStatus_Fail; - ret = CAAM_HASH_Update(ctx, input, ilen); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-256 final digest - */ -int mbedtls_sha256_finish_ret(mbedtls_sha256_context * ctx, unsigned char output[32]) -{ - status_t ret = kStatus_Fail; - ret = CAAM_HASH_Finish(ctx, output, 0); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -#elif defined(MBEDTLS_FREESCALE_DCP_SHA256) -#include "mbedtls/sha256.h" - -void mbedtls_sha256_init(mbedtls_sha256_context * ctx) -{ - memset(ctx, 0, sizeof(mbedtls_sha256_context)); -} - -void mbedtls_sha256_free(mbedtls_sha256_context * ctx) -{ - if (ctx == NULL) - return; - - mbedtls_zeroize(ctx, sizeof(mbedtls_sha256_context)); -} - -void mbedtls_sha256_clone(mbedtls_sha256_context * dst, const mbedtls_sha256_context * src) -{ - memcpy(dst, src, sizeof(*dst)); -} - -/* - * SHA-256 context setup - */ -int mbedtls_sha256_starts_ret(mbedtls_sha256_context * ctx, int is224) -{ - status_t ret = kStatus_Fail; - if (!is224) - { - ret = DCP_HASH_Init(DCP, &s_dcpHandle, ctx, kDCP_Sha256); - } - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -int mbedtls_internal_sha256_process(mbedtls_sha256_context * ctx, const unsigned char data[64]) -{ - status_t ret = kStatus_Fail; - ret = DCP_HASH_Update(DCP, ctx, data, 64); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-256 process buffer - */ -int mbedtls_sha256_update_ret(mbedtls_sha256_context * ctx, const unsigned char * input, size_t ilen) -{ - status_t ret = kStatus_Fail; - ret = DCP_HASH_Update(DCP, ctx, input, ilen); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-256 final digest - */ -int mbedtls_sha256_finish_ret(mbedtls_sha256_context * ctx, unsigned char output[32]) -{ - status_t ret = kStatus_Fail; - ret = DCP_HASH_Finish(DCP, ctx, output, NULL); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -#elif defined(MBEDTLS_FREESCALE_HASHCRYPT_SHA256) -#include "mbedtls/sha256.h" - -void mbedtls_sha256_init(mbedtls_sha256_context * ctx) -{ - memset(ctx, 0, sizeof(mbedtls_sha256_context)); -} - -void mbedtls_sha256_free(mbedtls_sha256_context * ctx) -{ - if (ctx == NULL) - return; - - mbedtls_zeroize(ctx, sizeof(mbedtls_sha256_context)); -} - -void mbedtls_sha256_clone(mbedtls_sha256_context * dst, const mbedtls_sha256_context * src) -{ - memcpy(dst, src, sizeof(*dst)); -} - -/* - * SHA-256 context setup - */ -int mbedtls_sha256_starts_ret(mbedtls_sha256_context * ctx, int is224) -{ - status_t ret = kStatus_Fail; - if (!is224) /* SHA-224 not supported */ - { - ret = HASHCRYPT_SHA_Init(HASHCRYPT, ctx, kHASHCRYPT_Sha256); - } - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -int mbedtls_internal_sha256_process(mbedtls_sha256_context * ctx, const unsigned char data[64]) -{ - status_t ret = kStatus_Fail; - ret = HASHCRYPT_SHA_Update(HASHCRYPT, ctx, data, 64); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-256 process buffer - */ -int mbedtls_sha256_update_ret(mbedtls_sha256_context * ctx, const unsigned char * input, size_t ilen) -{ - status_t ret = kStatus_Fail; - ret = HASHCRYPT_SHA_Update(HASHCRYPT, ctx, input, ilen); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} - -/* - * SHA-256 final digest - */ -int mbedtls_sha256_finish_ret(mbedtls_sha256_context * ctx, unsigned char output[32]) -{ - status_t ret = kStatus_Fail; - size_t outputSize = 32; - ret = HASHCRYPT_SHA_Finish(HASHCRYPT, ctx, output, &outputSize); - if (ret != kStatus_Success) - { - return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED; - } - return 0; -} -#endif /* MBEDTLS_FREESCALE_LTC_SHA256 */ -#if !defined(MBEDTLS_DEPRECATED_REMOVED) && defined(MBEDTLS_SHA256_ALT) -#include "mbedtls/sha256.h" - -void mbedtls_sha256_starts(mbedtls_sha256_context * ctx, int is224) -{ - mbedtls_sha256_starts_ret(ctx, is224); -} - -void mbedtls_sha256_update(mbedtls_sha256_context * ctx, const unsigned char * input, size_t ilen) -{ - mbedtls_sha256_update_ret(ctx, input, ilen); -} - -void mbedtls_sha256_finish(mbedtls_sha256_context * ctx, unsigned char output[32]) -{ - mbedtls_sha256_finish_ret(ctx, output); -} - -void mbedtls_sha256_process(mbedtls_sha256_context * ctx, const unsigned char data[64]) -{ - mbedtls_internal_sha256_process(ctx, data); -} -#endif /* MBEDTLS_DEPRECATED_REMOVED */ -#endif /* MBEDTLS_SHA256_C */ - -/* Entropy poll callback for a hardware source */ -#if defined(MBEDTLS_ENTROPY_HARDWARE_ALT) - -#if defined(FSL_FEATURE_SOC_TRNG_COUNT) && (FSL_FEATURE_SOC_TRNG_COUNT > 0) -#if defined CPU_JN518X -#include "fsl_rng.h" -#else -#include "fsl_trng.h" -#endif -#elif defined(FSL_FEATURE_SOC_RNG_COUNT) && (FSL_FEATURE_SOC_RNG_COUNT > 0) -#include "fsl_rnga.h" -#elif defined(FSL_FEATURE_SOC_LPC_RNG_COUNT) && (FSL_FEATURE_SOC_LPC_RNG_COUNT > 0) -#include "fsl_rng.h" -#elif defined(FSL_FEATURE_SOC_LPC_RNG1_COUNT) && (FSL_FEATURE_SOC_LPC_RNG1_COUNT > 0) -#include "fsl_rng.h" -#endif - -int mbedtls_hardware_poll(void * data, unsigned char * output, size_t len, size_t * olen) -{ - status_t result = kStatus_Success; - -#if defined(FSL_FEATURE_SOC_TRNG_COUNT) && (FSL_FEATURE_SOC_TRNG_COUNT > 0) -#if defined CPU_JN518X -#ifndef TRNG0 -#define TRNG0 RNG -#endif -#else -#ifndef TRNG0 -#define TRNG0 TRNG -#endif -#endif - result = TRNG_GetRandomData(TRNG0, output, len); -#elif defined(FSL_FEATURE_SOC_RNG_COUNT) && (FSL_FEATURE_SOC_RNG_COUNT > 0) - result = RNGA_GetRandomData(RNG, (void *) output, len); -#elif defined(FSL_FEATURE_SOC_CAAM_COUNT) && (FSL_FEATURE_SOC_CAAM_COUNT > 0) && defined(CRYPTO_USE_DRIVER_CAAM) - result = CAAM_RNG_GetRandomData(CAAM_INSTANCE, &s_caamHandle, kCAAM_RngStateHandle0, output, len, kCAAM_RngDataAny, NULL); -#elif defined(FSL_FEATURE_SOC_LPC_RNG_COUNT) && (FSL_FEATURE_SOC_LPC_RNG_COUNT > 0) - uint32_t rn; - size_t length; - int i; - - length = len; - - while (length > 0) - { - rn = RNG_GetRandomData(); - - if (length >= sizeof(uint32_t)) - { - memcpy(output, &rn, sizeof(uint32_t)); - length -= sizeof(uint32_t); - output += sizeof(uint32_t); - } - else - { - memcpy(output, &rn, length); - output += length; - len = 0U; - } - - /* Discard next 32 random words for better entropy */ - for (i = 0; i < 32; i++) - { - RNG_GetRandomData(); - } - } - - result = kStatus_Success; -#elif defined(FSL_FEATURE_SOC_LPC_RNG1_COUNT) && (FSL_FEATURE_SOC_LPC_RNG1_COUNT > 0) - status_t status = kStatus_Fail; - - while (status != kStatus_Success) - { - status = RNG_GetRandomData(RNG, output, len); - - if (status == kStatus_Fail) - { - RNG_Init(RNG); - } - } - - result = status; -#endif - if (result == kStatus_Success) - { - *olen = len; - return 0; - } - else - { - return result; - } -} - -#endif - -/******************************************************************************/ -/*************************** FreeRTOS ********************************************/ -/******************************************************************************/ -#if USE_RTOS && defined(FSL_RTOS_FREE_RTOS) && defined(MBEDTLS_FREESCALE_FREERTOS_CALLOC_ALT) -#include "FreeRTOS.h" -#include "task.h" -#include - -/*---------HEAP_3 calloc --------------------------------------------------*/ - -void * pvPortCalloc(size_t num, size_t size) -{ - void * pvReturn; - - vTaskSuspendAll(); - { - pvReturn = calloc(num, size); - traceMALLOC(pvReturn, xWantedSize); - } - (void) xTaskResumeAll(); - -#if (configUSE_MALLOC_FAILED_HOOK == 1) - { - if (pvReturn == NULL) - { - extern void vApplicationMallocFailedHook(void); - vApplicationMallocFailedHook(); - } - } -#endif - - return pvReturn; -} -#endif /* USE_RTOS && defined(FSL_RTOS_FREE_RTOS) && defined(MBEDTLS_FREESCALE_FREERTOS_CALLOC_ALT) */ diff --git a/third_party/nxp/k32w0_sdk/k32w0_sdk.gni b/third_party/nxp/k32w0_sdk/k32w0_sdk.gni index 41e9761044106f..e8858022e20516 100644 --- a/third_party/nxp/k32w0_sdk/k32w0_sdk.gni +++ b/third_party/nxp/k32w0_sdk/k32w0_sdk.gni @@ -204,7 +204,28 @@ template("k32w0_sdk") { "${k32w0_sdk_root}/components/serial_manager", "${k32w0_sdk_root}/components/uart", "${k32w0_sdk_root}/devices/${device}", - "${k32w0_sdk_root}/devices/${device}/drivers", + "${k32w0_sdk_root}/devices/K32W061/drivers", + "${k32w0_sdk_root}/drivers/common", + "${k32w0_sdk_root}/drivers/lpc_gpio", + "${k32w0_sdk_root}/drivers/aes", + "${k32w0_sdk_root}/drivers/jn_iocon", + "${k32w0_sdk_root}/drivers/lpc_adc", + "${k32w0_sdk_root}/drivers/aes", + "${k32w0_sdk_root}/drivers/jn_flash", + "${k32w0_sdk_root}/drivers/sha", + "${k32w0_sdk_root}/drivers/flexcomm", + "${k32w0_sdk_root}/drivers/lpc_dma", + "${k32w0_sdk_root}/drivers/pint", + "${k32w0_sdk_root}/drivers/inputmux", + "${k32w0_sdk_root}/drivers/spifi", + "${k32w0_sdk_root}/drivers/jn_rtc", + "${k32w0_sdk_root}/drivers/fmeas", + "${k32w0_sdk_root}/drivers/jn_rng", + "${k32w0_sdk_root}/drivers/ctimer", + "${k32w0_sdk_root}/drivers/wwdt", + "${k32w0_sdk_root}/drivers/gint", + "${k32w0_sdk_root}/utilities/debug_console/str", + "${k32w0_sdk_root}/utilities/debug_console", "${k32w0_sdk_root}/devices/${device}/utilities", "${k32w0_sdk_root}/devices/${device}/utilities/debug_console", "${k32w0_sdk_root}/devices/${device}/utilities/str", @@ -257,7 +278,6 @@ template("k32w0_sdk") { ] defines = [ - "gPWR_CpuClk_48MHz=1", "gMainThreadPriority_c=5", "CPU_JN518X", "CPU_JN518X_REV=2", @@ -335,9 +355,15 @@ template("k32w0_sdk") { } if (use_fro_32k == 1) { - defines += [ "gClkUseFro32K=1" ] + defines += [ + "gClkUseFro32K=1", + "gPWR_CpuClk_48MHz=0", + ] } else { - defines += [ "gClkUseFro32K=0" ] + defines += [ + "gClkUseFro32K=0", + "gPWR_CpuClk_48MHz=1", + ] } if (chip_with_pdm_encryption == 1) { @@ -399,6 +425,7 @@ template("k32w0_sdk") { if (chip_with_low_power == 1) { defines += [ + "chip_with_low_power=1", "cPWR_UsePowerDownMode=1", "cPWR_FullPowerDownMode=1", "DBG_PostStepTickAssess=0", @@ -456,7 +483,7 @@ template("k32w0_sdk") { } if (chip_with_factory_data == 1) { - defines += [ "CONFIG_CHIP_K32W0_REAL_FACTORY_DATA=1" ] + defines += [ "CONFIG_CHIP_LOAD_REAL_FACTORY_DATA=1" ] } if (defined(invoker.defines)) { @@ -510,31 +537,29 @@ template("k32w0_sdk") { "${k32w0_sdk_root}/components/serial_manager/serial_manager.c", "${k32w0_sdk_root}/components/serial_manager/serial_port_uart.c", "${k32w0_sdk_root}/components/uart/usart_adapter.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_adc.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_aes.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_clock.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_common.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_ctimer.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_flash.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_flexcomm.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_fmeas.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_gpio.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_i2c.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_i2c_freertos.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_inputmux.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_pint.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_power.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_reset.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_rng.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_rtc.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_sha.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_spifi.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_usart.c", - "${k32w0_sdk_root}/devices/${device}/drivers/fsl_wtimer.c", "${k32w0_sdk_root}/devices/${device}/mcuxpresso/startup_${device_lowercase}.c", "${k32w0_sdk_root}/devices/${device}/system_${device}.c", - "${k32w0_sdk_root}/devices/${device}/utilities/debug_console/fsl_debug_console.c", - "${k32w0_sdk_root}/devices/${device}/utilities/str/fsl_str.c", + "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_clock.c", + "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_power.c", + "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_reset.c", + "${k32w0_sdk_root}/devices/K32W061/drivers/fsl_wtimer.c", + "${k32w0_sdk_root}/drivers/aes/fsl_aes.c", + "${k32w0_sdk_root}/drivers/common/fsl_common.c", + "${k32w0_sdk_root}/drivers/ctimer/fsl_ctimer.c", + "${k32w0_sdk_root}/drivers/flexcomm/fsl_flexcomm.c", + "${k32w0_sdk_root}/drivers/flexcomm/fsl_i2c.c", + "${k32w0_sdk_root}/drivers/flexcomm/fsl_i2c_freertos.c", + "${k32w0_sdk_root}/drivers/flexcomm/fsl_usart.c", + "${k32w0_sdk_root}/drivers/fmeas/fsl_fmeas.c", + "${k32w0_sdk_root}/drivers/inputmux/fsl_inputmux.c", + "${k32w0_sdk_root}/drivers/jn_flash/fsl_flash.c", + "${k32w0_sdk_root}/drivers/jn_rng/fsl_rng.c", + "${k32w0_sdk_root}/drivers/jn_rtc/fsl_rtc.c", + "${k32w0_sdk_root}/drivers/lpc_adc/fsl_adc.c", + "${k32w0_sdk_root}/drivers/lpc_gpio/fsl_gpio.c", + "${k32w0_sdk_root}/drivers/pint/fsl_pint.c", + "${k32w0_sdk_root}/drivers/sha/fsl_sha.c", + "${k32w0_sdk_root}/drivers/spifi/fsl_spifi.c", "${k32w0_sdk_root}/middleware/wireless/ble_controller/config/controller_config.c", "${k32w0_sdk_root}/middleware/wireless/bluetooth/application/common/ble_conn_manager.c", "${k32w0_sdk_root}/middleware/wireless/bluetooth/application/common/ble_host_tasks.c", @@ -574,6 +599,8 @@ template("k32w0_sdk") { "${k32w0_sdk_root}/rtos/amazon-freertos/lib/FreeRTOS/queue.c", "${k32w0_sdk_root}/rtos/amazon-freertos/lib/FreeRTOS/tasks.c", "${k32w0_sdk_root}/rtos/amazon-freertos/lib/FreeRTOS/timers.c", + "${k32w0_sdk_root}/utilities/debug_console/fsl_debug_console.c", + "${k32w0_sdk_root}/utilities/debug_console/str/fsl_str.c", ] if (chip_with_DK6) { diff --git a/third_party/nxp/k32w0_sdk/repo/.gitignore b/third_party/nxp/k32w0_sdk/repo/.gitignore new file mode 100644 index 00000000000000..16b30e08a957c7 --- /dev/null +++ b/third_party/nxp/k32w0_sdk/repo/.gitignore @@ -0,0 +1,2 @@ +core +.west diff --git a/third_party/nxp/k32w0_sdk/repo/manifest/west.yml b/third_party/nxp/k32w0_sdk/repo/manifest/west.yml new file mode 100644 index 00000000000000..3a00791908f057 --- /dev/null +++ b/third_party/nxp/k32w0_sdk/repo/manifest/west.yml @@ -0,0 +1,43 @@ +# The west manifest file (west.yml) for MCUXpresso SDK delivery. +# +# See the west documentation for more information: +# +# https://docs.zephyrproject.org/latest/guides/west/index.html +manifest: + remotes: + - name: nxpmicro + url-base: https://github.com/NXPmicro + defaults: + remote: nxpmicro + projects: + - name: mcux-sdk + revision: b1ce670e8433142a3c78dca7f4597326eb5f5342 + path: core + - name: amazon-freertos + url: https://github.com/NXP/amazon-freertos.git + path: core/rtos/amazon-freertos + revision: fb74168634e716fb5f0a61714e5c0d1ac6246ba + - name: mbedtls + url: https://github.com/nxp-mcuxpresso/mbedtls.git + path: core/middleware/mbedtls + revision: 15458495823165de372f62c3dad621a8da6c86e3 + - name: framework + url: https://github.com/NXP/mcux-sdk-middleware-connectivity-framework.git + revision: a45ed24bc5f8d54312c4d9243c4423d226084412 + path: core/middleware/wireless/framework + - name: ble_controller + url: https://github.com/NXP/mcux-sdk-middleware-bluetooth-controller.git + revision: 0e4effc707a0d5569160b9335bc2e57c17255f01 + path: core/middleware/wireless/ble_controller + - name: bluetooth + url: https://github.com/NXP/mcux-sdk-middleware-bluetooth-host.git + revision: e5a1b7b9e3b44b49c6c0318edfc3acac74b342d8 + path: core/middleware/wireless/bluetooth + - name: ieee-802.15.4 + url: https://github.com/NXP/mcux-sdk-middleware-ieee_802.15.4.git + revision: 7cca871d58e53c78a703a39b269c4366b03f26e4 + path: core/middleware/wireless/ieee-802.15.4 + - name: examples + url: https://github.com/nxp-mcuxpresso/mcux-sdk-examples.git + revision: 39eed09d6a8485dcf365a24cd6ef957e7cc6fbf8 + path: core/boards diff --git a/third_party/openthread/ot-nxp b/third_party/openthread/ot-nxp index 015fd8d1dd3fa0..d533504a90f231 160000 --- a/third_party/openthread/ot-nxp +++ b/third_party/openthread/ot-nxp @@ -1 +1 @@ -Subproject commit 015fd8d1dd3fa032e78236f2b15e6ff4131c5108 +Subproject commit d533504a90f2312ba3cfe94f716f3ee9b59d4209 From e05fc6ea339760f513034ef4a8c805848f3534a0 Mon Sep 17 00:00:00 2001 From: Marius Tache <102153746+marius-alex-tache@users.noreply.github.com> Date: Wed, 9 Aug 2023 16:48:32 +0300 Subject: [PATCH 57/74] [Docker][K32W1] Add support for K32W1 SDK (#28601) Signed-off-by: Marius Tache --- integrations/docker/images/base/chip-build/version | 2 +- .../docker/images/stage-2/chip-build-k32w/Dockerfile | 7 +++++++ .../docker/images/vscode/chip-build-vscode/Dockerfile | 5 +++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index dfab429dbd9f0a..abc531aac97603 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -5 : Use west to download the K32W0 SDK +6 : Add support for K32W1 SDK diff --git a/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile index dd629a9824c6ee..87a12ffa36a72c 100644 --- a/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile @@ -22,8 +22,15 @@ RUN set -x \ && cp -R examples/* core/boards && rm -rf examples \ && : # last line +RUN set -x \ + && mkdir -p k32w1 + && wget https://cache.nxp.com/lgfiles/bsps/SDK_2_12_5_K32W148-EVK.zip \ + && unzip SDK_2_12_5_K32W148-EVK.zip -d k32w1 \ + && rm -rf SDK_2_12_5_K32W148-EVK.zip \ + FROM ghcr.io/project-chip/chip-build:${VERSION} COPY --from=build /opt/sdk/ /opt/sdk/ ENV NXP_K32W0_SDK_ROOT=/opt/sdk/core +ENV NXP_K32W1_SDK_ROOT=/opt/sdk/k32w1 diff --git a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile index bf90c8ae7dfedf..6eb6087e597dd6 100644 --- a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile +++ b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile @@ -48,7 +48,7 @@ COPY --from=crosscompile /opt/ubuntu-22.04.1-aarch64-sysroot /opt/ubuntu-22.04.1 COPY --from=ameba /opt/ameba /opt/ameba -COPY --from=k32w /opt/sdk /opt/k32w_sdk +COPY --from=k32w /opt/sdk /opt/k32w COPY --from=imx /opt/fsl-imx-xwayland /opt/fsl-imx-xwayland @@ -104,7 +104,8 @@ ENV IDF_TOOLS_PATH=/opt/espressif/tools ENV IMX_SDK_ROOT=/opt/fsl-imx-xwayland/6.1-langdale ENV JAVA_PATH=/usr/lib/jvm/java-8-openjdk-amd64 ENV NRF5_TOOLS_ROOT=/opt/NordicSemiconductor/nRF5_tools -ENV NXP_K32W0_SDK_ROOT=/opt/k32w_sdk +ENV NXP_K32W0_SDK_ROOT=/opt/k32w/core +ENV NXP_K32W1_SDK_ROOT=/opt/k32w/k32w1 ENV OPENOCD_PATH=/opt/openocd/ ENV PW_ENVIRONMENT_ROOT=/home/vscode/pigweed/env ENV QEMU_ESP32=/opt/espressif/qemu/xtensa-softmmu/qemu-system-xtensa From e8994b900147d9a5bfdf27a3efa4f465856de3fe Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Wed, 9 Aug 2023 09:20:20 -0700 Subject: [PATCH 58/74] Fix a typo for a non-matched parameter in EventState (#28597) --- .../java/src/chip/devicecontroller/model/EventState.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/java/src/chip/devicecontroller/model/EventState.java b/src/controller/java/src/chip/devicecontroller/model/EventState.java index 23988c7884687f..72b14c1391dc93 100644 --- a/src/controller/java/src/chip/devicecontroller/model/EventState.java +++ b/src/controller/java/src/chip/devicecontroller/model/EventState.java @@ -40,7 +40,7 @@ public EventState( long eventNumber, int priorityLevel, int timestampType, - long systemTimeStamp, + long timestampValue, Object valueObject, byte[] tlv, String jsonString) { From 55d1e8e40af289a50e4186b796e84806feb3e9a4 Mon Sep 17 00:00:00 2001 From: abeck-whirlpool <129295708+abeck-whirlpool@users.noreply.github.com> Date: Wed, 9 Aug 2023 11:52:00 -0500 Subject: [PATCH 59/74] Adding invalid in state to status code file (#28530) * Adding invalid in state to status code file * Adding invalid in state to ember --------- Co-authored-by: abeck-riis <98488327+abeck-riis@users.noreply.github.com> --- src/app/util/af-enums.h | 1 + src/protocols/interaction_model/StatusCodeList.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/app/util/af-enums.h b/src/app/util/af-enums.h index 646ea32c5565d7..27a9c76855bfee 100644 --- a/src/app/util/af-enums.h +++ b/src/app/util/af-enums.h @@ -67,5 +67,6 @@ enum EmberAfStatus : uint8_t EMBER_ZCL_STATUS_PATHS_EXHAUSTED = 0xC8, EMBER_ZCL_STATUS_TIMED_REQUEST_MISMATCH = 0xC9, EMBER_ZCL_STATUS_FAILSAFE_REQUIRED = 0xCA, + EMBER_ZCL_STATE_INVALID_IN_STATE = 0xCB, EMBER_ZCL_STATUS_WRITE_IGNORED = 0xF0, // NOT SPEC COMPLIANT FOR TEST ONLY }; diff --git a/src/protocols/interaction_model/StatusCodeList.h b/src/protocols/interaction_model/StatusCodeList.h index 62891c2e7b978d..1c37440e5c6eaa 100644 --- a/src/protocols/interaction_model/StatusCodeList.h +++ b/src/protocols/interaction_model/StatusCodeList.h @@ -69,5 +69,6 @@ CHIP_IM_STATUS_CODE(UnsupportedEvent , UNSUPPORTED_EVENT , 0xc7) CHIP_IM_STATUS_CODE(PathsExhausted , PATHS_EXHAUSTED , 0xc8) CHIP_IM_STATUS_CODE(TimedRequestMismatch , TIMED_REQUEST_MISMATCH , 0xc9) CHIP_IM_STATUS_CODE(FailsafeRequired , FAILSAFE_REQUIRED , 0xca) +CHIP_IM_STATUS_CODE(InvalidInState , INVALID_IN_STATE , 0xcb) CHIP_IM_STATUS_CODE(WriteIgnored , WRITE_IGNORED , 0xF0) // non-spec error code and use only internally // clang-format on From a6b070aa0c75596bddc5e4db8c7e6c6bfe6fee24 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 9 Aug 2023 13:08:16 -0400 Subject: [PATCH 60/74] Fix k32w image instructions (#28607) Co-authored-by: Andrei Litvin --- integrations/docker/images/stage-2/chip-build-k32w/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile index 87a12ffa36a72c..5bc74d4410c668 100644 --- a/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile @@ -23,10 +23,10 @@ RUN set -x \ && : # last line RUN set -x \ - && mkdir -p k32w1 + && mkdir -p k32w1 \ && wget https://cache.nxp.com/lgfiles/bsps/SDK_2_12_5_K32W148-EVK.zip \ && unzip SDK_2_12_5_K32W148-EVK.zip -d k32w1 \ - && rm -rf SDK_2_12_5_K32W148-EVK.zip \ + && rm -rf SDK_2_12_5_K32W148-EVK.zip FROM ghcr.io/project-chip/chip-build:${VERSION} From d621d5433ac72b2476adf9b6f2102a14e4f28cb9 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 9 Aug 2023 13:09:16 -0400 Subject: [PATCH 61/74] Separate out python dependencies for running scripts (#28582) * Separate oput requirements for various python scripts * Update certbins to install requirements for test script running instead of hard-coding dependencies * Update text for help in build_python * Fix the requirements install - need to copy the dependencies locally * Update the sha to something that supports the latest options. This is the TE2 for 1.2 SHA * A few more dependencies for py_matter_yamltests ... dependencies there seem off * Revert submodule updates * Update dependencies for chip repl to allow py_matter_idl * Fix dependencies in yaml: need dependencies at runtime not at build time --------- Co-authored-by: Andrei Litvin --- .github/workflows/tests.yaml | 2 +- .../docker/images/chip-cert-bins/Dockerfile | 10 ++++++++-- scripts/build_python.sh | 6 ++++-- scripts/py_matter_idl/setup.cfg | 4 ++++ scripts/py_matter_yamltests/setup.cfg | 4 +++- scripts/setup/requirements.python_tests.txt | 16 ---------------- scripts/tests/requirements.txt | 5 +++++ src/python_testing/requirements.txt | 3 +++ 8 files changed, 28 insertions(+), 22 deletions(-) delete mode 100644 scripts/setup/requirements.python_tests.txt create mode 100644 scripts/tests/requirements.txt create mode 100644 src/python_testing/requirements.txt diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c462203ae6cd0d..48135fd924afa5 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -427,7 +427,7 @@ jobs: - name: Build Python REPL and example apps run: | - scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv --extra_packages "mobly"' + scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv' ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ --target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test \ diff --git a/integrations/docker/images/chip-cert-bins/Dockerfile b/integrations/docker/images/chip-cert-bins/Dockerfile index 47d7cc0b606742..6c3872df43102e 100644 --- a/integrations/docker/images/chip-cert-bins/Dockerfile +++ b/integrations/docker/images/chip-cert-bins/Dockerfile @@ -3,7 +3,7 @@ FROM ubuntu:22.04 as chip-build-cert LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip ARG TARGETPLATFORM # COMMITHASH defines the target commit to build from. May be passed in using --build-arg. -ARG COMMITHASH=7b99e6399c6069037c613782d78132c69b9dcabb +ARG COMMITHASH=c1ec2d777456924dcaa59b53351b00d73caf378f # Ensure TARGETPLATFORM is set RUN case ${TARGETPLATFORM} in \ @@ -268,5 +268,11 @@ COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-app1 chip-app1 # Stage 3.1 Setup the Matter Python environment COPY --from=chip-build-cert-bins /root/connectedhomeip/out/python_lib python_lib COPY --from=chip-build-cert-bins /root/connectedhomeip/src/python_testing python_testing -RUN pip install click websockets lark diskcache + +COPY --from=chip-build-cert-bins /root/connectedhomeip/scripts/tests/requirements.txt /tmp/requirements.txt +RUN pip install -r /tmp/requirements.txt && rm /tmp/requirements.txt + +COPY --from=chip-build-cert-bins /root/connectedhomeip/src/python_testing/requirements.txt /tmp/requirements.txt +RUN pip install -r /tmp/requirements.txt && rm /tmp/requirements.txt + RUN pip install --no-cache-dir python_lib/controller/python/chip*.whl diff --git a/scripts/build_python.sh b/scripts/build_python.sh index 08ad42965d5b99..5a0a12f9df84fe 100755 --- a/scripts/build_python.sh +++ b/scripts/build_python.sh @@ -64,7 +64,8 @@ Input Options: represents where the virtual environment is to be created. -c, --clean_virtual_env When installing a virtual environment, create/clean it first. Defaults to yes. - --include_pytest_deps Install requirements.python_tests.txt. + --include_pytest_deps Install requirements.txt for running scripts/tests and + src/python_testing scripts. Defaults to yes. --extra_packages PACKAGES Install extra Python packages from PyPI --include_yamltests Whether to install the matter_yamltests wheel. @@ -214,7 +215,8 @@ if [ -n "$install_virtual_env" ]; then if [ "$install_pytest_requirements" = "yes" ]; then echo_blue "Installing python test dependencies ..." - "$ENVIRONMENT_ROOT"/bin/pip install -r "$CHIP_ROOT/scripts/setup/requirements.python_tests.txt" + "$ENVIRONMENT_ROOT"/bin/pip install -r "$CHIP_ROOT/scripts/tests/requirements.txt" + "$ENVIRONMENT_ROOT"/bin/pip install -r "$CHIP_ROOT/src/python_testing/requirements.txt" fi echo "" diff --git a/scripts/py_matter_idl/setup.cfg b/scripts/py_matter_idl/setup.cfg index 2a7d386375a2e7..57f93c3dd9aa82 100644 --- a/scripts/py_matter_idl/setup.cfg +++ b/scripts/py_matter_idl/setup.cfg @@ -21,6 +21,10 @@ description = Parse matter idl files [options] packages = find: zip_safe = False +install_requires= + lark + jinja2 + stringcase [options.package_data] matter_idl = diff --git a/scripts/py_matter_yamltests/setup.cfg b/scripts/py_matter_yamltests/setup.cfg index 497022ce1459d9..f115c8e28e17be 100644 --- a/scripts/py_matter_yamltests/setup.cfg +++ b/scripts/py_matter_yamltests/setup.cfg @@ -20,5 +20,7 @@ description = Parse matter yaml tests files [options] packages = find: - zip_safe = False +install_requires= + websockets + lark diff --git a/scripts/setup/requirements.python_tests.txt b/scripts/setup/requirements.python_tests.txt deleted file mode 100644 index 92d6db9016814e..00000000000000 --- a/scripts/setup/requirements.python_tests.txt +++ /dev/null @@ -1,16 +0,0 @@ -# scripts/tests -click -colorama -diskcache -websockets - -# scripts/py_matter_idl -# TODO: these should be wheel dependencies -lark -jinja2 -stringcase - -# src/python_testing -mobly -pyasn1 -pyasn1_modules diff --git a/scripts/tests/requirements.txt b/scripts/tests/requirements.txt new file mode 100644 index 00000000000000..d3c26e9cba23c6 --- /dev/null +++ b/scripts/tests/requirements.txt @@ -0,0 +1,5 @@ +# Python requirements for scripts in this location +click +colorama +diskcache +websockets diff --git a/src/python_testing/requirements.txt b/src/python_testing/requirements.txt new file mode 100644 index 00000000000000..84196f3f9e48f2 --- /dev/null +++ b/src/python_testing/requirements.txt @@ -0,0 +1,3 @@ +mobly +pyasn1 +pyasn1_modules From 75609c49b96f3ed178eab737ef953c0767f09ce2 Mon Sep 17 00:00:00 2001 From: William Date: Wed, 9 Aug 2023 18:09:31 +0100 Subject: [PATCH 62/74] Reorder mode base and op state (#28573) * Reordered Mode Base functions. * Moved generic OpState cluster objects into one header file. * Reordered OperationalStateServer functions. * Moved OpState delegate in the server header file. * Updated the TestOperationalStateDelegate inctludes following the operational state delegate change in location. * Renamed TestOperationalStateDelegate.cpp -> src/app/tests/TestOperationalStateClusterObjects.cpp * Restyled by clang-format * Minor corrections following revision. * Moved the initialization of the mCurrentMode attribute from the constructor. * Restyled by clang-format * Improved the name of private Mode Base register functions. * Reverted change in the ifdef in the mode base init method. This was accendentally changed during a merge. --------- Co-authored-by: Restyled.io --- .../mode-base-server/mode-base-server.cpp | 9 ++++----- .../clusters/mode-base-server/mode-base-server.h | 15 ++++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/app/clusters/mode-base-server/mode-base-server.cpp b/src/app/clusters/mode-base-server/mode-base-server.cpp index b5b8a403b9ba3e..cb55bc214c8676 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.cpp +++ b/src/app/clusters/mode-base-server/mode-base-server.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include using namespace chip; @@ -52,7 +51,7 @@ Instance::Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClus Instance::~Instance() { - UnregisterInstance(); + UnregisterThisInstance(); chip::app::InteractionModelEngine::GetInstance()->UnregisterCommandHandler(this); unregisterAttributeAccessOverride(this); } @@ -69,7 +68,7 @@ CHIP_ERROR Instance::Init() ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->RegisterCommandHandler(this)); VerifyOrReturnError(registerAttributeAccessOverride(this), CHIP_ERROR_INCORRECT_STATE); - RegisterInstance(); + RegisterThisInstance(); ReturnErrorOnFailure(mDelegate->Init()); // If the StartUpMode is set, the CurrentMode attribute SHALL be set to the StartUpMode value, when the server is powered up. @@ -350,7 +349,7 @@ CHIP_ERROR Instance::Write(const ConcreteDataAttributePath & attributePath, Attr return CHIP_ERROR_INCORRECT_STATE; } -void Instance::RegisterInstance() +void Instance::RegisterThisInstance() { if (!gModeBaseAliasesInstances.Contains(this)) { @@ -358,7 +357,7 @@ void Instance::RegisterInstance() } } -void Instance::UnregisterInstance() +void Instance::UnregisterThisInstance() { gModeBaseAliasesInstances.Remove(this); } diff --git a/src/app/clusters/mode-base-server/mode-base-server.h b/src/app/clusters/mode-base-server/mode-base-server.h index 10a2a97c07080f..ef88ee8269dd46 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.h +++ b/src/app/clusters/mode-base-server/mode-base-server.h @@ -124,11 +124,12 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface private: Delegate * mDelegate; - EndpointId mEndpointId{}; - ClusterId mClusterId{}; + EndpointId mEndpointId; + ClusterId mClusterId; // Attribute data store - uint8_t mCurrentMode; + uint8_t mCurrentMode = 0; // This is a temporary value and may not be valid. We will change this to the value of the first + // mode in the list at the start of the Init function to ensure that it represents a valid mode. DataModel::Nullable mStartUpMode; DataModel::Nullable mOnMode; uint32_t mFeature; @@ -146,14 +147,14 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; /** - * Register this ModeBase instance. + * Register this ModeBase instance in gModeBaseAliasesInstances. */ - void RegisterInstance(); + void RegisterThisInstance(); /** - * Unregister this ModeBase instance. + * Unregister this ModeBase instance in gModeBaseAliasesInstances. */ - void UnregisterInstance(); + void UnregisterThisInstance(); /** * Internal change-to-mode command handler function. From 392d054253fb93299bce7883d672385bc9cbc539 Mon Sep 17 00:00:00 2001 From: shchen-Lab <75290921+shchen-Lab@users.noreply.github.com> Date: Thu, 10 Aug 2023 02:25:54 +0800 Subject: [PATCH 63/74] [BouffaloLab][BLE]Add BLE ManagerImpl ShutDown Function (#28600) * Add BLE ManagerImpl ShutDown Function * Restyled by whitespace * Restyled by clang-format --------- Co-authored-by: Restyled.io --- .../bouffalolab/common/BLEManagerImpl.cpp | 22 +++++++++++++++++-- .../bouffalolab/common/BLEManagerImpl.h | 3 ++- .../common/ConfigurationManagerImpl.cpp | 12 +++++++++- .../common/ConfigurationManagerImpl.h | 1 + 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/src/platform/bouffalolab/common/BLEManagerImpl.cpp b/src/platform/bouffalolab/common/BLEManagerImpl.cpp index 73a6f8ff466650..b233721953161e 100644 --- a/src/platform/bouffalolab/common/BLEManagerImpl.cpp +++ b/src/platform/bouffalolab/common/BLEManagerImpl.cpp @@ -146,6 +146,12 @@ CHIP_ERROR BLEManagerImpl::_Init() return CHIP_NO_ERROR; } +void BLEManagerImpl::_Shutdown() +{ + // Release BLE Stack resources + mFlags.Set(Flags::kChipoBleShutDown); +} + void BLEManagerImpl::DriveBLEState(intptr_t arg) { BLEMgrImpl().DriveBLEState(); @@ -435,7 +441,7 @@ CHIP_ERROR BLEManagerImpl::HandleGAPDisconnect(const ChipDeviceEvent * event) { case BT_HCI_ERR_REMOTE_USER_TERM_CONN: // Do not treat proper connection termination as an error and exit. - VerifyOrExit(!ConfigurationMgr().IsFullyProvisioned(), ); + VerifyOrExit(!ConfigurationMgr().IsFullyProvisioned(), BLEMgrImpl()._Shutdown()); disconReason = BLE_ERROR_REMOTE_DEVICE_DISCONNECTED; break; case BT_HCI_ERR_LOCALHOST_TERM_CONN: @@ -457,7 +463,19 @@ CHIP_ERROR BLEManagerImpl::HandleGAPDisconnect(const ChipDeviceEvent * event) ChipDeviceEvent disconnectEvent; disconnectEvent.Type = DeviceEventType::kCHIPoBLEConnectionClosed; ReturnErrorOnFailure(PlatformMgr().PostEvent(&disconnectEvent)); - + if (mFlags.Has(Flags::kChipoBleShutDown)) + { + int ret = bt_disable(); + if (ret) + { + ChipLogError(DeviceLayer, "CHIPoBLE Shutdown faild =%d", ret); + } + else + { + mFlags.Clear(Flags::kChipoBleShutDown); + } + return CHIP_NO_ERROR; + } // Force a reconfiguration of advertising in case we switched to non-connectable mode when // the BLE connection was established. mFlags.Set(Flags::kAdvertisingRefreshNeeded); diff --git a/src/platform/bouffalolab/common/BLEManagerImpl.h b/src/platform/bouffalolab/common/BLEManagerImpl.h index 1589d88006a19d..d5d571ef7949cd 100644 --- a/src/platform/bouffalolab/common/BLEManagerImpl.h +++ b/src/platform/bouffalolab/common/BLEManagerImpl.h @@ -44,7 +44,7 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla std::conditional_t::value, bt_gatt_indicate_params *, const bt_gatt_attr *>; CHIP_ERROR _Init(void); - void _Shutdown() {} + void _Shutdown(); bool _IsAdvertisingEnabled(void); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsAdvertising(void); @@ -85,6 +85,7 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla kAdvertisingRefreshNeeded = 0x0010, /**< The advertising state/configuration has changed, but the SoftDevice has yet to be updated. */ kChipoBleGattServiceRegister = 0x0020, /**< The system has currently CHIPoBLE GATT service registered. */ + kChipoBleShutDown = 0x0040, /**< The system has disable ble stack. */ }; struct ServiceData; diff --git a/src/platform/bouffalolab/common/ConfigurationManagerImpl.cpp b/src/platform/bouffalolab/common/ConfigurationManagerImpl.cpp index d4c06dc2d3868e..b9719b795d15c3 100644 --- a/src/platform/bouffalolab/common/ConfigurationManagerImpl.cpp +++ b/src/platform/bouffalolab/common/ConfigurationManagerImpl.cpp @@ -34,7 +34,17 @@ ConfigurationManagerImpl & ConfigurationManagerImpl::GetDefaultInstance() static ConfigurationManagerImpl sInstance; return sInstance; } - +bool ConfigurationManagerImpl::IsFullyProvisioned() +{ + return +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + ConnectivityMgr().IsWiFiStationProvisioned() && +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + ConnectivityMgr().IsThreadProvisioned() && +#endif + true; +} CHIP_ERROR ConfigurationManagerImpl::Init() { CHIP_ERROR err; diff --git a/src/platform/bouffalolab/common/ConfigurationManagerImpl.h b/src/platform/bouffalolab/common/ConfigurationManagerImpl.h index b9d207fc1ec9d2..d882f76f89e3bf 100644 --- a/src/platform/bouffalolab/common/ConfigurationManagerImpl.h +++ b/src/platform/bouffalolab/common/ConfigurationManagerImpl.h @@ -36,6 +36,7 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp CHIP_ERROR StoreRebootCount(uint32_t rebootCount); CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours); CHIP_ERROR StoreTotalOperationalHours(uint32_t totalOperationalHours); + bool IsFullyProvisioned(); private: // ===== Members that implement the ConfigurationManager private interface. From 648c141a77a8cb69fbeae7a462b7ff3a2c4e1060 Mon Sep 17 00:00:00 2001 From: Serhii Salamakha Date: Wed, 9 Aug 2023 21:31:50 +0300 Subject: [PATCH 64/74] [Telink] Fix restart BLE adv after commissioning fail (#28606) --- .../platform/telink/common/src/AppTaskCommon.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index 41d3a0c3e3fec5..a59f660a8a7788 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -157,6 +157,7 @@ class AppFabricTableDelegate : public FabricTable::Delegate { if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0) { + bool isCommissioningFailed = chip::Server::GetInstance().GetCommissioningWindowManager().IsCommissioningWindowOpen(); ChipLogProgress(DeviceLayer, "Performing erasing of settings partition"); #ifdef CONFIG_CHIP_FACTORY_RESET_ERASE_NVS @@ -168,9 +169,12 @@ class AppFabricTableDelegate : public FabricTable::Delegate status = nvs_clear(static_cast(storage)); } - if (!status) + if (!isCommissioningFailed) { - status = nvs_mount(static_cast(storage)); + if (!status) + { + status = nvs_mount(static_cast(storage)); + } } if (status) @@ -187,6 +191,10 @@ class AppFabricTableDelegate : public FabricTable::Delegate ConnectivityMgr().ErasePersistentInfo(); #endif + if (isCommissioningFailed) + { + PlatformMgr().Shutdown(); + } } } }; From d7414cc29442b3f29f9b978a67421a138f9c8861 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 9 Aug 2023 14:39:57 -0400 Subject: [PATCH 65/74] Fix bootstrap on M1/M2 mac. (#28609) https://github.com/project-chip/connectedhomeip/pull/28146 added bitarray to requirements.bouffalolab.txt, but that package requires native compilation during bootstrap. And bootstrap ends up using the pigweed-provided clang for that, but that clang is broken on M1/M2 mac. For now, stop pulling requirements.bouffalolab.txt into the general requirements.all.txt, so that bootstrap works for all the people not actively developing for bouffalolab. If it's re-added there later, it should be split up to make sure the bitarray bits are not pulled in. The action fixes are to make sure that for boufallolab CI we end up doing bootstrap with the right -p parameter to pull in requirements.bouffalolab.txt there. --- .github/actions/bootstrap/action.yaml | 7 ++++++- .../actions/checkout-submodules-and-bootstrap/action.yaml | 2 ++ scripts/setup/requirements.all.txt | 1 - 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/bootstrap/action.yaml b/.github/actions/bootstrap/action.yaml index 66e6645fff4992..a217fa37525ff4 100644 --- a/.github/actions/bootstrap/action.yaml +++ b/.github/actions/bootstrap/action.yaml @@ -1,8 +1,13 @@ name: Bootstrap description: Bootstrap +inputs: + platform: + description: "Platform name" + required: false + default: none runs: using: "composite" steps: - name: Bootstrap shell: bash - run: bash scripts/bootstrap.sh + run: bash scripts/bootstrap.sh -p ${{ inputs.platform }} diff --git a/.github/actions/checkout-submodules-and-bootstrap/action.yaml b/.github/actions/checkout-submodules-and-bootstrap/action.yaml index 22b3629f0e7052..8226b7e7bd3d41 100644 --- a/.github/actions/checkout-submodules-and-bootstrap/action.yaml +++ b/.github/actions/checkout-submodules-and-bootstrap/action.yaml @@ -24,6 +24,8 @@ runs: uses: ./.github/actions/bootstrap-cache - name: Bootstrap uses: ./.github/actions/bootstrap + with: + platform: ${{ inputs.platform }} - name: Upload Bootstrap Logs uses: ./.github/actions/upload-bootstrap-logs with: diff --git a/scripts/setup/requirements.all.txt b/scripts/setup/requirements.all.txt index 378959cce0f17e..b604dd369b727b 100644 --- a/scripts/setup/requirements.all.txt +++ b/scripts/setup/requirements.all.txt @@ -9,7 +9,6 @@ virtualenv -r requirements.esp32.txt -r requirements.mbed.txt --r requirements.bouffalolab.txt -r requirements.openiotsdk.txt -r requirements.infineon.txt -r requirements.ti.txt From bb0031f09830d52cc6995bfe70aa7181c0641e43 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 9 Aug 2023 17:07:52 -0400 Subject: [PATCH 66/74] Looking to remove dependencies from `requirements.all.txt` (#28613) * Remove telink from all dependencies * Remove ti and boufallolab deps * Remove more requirements, make sure yaml test requirements are part of the whl * Update requirements to include python bits...and add a note that this should be temporary * Install generic dependencies (unfortunately named all) and then platform specific ones too --- .github/actions/bootstrap/action.yaml | 2 +- scripts/py_matter_yamltests/setup.cfg | 3 ++- scripts/setup/requirements.all.txt | 14 ++++++++------ scripts/setup/requirements.yaml_tests.txt | 2 -- 4 files changed, 11 insertions(+), 10 deletions(-) delete mode 100644 scripts/setup/requirements.yaml_tests.txt diff --git a/.github/actions/bootstrap/action.yaml b/.github/actions/bootstrap/action.yaml index a217fa37525ff4..8f94830b8c0e51 100644 --- a/.github/actions/bootstrap/action.yaml +++ b/.github/actions/bootstrap/action.yaml @@ -10,4 +10,4 @@ runs: steps: - name: Bootstrap shell: bash - run: bash scripts/bootstrap.sh -p ${{ inputs.platform }} + run: bash scripts/bootstrap.sh -p all,${{ inputs.platform }} diff --git a/scripts/py_matter_yamltests/setup.cfg b/scripts/py_matter_yamltests/setup.cfg index f115c8e28e17be..a3c7983e7299cd 100644 --- a/scripts/py_matter_yamltests/setup.cfg +++ b/scripts/py_matter_yamltests/setup.cfg @@ -22,5 +22,6 @@ description = Parse matter yaml tests files packages = find: zip_safe = False install_requires= - websockets + diskcache lark + websockets diff --git a/scripts/setup/requirements.all.txt b/scripts/setup/requirements.all.txt index b604dd369b727b..2cccfdbf84db03 100644 --- a/scripts/setup/requirements.all.txt +++ b/scripts/setup/requirements.all.txt @@ -8,15 +8,9 @@ virtualenv -c constraints.esp32.txt -r requirements.esp32.txt --r requirements.mbed.txt --r requirements.openiotsdk.txt --r requirements.infineon.txt --r requirements.ti.txt --r requirements.telink.txt -r requirements.zephyr.txt -r requirements.cirque.txt -r requirements.memory.txt --r requirements.yaml_tests.txt # device controller wheel package wheel; sys_platform == 'linux' @@ -25,6 +19,14 @@ pyobjc-core; sys_platform == 'darwin' pyobjc-framework-cocoa; sys_platform == 'darwin' pyobjc-framework-corebluetooth; sys_platform == 'darwin' +# python unit tests run directly without installing +# built venv +# +# TODO: this should change in the Future +diskcache +lark +websockets + # mobly tests portpicker mobly diff --git a/scripts/setup/requirements.yaml_tests.txt b/scripts/setup/requirements.yaml_tests.txt deleted file mode 100644 index 7fc0c5f653c194..00000000000000 --- a/scripts/setup/requirements.yaml_tests.txt +++ /dev/null @@ -1,2 +0,0 @@ -diskcache -websockets From 96426f33700c18e01b577b6f79a13aa6cdf25cd7 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 9 Aug 2023 17:27:35 -0400 Subject: [PATCH 67/74] Fix TI_SYSCONFIG_ROOT in vscode dockerfile (#28612) --- integrations/docker/images/base/chip-build/version | 2 +- integrations/docker/images/vscode/chip-build-vscode/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index abc531aac97603..a3bb1d9c725371 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -6 : Add support for K32W1 SDK +7 : Fix TI sysconfig root in vscode image diff --git a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile index 6eb6087e597dd6..4f924867fdc05c 100644 --- a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile +++ b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile @@ -113,7 +113,7 @@ ENV QEMU_ESP32_DIR=/opt/espressif/qemu ENV SYSROOT_AARCH64=/opt/ubuntu-22.04.1-aarch64-sysroot ENV TELINK_ZEPHYR_BASE=/opt/telink/zephyrproject/zephyr ENV TELINK_ZEPHYR_SDK_DIR=/opt/telink/zephyr-sdk-0.16.1 -ENV TI_SYSCONFIG_ROOT=/opt/ti/sysconfig_1.13.0 +ENV TI_SYSCONFIG_ROOT=/opt/ti/sysconfig_1.15.0 ENV ZEPHYR_BASE=/opt/NordicSemiconductor/nrfconnect/zephyr ENV ZEPHYR_SDK_INSTALL_DIR=/opt/NordicSemiconductor/nRF5_tools/zephyr-sdk-0.16.0 ENV ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb From a3c4b483651b1f5a44039da96857deed9122860f Mon Sep 17 00:00:00 2001 From: EricZijian_Siter Date: Thu, 10 Aug 2023 11:58:46 +0800 Subject: [PATCH 68/74] Add support for SmokeCO TC's in chip-all-clusters-app (#28548) * Add support for SmokeCO TC's in chip-all-clusters-app Address Issues: Fixes Cert blocker issues : 28193, 27747, 27746, 27742, 27731 * Improve SmokeCO TC support in all-clusters-app * Move priority order to server * Revision per review comments * Make smco-test-event-trigger public * Add deps to tizen * Revision per review comments * Add LogErrorOnFailure * Update src/app/clusters/smoke-co-alarm-server/SmokeCOTestEventTriggerDelegate.cpp Co-authored-by: Boris Zbarsky * Revert "Add LogErrorOnFailure" This reverts commit 25c27dac2839d591bd066f125e23acabbd390256. * Add ChipLogError * Remove redundant code --------- Co-authored-by: Chris Beach Co-authored-by: Hare Co-authored-by: Boris Zbarsky --- .../all-clusters-common/src/smco-stub.cpp | 168 +++++++++++++++++- examples/all-clusters-app/linux/args.gni | 1 + examples/all-clusters-app/tizen/BUILD.gn | 1 + .../all-clusters-minimal-app/tizen/BUILD.gn | 1 + examples/platform/linux/AppMain.cpp | 9 + examples/platform/linux/BUILD.gn | 13 ++ src/app/chip_data_model.gni | 7 + .../SmokeCOTestEventTriggerDelegate.cpp | 42 +++++ .../SmokeCOTestEventTriggerDelegate.h | 83 +++++++++ .../smoke-co-alarm-server.cpp | 62 +++++-- .../smoke-co-alarm-server.h | 14 +- 11 files changed, 384 insertions(+), 17 deletions(-) create mode 100644 src/app/clusters/smoke-co-alarm-server/SmokeCOTestEventTriggerDelegate.cpp create mode 100644 src/app/clusters/smoke-co-alarm-server/SmokeCOTestEventTriggerDelegate.h diff --git a/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp index 66f86e5b28ab99..e6e18ab9edb32a 100644 --- a/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp @@ -15,9 +15,173 @@ * limitations under the License. */ -#include +#include +#include -bool emberAfPluginSmokeCoAlarmSelfTestRequestCommand(chip::EndpointId endpointId) +#include + +using namespace chip; +using namespace chip::app::Clusters::SmokeCoAlarm; +using namespace chip::DeviceLayer; + +namespace { + +constexpr const uint16_t kSelfTestingTimeoutSec = 10; + +} // namespace + +static std::array sPriorityOrder = { + ExpressedStateEnum::kSmokeAlarm, ExpressedStateEnum::kInterconnectSmoke, ExpressedStateEnum::kCOAlarm, + ExpressedStateEnum::kInterconnectCO, ExpressedStateEnum::kHardwareFault, ExpressedStateEnum::kTesting, + ExpressedStateEnum::kEndOfService, ExpressedStateEnum::kBatteryAlert +}; + +void EndSelfTestingEventHandler(System::Layer * systemLayer, void * appState) +{ + SmokeCoAlarmServer::Instance().SetTestInProgress(1, false); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + + ChipLogProgress(Support, "[Smoke-CO-Alarm] => Self test complete"); +} + +bool emberAfPluginSmokeCoAlarmSelfTestRequestCommand(EndpointId endpointId) { + SmokeCoAlarmServer::Instance().SetTestInProgress(1, true); + + ChipLogProgress(Support, "[Smoke-CO-Alarm] => Self test running"); + + DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds32(kSelfTestingTimeoutSec), EndSelfTestingEventHandler, nullptr); + + return true; +} + +bool HandleSmokeCOTestEventTrigger(uint64_t eventTrigger) +{ + SmokeCOTrigger trigger = static_cast(eventTrigger); + + switch (trigger) + { + case SmokeCOTrigger::kForceSmokeCritical: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke (critical)"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kCritical), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kForceSmokeWarning: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke (warning)"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kWarning), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kForceSmokeInterconnect: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke interconnect (warning)"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectSmokeAlarm(1, AlarmStateEnum::kWarning), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kForceCOCritical: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force CO (critical)"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kCritical), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kForceCOWarning: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force CO (warning)"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kWarning), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kForceCOInterconnect: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force CO (warning)"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectCOAlarm(1, AlarmStateEnum::kWarning), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kForceSmokeContaminationHigh: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke contamination (critical)"); + SmokeCoAlarmServer::Instance().SetContaminationState(1, ContaminationStateEnum::kCritical); + break; + case SmokeCOTrigger::kForceSmokeContaminationLow: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke contamination (warning)"); + SmokeCoAlarmServer::Instance().SetContaminationState(1, ContaminationStateEnum::kLow); + break; + case SmokeCOTrigger::kForceSmokeSensitivityHigh: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke sensistivity (high)"); + SmokeCoAlarmServer::Instance().SetSmokeSensitivityLevel(1, SensitivityEnum::kHigh); + break; + case SmokeCOTrigger::kForceSmokeSensitivityLow: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke sensitivity (low)"); + SmokeCoAlarmServer::Instance().SetSmokeSensitivityLevel(1, SensitivityEnum::kLow); + break; + case SmokeCOTrigger::kForceMalfunction: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force malfunction"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetHardwareFaultAlert(1, true), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kForceLowBatteryWarning: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force low battery (warning)"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kWarning), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kForceLowBatteryCritical: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force low battery (critical)"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kCritical), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kForceEndOfLife: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force end-of-life"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kExpired), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kForceSilence: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force silence"); + SmokeCoAlarmServer::Instance().SetDeviceMuted(1, MuteStateEnum::kMuted); + break; + case SmokeCOTrigger::kClearSmoke: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear smoke"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kNormal), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kClearCO: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear CO"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kNormal), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kClearSmokeInterconnect: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear smoke interconnect"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectSmokeAlarm(1, AlarmStateEnum::kNormal), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kClearCOInterconnect: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear CO interconnect"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectCOAlarm(1, AlarmStateEnum::kNormal), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kClearMalfunction: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear malfunction"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetHardwareFaultAlert(1, false), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kClearEndOfLife: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear end-of-life"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kNormal), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kClearSilence: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear silence"); + SmokeCoAlarmServer::Instance().SetDeviceMuted(1, MuteStateEnum::kNotMuted); + break; + case SmokeCOTrigger::kClearBatteryLevelLow: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear low battery"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kNormal), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kClearContamination: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force SmokeContamination (warning)"); + SmokeCoAlarmServer::Instance().SetContaminationState(1, ContaminationStateEnum::kNormal); + break; + case SmokeCOTrigger::kClearSensitivity: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear Smoke Sensitivity"); + SmokeCoAlarmServer::Instance().SetSmokeSensitivityLevel(1, SensitivityEnum::kStandard); + break; + default: + + return false; + } + return true; } diff --git a/examples/all-clusters-app/linux/args.gni b/examples/all-clusters-app/linux/args.gni index c4c9a18cec9cf5..1bcd86f18843b8 100644 --- a/examples/all-clusters-app/linux/args.gni +++ b/examples/all-clusters-app/linux/args.gni @@ -27,3 +27,4 @@ chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] matter_enable_tracing_support = true matter_log_json_payload_decode_full = true matter_log_json_payload_hex = true +chip_enable_smoke_co_trigger = true diff --git a/examples/all-clusters-app/tizen/BUILD.gn b/examples/all-clusters-app/tizen/BUILD.gn index 484732400b64f1..8bf7f00152148f 100644 --- a/examples/all-clusters-app/tizen/BUILD.gn +++ b/examples/all-clusters-app/tizen/BUILD.gn @@ -34,6 +34,7 @@ source_set("chip-all-clusters-common") { deps = [ "${chip_root}/examples/all-clusters-app/all-clusters-common", + "${chip_root}/examples/platform/tizen:app-main", "${chip_root}/src/lib/shell:shell_core", ] diff --git a/examples/all-clusters-minimal-app/tizen/BUILD.gn b/examples/all-clusters-minimal-app/tizen/BUILD.gn index 5485fdd469d223..99f857e86303ea 100644 --- a/examples/all-clusters-minimal-app/tizen/BUILD.gn +++ b/examples/all-clusters-minimal-app/tizen/BUILD.gn @@ -31,6 +31,7 @@ source_set("chip-all-clusters-common") { deps = [ "${chip_root}/examples/all-clusters-minimal-app/all-clusters-common", + "${chip_root}/examples/platform/tizen:app-main", "${chip_root}/src/lib/shell:shell_core", ] diff --git a/examples/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index 22ff4d2db71cb6..ea52a49e79634a 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -75,6 +75,9 @@ #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR #include #endif +#if CHIP_DEVICE_CONFIG_ENABLE_SMOKE_CO_TRIGGER +#include +#endif #include #include @@ -522,6 +525,12 @@ void ChipLinuxAppMainLoop(AppMainLoopImplementation * impl) static OTATestEventTriggerDelegate otaTestEventTriggerDelegate{ ByteSpan( LinuxDeviceOptions::GetInstance().testEventTriggerEnableKey) }; otherDelegate = &otaTestEventTriggerDelegate; +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_SMOKE_CO_TRIGGER + static SmokeCOTestEventTriggerDelegate smokeCOTestEventTriggerDelegate{ + ByteSpan(LinuxDeviceOptions::GetInstance().testEventTriggerEnableKey), otherDelegate + }; + otherDelegate = &smokeCOTestEventTriggerDelegate; #endif // For general testing of TestEventTrigger, we have a common "core" event trigger delegate. static SampleTestEventTriggerDelegate testEventTriggerDelegate; diff --git a/examples/platform/linux/BUILD.gn b/examples/platform/linux/BUILD.gn index 8427fe8aa80104..44a96b12c00604 100644 --- a/examples/platform/linux/BUILD.gn +++ b/examples/platform/linux/BUILD.gn @@ -19,6 +19,10 @@ import("${chip_root}/src/lib/core/core.gni") import("${chip_root}/src/lib/lib.gni") import("${chip_root}/src/tracing/tracing_args.gni") +declare_args() { + chip_enable_smoke_co_trigger = false +} + config("app-main-config") { include_dirs = [ "." ] } @@ -29,6 +33,10 @@ source_set("ota-test-event-trigger") { ] } +source_set("smco-test-event-trigger") { + sources = [ "${chip_root}/src/app/clusters/smoke-co-alarm-server/SmokeCOTestEventTriggerDelegate.h" ] +} + source_set("app-main") { defines = [ "ENABLE_TRACING=${matter_enable_tracing_support}" ] sources = [ @@ -51,6 +59,7 @@ source_set("app-main") { ] public_deps = [ + ":smco-test-event-trigger", "${chip_root}/src/lib", "${chip_root}/src/platform/logging:force_stdio", ] @@ -85,6 +94,10 @@ source_set("app-main") { ] } + if (chip_enable_smoke_co_trigger) { + defines += [ "CHIP_DEVICE_CONFIG_ENABLE_SMOKE_CO_TRIGGER=1" ] + } + public_configs = [ ":app-main-config" ] } diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index d484d7ce654e9b..d20e28a83bbee8 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -287,6 +287,13 @@ template("chip_data_model") { "${_app_root}/clusters/${cluster}/resource-monitoring-cluster-objects.cpp", "${_app_root}/clusters/${cluster}/resource-monitoring-cluster-objects.h", ] + } else if (cluster == "smoke-co-alarm-server") { + sources += [ + "${_app_root}/clusters/${cluster}/${cluster}.cpp", + "${_app_root}/clusters/${cluster}/${cluster}.h", + "${_app_root}/clusters/${cluster}/SmokeCOTestEventTriggerDelegate.cpp", + "${_app_root}/clusters/${cluster}/SmokeCOTestEventTriggerDelegate.h", + ] } else { sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp" ] } diff --git a/src/app/clusters/smoke-co-alarm-server/SmokeCOTestEventTriggerDelegate.cpp b/src/app/clusters/smoke-co-alarm-server/SmokeCOTestEventTriggerDelegate.cpp new file mode 100644 index 00000000000000..597737b14bb768 --- /dev/null +++ b/src/app/clusters/smoke-co-alarm-server/SmokeCOTestEventTriggerDelegate.cpp @@ -0,0 +1,42 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "SmokeCOTestEventTriggerDelegate.h" + +using namespace chip::app::Clusters::SmokeCoAlarm; + +namespace chip { + +bool SmokeCOTestEventTriggerDelegate::DoesEnableKeyMatch(const ByteSpan & enableKey) const +{ + return !mEnableKey.empty() && mEnableKey.data_equal(enableKey); +} + +CHIP_ERROR SmokeCOTestEventTriggerDelegate::HandleEventTrigger(uint64_t eventTrigger) +{ + if (HandleSmokeCOTestEventTrigger(eventTrigger)) + { + return CHIP_NO_ERROR; + } + if (mOtherDelegate != nullptr) + { + return mOtherDelegate->HandleEventTrigger(eventTrigger); + } + return CHIP_ERROR_INVALID_ARGUMENT; +} + +} // namespace chip diff --git a/src/app/clusters/smoke-co-alarm-server/SmokeCOTestEventTriggerDelegate.h b/src/app/clusters/smoke-co-alarm-server/SmokeCOTestEventTriggerDelegate.h new file mode 100644 index 00000000000000..599eb6ab2fc080 --- /dev/null +++ b/src/app/clusters/smoke-co-alarm-server/SmokeCOTestEventTriggerDelegate.h @@ -0,0 +1,83 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +namespace chip { + +enum class SmokeCOTrigger : uint64_t +{ + // Force alarm commands + kForceSmokeWarning = 0xffffffff00000090, + kForceCOWarning = 0xffffffff00000091, + kForceSmokeInterconnect = 0xffffffff00000092, + kForceMalfunction = 0xffffffff00000093, + kForceCOInterconnect = 0xffffffff00000094, + kForceLowBatteryWarning = 0xffffffff00000095, + kForceSmokeContaminationHigh = 0xffffffff00000096, + kForceSmokeContaminationLow = 0xffffffff00000097, + kForceSmokeSensitivityHigh = 0xffffffff00000098, + kForceSmokeSensitivityLow = 0xffffffff00000099, + kForceEndOfLife = 0xffffffff0000009a, + kForceSilence = 0xffffffff0000009b, + kForceSmokeCritical = 0xffffffff0000009c, + kForceCOCritical = 0xffffffff0000009d, + kForceLowBatteryCritical = 0xffffffff0000009e, + // Clear alarm commands + kClearSmoke = 0xffffffff000000a0, + kClearCO = 0xffffffff000000a1, + kClearSmokeInterconnect = 0xffffffff000000a2, + kClearMalfunction = 0xffffffff000000a3, + kClearCOInterconnect = 0xffffffff000000a4, + kClearBatteryLevelLow = 0xffffffff000000a5, + kClearContamination = 0xffffffff000000a6, + kClearSensitivity = 0xffffffff000000a8, + kClearEndOfLife = 0xffffffff000000aa, + kClearSilence = 0xffffffff000000ab +}; + +class SmokeCOTestEventTriggerDelegate : public TestEventTriggerDelegate +{ +public: + explicit SmokeCOTestEventTriggerDelegate(const ByteSpan & enableKey, TestEventTriggerDelegate * otherDelegate) : + mEnableKey(enableKey), mOtherDelegate(otherDelegate) + {} + + bool DoesEnableKeyMatch(const ByteSpan & enableKey) const override; + CHIP_ERROR HandleEventTrigger(uint64_t eventTrigger) override; + +private: + ByteSpan mEnableKey; + TestEventTriggerDelegate * mOtherDelegate; +}; + +} // namespace chip + +/** + * @brief User handler for handling the test event trigger + * + * @note If TestEventTrigger is enabled, it needs to be implemented in the app + * + * @param eventTrigger Event trigger to handle + * + * @retval true on success + * @retval false if error happened + */ +bool HandleSmokeCOTestEventTrigger(uint64_t eventTrigger); diff --git a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.cpp b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.cpp index c5f109fac63a31..19f1da4f8a8d76 100644 --- a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.cpp +++ b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.cpp @@ -22,23 +22,12 @@ */ #include "smoke-co-alarm-server.h" + #include -#include -#include #include -#include -#include -#include -#include - -#include -#include -#include -#include using namespace chip; using namespace chip::app; -using namespace chip::app::DataModel; using namespace chip::app::Clusters::SmokeCoAlarm; using chip::Protocols::InteractionModel::Status; @@ -72,6 +61,55 @@ bool SmokeCoAlarmServer::SetExpressedState(EndpointId endpointId, ExpressedState return success; } +void SmokeCoAlarmServer::SetExpressedStateByPriority(EndpointId endpointId, + const std::array & priorityOrder) +{ + AlarmStateEnum alarmState = AlarmStateEnum::kNormal; + EndOfServiceEnum endOfServiceState = EndOfServiceEnum::kNormal; + bool active = false; + + for (ExpressedStateEnum priority : priorityOrder) + { + switch (priority) + { + case ExpressedStateEnum::kSmokeAlarm: + VerifyOrReturn(GetSmokeState(endpointId, alarmState)); + break; + case ExpressedStateEnum::kCOAlarm: + VerifyOrReturn(GetCOState(endpointId, alarmState)); + break; + case ExpressedStateEnum::kBatteryAlert: + VerifyOrReturn(GetBatteryAlert(endpointId, alarmState)); + break; + case ExpressedStateEnum::kTesting: + VerifyOrReturn(GetTestInProgress(endpointId, active)); + break; + case ExpressedStateEnum::kHardwareFault: + VerifyOrReturn(GetHardwareFaultAlert(endpointId, active)); + break; + case ExpressedStateEnum::kEndOfService: + VerifyOrReturn(GetEndOfServiceAlert(endpointId, endOfServiceState)); + break; + case ExpressedStateEnum::kInterconnectSmoke: + VerifyOrReturn(GetInterconnectSmokeAlarm(endpointId, alarmState)); + break; + case ExpressedStateEnum::kInterconnectCO: + VerifyOrReturn(GetInterconnectCOAlarm(endpointId, alarmState)); + break; + default: + break; + } + + if ((alarmState != AlarmStateEnum::kNormal) || (endOfServiceState != EndOfServiceEnum::kNormal) || active) + { + VerifyOrDo(SetExpressedState(endpointId, priority), ChipLogError(NotSpecified, "Set ExpressedState failed")); + return; + } + } + + VerifyOrDo(SetExpressedState(endpointId, ExpressedStateEnum::kNormal), ChipLogError(NotSpecified, "Set ExpressedState failed")); +} + bool SmokeCoAlarmServer::SetSmokeState(EndpointId endpointId, AlarmStateEnum newSmokeState) { AlarmStateEnum smokeState; diff --git a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h index 529df2ed766807..0df9583371b67a 100644 --- a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h +++ b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h @@ -25,10 +25,7 @@ #include #include -#include #include -#include -#include /** * @brief Smoke CO Alarm Server Plugin class @@ -38,6 +35,9 @@ class SmokeCoAlarmServer public: static SmokeCoAlarmServer & Instance(); + /* Expected byte size of the PriorityOrder */ + static constexpr size_t kPriorityOrderLength = 8; + using AlarmStateEnum = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; using ContaminationStateEnum = chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum; using EndOfServiceEnum = chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum; @@ -61,6 +61,14 @@ class SmokeCoAlarmServer */ bool SetExpressedState(chip::EndpointId endpointId, ExpressedStateEnum newExpressedState); + /** + * @brief Set the highest level of Expressed State according to priorityOrder + * @param endpointId ID of the endpoint + * @param priorityOrder Priority order of expressed state from highest to lowest + */ + void SetExpressedStateByPriority(chip::EndpointId endpointId, + const std::array & priorityOrder); + bool SetSmokeState(chip::EndpointId endpointId, AlarmStateEnum newSmokeState); bool SetCOState(chip::EndpointId endpointId, AlarmStateEnum newCOState); bool SetBatteryAlert(chip::EndpointId endpointId, AlarmStateEnum newBatteryAlert); From 4c03e5044aaffd1fd62aecab715d205554a2bb6b Mon Sep 17 00:00:00 2001 From: PSONALl <77670766+PSONALl@users.noreply.github.com> Date: Thu, 10 Aug 2023 14:59:13 +0530 Subject: [PATCH 69/74] [ESP32] Add matter IP events for Ethernet (#28520) * [ESP32] Add matter IP events for Ethernet * Restyled by clang-format --------- Co-authored-by: Restyled.io --- src/platform/ESP32/ConnectivityManagerImpl.h | 6 +++ .../ConnectivityManagerImpl_Ethernet.cpp | 41 ++++++++++++++++++- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/src/platform/ESP32/ConnectivityManagerImpl.h b/src/platform/ESP32/ConnectivityManagerImpl.h index 97d07b894cb9c2..0add13da49886c 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl.h +++ b/src/platform/ESP32/ConnectivityManagerImpl.h @@ -167,6 +167,12 @@ class ConnectivityManagerImpl final : public ConnectivityManager, void OnStationIPv6AddressAvailable(const ip_event_got_ip6_t & got_ip); #endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI +#if CHIP_DEVICE_CONFIG_ENABLE_ETHERNET + void OnEthernetIPv4AddressAvailable(const ip_event_got_ip_t & got_ip); + void OnEthernetIPv4AddressLost(void); + void OnEthernetIPv6AddressAvailable(const ip_event_got_ip6_t & got_ip); +#endif // CHIP_DEVICE_CONFIG_ENABLE_ETHERNET + // ===== Members for internal use by the following friends. friend ConnectivityManager & ConnectivityMgr(void); diff --git a/src/platform/ESP32/ConnectivityManagerImpl_Ethernet.cpp b/src/platform/ESP32/ConnectivityManagerImpl_Ethernet.cpp index ec8d729d417d85..d8f7137047ebac 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl_Ethernet.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl_Ethernet.cpp @@ -55,15 +55,52 @@ CHIP_ERROR ConnectivityManagerImpl::InitEthernet() return CHIP_NO_ERROR; } +void ConnectivityManagerImpl::OnEthernetIPv4AddressAvailable(const ip_event_got_ip_t & got_ip) +{ + ChipLogProgress(DeviceLayer, "IPv4 address available on Ethernet interface: " IPSTR "/" IPSTR " gateway " IPSTR, + IP2STR(&got_ip.ip_info.ip), IP2STR(&got_ip.ip_info.netmask), IP2STR(&got_ip.ip_info.gw)); + + ChipDeviceEvent event; + event.Type = DeviceEventType::kInterfaceIpAddressChanged; + event.InterfaceIpAddressChanged.Type = InterfaceIpChangeType::kIpV4_Assigned; + PlatformMgr().PostEventOrDie(&event); +} + +void ConnectivityManagerImpl::OnEthernetIPv4AddressLost(void) +{ + ChipLogProgress(DeviceLayer, "IPv4 address lost on Ethernet interface"); + + ChipDeviceEvent event; + event.Type = DeviceEventType::kInterfaceIpAddressChanged; + event.InterfaceIpAddressChanged.Type = InterfaceIpChangeType::kIpV4_Lost; + PlatformMgr().PostEventOrDie(&event); +} + +void ConnectivityManagerImpl::OnEthernetIPv6AddressAvailable(const ip_event_got_ip6_t & got_ip) +{ + ChipLogProgress(DeviceLayer, "IPv6 address available on Ethernet interface: " IPV6STR, IPV62STR(got_ip.ip6_info.ip)); + + ChipDeviceEvent event; + event.Type = DeviceEventType::kInterfaceIpAddressChanged; + event.InterfaceIpAddressChanged.Type = InterfaceIpChangeType::kIpV6_Assigned; + PlatformMgr().PostEventOrDie(&event); +} + void ConnectivityManagerImpl::OnEthernetPlatformEvent(const ChipDeviceEvent * event) { switch (event->Platform.ESPSystemEvent.Id) { case IP_EVENT_ETH_GOT_IP: - ChipLogProgress(DeviceLayer, "Ethernet Link Up"); + OnEthernetIPv4AddressAvailable(event->Platform.ESPSystemEvent.Data.IpGotIp); break; case IP_EVENT_ETH_LOST_IP: - ChipLogProgress(DeviceLayer, "Ethernet Link Down"); + OnEthernetIPv4AddressLost(); + break; + case IP_EVENT_GOT_IP6: + if (strcmp(esp_netif_get_ifkey(event->Platform.ESPSystemEvent.Data.IpGotIp6.esp_netif), "ETH_DEF") == 0) + { + OnEthernetIPv6AddressAvailable(event->Platform.ESPSystemEvent.Data.IpGotIp6); + } break; case ETHERNET_EVENT_START: ChipLogProgress(DeviceLayer, "Ethernet Started"); From 570eb8392e830d95a5d87227edebfe4be2fb6edb Mon Sep 17 00:00:00 2001 From: William Date: Thu, 10 Aug 2023 12:12:50 +0100 Subject: [PATCH 70/74] Check if Mode Base is already in the requested mode before calling the delegate. (#28610) --- .../mode-base-server/mode-base-server.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/app/clusters/mode-base-server/mode-base-server.cpp b/src/app/clusters/mode-base-server/mode-base-server.cpp index cb55bc214c8676..2b9cc232f87e8d 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.cpp +++ b/src/app/clusters/mode-base-server/mode-base-server.cpp @@ -368,6 +368,11 @@ void Instance::HandleChangeToMode(HandlerContext & ctx, const Commands::ChangeTo Commands::ChangeToModeResponse::Type response; + // If the NewMode field doesn't match the Mode field of any entry of the SupportedModes list, + // the ChangeToModeResponse command's Status field SHALL indicate UnsupportedMode and + // the StatusText field SHALL be included and MAY be used to indicate the issue, with a human readable string, + // or include an empty string. + // We are leaving the StatusText empty since the Status is descriptive enough. if (!IsSupportedMode(newMode)) { ChipLogError(Zcl, "ModeBase: Failed to find the option with mode %u", newMode); @@ -376,6 +381,17 @@ void Instance::HandleChangeToMode(HandlerContext & ctx, const Commands::ChangeTo return; } + // If the NewMode field is the same as the value of the CurrentMode attribute + // the ChangeToModeResponse command SHALL have the Status field set to Success and + // the StatusText field MAY be supplied with a human readable string or include an empty string. + // We are leaving the StatusText empty since the Status is descriptive enough. + if (newMode == GetCurrentMode()) + { + response.status = to_underlying(ModeBase::StatusCode::kSuccess); + ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); + return; + } + mDelegate->HandleChangeToMode(newMode, response); if (response.status == to_underlying(StatusCode::kSuccess)) From ceb14fda9bd3bbd200ab88394cb6b19f35bcceae Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Thu, 10 Aug 2023 09:38:37 -0400 Subject: [PATCH 71/74] Fix KeySetRemove to fail on key set index 0 (#28524) * Fix KeySetRemove to fail on key set index 0 Problem: - Removing KeySet index 0 is not allowed by spec, but SDK allowed it. - Checking that we ran without accessing fabric is not done, so error is FAILURE instead of UNSUPPORTED_ACCESS. - Fixes #28518 This PR: - Adds the check and tests against removing fabric index zero - Improves error reporting for several errors in the cluster - Combines validation logic for accessing fabric that was missing Testing: - Added unit tests and integration tests for additions (except for the unsupported access that requires PASE to check) * Regen tests with ZAP * Restyled by clang-format * Remove explicit check for undefined fabric index * Fix build * Rename ValidateAndGetProviderAndFabric to just GetProviderAndFabric * Added back cleanup for VerifyOrDie argument checking * Restyle --------- Co-authored-by: tennessee.carmelveilleux@gmail.com Co-authored-by: Restyled.io Co-authored-by: Andrei Litvin Co-authored-by: Andrei Litvin --- src/app/CommandHandler.cpp | 8 +- src/app/CommandHandler.h | 7 +- .../group-key-mgmt-server.cpp | 119 ++++++++++++------ .../suites/TestGroupKeyManagementCluster.yaml | 9 ++ src/credentials/FabricTable.cpp | 5 + src/credentials/tests/TestFabricTable.cpp | 5 + 6 files changed, 107 insertions(+), 46 deletions(-) diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index 14ad098965f5e5..df58e38c5129b1 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -303,6 +303,9 @@ Status CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommandElem if (CommandIsFabricScoped(concretePath.mClusterId, concretePath.mCommandId)) { + // SPEC: Else if the command in the path is fabric-scoped and there is no accessing fabric, + // a CommandStatusIB SHALL be generated with the UNSUPPORTED_ACCESS Status Code. + // Fabric-scoped commands are not allowed before a specific accessing fabric is available. // This is mostly just during a PASE session before AddNOC. if (GetAccessingFabricIndex() == kUndefinedFabricIndex) @@ -470,8 +473,7 @@ CHIP_ERROR CommandHandler::AddStatus(const ConcreteCommandPath & aCommandPath, c return AddStatusInternal(aCommandPath, StatusIB(aStatus)); } -CHIP_ERROR CommandHandler::AddStatusAndLogIfFailure(const ConcreteCommandPath & aCommandPath, const Status aStatus, - const char * aMessage) +void CommandHandler::AddStatusAndLogIfFailure(const ConcreteCommandPath & aCommandPath, const Status aStatus, const char * aMessage) { if (aStatus != Status::Success) { @@ -482,7 +484,7 @@ CHIP_ERROR CommandHandler::AddStatusAndLogIfFailure(const ConcreteCommandPath & ChipLogValueIMStatus(aStatus), aMessage); } - return AddStatus(aCommandPath, aStatus); + LogErrorOnFailure(AddStatus(aCommandPath, aStatus)); } CHIP_ERROR CommandHandler::AddClusterSpecificSuccess(const ConcreteCommandPath & aCommandPath, ClusterStatus aClusterStatus) diff --git a/src/app/CommandHandler.h b/src/app/CommandHandler.h index e2d2f4a6f75e1e..bc96583abd7597 100644 --- a/src/app/CommandHandler.h +++ b/src/app/CommandHandler.h @@ -173,9 +173,10 @@ class CommandHandler : public Messaging::ExchangeDelegate CHIP_ERROR AddStatus(const ConcreteCommandPath & aCommandPath, const Protocols::InteractionModel::Status aStatus); // Same as AddStatus, but logs that the command represented by aCommandPath failed with the given - // error status and error message, if aStatus is an error. - CHIP_ERROR AddStatusAndLogIfFailure(const ConcreteCommandPath & aCommandPath, const Protocols::InteractionModel::Status aStatus, - const char * aMessage); + // error status and error message, if aStatus is an error. Errors on AddStatus are just logged + // (since the caller likely can only log and not further add a status). + void AddStatusAndLogIfFailure(const ConcreteCommandPath & aCommandPath, const Protocols::InteractionModel::Status aStatus, + const char * aMessage); CHIP_ERROR AddClusterSpecificSuccess(const ConcreteCommandPath & aCommandPath, ClusterStatus aClusterStatus); diff --git a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp index 9ff43d9a2ef834..51a9977977a042 100644 --- a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp +++ b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp @@ -401,7 +401,34 @@ ValidateKeySetWriteArguments(const chip::app::Clusters::GroupKeyManagement::Comm return Status::Success; } -constexpr uint16_t GroupKeyManagementAttributeAccess::kClusterRevision; +bool GetProviderAndFabric(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + Credentials::GroupDataProvider ** outGroupDataProvider, const FabricInfo ** outFabricInfo) +{ + VerifyOrDie(commandObj != nullptr); + VerifyOrDie(outGroupDataProvider != nullptr); + VerifyOrDie(outFabricInfo != nullptr); + + // Internal failures on internal inconsistencies. + auto provider = GetGroupDataProvider(); + auto fabric = Server::GetInstance().GetFabricTable().FindFabricWithIndex(commandObj->GetAccessingFabricIndex()); + + if (nullptr == provider) + { + commandObj->AddStatusAndLogIfFailure(commandPath, Status::Failure, "Internal consistency error on provider!"); + return false; + } + + if (nullptr == fabric) + { + commandObj->AddStatusAndLogIfFailure(commandPath, Status::Failure, "Internal consistency error on access fabric!"); + return false; + } + + *outGroupDataProvider = provider; + *outFabricInfo = fabric; + + return true; +} GroupKeyManagementAttributeAccess gAttribute; @@ -420,12 +447,13 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::DecodableType & commandData) { - auto provider = GetGroupDataProvider(); - auto fabric = Server::GetInstance().GetFabricTable().FindFabricWithIndex(commandObj->GetAccessingFabricIndex()); + Credentials::GroupDataProvider * provider = nullptr; + const FabricInfo * fabric = nullptr; - if (nullptr == provider || nullptr == fabric) + // Flight-check fabric scoping. + if (!GetProviderAndFabric(commandObj, commandPath, &provider, &fabric)) { - commandObj->AddStatusAndLogIfFailure(commandPath, Status::Failure, "Internal consistency error on provider/fabric"); + // Command will already have status populated from validation. return true; } @@ -516,11 +544,7 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( } // Send response - err = commandObj->AddStatus(commandPath, StatusIB(err).mStatus); - if (CHIP_NO_ERROR != err) - { - ChipLogDetail(Zcl, "GroupKeyManagementCluster: KeySetWrite failed: %" CHIP_ERROR_FORMAT, err.Format()); - } + commandObj->AddStatus(commandPath, StatusIB(err).mStatus); return true; } @@ -528,20 +552,22 @@ bool emberAfGroupKeyManagementClusterKeySetReadCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::DecodableType & commandData) { - auto fabric = commandObj->GetAccessingFabricIndex(); - auto * provider = GetGroupDataProvider(); + Credentials::GroupDataProvider * provider = nullptr; + const FabricInfo * fabric = nullptr; - if (nullptr == provider) + // Flight-check fabric scoping. + if (!GetProviderAndFabric(commandObj, commandPath, &provider, &fabric)) { - commandObj->AddStatus(commandPath, Status::Failure); + // Command will already have status populated from validation. return true; } + FabricIndex fabricIndex = fabric->GetFabricIndex(); GroupDataProvider::KeySet keyset; - if (CHIP_NO_ERROR != provider->GetKeySet(fabric, commandData.groupKeySetID, keyset)) + if (CHIP_NO_ERROR != provider->GetKeySet(fabricIndex, commandData.groupKeySetID, keyset)) { // KeySet ID not found - commandObj->AddStatus(commandPath, Status::NotFound); + commandObj->AddStatusAndLogIfFailure(commandPath, Status::NotFound, "Keyset ID not found in KeySetRead"); return true; } @@ -592,30 +618,41 @@ bool emberAfGroupKeyManagementClusterKeySetRemoveCallback( const chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::DecodableType & commandData) { - auto fabric = commandObj->GetAccessingFabricIndex(); - auto * provider = GetGroupDataProvider(); - Status status = Status::Failure; + Credentials::GroupDataProvider * provider = nullptr; + const FabricInfo * fabric = nullptr; - if (nullptr != provider) + // Flight-check fabric scoping. + if (!GetProviderAndFabric(commandObj, commandPath, &provider, &fabric)) { - // Remove keyset - CHIP_ERROR err = provider->RemoveKeySet(fabric, commandData.groupKeySetID); - if (CHIP_ERROR_KEY_NOT_FOUND == err) - { - status = Status::NotFound; - } - else if (CHIP_NO_ERROR == err) - { - status = Status::Success; - } + // Command will already have status populated from validation. + return true; } - // Send response - CHIP_ERROR send_err = commandObj->AddStatus(commandPath, status); - if (CHIP_NO_ERROR != send_err) + if (commandData.groupKeySetID == GroupDataProvider::kIdentityProtectionKeySetId) + { + // SPEC: This command SHALL fail with an INVALID_COMMAND status code back to the initiator if the GroupKeySetID being + // removed is 0, which is the Key Set associated with the Identity Protection Key (IPK). + commandObj->AddStatusAndLogIfFailure(commandPath, Status::InvalidCommand, + "Attempted to KeySetRemove the identity protection key!"); + return true; + } + + // Remove keyset + FabricIndex fabricIndex = fabric->GetFabricIndex(); + CHIP_ERROR err = provider->RemoveKeySet(fabricIndex, commandData.groupKeySetID); + + Status status = Status::Success; + if (CHIP_ERROR_KEY_NOT_FOUND == err) + { + status = Status::NotFound; + } + else if (CHIP_NO_ERROR != err) { - ChipLogDetail(Zcl, "GroupKeyManagementCluster: KeySetRemove failed: %" CHIP_ERROR_FORMAT, send_err.Format()); + status = Status::Failure; } + + // Send status response. + commandObj->AddStatusAndLogIfFailure(commandPath, status, "KeySetRemove failed"); return true; } @@ -654,19 +691,21 @@ bool emberAfGroupKeyManagementClusterKeySetReadAllIndicesCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::DecodableType & commandData) { - auto fabric = commandObj->GetAccessingFabricIndex(); - auto * provider = GetGroupDataProvider(); + Credentials::GroupDataProvider * provider = nullptr; + const FabricInfo * fabric = nullptr; - if (nullptr == provider) + // Flight-check fabric scoping. + if (!GetProviderAndFabric(commandObj, commandPath, &provider, &fabric)) { - commandObj->AddStatus(commandPath, Status::Failure); + // Command will already have status populated from validation. return true; } - auto keysIt = provider->IterateKeySets(fabric); + FabricIndex fabricIndex = fabric->GetFabricIndex(); + auto keysIt = provider->IterateKeySets(fabricIndex); if (nullptr == keysIt) { - commandObj->AddStatus(commandPath, Status::Failure); + commandObj->AddStatusAndLogIfFailure(commandPath, Status::Failure, "Failed iteration of key set indices!"); return true; } diff --git a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml index 11d190c78738d6..82e10bc2120374 100644 --- a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml +++ b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml @@ -556,6 +556,15 @@ tests: response: error: RESOURCE_EXHAUSTED + - label: "Try to remove KeySet index 0 should fail" + command: "KeySetRemove" + arguments: + values: + - name: "GroupKeySetID" + value: 0 + response: + error: INVALID_COMMAND + - label: "Write Group Keys (invalid)" command: "writeAttribute" attribute: "GroupKeyMap" diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index 8ec4691f9f80fa..f9b7503a7bad9e 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -510,6 +510,11 @@ FabricInfo * FabricTable::GetMutableFabricByIndex(FabricIndex fabricIndex) const FabricInfo * FabricTable::FindFabricWithIndex(FabricIndex fabricIndex) const { + if (fabricIndex == kUndefinedFabricIndex) + { + return nullptr; + } + // Try to match pending fabric first if available if (HasPendingFabricUpdate() && (mPendingFabric.GetFabricIndex() == fabricIndex)) { diff --git a/src/credentials/tests/TestFabricTable.cpp b/src/credentials/tests/TestFabricTable.cpp index 96ed242a684310..0ed6db832f3b17 100644 --- a/src/credentials/tests/TestFabricTable.cpp +++ b/src/credentials/tests/TestFabricTable.cpp @@ -2391,6 +2391,11 @@ void TestFabricLookup(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricIndex() == 2); NL_TEST_ASSERT(inSuite, !fabricInfo->ShouldAdvertiseIdentity()); } + + // Attempt lookup of FabricIndex 0 --> should always fail. + { + NL_TEST_ASSERT(inSuite, fabricTable.FindFabricWithIndex(0) == nullptr); + } } void TestFetchCATs(nlTestSuite * inSuite, void * inContext) From ba490f6447d9fdc2aa8e6e20748b63bd7718d4f9 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 10 Aug 2023 10:08:35 -0400 Subject: [PATCH 72/74] Add missed code review comments (#28626) * Fix KeySetRemove to fail on key set index 0 Problem: - Removing KeySet index 0 is not allowed by spec, but SDK allowed it. - Checking that we ran without accessing fabric is not done, so error is FAILURE instead of UNSUPPORTED_ACCESS. - Fixes #28518 This PR: - Adds the check and tests against removing fabric index zero - Improves error reporting for several errors in the cluster - Combines validation logic for accessing fabric that was missing Testing: - Added unit tests and integration tests for additions (except for the unsupported access that requires PASE to check) * Regen tests with ZAP * Restyled by clang-format * Remove explicit check for undefined fabric index * Fix build * Rename ValidateAndGetProviderAndFabric to just GetProviderAndFabric * Added back cleanup for VerifyOrDie argument checking * Restyle * Update based on code review comments * Remove two more flight check comments * Restyle * Fix merge error --------- Co-authored-by: tennessee.carmelveilleux@gmail.com Co-authored-by: Restyled.io Co-authored-by: Andrei Litvin --- src/app/CommandHandler.cpp | 10 +++++++++- .../group-key-mgmt-server/group-key-mgmt-server.cpp | 4 ---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index df58e38c5129b1..d291d8154d421f 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -484,7 +484,15 @@ void CommandHandler::AddStatusAndLogIfFailure(const ConcreteCommandPath & aComma ChipLogValueIMStatus(aStatus), aMessage); } - LogErrorOnFailure(AddStatus(aCommandPath, aStatus)); + CHIP_ERROR err = AddStatus(aCommandPath, aStatus); + if (err != CHIP_NO_ERROR) + { + ChipLogError(DataManagement, + "Failed to set status on Endpoint=%u Cluster=" ChipLogFormatMEI " Command=" ChipLogFormatMEI + ": %" CHIP_ERROR_FORMAT, + aCommandPath.mEndpointId, ChipLogValueMEI(aCommandPath.mClusterId), ChipLogValueMEI(aCommandPath.mCommandId), + err.Format()); + } } CHIP_ERROR CommandHandler::AddClusterSpecificSuccess(const ConcreteCommandPath & aCommandPath, ClusterStatus aClusterStatus) diff --git a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp index 51a9977977a042..fcd0dfa1353516 100644 --- a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp +++ b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp @@ -450,7 +450,6 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( Credentials::GroupDataProvider * provider = nullptr; const FabricInfo * fabric = nullptr; - // Flight-check fabric scoping. if (!GetProviderAndFabric(commandObj, commandPath, &provider, &fabric)) { // Command will already have status populated from validation. @@ -555,7 +554,6 @@ bool emberAfGroupKeyManagementClusterKeySetReadCallback( Credentials::GroupDataProvider * provider = nullptr; const FabricInfo * fabric = nullptr; - // Flight-check fabric scoping. if (!GetProviderAndFabric(commandObj, commandPath, &provider, &fabric)) { // Command will already have status populated from validation. @@ -621,7 +619,6 @@ bool emberAfGroupKeyManagementClusterKeySetRemoveCallback( Credentials::GroupDataProvider * provider = nullptr; const FabricInfo * fabric = nullptr; - // Flight-check fabric scoping. if (!GetProviderAndFabric(commandObj, commandPath, &provider, &fabric)) { // Command will already have status populated from validation. @@ -694,7 +691,6 @@ bool emberAfGroupKeyManagementClusterKeySetReadAllIndicesCallback( Credentials::GroupDataProvider * provider = nullptr; const FabricInfo * fabric = nullptr; - // Flight-check fabric scoping. if (!GetProviderAndFabric(commandObj, commandPath, &provider, &fabric)) { // Command will already have status populated from validation. From 7353fd6cab156b2f5cf5ca432f005cf33312a1fe Mon Sep 17 00:00:00 2001 From: Matt Hazley Date: Thu, 10 Aug 2023 15:31:31 +0100 Subject: [PATCH 73/74] Remove .kvs file that I accidentally merged (#28624) --- examples/all-clusters-app/linux/.kvs | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 examples/all-clusters-app/linux/.kvs diff --git a/examples/all-clusters-app/linux/.kvs b/examples/all-clusters-app/linux/.kvs deleted file mode 100644 index 9976ff5b8b7caf..00000000000000 --- a/examples/all-clusters-app/linux/.kvs +++ /dev/null @@ -1,28 +0,0 @@ -[DEFAULT] -f/1/ac/0/0=FSQBBSQCAjYDBmm2AQAYNAQY -f/1/g=FSQBACQCACQDACQEACQFACQGASQHABg= -f/1/i=FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQTAhgkBwEkCAEwCUEE3KqJqpPwju/MeqShRDFpusi544wfWj6+gYRG/nor4oHRLfTRz4+zihd9ONWqQ9zwA/CQomn+sjmIvbcRYIYh2DcKNQEpARgkAmAwBBQPVaSOYFdX6pOarWj2mXieOQsSJzAFFGx6kZSTgFw3YQDgKHYjei851xbkGDALQPRuk4wx/ZAQXSmais4GD0JyZl9Jwxq1MM8TUdUQ1nCQ0Q/VuHZqy0pR9HxjgLUDPy2b4YFJIT1rIf8ZYHAeaCMY -f/1/k/0=FSQBACQCATYDFScEUAIAAOx/AAAlBVRMMAYQ7QtLfz7zOjEY6QUsagDDPRgVJAQAJAUAMAYQAAAAAAAAAAAAAAAAAAAAABgVJAQAJAUAMAYQAAAAAAAAAAAAAAAAAAAAABgYJQf//xg= -f/1/m=FSUA8f8sAQAY -f/1/n=FTABAQEkAgE3AyQTAhgmBIAigScmBYAlTTo3BiQVASYRIUM0EhgkBwEkCAEwCUEE7R7vwTlybDjtGBspWXkUMSnID4um6q91pa7EQdCSIioP+AgPAA3zqzXyYunmoZbVijM9UbzOUhvacYvA+2xanzcKNQEoARgkAgE2AwQCBAEYMAQUi5rGWgAt12jH/3fxeswo+bhw+YcwBRQPVaSOYFdX6pOarWj2mXieOQsSJxgwC0AtXja1zqi99vqxUOcDooFbR7g3dR6FHR/DjYJOy2QgtY0m1Krqo9Whb9A//TtnLTpsXj+DKnl4cBJ6Zb1WGdhrGA== -f/1/o=FSQAATABYQTtHu/BOXJsOO0YGylZeRQxKcgPi6bqr3WlrsRB0JIiKg/4CA8ADfOrNfJi6eahltWKMz1RvM5SG9pxi8D7bFqftpuGwM3zJ0gq/ZXqozNld3ZK32h4PWWNKTlq3zM9wUEY -f/1/r=FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQUARgkBwEkCAEwCUEECT5tju37pQzMYxhc2pumcwtyKq7elKv8mcWFxDqluOWVK6RJYxiytMv4NQA+JFg/rN8AVPzfz2txBhBJKEF0UDcKNQEpARgkAmAwBBRsepGUk4BcN2EA4Ch2I3ovOdcW5DAFFGx6kZSTgFw3YQDgKHYjei851xbkGDALQBPAPvpTcPaJ51tb6/5sPfKuU6QWe2ClszX+T9fCPL4ZSeJZq0ukzeGMqOgnlAh3MVzkugI2IKdO9e/lcAib04QY -f/1/s/000000000001B669=FTADEO0xJXt8dKE+RAjHrjhJCREwBCAkLjwW/9P1MAh7PKST7kCABWTyP5W6JnAccoRVc8JXPDAFDAAAAAAAAAAAAAAAABg= -g/a/0/2b/0=BWVuLVVT -g/a/1/102/7=Gw== -g/a/1/300/4001=Ag== -g/a/1/300/7=AAA= -g/a/1/8/0=/g== -g/fidx=FSQAAjYBBAEYGA== -g/gcc=E0Y8Aw== -g/gdc=PtW/BQ== -g/gfl=FSQBASQCARg= -g/im/ec=AAABAAAAAAA= -g/lkgt=FSYAgwxNLBg= -g/s/7TEle3x0oT5ECMeuOEkJEQ\x3d\x3d=FSQBASYCabYBABg= -g/sri=FhUkAQEmAmm2AQAYGA== -g/sum=MAA= -g/ts/tz=FhUgAAAkAQAsAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBg= -wifi-pass= -wifi-ssid= - From 95e3d94fb777c518c66736c69b733d36f286d892 Mon Sep 17 00:00:00 2001 From: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> Date: Thu, 10 Aug 2023 13:55:50 -0400 Subject: [PATCH 74/74] Update Silabs docker to pull latest gsdk (v4.3.1) (#28633) --- integrations/docker/images/base/chip-build/version | 2 +- .../docker/images/stage-2/chip-build-efr32/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index a3bb1d9c725371..ca7bc016f5ad62 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -7 : Fix TI sysconfig root in vscode image +8 : Update Silabs GSDK to v4.3.1 diff --git a/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile b/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile index 1946a0e6073717..619dcb870ba2b2 100644 --- a/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile @@ -17,8 +17,8 @@ RUN set -x \ && : # last line -#Clone Gecko SDK 4.2.0 (ef05eb6) -RUN git clone --depth=1 --branch=v4.2.3 https://github.com/SiliconLabs/gecko_sdk.git && \ +#Clone Gecko SDK 4.3.1 (2ba59bf) +RUN git clone --depth=1 --branch=v4.3.1 https://github.com/SiliconLabs/gecko_sdk.git && \ cd gecko_sdk && \ rm -rf .git \ && : # last line